Jump to content

Combining Two Commands - Explode and Fillet


Recommended Posts

Posted

How hard is it to create a routine that when the user selects objects during the fillet command that it explodes them first?

 

 

I can not fillet with radius with straight polylines and exploded arcs. If both are exploded. I can fillet them with a radius.

 

 

I hope this is somewhat doing about... This will save a lot of extra exploding! lol.

 

Thank you again.

Posted

"during" the ***** command is a problem, you could first pick two objects and then "batch fillet" them (I hope I explained correctly).

 

I attempted to write some solution, but failed - atleast ended up with some "handy" subfunction:

 

; _$ (_PickSegment "\nPick something: ") -> (<Entity name: 8998e85ce0> (297752.0 -203065.0 0.0))
; Returns the 'entsel' result from the picked Line/Arc or if Polyline, list of: (<PickedSegment [As Line Or Arc] Ename> <PickedPoint>)
(defun _PickSegment ( msg / pick e typ newpick Exploded o r ) (setvar 'errno 0)
 (while (/= 52 (getvar 'errno)) (setq pick (entsel msg)) 
   (cond 
     ( (= 7 (getvar 'errno)) (setvar 'errno 0) ) ( (not (setq e (car pick))) )
     ( (wcmatch (setq typ (cdr (assoc 0 (entget e)))) "*POLYLINE")
       (setq newpick ; We've just exploded the POLYLINE, now find the associated entity segment from the 'Exploded' list, by temporarily erasing any overlapping entities
         (
           (lambda ( p L / s tmp r dL )
             (while (and (not s) (setq tmp (car (nentselp p))))
               (or 
                 (and (setq r (cdr (assoc (cdr (assoc 5 (entget tmp))) L))) (setq s T))
                 (and (setq dL (cons tmp dL)) (entdel tmp))
               )
             )
             (if dL (mapcar 'entdel dL)) (if r (list r p))
           )
           (cadr pick) (setq Exploded (mapcar '(lambda (x) (cons (vlax-get x 'Handle) (vlax-vla-object->ename x))) (vlax-invoke (setq o (vlax-ename->vla-object e)) 'Explode)))
         )
       )
       (mapcar 'entdel (mapcar 'cdr Exploded)) ; Erase every generated object from the 'Explode' method
       (entdel (car newpick)) ; UnErase the segment entity
       (setq r newpick) (setvar 'errno 52)
     )
     ( (member typ '("LINE" "ARC")) (setq r pick) (setvar 'errno 52) )
   )
 )
 r
); defun _PickSegment

 

Might help the guys who attempt something here..

BTW I think that there are solution(s) for your problem (perhaps search more carefully?)

Posted

mstg007 you need to post a image or dwg showing what your trying to do you may not need a explode.

Posted

Hopefully this will help. The Red line is a "line". If I explode everything. It works. That's why I was wondering if there was a possibility of a routine that would work with these situations.

Capture.jpg

Posted

You are so correct. Thank you for the cross post.

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