rpsalvi Posted Thursday at 11:35 AM Share Posted Thursday at 11:35 AM Quote Link to comment Share on other sites More sharing options...
SLW210 Posted Thursday at 02:27 PM Share Posted Thursday at 02:27 PM https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/fillet-multiple-polyline-all-at-once-by-lisp/td-p/6473119 Set the Fillet Radius to 0 Newer AutoCAD can use Multiple option. https://www.autodesk.com/support/technical/article/caas/sfdcarticles/sfdcarticles/FILLET-and-CHAMFER-multiple-sets-of-lines.html Maybe something here works for you. 1 Quote Link to comment Share on other sites More sharing options...
BIGAL Posted Thursday at 11:19 PM Share Posted Thursday at 11:19 PM Try this written like 30 years ago. ; Fillets multi lines in one go ;By Alan H (defun AH:Fmulti ( / ss fpts num num2 x y) (alert "pick outside-inside-outside") (setq fpts '()) (setq fpts (cons (getpoint "Pick outside")fpts)) (setq fpts (cons (getpoint "Pick inside") fpts)) (setq fpts (cons (getpoint "Pick outside") fpts)) (setq ss (ssget "F" fpts (list (cons 0 "LINE")))) (setq num (sslength ss)) (setq num2 (/ num 2.0)) (if (= (- (fix num2) num2) 0.5) (progn (Alert "you have an odd number of lines please check") (exit) ) ) (setq x 0) (setq y (- num 1)) (setvar "filletrad" 0.0) (repeat (fix num2) ; not a real (setq obj1 (ssname ss x)) (setq obj2 (ssname ss y)) (command "fillet" obj1 obj2) (setq x (+ x 1)) (setq y (- y 1)) ) ) ; defun (AH:fmulti) 1 Quote Link to comment Share on other sites More sharing options...
rpsalvi Posted Friday at 06:06 AM Author Share Posted Friday at 06:06 AM i tried this but it is not working Quote Link to comment Share on other sites More sharing options...
Nikon Posted Friday at 06:43 AM Share Posted Friday at 06:43 AM (edited) 42 minutes ago, rpsalvi said: i tried this but it is not working Works only with lines. Polylines are not supported. If the AutoCAD version is localized, then (command "_fillet" obj1 obj2) and (setq ss (ssget "_F" fpts (list (cons 0 "LINE")))) ; Fillets multi lines in one go ;By Alan H (defun AH:Fmulti ( / ss fpts num num2 x y) (alert "pick outside-inside-outside") (setq fpts '()) (setq fpts (cons (getpoint "Pick outside")fpts)) (setq fpts (cons (getpoint "Pick inside") fpts)) (setq fpts (cons (getpoint "Pick outside") fpts)) (setq ss (ssget "_F" fpts (list (cons 0 "LINE")))) (setq num (sslength ss)) (setq num2 (/ num 2.0)) (if (= (- (fix num2) num2) 0.5) (progn (Alert "you have an odd number of lines please check") (exit) ) ) (setq x 0) (setq y (- num 1)) (setvar "filletrad" 0.0) (repeat (fix num2) ; not a real (setq obj1 (ssname ss x)) (setq obj2 (ssname ss y)) (command "_fillet" obj1 obj2) (setq x (+ x 1)) (setq y (- y 1)) ) ) ; defun (AH:fmulti1) Edited Friday at 06:50 AM by Nikon 1 Quote Link to comment Share on other sites More sharing options...
EnM4st3r Posted Friday at 06:44 AM Share Posted Friday at 06:44 AM (edited) i also tried it, it is working. You just need to adjust it a little to your needs. If your autocad language is not english, you need to add an underscore for the ssget "F" so "_F" and for the filet command. Also you would need to change the ssget filter to use lwpolylines instead of lines and add a pedit command to actually join them after the fillet. Edit: ok its not working with lwpolyline tough i dont get why Edited Friday at 07:11 AM by EnM4st3r Quote Link to comment Share on other sites More sharing options...
pkenewell Posted Friday at 06:35 PM Share Posted Friday at 06:35 PM (edited) 12 hours ago, EnM4st3r said: i also tried it, it is working. You just need to adjust it a little to your needs. If your autocad language is not english, you need to add an underscore for the ssget "F" so "_F" and for the filet command. Also you would need to change the ssget filter to use lwpolylines instead of lines and add a pedit command to actually join them after the fillet. Edit: ok its not working with lwpolyline tough i dont get why This has been a long time problem in calling the FILLET command within AutoLISP (Google it - there is allot of forum posts out there). When typing in the FILLET at the command line in AutoCAD, it works with Polylines, but it doesn't work when called inside a (command) statement. As far as I can tell, noone has provided a solution, other than using direct object manipulation (via ENTMOD or with VLA; joining and setting bulges). EDIT: NOTE - it will work for me if the Polylines are 2 separate objects, but if they are already connected into a single object at the corner, it won't work. Edited Friday at 07:35 PM by pkenewell Quote Link to comment Share on other sites More sharing options...
BIGAL Posted Friday at 11:00 PM Share Posted Friday at 11:00 PM I will have another look at it using *LINE will detect plines but did find another problem on a certain pattern of linework. Updated. ; Fillets multi lines in one go ;By Alan H (defun AH:Fmulti ( / ss fpts num num2 x y) (alert "pick outside-inside-outside") (setq fpts '()) (setq pt1 (getpoint "Pick outside ")) (setq fpts (cons pt1 fpts)) (setq pt1 (getpoint pt1 "Pick inside ")) (setq fpts (cons pt1 fpts)) (setq fpts (cons (getpoint pt1 "Pick outside ") fpts)) (setq ss (ssget "F" fpts (list (cons 0 "*LINE")))) (princ (sslength ss)) (setq num (sslength ss)) (setq num2 (/ num 2.0)) (if (= (- (fix num2) num2) 0.5) (progn (Alert "you have an odd number of lines please check") (exit) ) ) (setq x 0) (setq y (- num 1)) (setvar "filletrad" 0.0) (repeat (fix num2) ; not a real (setq obj1 (ssname ss x)) (setq obj2 (ssname ss y)) (command "fillet" obj1 obj2) (setq x (+ x 1)) (setq y (- y 1)) ) ) ; defun (AH:fmulti) Will improve a bit more. Quote Link to comment Share on other sites More sharing options...
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.