land Posted January 10, 2023 Posted January 10, 2023 hello i have many circle and i must trim inside them i need a lisp to do that quickly with lisp Quote
ronjonp Posted January 10, 2023 Posted January 10, 2023 8 hours ago, land said: hello i have many circle and i must trim inside them i need a lisp to do that quickly with lisp If it's for graphics, make that circle a block and create a mask with a hatch that is color 255,255,255. 1 Quote
Steven P Posted January 10, 2023 Posted January 10, 2023 Would this be a good starting point? It trims a single polyline however could be modified I think for many objects inside a circle 1 Quote
mhupp Posted January 10, 2023 Posted January 10, 2023 Made this a couple of weeks ago. https://www.cadtutor.net/forum/topic/76515-trim-inside-selected-rectangles/ should also work with circles. Quote
land Posted January 14, 2023 Author Posted January 14, 2023 thank you thast from you and work good Quote (defun C:CC (/ coords ent rad e t1) (defun MTR (e t1 p / l c) (command "TRIM" e "") (command (list t1 p)) (command "") ) (setq rad (getreal"\nEnter radius: ")) (while (setq ent (car (entsel "\nSelect polyline (or press Enter to Exit) >> "))) (setq t1 ent) (setq coords (vl-remove-if 'not (mapcar (function (lambda(p) (if (= 10 (car p))(cdr p)) )) (entget ent) ) ; end mapcar )) ; end setq, vl-remove-if (setq coords (reverse coords)) (foreach pt coords (command "_circle" "_non" pt rad) (setq e nil) (setq e (entlast)) (setq p (assoc 10 (entget e))) (setq p (list (cadr p) (caddr p) (cadddr p))) (command "TRIM" e "") (command (list t1 p)) (command "") ) ; end foreach ) ; end while (princ) ) 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.