Can you modify this LISP to chamfer instead of fillet?

Can you modify this LISP to chamfer instead of fillet?

masumiNYMDW
Enthusiast Enthusiast
484 Views
4 Replies
Message 1 of 5

Can you modify this LISP to chamfer instead of fillet?

masumiNYMDW
Enthusiast
Enthusiast

I'd like to make this LISP to chamfer @100, 100 distance as I draw a polyline.

I think we can use the LISP below to add the necessary modifications.

Probably we can register the new LISP as PLC?

I'd appreciate it if someone could take a look at it because I'm very new to LISP.

 

(defun C:PLF ()
(command "_PLINE")
(while (= 1 (getvar "cmdactive"))
(command pause))
(command "._FILLET" "P" "R" 100 "L")
(princ)
)

0 Likes
Accepted solutions (1)
485 Views
4 Replies
Replies (4)
Message 2 of 5

LDShaw
Collaborator
Collaborator
Accepted solution

Works like the one you posted.

(defun C:PLC ()
(command "_PLINE")
(while (= 1 (getvar "cmdactive"))
(command pause)
)

(command "._CHAMFER" "D" "100" "100")
(setq pline (entlast)) ;; Get the last created polyline
(command "._CHAMFER" "P" pline "")
(princ)
)

0 Likes
Message 3 of 5

Kent1Cooper
Consultant
Consultant

@masumiNYMDW wrote:

I'd like to make this LISP to chamfer @100, 100 distance as I draw a polyline.

....


Do you mean to Chamfer every corner as you go along?  [The suggestion made already does it after the Polyline is drawn with as-yet-un-Chamfered corners.]

 

For Filleting, I wrote PlineFilletAlong.lsp, >here<, that does the Filleting of each corner as you go along.  I imagine it could be modified to Chamfer instead, if that's what you're looking for.

Kent Cooper, AIA
Message 4 of 5

masumiNYMDW
Enthusiast
Enthusiast

Love it! Thanks!

0 Likes
Message 5 of 5

masumiNYMDW
Enthusiast
Enthusiast

You are right. "After finishing writing a polyline by pressing enter" was a more accurate request. Thank you!

0 Likes