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