Jump to content

Recommended Posts

Posted

Test it and find out. No time like the present. How long could it take you? Two minutes maybe (if that)?

  • 1 month later...
  • Replies 25
  • Created
  • Last Reply

Top Posters In This Topic

  • ReMark

    5

  • irneb

    4

  • issammesk

    4

  • marko_ribar

    2

Top Posters In This Topic

Posted Images

Posted
trimming.jpgbut i am looking like this, i have attached a file please check
Posted

CAB wrote a versatile routine that will help with this instance. It has the option to break at the intersections and then delete every other segment.

http://www.theswamp.org/index.php?topic=10370.0

 

 

This is a bundled function for Breaking Objects.

After writing the BreakAll function the rest was easy.

The following functions are a result.

 

c:BreakAll - Break all objects selected

c:BreakwObjects - Break many objects with a single object

c:BreakObject - Break a single object with many objects

c:BreakWith - Break selected objects with other selected objects

c:BreakTouching - Break objects touching the single Break object

c:BreakSelected - Break selected objects with any objects that touch it

c:MyBreak - Dialog with buttons to run three of the routines

c:BreakRemove - Break selected object with any objects that touch it & remove

every other new segment, start with selected object

Note: Color in picture not by lisp, but added for clairity.

  • 2 years later...
Posted

M.R....

This seems to be deleting or trimming anything outside the circle, not inside the circle?

Posted (edited)

pra3389 Here is a version.

 

; assoc version
(defun test ( / ss x c1)
(setq ss (ssget (list (cons 0 "Circle"))))
(repeat (setq x (sslength ss))
(setq c1 (entget (ssname ss (setq x (- x 1)))))
(setq cenpt (assoc 10 c1))
(setq cenpt (list (nth 1 cenpt)(nth 2 cenpt) (nth 3 cenpt)))
(command "trim" (cdr (assoc -1 c1)) "" cenpt "")
) ; repeat
) ;defun
(test)

;vl version
(defun test2 ( / ss x c1)
(setq ss (ssget (list (cons 0 "Circle"))))
(repeat (setq x (sslength ss))
(setq c1 (vlax-ename->vla-object (ssname ss (setq x (- x 1)))))
(setq cenpt (vlax-safearray->list (vlax-variant-value (vla-get-center c1))) )
(command "trim" (vlax-vla-object->ename c1) "" cenpt "")
) ; repeat
) ;defun
(test2)

Edited by BIGAL
Posted

Oldie...

 

(defun c:CIT (/ ss i e)
 ;; Trim Inside of selected Circles
 ;; Required subroutines: etrim (from Express Tool: EXTrim.LSP)
 ;; Alan J. Thomspon, 12.22.10 / 05.11.11
 (if (or etrim (load "extrim.lsp" nil))
   (if (setq ss (ssget '((0 . "CIRCLE"))))
     (repeat (setq i (sslength ss))
       (etrim (setq e (ssname ss (setq i (1- i)))) (trans (cdr (assoc 10 (entget e))) 0 1))
     )
   )
   (alert "Express Tool: EXTrim required!")
 )
 (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...