Assembly mates and rebuild times

A recent discussion I had with Chris MacCormack was about how mates within an assembly affect rebuilt times.  He posed a question to me.  Do I fully contrain screws after I insert them?  My answer was basically “yes, as time allows.”  He then stated that he actually promotes the notion of not fully contraining screws.  He went so far as to suggest it would be better to suppress the mates altogether and fixing all components. 

His reason for this policy is that a higher number of mates will slow down rebuild times because SolidWorks has to caculate each mate on every rebuild.  My primary thought is that I prefer my model assemblies to be stable and predictable, which full mate constraint methodology delivers.  Secondarily, on instinct, I was working under the idea that having everything fully constrained helps SolidWorks work out all the details so it doesn’t have to spend so much time figuring everything during a rebuild.  (I was aware that particular kinds of mates do slow down rebuild times.) 

So, I decided to put this to a test.  I created the model assembly shown here.  Though these are not real world parts, they are created and assemblied using real world techniques, with details I would normally use, even to the degree of adding material to each component.

Test subject

I created a series of configurations of this assembly in various states of mating, both with patterned components and with all instances of hardware individually inserted.  I then used handleman’s latest macro, Rebuildtimes.swp (which he recently provided on eng-tipsc.om as a response to a request by another user).  This macro was used several times on each configuration.  Here are the best times for each.

Condition:  First rebuild time (s)
Patterned Fully Constrained:  0.3438
Patterned Partially Constrained:  0.3125
Patterned Not Constrained:  0.2812
Patterned Fixed:  0.2656
All Instances Inserted Fully Constrained:  1.125
All Instances Inserted Partially Constrained:  0.5938
All Instances Inserted Not Constrained:  0.2656
All Instances Inserted Fixed:  0.2656

The test results show a clear pattern.  Chris’ assessment is correct.  With each additional mate, SolidWorks takes more time to rebuilt the assembly.  Even in this small example, there is a significant difference between fully constrained hardware and hardware that was just inserted via smart mates (partially constrained); 1.12 seconds verses .59.  The rebuild time was literally doubled just by adding parallel mates to fully constrain the smart mated hardware.

Even in light of this realization, I do not advocate suppressing all mates and fixing components.  In my experience, this isn’t practical for the real world.  However, this is going to make me reconsider just how I will be handling mating schemes.  There needs to be a balance between the speed of the software and the functionality of the model assembly.  Where is that balancing point?

Measure that Mate (Why are results different?)

I was recently asked,

“I did a check where the distance mate value and the measurement for the same features shows two markedly different values.  Have you ever seen anything like this?”

Distance Mate Result

This individual wondered how it was possible that his measurement of two associated features was different than the dimension he entered for the distance mate assigned to those two features.

Measurement Results

My reply was pragmatic.

“Without seeing the model directly, it’s hard to confirm the error.  However, I have found that whenever SolidWorks gives me a number and it doesn’t make sense, it is due to something the user is doing or some misinterpretation of the data.  This causes me to try to investigate when such issues arise by first considering what the user is doing.

“In this case, I’m assuming you are measuring from the center of the circle to the flat face.  However, I notice that your mate is set up face to face. I’m guessing SolidWorks is mating your hole based on the closest point of the circular face, and not the hole’s center.

“To fix this, use the temporary axis of the hole as the selected entity for your mate instead of the hole’s face.”

This individual followed my advice and was able to eliminate the apparent discrepancy.  In general, it is a good idea to check look at how SolidWorks (or any software) functions in order to understand why something is happening.