Small Fish Posted December 6, 2010 Posted December 6, 2010 My code below inserts blocks on all vertices of a closed pline. How can I modify it so that blocks are inserted only if the internal angle is 180 degrees or less? thanks (setq ent (car (entsel "\nSelect closed polyline: "))) e2 (entget e4)) len (length e2)) n 0) );setq (repeat len (setq e1 (car (nth n e2))) (if (= e1 10) (command "_.INSERT" "myblock" (cdr (nth n e2)) 1 "" 0) );if (setq n (1+ n)) );repeat Quote
David Bethel Posted December 7, 2010 Posted December 7, 2010 I don't think I quite understand the wording. A closed polyline will be either CW or CCW. In an internal angle, are you referring to the delta of 2 adjacent segments? The XY Plane angle of a given segment? I believe that you will have to extract the point list in order to compare the angles. -David Quote
Small Fish Posted December 7, 2010 Author Posted December 7, 2010 David yes you are correct thinking about it. I thought I might be able to use the code I had to start with, but I as you say I need a points list to compare xy planes of a given segment. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.