Jump to content

Like a text mask, can LISP it the same in circle? if yes, how?


Recommended Posts

Posted (edited)

attachment.php?attachmentid=34005&d=1333365908

 

Hello guys, can someone make this for me?

Let's say I start with what is shown in circle #1. What I want the results of this custom lisp routine to look like Circle # 2 after it is run but not cutting any lines inside it but just masking it and putting circle in another layer.

 

Thanks.

Edited by Ahmeds
Posted

Thanks for the recommendation nod :thumbsup:

The program is also available on my site since you may need membership to view that area of TheSwamp.

Posted

I already tried the Circular Wipeout found from TheSwamp, and I am using it now instead of the one in Lee's site..

Lee, I run the routine and it is so useful to me but with some modification makes a lot better if that Circular Wipeout could work not only in one selected circle but all circles within the layer.. how could it be?

Posted

... but with some modification makes a lot better if that Circular Wipeout could work not only in one selected circle but all circles within the layer.. how could it be?

 

Try this code and let me know how things are going on with you . :)

 

(defun c:Test (/ *error* ss i sn st le di lst e)
;;;   Tharwat 31. jan. 2013    ;;;
;;;     Wipeout circles        ;;;
 (vl-load-com)
 (defun *error* (x)
   (if cm
     (setvar 'cmdecho cm)
   )
   (princ "\n *Cancel*")
 )
 (or Doc (setq Doc (vla-get-ActiveDocument (vlax-get-acad-object))))
 (if (progn (print "Select Circles to Wipeout ...")
       (setq ss (ssget "_:L" '((0 . "CIRCLE")))))
   (progn (setq cm (getvar 'cmdecho))
          (setvar 'cmdecho 0)
          (vla-StartUndoMark Doc)
          (repeat (setq i (sslength ss))
            (setq sn  (ssname ss (setq i (1- i)))
                  st  (vlax-curve-getstartpoint sn)
                  le  (/ (* pi (* (cdr (assoc 40 (entget sn))) 2.)) 50.)
                  di  le
                  lst nil
            )
            (repeat 50 (setq lst (cons (vlax-curve-getpointatdist sn di) lst)) (setq di (+ di le)))
            (setq e (entmakex (append (list '(0 . "LWPOLYLINE")
                                            '(100 . "AcDbEntity")
                                            '(100 . "AcDbPolyline")
                                            (cons 90 (length lst))
                                            '(70 . 1)
                                      )
                                      (mapcar '(lambda (p) (cons 10 (list (car p) (cadr p)))) lst)
                              )
                    )
            )
            (command "_.wipeout" "_p" e "y")
            (entdel sn)
          )
          (setvar 'cmdecho cm)
          (vla-EndUndomark Doc)
   )
 )
 (princ "\n Written by Tharwat Al Shoufi")
 (princ)
)

Posted

I have now updated my Circular Wipeout program to include a new command, c2wipe, to allow the user to convert existing circles to circular wipeouts, whilst retaining all original properties (such as Layer, Linetype, Lineweight etc.) of the existing circles.

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