.NET

Reply
Valued Mentor
gasty1001
Posts: 437
Registered: ‎04-11-2010
Message 11 of 14 (197 Views)

Re: How to know the orientation of a polyline

02-25-2013 03:07 PM in reply to: _gile

Hi,

 

Nice code Gilles, just want to say that if performance is important, you don't need to divide by 2 the area, just the sign matters for the test, may be I'm wrong, but I think the same apply for arcs, it doesn't matter the area of them just the start and end point order.

 

Gaston Nunez

*Expert Elite*
_gile
Posts: 2,069
Registered: ‎04-29-2006
Message 12 of 14 (190 Views)

Re: How to know the orientation of a polyline

02-25-2013 09:51 PM in reply to: gasty1001

Thanks Gaston,

 

I know that, but as these extension methods may be reusable, I prefered let them return the right area.

About performance issue, I think (without testing) this won't be sensible until you're looping through many polylines having a great number of vertices...

Gilles Chanteau
Moderator
Alexander.Rivilis
Posts: 1,388
Registered: ‎04-09-2008
Message 13 of 14 (187 Views)

Re: How to know the orientation of a polyline

02-25-2013 10:35 PM in reply to: gasty1001

gasty1001 wrote:
...but I think the same apply for arcs, it doesn't matter the area of them just the start and end point order...

Are you sure? :smileywink:

26-02-2013 8-29-15.png


Пожалуйста не забывайте про Утвердить в качестве решения! Утвердить в качестве решения и Give Kudos!Баллы
Please remember to Accept Solution! Accept as Solution and Give Kudos!Kudos

Valued Mentor
gasty1001
Posts: 437
Registered: ‎04-11-2010
Message 14 of 14 (180 Views)

Re: How to know the orientation of a polyline

02-26-2013 05:08 AM in reply to: Alexander.Rivilis

Hi Alexander,

 

No, I was not sure, that's why I started with: "may be I'm wrong". Thanks for the counterexample.

 

Gaston Nunez

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community