Guys,
Does anyone have a routine that will allow the user to set a radius and then start drawing polylines and all angles will be filletted to that radius ?
Stephen
Printable View
Guys,
Does anyone have a routine that will allow the user to set a radius and then start drawing polylines and all angles will be filletted to that radius ?
Stephen
Hi Stephen,
Take a look at FILLETRAD system variable
in the Help file
Thank you Fixo for tour reply.
It isn't correct though something like this ?
Code:(defun c:Fpline (/ pl)
(command "-layer" "m" "-M-DUCT"
"C" "4" "-M-DUCT"
"Lt" "CONTINUOUS" "-M-DUCT"
""
)
(princ "Use ESC to exit loop")
(setvar "plinewid" 100)
(setvar "filletrad" 600)
(while (not
(vl-catch-all-error-p
(vl-catch-all-apply
(function
(lambda ()
(progn
(command "_pline")
(setq pl (entlast))
(command "_.fillet" "p" pl)
(while (= (getvar "cmdactive") 1) (command pause))
)
)
)
)
)
)
)
(setvar "plinewid" 0)
(setvar "filletrad" 0)
(if (= (getvar "errno") 2)
(princ "Interrupted by user")
)
(princ)
)
You can play with this LINK to make a polyline with radius and more.
: ) Happy Computing !
kennet
Try this instead, seems to working
with my version (A2007)
Code:(defun c:Fpline (/ pl)
(command "-layer" "m" "-M-DUCT"
"C" "4" "-M-DUCT"
"Lt" "CONTINUOUS" "-M-DUCT"
""
)
(princ "Use ESC to exit loop")
(setvar "plinewid" 100)
(setvar "filletrad" 600)
(while (not
(vl-catch-all-error-p
(vl-catch-all-apply
(function
(lambda ()
(progn
(command "_pline")
;(setq pl (entlast))
;(command "_.fillet" "p" pl)
(while (= (getvar "cmdactive") 1) (command pause))
)
)
)
)
)
)
(command "fillet" "P" "L")
)
;;;)
(setvar "plinewid" 0)
(setvar "filletrad" 0)
(if (= (getvar "errno") 2)
(princ "Interrupted by user")
)
(princ)
)
Kennet,
Thank you, I will look further at the thread and see what's on offer.
Fixo,
Thank you also, that is perfect.
Stephen
You are welcome, Stephen
Happy coding :)
Fixo,
I iwsh to add a block at the start of the flex (polyline). Can you assist me by directing me to resolve these issues ?
To add the block I need to place the block on the starting point of the polyline. I then need to start the polyline 200mm forward of the inital starting point. What do i need to look at to determine the starting point of the polyline. Ialso need to work out the direction the polyline is going from the first to second point ?
Stephen