Jump to content

Recommended Posts

Posted

hello i have many circle and i must trim inside them i need a lisp to do that quickly with lisp

Posted
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.

  • Like 1
Posted

Would this be a good starting point? It trims a single polyline however could be modified I think for many objects inside a circle

 

 

  • Like 1
Posted

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)
)

 

 

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...