Jump to content
KARDOLITO89

polyline and fillet lisp

Recommended Posts

I found this on the web

 

 

(defun C:PLF ()
(princ "\nSpecify start point: ")
(command "._pline")
(while (= (getvar "cmdactive") 1)
(command pause)
(princ "\nNext point: ")
)
(command
"._fillet" "R" "12.0"
"._fillet" "P" (entlast))
(princ)
)

 

 

when executing it the polyline has a global whidth of 2.6956 and the radius automatically. There will be some way to be able to have the global whidth in 0 and request radio in each vertex. thank you very much for your attention.

Share this post


Link to post
Share on other sites
Posted (edited)

A possible simple way is to take the approach of using pline join, make a pline between 2 pts 1st, draw another line to 3rd point ask fillet radius and do just that fillet then pline join pline, arc, line and keep going. Going fishing now so maybe later but anyone else jump in. Back and just caught bait.

 

; pline with individual radius at each vertice
; By Alan H April 2018

(defun c:prad ( / )
(setq ss (ssadd))
(setq p1(getpoint "Pick 1st point"))
(setq p2 (getpoint p1 "pick second point"))
(command "line" p1 p2 "")
(setq obj1 (entlast))
(setq obj2 obj1)

(while
(setq p3 (getpoint p2 "pick next point"))
(setvar 'filletrad (getreal "Enter radius"))
(command "line" p2 p3 "")
(setq obj3 (entlast))
(command "fillet" obj2 obj3 )
(ssadd (entlast)ss)
(ssadd obj3 ss)
(setq p2 p3)
(setq obj2 obj3)
)

(command "pedit" obj1  "Y" "J" )
(repeat (setq x (sslength ss))
(command (ssname ss (setq x(- x 1))))
)
(command "" "")
(princ)
)
(c:prad)

Edited by BIGAL

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×