|SolidWorks Featured Author Blog - January 2013|
Making parts with Large Patterns manageable
A few years ago Anna Wood posted a part on her website for people to use to benchmark systems. http://www.solidmuse.com/benchmarks/solidworks-benchmark-punch-holder/ The model is intentionally not optimized – it is just supposed to deliver a processing challenge for SolidWorks so people can benchmark their systems against results and system specs submitted by others.
Ignoring the explicit instructions from Anna to turn off “verification on rebuild”, I pressed Ctrl+Q to force a complete rebuild on the part. That rebuild took 14,155 seconds.
That is not a typo – it was just shy of 4 hours to rebuild the part.
After a bit of sleuthing, I got the rebuild time down to 21 seconds. Same computer, same final geometry. I just needed to learn how to restructure the tree and set up my system to optimize rebuild time!
The bulk of the improvement in rebuild time comes from things most people would expect. But stay tuned – there are a couple of really interesting tricks (starting with item 4) that have a dramatic impact when working with large patterns.
1. The lowest hanging fruit for improving rebuild time is to go into Tools-System Options – Performance and insure that ‘Verification on rebuild’ is NOT checked.
Just disabling ‘Verification on Rebuild’ reduced the rebuild time from 4 hours to less than 5 minutes (286 seconds.) So why would anyone in their right mind ever use Verification on Rebuild? What does it do?
With it OFF, when a feature is added or rebuilt, SolidWorks only checks the geometric validity of that feature’s faces with model faces adjacent to the feature. When it is ON, the error checking is expanded to include other faces of the model that might be affected. Experience suggests it also does additional error checking relating to edge tolerances and the way faces connect. This of course takes more time – but catches problems.
If you work with it OFF you can create a model with a critical geometry flaw or an impossible model and not know it! Whenever I am called over to help someone because SolidWorks is behaving in a bizarre manner, more often than not it is because of bad geometry that was invisible to the user because Verification on Rebuild was turned off.
When doing models with complex geometry (lofts, boundaries, etc) and relatively few faces, I like to leave it ON and have the computer do that checking for me automatically since that is the sort of thing that computers are really good at.
When rebuild times start getting longer, I turn it off. But I am conscious of the fact that I am now working without that safety net.
Tools- Check is required to scan for the geometry errors that the disabled ‘verification on rebuild’ would have caught automatically.
It takes a little discipline to remember to use this tool to periodically check the validity of the geometry. And it does take time: on this model, it takes about 43 seconds for tools>check to analyze all the faces. However, that is a small price to pay for saving the balance of 4 hours each rebuild!
2. As anyone would expect, newer hardware is better. And the difference is substantial. On my old computer, the rebuild time was 286 seconds once Verification on Rebuild was disabled. On my latest work rig, the rebuild time of the punch block is 78.88 seconds. And I am embarrassed to say that is still almost twice the rebuild time of the fastest machine currently listed on Anna Woods benchmark. The bottom line is that paying for updated hardware can have a nice positive impact on your department’s bottom line. It is far less expensive to pay for machinery than it is to pay an Engineer or Designer to sit there doing nothing while patiently waiting for their computer to catch up.
3. When we’re told that the new version of SolidWorks has better performance, the skeptic inside has to ask ‘does it really?’ I’m happy to report that it’s true! Today I clocked a rebuild time of 78.88s in SolidWorks 2009. When I checked in 2012 on the same machine, the rebuild time was 73.76s. That’s a nice 6.5% improvement – it’s not a lot, but it’s real and I’ll take it.
While the above 3 items are important, they aren’t really worth an article.
It’s time to move on to the fun stuff!
Tools> Feature Statistics is an invaluable tool when trying to figure out how to work faster.
The report we get from Feature Statistics provides the overall rebuild times that were cited earlier in this article. More valuably, it gives the rebuild time for each feature. Looking at the report, it is clear that the focus needs to be on improving LPattern5, which accounts for about 65% of the total rebuild time. There are also a couple of other very suspicious and enlightening anamolies. See if you can spot them.
4. LPattern5 is just a big pattern, and no-matter-what it is going to take SolidWorks 48.59s to calculate, right?
Fortunately, that hypothesis can be readily tested by simply suppressing all the unrelated features before LPattern5 in the model.
Here’s the result:
The rebuild time for that pattern feature went down 97%. Consider that hypothesis busted! LPattern5 makes a lot of slots, but the feature in and of itself shouldn’t take so long to rebuild.
The reason the pattern can take so long is that it has to interact with existing solid geometry. To confirm this hypothesis, I made sure that all of the features prior to the seed feature for LPattern5 were unsuppressed. I then added a Boss-Extrude to fill in all of the holes in the same region as LPattern5. When I rolled back to the bottom of the tree I was rewarded with a dramatically reduced rebuild time. That sure is counter intuitive – adding a feature improved the rebuild time!
To capitalize on this knowledge, reorder features so that any geometry which has to exist in the same physical space as any of the patterned instances is created after the pattern. This also includes geometry that ought to be irrelevant because it is in the space of a ‘skipped instance’ in the pattern. SolidWorks does not skip them! In the part above, having even one tiny hole in the area that would have been occupied by just one ‘skipped instance’ makes the rebuild time of LPattern5 jump from 1.4 seconds to 38.9 seconds!
5. Couldn’t this pattern be sped up with Geometry Pattern? The answer is yes, but with a couple of caveats.
First, it is a myth that geometry pattern is always faster. Seriously – test it for yourself. The streamlined LPattern5 discussed above takes around 1.4 seconds. If Geometry Pattern is checked in the Options for the Pattern, the rebuild time jumps to 1.6 seconds.
Geometry Pattern can be faster if there is a complicated end condition on the seed feature since the end condition won’t be recalculated for each instance.
And fortunately for this part, Geometry Pattern is a speed demon, only taking 1.5 seconds to rebuild because it ignores any geometry in the region of the patterned and skipped instances. But there is a catch when the Geometry Pattern option is used in the “as is” model - future features are going to act in a bizarre fashion, and the graphics display will do weird things when more work is done on the model. Remember, we have disabled Verification on Rebuild. The Geometry Pattern actually makes an impossible model and there is no error to let us know! That is the price of the performance increase.
The gray cylinders you see in the above image are the pilot holes put into the model prior to creating the rectangular slots with LPattern5. Yup, those are holes inside holes. The geometry of the rectangular slots was patterned, but SolidWorks didn’t check to see if any faces should have been consumed by the slots. Tools-Check verifies that the model has two general faults. Fortunately, if the pilot holes are suppressed prior to LPattern5, the General Fault goes away. And after suppressing the pilot holes and keeping the Geometry Pattern, the Feature statistics show the model takes about 1/3 as long to rebuild as it did before.
6. The next question is why does that #8-32 Tapped Hole take so long to rebuild? This is the suspicious anamoly that I mentioned earlier. 12 seconds seems way too long. Just like LPattern5, the analysis starts with suppressing all unrelated features prior to the #8-32 Tapped Holes to see what time the feature really takes. On it’s own, the hole feature takes 0.42 seconds. If all the features except LPattern5 are unsuppressed, the rebuild time for the hole feature sneaks up to 1.4s. And of course if LPattern5 is unsupressed, the feature is back up to 12.2s.
Here comes the fascinating part – dragging LPattern5 below #8-32 Tapped Hole in the feature tree reduces the rebuild time for the hole feature to 1.4s, The build time for a feature is dependent on the complexity of the model it is applied to, even if the new feature does not interact with any of the more complex features! Moving a large pattern down the tree allows the features that had previously come after it to build faster. In fact, Moving LPattern5 to the very end of the feature tree allows so many features to rebuild faster that the rebuild time rockets down from 25.5 seconds down to just 4.2 seconds.
This repostioning does increase the rebuild time of LPattern5, but the trade-off is that the entire model is 85% faster!.
To make parts with large patterns more manageable:
- Save the big patterns for the end of the model.
- Skipped instances on a pattern aren’t skipped unless you enable geometry pattern.
- Disabling Verification on Rebuild delivers performance gains but comes with a lot of responsibility.
- Finally, pester the powers that be to upgrade equipment and hardware.
Final note: Phil Sluder and I turned the above exploration into a SolidWorks World presentation that can be found at http://www.dimontegroup.com/Tutorials/You-got-a-problem-with-that.htm The sample model is also available there with the generous permission of Anna Wood.
Ed Eaton is a product designer with the DiMonte Group, a product development consultancy located outside of Chicago. www.dimontegroup.com