Community
AutoCAD Forum
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Multiple mirroring lines

8 REPLIES 8
SOLVED
Reply
Message 1 of 9
jsindler
1717 Views, 8 Replies

Multiple mirroring lines

Hey all,

I'm looking for a command, or a way to make a command, that would alow me to pick multiple mirroring lines.  What I DO NOT want is to mirror multiple lines. That's easy! No, what I need is far more complex (I think).

 

I want to be able to select multiple lines that would act as the mirroring line. It would be best if I could select a line I wanted to be mirrored mutiple times, and then be able to pick the multiple lines that would do the mirroring.

 

So, I'd like to be able to select the green line in the attached file "mult1" and then be able to select the multiple red mirroring lines in a single comand and end up with what is pictured in "mult2", with out needing to use the regular mirror comand each time.

 

This would really help me speed up a project I'm working on.

 

Thanks for any help and wisdom!

8 REPLIES 8
Message 2 of 9
nestly2
in reply to: jsindler

Welcome to the Autodesk forums.

 

There isn't any such capability built into the MIRROR command, as what you've described isn't really MIRRORing.  In the scenario you've demonstrated, I would suggest Mirroring the first two, then using COPY or ARRAY

 

Array-Copy.gif

Message 3 of 9
jsindler
in reply to: nestly2

I should have been more explicate. I would like to easily beable to mirror in cases like "mult3" and "mult4" as well.

 

In both of these drawings the green lines are being mirrored whenever they intersect a red line.

 

Thanks for the response!

Message 4 of 9
jsindler
in reply to: nestly2

Also thanks for the welcome!

 

Is there anyway I could make a command? use a plugin or something? I've read some stuff about macros and scripts, but haven't had much luck trying to actually use them. Are there some macro or script wizards around that might be able to give me a hand?

Tags (2)
Message 5 of 9
nestly2
in reply to: jsindler

OK, think I have a better understanding now.  I'm still somewhat skeptical that what you initially suggested could work because the mirror point is where ever the previously mirrored intersects the next line.  Something like LeeMac's QuickMirror lisp would significantly speed up the process, but would still require a pick/click on each object.

 

QM.gif

 

You should probably ask on the Customization forum, as those guys can do some pretty amazing things with AutoLISP.

 

 

Message 6 of 9
jsindler
in reply to: nestly2

Thank you so much. It looks like this will already be a huge boon. I'll definitely check with the people in the customization forums!

Message 7 of 9
Lee_Mac
in reply to: jsindler

@nestly,

Many thanks for the recommendation for my program - I appreciate it! Smiley Happy

 

@jsindler,

Please try the following program - the command is mmirror

 

(defun c:mmirror ( / axs ent idx lst obj sel )
    (if
        (and
            (princ "\nSelect line to be mirrored: ")
            (setq ent (ssget "_+.:E:S:L" '((0 . "LINE"))))
            (princ "\nSelect mirror axis lines: ")
            (setq sel (ssget "_:L"       '((0 . "LINE"))))
            (setq ent (ssname ent 0)
                  obj (vlax-ename->vla-object ent)
            )
        )
        (progn
            (ssdel ent sel)
            (repeat (setq idx (sslength sel))
                (setq lst (cons (vlax-ename->vla-object (ssname sel (setq idx (1- idx)))) lst))
            )
            (while
                (vl-some
                   '(lambda ( x )
                        (if (vlax-invoke obj 'intersectwith x acextendnone)
                            (setq axs x)
                        )
                    )
                    lst
                )
                (setq obj (vla-mirror obj (vla-get-startpoint axs) (vla-get-endpoint axs))
                      lst (vl-remove axs lst)
                )
            )
        )
    )
    (princ)
)
(vl-load-com) (princ)

 

A quick demonstration:

 

offsetdemo.gif

Message 8 of 9
jsindler
in reply to: Lee_Mac

Wow.

So apparently this is the most helpful, altruistic, and cool community on the net! Come to them with a problem at eight o'clock at night and wake up the next morning to a program custom made for your workflow. Honestly, I'm real thankful.

 

Thanks for all the help @nestly and @Lee_Mac !

Message 9 of 9
Lee_Mac
in reply to: jsindler


@jsindler wrote:

Wow.

So apparently this is the most helpful, altruistic, and cool community on the net! Come to them with a problem at eight o'clock at night and wake up the next morning to a program custom made for your workflow. Honestly, I'm real thankful.

 

@Thanks for all the help @nestly and @Lee_Mac !


I very much appreciate your gratitude jsindler - you're most welcome Smiley Happy

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost