Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.

First time visiting? Here are some places to start:
  1. Looking for a certain topic? Check out the categories filter or use Search (upper right).
  2. Need support? Ask a question to our Community Support category.
  3. Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
  4. Be respectful, on topic and if you see a problem, Flag it.

If you would like to contact our Community Manager personally, feel free to send a private message or an email.

New Feature: Multi-Mirror

Evan_ReeseEvan_Reese Member Posts: 2,054 PRO
edited December 2019 in FeatureScript
I often work with symmetrical designs in multi-part studios, and many times I have a number of parts to mirror across multiple planes. With the standard mirror feature, I have to use a new feature for each part x the number of planes to mirror about. That means if I have 3 parts to mirror about the top, right, and front planes, I'll need 9 mirror features. This feature can do it all in one go either using the world planes, or the 3 directions of a mate connector. Hopefully, someone else finds it useful too. You can find the feature here. I'm open to improvement suggestions if someone imagines a tweak that would open up a better workflow. note: this isn't meant to replace the standard mirror, since it only handles bodies and is a lot less flexible in certain ways, but it definitely solves a pain-point I've had since the Solidworks days.

Evan Reese / Principal and Industrial Designer with Ovyl
Website: ovyl.io

Comments

  • john_mcclaryjohn_mcclary Member, Developers Posts: 3,876 PRO
    Oh, that's a good idea
  • TimRiceTimRice Member, Moderator, Onshape Employees Posts: 315
    Nice, I will use this a lot!
    Tim Rice | User Experience | Support 
    Onshape, Inc.
  • owen_sparksowen_sparks Member, Developers Posts: 2,660 PRO
    Bonus points awarded for building an icon that looks perfectly in keeping with the native features B)
    Owen S.
    Business Systems and Configuration Controller
    HWM-Water Ltd
  • bruce_williamsbruce_williams Member, Developers Posts: 842 PRO
    @Evan_Reese

    Very useful feature!   It would be nice to work on surfaces also if possible.
    www.accuratepattern.com
  • Evan_ReeseEvan_Reese Member Posts: 2,054 PRO
    @Evan_Reese

    Very useful feature!   It would be nice to work on surfaces also if possible.
    oooooh  :o that's a good idea.
    Evan Reese / Principal and Industrial Designer with Ovyl
    Website: ovyl.io
  • Evan_ReeseEvan_Reese Member Posts: 2,054 PRO
    edited December 2019
    Bonus points awarded for building an icon that looks perfectly in keeping with the native features B)
    Owen S.
     B)B)B)
    Evan Reese / Principal and Industrial Designer with Ovyl
    Website: ovyl.io
  • MichaelPascoeMichaelPascoe Member Posts: 1,654 PRO
    Whew, now this will save some time. 

    Thanks Evan!

    Learn more about the Gospel of Christ  ( Here )

    CADSharp  -  We make custom features and integrated Onshape apps!   cadsharp.com/featurescripts 💎
  • Evan_ReeseEvan_Reese Member Posts: 2,054 PRO
    @MichaelPascoe
    This is one of my personal favorites. It cuts down so much repetitive work for certain designs. Shoutout to @MBartlett21 who helped me refactor the code to be much more concise.
    Evan Reese / Principal and Industrial Designer with Ovyl
    Website: ovyl.io
  • MichaelPascoeMichaelPascoe Member Posts: 1,654 PRO
    Multi Mirror is now a part of my standard procedure! I used it today to create a mirrored plinth. Smooth.



    Learn more about the Gospel of Christ  ( Here )

    CADSharp  -  We make custom features and integrated Onshape apps!   cadsharp.com/featurescripts 💎
  • Evan_ReeseEvan_Reese Member Posts: 2,054 PRO
    I'm so glad! I still get a kick out of it every time I use it. I often use it even when it's just one part and one mirror, so that it's easy to add parts to the feature later if I need to without messing up the IDs of things downstream.
    Evan Reese / Principal and Industrial Designer with Ovyl
    Website: ovyl.io
  • robert_stilesrobert_stiles Member Posts: 85 PRO
    @Evan_Reese I have a question please... how come the version in your screen grab has a "new" or "self" Tab at the top?  And the version in the shared document does not? Or am I missing how to access this? 

    This seems very useful to me, as it saves a delete parts step. 
    Also, a key extra for me would be a "select all" option for the bodies to mirror. 
    This need also links into the need for the "new" or "self" tab. I'll explain :
    I often need a handed version in a configuration. Furthermore, its common for me to use a pattern feature. This means the number of bodies changes between configurations. Currently I have to create the highest pattern number I think I might ever need,
    - mirror it all
    - delete the original
    The problem here is if the number of bodies ever changes. If there are multiple part patterns controlled by multiple configurations, then I need to make all the possible parts across all the configurations and do the mirror at the end with the max number of bodies. Its not perfect 
    All this would be removed with the "new" or "self" tab, which I think removes the need for the delete step, and a select all bodies tick box. It would then simply grab everything in the parts studio, and hand it. 
    Even better would be a reset origin (essentially a transform of all the bodies selected) to re position the mirrored version to have the same insertion point as the non handed original version. 

    Is there a featurescript version with the "new"/"self" tab floating about? 
    Thanks
    Rob
  • Evan_ReeseEvan_Reese Member Posts: 2,054 PRO
    @robert_stiles
    I ended up developing it without the options, since the main use-case for me is always to merge things, and you can use the standard Mirror feature for everything else. If you want to, you could search through the previous versions in the version graph, and add an older version where it has that. I don't remember whether it ever worked or not. I don't plan on updating this one anytime soon.

    For your use case, it sounds like you might want to copy the code from the standard mirror feature and just modify it to automate your selections and delete stuff. Would that work?
    Evan Reese / Principal and Industrial Designer with Ovyl
    Website: ovyl.io
  • S1monS1mon Member Posts: 2,211 PRO
    @Evan_Reese
    You might find the UI of the mirror feature in Plasticity interesting. See these videos:
    https://www.youtube.com/watch?v=Zf6cgg0X5F8&list=PLv8HciXoFYX-VGc-zqYQNLaWl8PuwIelI&index=211
    https://www.youtube.com/watch?v=rGEEvNZhesg&list=PLv8HciXoFYX-VGc-zqYQNLaWl8PuwIelI&index=23

    In addition to quickly choosing and/or translating the plane to mirror around (either using the manipulator or keyboard shortcuts), it has options for cutting the part first (enabled by default) and for performing a boolean union after the mirror operation. It doesn't have options to mirror more than one axis at a time.


  • Evan_ReeseEvan_Reese Member Posts: 2,054 PRO
    That is an interesting one. I like the idea of adding some manipulators that can be used to quickly pick which directions to mirror about. The cutting first thing would be handy for quick models (perfect for plasticity), but also enable sloppy behavior for cleaner models. Thanks for sharing the vids.
    Evan Reese / Principal and Industrial Designer with Ovyl
    Website: ovyl.io
  • S1monS1mon Member Posts: 2,211 PRO
    Yes, cutting mostly makes sense when you're in a direct modeling mode (which is basically everything in Plasticity so far). Typically the reason you'd use that is that you've done some modeling on one side, and now you want to duplicate it across. Since Plasticity doesn't have history, every time you want to update a mirror, you can use this tool. Adding a mirror every time you add features in Onshape would be kinda sloppy. I wouldn't enable a cut option by default, but I would enable a boolean union by default.

    That said, there are occasions in Onshape (or other history based tools) when I start by modeling something across the mirror plane to guarantee that it will be continuous. Cutting that in half could be useful. In the model that's in my screenshot, I started by building the top surface in one piece and then added side, front, bottom and rear surfaces. I would likely do the same thing in Onshape, although I might have mirrored the side surfaces before joining them to the main body.
  • John_vd_WerffJohn_vd_Werff Member Posts: 65 PRO
    Great FS!
    Wish I had known about it earlier...
  • Evan_ReeseEvan_Reese Member Posts: 2,054 PRO
    Great FS!
    Wish I had known about it earlier...
    Thanks! I want to make sure to throw credit back to @MBartlett21. I wrote a bad version of the feature early in learning FeatureScript, and he pretty much re-wrote it to be good, hahaha. I've since done a bit more to improve performance.
    Evan Reese / Principal and Industrial Designer with Ovyl
    Website: ovyl.io
Sign In or Register to comment.