10 Replies Latest reply on Aug 6, 2018 10:19 AM by John Stoltzfus

    Identify and remove redundant mates?

    Tom Gagnon

      Q: Is there any way to remove all unnecessary or redundant mates, and still leave it fully defined?


      I'll elaborate.

      I piece assemblies together like Lego. This goes here, along this, so far from other, aligned as such.. repeat and repeat. Assembly stays Fully Defined and not Over-Defined (FD & not OD).

      Then, I start cutting it apart to alter, improve, un-obstruct, un-collide, or w/e. This item needs bigger size, change this tee to elbow, etc. It varies widely.

      When cutting apart a square-ish portion of right angled components, I can destroy some mates, and it still remains FD & not OD. This is because the right angles mean that between these FD components, other items stay in place and FD because of relations remaining to the more defined things. Yes, I'm struggling to explain this correctly, and will struggle more to try to reproduce it to demonstrate in images w/o file share.


      So, clearly some mates are useful enough in my process to get the component to where and how it's needed, then become redundant once interlinked with the full sequence.


      Is there any way to have MateXpert (or something else) diagnose this for me, and remove the most mates possible while still remaining fully defined?

      I'd accept either case of just here's your maximum removed case, or selecting through a series of options of what to remove, if indeed some of those were defining priority, kinda like SketchXpert or MateXpert already offer possible solution sets that you can click through and select the best or intended one from.


      Of course, I can pull mates out myself like loose wires and see it the device still functions, just like Monkeys in room with typewriters eventually producing Shakespeare. Undo if broken, and move on to break more (or not). I have thousands of mates, and that doesn't even count those within subassemblies (thank intent for that). I already poke and prod sometimes, and wondered if there was a solution to have it done for me.


      Anything I can do to reduce mates in a large assembly would improve performance, even if it was only like 5% of them.

      Sometimes when switching from edit assembly to publishing drawing revision, I'll update or recreate a subconfiguration where everything is fixed instead. That's a clunky workaround to achieve Lg Assy drawing performance.


      It it is not available, I think it'd be a serious contender for new ideas in future releases.

      "Think for me, software!!! Take my junk and polish it to perfection!" Ok, that was just facetious.

      Thanks for your time.

        • Re: Identify and remove redundant mates?
          Kevin Chandler



          I think the persons who regularly use skeleton sketch can weigh in on whether this methodology can help you.

          There are several regular forum members who are proponents and I believe John Stoltzfus is one such individual.





            • Re: Identify and remove redundant mates?
              Tom Gagnon

              I understand how to operate without mates, though that is not the focus of my question. It is unfeasible for 2500+ components. Also, it ought to be implemented from the start, not 1 year into it.

              I thought of this topic after reading the discussion earlier today about mate-less assemblies, then returning to my pile of fuss. Thank you.

                • Re: Identify and remove redundant mates?
                  Dennis Dohogne

                  Tom, I fully appreciate your situation and also encounter it on a regular basis.  The skeleton sketch method is just another way to do things in SWX, but there is no one universal best way to do anything and my situations do not lend themselves to skeleton sketch or top-down methods either.  That said, here are the things I've found that reduce some of the mates required:

                  1. Use subassemblies as much as possible.  Often I'll find a group of parts and collect them together and Form Subassy Here, even if it is just those parts just that one time.  This moves their mates out of the top level assy and puts them together in their sub.

                  2. Use patterns of components as much as possible.  This reduces not only the Feature Manager, but also the mates - dramatically.

                  3. Use a concentric mate of an edge instead of a cylindrical surface or an axis to another circular edge.  This achieves both a concentric constraint and a coincident constraint.  One more mate can lock this component/subassy down.

                  4. For items that have a common origin insert them with the check mark instead of floating them into the assy.  This creates a fixed mate with the parts located at the origin and oriented on the primary planes without adding any mates.  My parts don't often qualify for this, but when they do it is a real savings.


                  I hope this helps!

                  - - -Dennis

                • Re: Identify and remove redundant mates?
                  Tom Gagnon

                  Thank you Deepak! I had not considered to search among macros, and struggled with ambiguous search terms.


                  However, that application seems to be in suspended Beta status. Even in that thread, author suggests trying it on a small assembly.

                  I started with a large assembly, saved a copy, and removed all structure, enclosure, and piping to only focus on electrical items. This removed about 2/3 of my mates and components. I ran the application DuplicateMatesDetector for over an hour with no results. Maybe I will try it again with an overnight run.


                  If it cannot handle large assemblies, then it is of negligible value to me. If all I needed was small assemblies analyzed, I can use my own observations and actions to do that manually.


                  I'll try it again, but I'm starting to think that the answer to my question, broadly, is no.

                    • Re: Identify and remove redundant mates?
                      Tom Gagnon

                      I gave this application sufficient time to analyze a reduced scope large assembly by running it over the weekend. It did conclude its scan, and found zero duplicate mates. I'm not surprised, as I don't make duplicate ones, but I do end up with redundant ones which was the focus of my question.


                      What I'm looking for is redundant mates, which are mates that can be suppressed and/or deleted and the assembly still remains fully defined.


                      To test it in much simpler condition, I created an empty part and put it in an empty assembly. I floated the part, defined right and front planes coincident to assembly, and part top 3in from assembly top. Then I set part/assy top planes also parallel to each other, and same with right planes. I ran the application on that 5-mate assembly, and it found no duplicates, and did not recognize the two intentional redundant parallel pates as such.


                      So, this tool may be useful in identifying duplicates, but it does not identify redundant ones.

                  • Re: Identify and remove redundant mates?
                    Tom Gagnon

                    No one wants to say no, that's not possible. I will, then mark it as correct.


                    No. That is not possible.


                    It would be a very pleasant expanded functionality to MateXpert or other mate or performance evaluation tools in a future release.

                      • Re: Identify and remove redundant mates?
                        John Stoltzfus

                        Tom Gagnon - I missed this topic and I really want the "Correct Answer" hehehe  - the Answer is "No"  but there are a few things you could do to help on your next project. 


                        There are very little parts that need a total of (3) three mates, as with nature, assemblies just work better and fit better when just using (2) two mates so it's more natural to have (2) two instead of 3


                        So think about this, reducing the amount of mates by 33% will affect the assemblies.  The key is to look for a possible L configuration in your parts, even creating an L Shaped sketch helps..


                        I also know that the more parts you can insert in a fixed manner will also affect the performance..

                      • Re: Identify and remove redundant mates?
                        Josh Brady

                        Every component has six DOF when it's completely floating.  Every mate type removes a certain number and type of DOF.  Most of the time, your components are redundantly located, even if deleting just one mate will make them movable.  For example, If you locate a part by making all 3 main planes coincident, you're putting 9 DOF constraints on it, therefore 3 are redundant.


                        Plane-plane coincident (whether it's actual plane or planar face) removes 2 rotational and 1 linear DOF.  Plane-point coincident just removes one linear DOF.  Line-plane parallel removes just one rotational DOF. Line-line coincident (whether you're talking edge-on-edge, cylinder to cylinder concentric, etc - effectively the same thing) removes 2 linear and 2 rotational.  Etc etc.


                        There was a time when I made myself a little table of the different mate types and what DOFs they removed, and I attempted to use the minimum number of constraints to define my assemblies, such that each component had exactly 6 DOF removed.  I expected better performance, but what I actually got was slightly worse stability.  Without those somewhat "redundant" mates, sometimes SW would work itself into a corner and think that a mate needed flipping or something to get it in the right orientation.


                        The best strategy I have found for performance is to use as many subassemblies as possible and still make sense.  You can think of the mates of an assembly as a system of equations.  The more mates, the more equations.  Solving a system of 10 equations in 10 unknowns takes exponentially longer than 2 equations in 2 unknowns.  When you use subassemblies (assuming that you don't make them flexible) it compartmentalizes those mates.  SW doesn't have to solve them simultaneously with the main assembly.  Those mates get solved when the subassembly is rebuilt, then SW can treat it like a solid chunk in the main assembly.