Jump to content

Insert circles at each corner/intersection. Need help.


general marko

Recommended Posts

can someone help me with a lisp routine that inserts circles at every intersection of a polyline/series of line including its endpoint. thank you very much in advance. :)

Link to comment
Share on other sites

:)........

 

 

@pBe: A lisp routine sir that will ask for the diameter.

@Lee Mac: The link was good sir but it's not just what i meant. Im going to post a picture, I can't really explain it. (sorry :) ) Thanks in advance my masters.

 

The figure below is a polyline. Is it possible to have a lisp routine that will insert circles at each corner of the polygon (formed by a closed polyline) upon clicking it?

help man.png

Link to comment
Share on other sites

@pBe: A lisp routine sir that will ask for the diameter.

@Lee Mac: The link was good sir but it's not just what i meant. Sorry, im not really good in explaining.

 

I hope this explanation will do. A lisp routine that will insert circles at each corner (intersections and endpoints) of a polygon (formed by a closed polyline/or closed line) upon selecting that closed polyline/ or those lines. Thanks in advance my masters.

Link to comment
Share on other sites

Thanks for the help and support mr Lee and mr pBe. But i think you don't get what i mean (sorry, im not good at explaining). I'll attach a picture so I can explain it further. thanks :)

Link to comment
Share on other sites

The picture attached herewith is a closed polyline. The lisp routine that I need is that when you click that polyline/or closed polyline, it will insert circles at its intersections and endpoints. The diameter of the circle would depend on the user, so the routine will ask for its diameter/radius. Also if possible, it is applicable to lines. can you help me with this master Lee and master pBe? Thank you so much again. w3hh4vmz5

help_man.jpg

Link to comment
Share on other sites

Another way this code returns all the co-ords of a pline so you can then add your circle see last line in code.

 

Code removed see next page for final version

Edited by BIGAL
Link to comment
Share on other sites

so this is the picture of what will the lisp routine will do. By selecting a closed polyline, the lisp will insert circles at its intersection including its end points. The user will define the diameter/radius of the circle. I also hope that this will be applicable to lines or series of lines. Thanks once again :)

help man.png

Link to comment
Share on other sites

Wow on line try this it is not tested no cad at moment

 


;original code by Jow Burke Autodesk forum
(defun c:circonpline ( / Y ptlist nlist pt rad)
(defun massoc (key alist / x nlist)
(foreach x alist
(if (eq key (car x))
(setq nlist (cons (cdr x) nlist))
)
)
(reverse nlist)
) ;end
(setq ptlist (massoc 10 (entget(car(entsel "pick pline")))))
(setq rad (getreal "\nEnter radius"))
(setq len (length ptlist))
(setq Y 0)

(repeat len
(setq pt (nth Y ptlist))
(Command "circle" pt Rad)
(setq Y (+ Y 1))
)
)
(c:circonpline)

Edited by BIGAL
Link to comment
Share on other sites

Thanks mr BIGAL, but im confused, should I combine the first and second code you posted? Don't know the final code. sorry, just started learning. :(

Link to comment
Share on other sites

yah, thanks BIGAL, the code worked. But can I ask you one more favor, I want that the lisp will function after typing in the commandline the command "circonpline". The thing is, when I load this lisp routine, it will automatically run the lisp routine. Can you help me again with this? Thanks again sir BIGAL. :)

Link to comment
Share on other sites

mr BIGAL, I've already edited the lisp for what I want. Luckily I got it. Thanks again for the code. :D

 

regards

marko

Link to comment
Share on other sites

We do something similar but in one go over multiple plines, this can be added pretty easy so only need 1 run let me know or have a go yourself using SSGET

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...