Jump to content

Move all circles to inside polyline


RepCad

Recommended Posts

Glad I could help. I tried to calculate the point, but I was a bit brain dead, and the number of conditions kept growing; so it was easier to use the ray and find the closest intersection point.

  • Like 1
Link to comment
Share on other sites

hi  dlanorh

 

Allow me to

 

An idea for  Lisp who wrote it

 

use

function to check if a polyline is counter clockwise

After the line

(setq   c_pt (vlax-curve-getclosestpointto obj i_pt))

 

And

 (setq angP (angle '(0.0 0.0 0.0) (vlax-curve-getfirstderiv obj (vlax-curve-getparamatpoint obj c_pt))))
                 
;;;                 (setq   ang (angle i_pt c_pt))
                  (setq c_pttt (polar c_pt (+ angP (/ pi 2.)) dst))
                  (entmake (list (cons 0 "CIRCLE") ;*** 
               (cons 6 "BYLAYER") 
               (cons 8 "0") 
               (cons 10 c_pttt) ;*** 
               (cons 39 0.0) 
               (cons 40 10) ; radius
               (cons 62 256) 
               (cons 210 (list 0.0 0.0 1.0)))) 

 

Then delete the circle
Please accept my suggestion

 

 

 

 

 

Edited by hosneyalaa
  • Like 1
Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...