BIGAL Posted August 16, 2011 Posted August 16, 2011 After completing a car park project realised how many times I filleted the kerb returns which are made up of either two or 3 lines so I wrote a multi line fillet option that use a single known radius and then calculates the other line offsets to work out the parallel radius. this may exist already but may be usefull to some one. Please feel to modify and post new versions here. Its pretty self explanatory pick 3 pts outside centre outside ;;;--------------------------------------------------------------------------- ;;; ;;; autokerb rad.LSP Version 1.0 ;;; by Alan H ;;; 1 Aug 2011 ;;; uses fillet given inside radius for any number of lines ;;; ;;;--------------------------------------------------------------------------- (defun C:krad (/ CM EN EN2 NUM OLDSNAP PT1 PT2 PT3 RAD SS1 SS2 TP1 TP2 ANS NUM2 PT4 X Y) (vl-load-com) (setq cm (getvar "cmdecho")) (setvar "cmdecho" 1) (setq oldsnap (getvar "osmode")) (setvar "osmode" 0) (setq pt1 (getpoint "\nPick outside first kerb :")) (setq pt2 (getpoint Pt1 "\nPick centre pt :")) (setq pt3 (getpoint pt2 "\nPick outside second kerb :")) (setq rad (getreal "\nEnter radius :")) (setq ss1 (ssget "F" (list pt1 pt2))) (setq ss2 (ssget "F" (list pt3 pt2))) (setq num (sslength ss1)) (setq num2 (sslength ss2)) (if (/= num num2) (progn (princ "\nYou have unequal number of lines ") (Setq ans (getstring "\Press any key when ready and try again")) (exit) ) ) (repeat num (setq en (ssname ss1 0)) (setq en2 (ssname ss2 0)) (setq tp1 (cons (vlax-curve-getClosestPointTo en pt2) tp1)) (setq tp2 (cons (vlax-curve-getClosestPointTo en2 pt2) tp2)) (ssdel en ss1) ; Delete each measured entity from set (ssdel en2 ss2) ; Delete each measured entity from set ) ; end repeat (reverse tp2) (setq pt1 (nth 0 tp1)) (setq pt2 (nth 0 tp2)) (setvar "filletrad" rad) (command "fillet" pt1 pt2) (setq num (- num 1)) (setq x 0) (repeat num (setq pt1d (nth x tp1)) (setq pt2d (nth (+ x 1) tp1)) (setq rad (+ rad (distance pt1d pt2d))) ; add distance between to rad (setvar "filletrad" rad) (setq pt1 (nth (+ x 1) tp1)) (setq pt2 (nth (+ x 1) tp2)) (command "fillet" pt1 pt2) (setq x (+ x 1)) ) ; end repeat (setvar "CMDECHO" cm) (setvar "osmode" oldsnap) ) (princ) Maybe a full VL version ? Quote
3dwannab Posted June 7, 2023 Posted June 7, 2023 Hi @BIGAL, I'm having trouble getting this to work. I'm on 2024 ACAD. See GIF of what I'm doing. Quote
BIGAL Posted June 7, 2023 Author Posted June 7, 2023 I will redo the code probably look at date 2011. It should be a drag over lines then fillet say based on 1st drag line then could have a Kerb&tray blending to a barrier kerb as an extra option. Possibly later today. 1 Quote
3dwannab Posted June 8, 2023 Posted June 8, 2023 (edited) Is that a variation where all the fillets are the same? Still looks cool. Edit: Think I have this and forgot about it. Edited June 8, 2023 by 3dwannab Quote
3dwannab Posted June 11, 2023 Posted June 11, 2023 Is the rad.lsp not different? That's the one I was having issues with. Quote
Tharwat Posted June 11, 2023 Posted June 11, 2023 I don't use other's codes and I just write mine from A to Z, so my program would fillet connected line object types with fixed radii entered by a user. Quote
3dwannab Posted June 11, 2023 Posted June 11, 2023 (edited) My bad. @BIGAL is the author. EDIT: Is the program released publicly? Edited June 11, 2023 by 3dwannab Quote
Steven P Posted June 11, 2023 Posted June 11, 2023 On 6/8/2023 at 8:32 PM, Tharwat said: Yes, all fillets are with the same radius. However in this case the radii should change to match real world kerb designs I think. Quote
BIGAL Posted June 11, 2023 Author Posted June 11, 2023 2 versions required, Tharwat fixed radius version and a changing radius based on line spacing changing radius as going outwards or inwards. Quote
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.