wind_skin
Guest
Hello, I ask you experts if there is a lisp (with .lsp extension) that can determine whether a closed polyline has been drawn clockwise or anti-clockwise.
Thank you in advance.
Thank you in advance.
and what should be the problem? are free, they are not heavy.. .the purpose was to solve everything without installing additional libraries. It happened to me again to propose doslib to solve another problem. the interlocutor has categorically refused. . .
confutatis, I just tried to load the lisp you kindly attached, but it gives me the following error in loading phase "; error: incorrect list in the input".This is a program I created time ago to check whether the polyline is clockwise or anti-clockwise. Please note that if the polyline is created with the _bpoly command is always anti-clockwise. if you are interested I also have the program to reverse the sense of polylinea (created to use it on autocad versions that did not have the reverse option of the editpl command).
My dear leemax, these are the side effects of the "third age". :biggrin:I forget. . .
thanks confutatis, your program works egregiously with all the types of polylinea that I had the opportunity to try, except those closed composed only by a circle arc and a segment (it is not because).once so much that I remember the (vl-load-com), I forget the brackets, bah...
I agree with you: it takes at least three vertices. the third summit (the missing one) could be the average point of the circle arc.with only two vertices how do you understand the clock or anti-clockwise? I thought the least was three...
I was inspired and created this: in all two-sided polylines and one of the two sides is a circle arc, on the same a third summit is inserted on the average point.the third summit (the missing one) could be the average point of the circle arc.
hi confutatis, I tried the program you wrote, but I didn't get the desired result (I don't know where I'm wrong). I attach a file containing an example of closed polylinea composed of a circle arc and a segment: If you have time (I don't want to take advantage of your kindness), take a look.I was inspired and created this: in all two-sided polylines and one of the two sides is a circle arc, on the same a third summit is inserted on the average point.
all this by exploiting the powerful vlisp functions of entity management.