19 Replies Latest reply on Mar 19, 2019 4:17 PM by Alin Vargatu

# How to improve linear pattern rebuild performance by ~10X

How to improve linear pattern rebuild performance by 10X | LinkedIn

Couple days ago, I received a part from VAR ( Value-Added Reseller) and asked me how to improve the rebuild performance of a complex part. The part is an SMD (Surface Mount Device) leadframe, in order to cut down the production cost, one leadframe usually consists several hundred or more than a thousand of units.

And this is how one SMD unit might look like: (below is an SMD LED component)

The part from VAR came with massive pattern feature, the number of the pattern instance is 1320 (!), the file size is 175MB and it takes 20 minutes to open the file and regenerate graphics. The total rebuild time is 13336 seconds, or 3 hours 42 minutes and 16 seconds, as you can see below, most of the rebuild time is spent on the pattern features. ( By the way, I have never seen a part with such a long rebuild time.)

So, how to deal with this problem? In order to understand the relation between number of instances and the rebuild time, I performed a simple experiment. I varied the number of instances in a part and measure the rebuild time for each case. After plotting the data in Excel and fit the points with a trendline, surprisingly I saw a perfect second order polynomial curve!

Now I understand why the rebuild time is so long! Because the rebuild time is not linearly proportioned to the number of instances, in fact, it grows exponentially with the number of instances! Based on above trendline equation, when the number of instances for a linear pattern is 1320, the rebuild time will become 11289 Seconds!

With above understanding, it is time to figure out how to reduce the rebuild time. We know that:

Which means if I break a massive pattern into many smaller patterns, the total rebuild time of those smaller patterns should be significantly shorter than a massive pattern. The actual result proves that my math was correct, with the new method, the rebuild time is reduced by 10 times!

The disadvantage of above method is you have to build more base features for the small patterns, but that is an easy task as I use Sketch Block and Equation to help me reuse the sketches. Eventually, mission accomplished!

### Update:

After I posted this article, I did some Google search using keyword like "How to improve pattern performance ", there are some articles suggest that pattern body and then perform Boolean operation is faster than the normal feature pattern method. I did some test using the pattern body + Boolean operation method ( using SOLIDWORKS feature Combine ). Here is the result:

This looks quite promising. For example, when the number of instances = 255, the Body Pattern + Boolean Operation is 6 times faster than feature pattern!

But when I extrapolate the number of instances to 1320 instances, things changes dramatically, the rebuild time for feature pattern is faster after number of instance is more than 1080.

This is indeed an interesting result, it means when number of instances is less than 600, it is worth to try the Body Pattern + Boolean Operation method to reduce the rebuild time, but when pattern instances increases further, I think it is still better to use the method I mentioned previously ( break a large pattern into smaller patterns).

• ###### Re: How to improve linear pattern rebuild performance by 10X

I am curious:

You said:

"The disadvantage of above method is you have to build more base features for the small patterns, but that is an easy task as I use Sketch Block and Equation to help me reuse the sketches. Eventually, mission accomplished!"

What if you created one body, patterned it, then patterned the pattern?

Example:  Lets say you need a total of 10000 instances in a 100X100 pattern with a spacing of 10 mm.  So, you create 1 body in the upper left corner of the pattern.  Then pattern that one body in a 10X10 pattern with a spacing of 100 mm.  Then patterned that pattern in another 10X10 pattern with a spacing of 10 mm.

This would get you the same result, but I am wondering on rebuild times.  (I am in the middle of a big project, so I can't test it out here.)

• ###### Re: How to improve linear pattern rebuild performance by 10X

Hi Dan:

I performed this test as well.

I think the rebuild time of a  [ 10x10 ] x [ 10x10 ] pattern will be approx. 20~40% lesser compare with a 100 x 100 pattern. [1]

So far the best approach to reduce the rebuild time for a massive pattern is still to use the principle below: ( Especially when the number of  instances is more than 1000 )

Raw data for [1]

Note:

1. For 225 Instance, the " two features pattern"  was created in this way: [ 3x3 ] x [ 5x5 ]

2. For 400 instance, the " two features pattern" was created in this way: [ 4x4 ] x [ 5x5 ]

3. For 324 instance, the " three features pattern" was created in this way: [ 2x2 ] x [ 3x3 ] x [ 3x3 ]

• ###### Re: How to improve linear pattern rebuild performance by 10X

..nice to see and agree.. sub patterns are useful workarounds..

.. pattern definitely needs a overhaul,.. to include "groups" and better options with orientation and display (simplified/reference)***

..for display.. although we can do some manipulation in laying this out..  maybe,.. having a simplfied and/or reference display state to illustrate start/end patterns and/or suppress the instances within the pattern feature?

• ###### Re: How to improve linear pattern rebuild performance by 10X

Great idea, some sort of lite weight or reference status would be very handy rather than burdening the system with the whole pattern and having long rebuilds. I would add to suppress instances, the ability to nominate which ones you require to be full fledged instances so you can add features to those - resolved if you like. Most of the time you are only interested in making an array/pattern but sometimes a few may get additional treatment.

• ###### Re: How to improve linear pattern rebuild performance by 10X

Hey Neil..  yeah, at that time,.. I was thinking/writing out-load,.. but, after returning back to this thread.. maybe more of a subliminal message from,.. Chris Clouser  response on  "..expanded metal or a cooling vent with a honeycomb cutout.."?

.. it seems logical win/win since patterns can really be a pita,..

• ###### Re: How to improve linear pattern rebuild performance by ~10X

I like that method and use it on a smaller scale.

I have a related Question:   Can one create a pattern then "break" it or "explode" it so you can have 3 or 4 or etc. ... identical items - in position, and one MODIFIED item (formerly a pattern member).  Or a Mirror: one side a little diferent because (oh lets say) it needs to fit something better??

(If anyone has spent a lot of time in Adobe Illustrator -it's like "Object > Expand" )

• ###### Re: How to improve linear pattern rebuild performance by ~10X

Yes...this is possible, but only in an assembly.

Inside an assembly, its called, "Dissolve Pattern" and it just drops instances of the part where the pattern instances used to be.   They are un-mated, however and will need to be mated.

Inside a part.....I don't think so.

• ###### Re: How to improve linear pattern rebuild performance by ~10X

Dan Pihlaja  wrote:

Inside a part.....I don't think so.

Correction.....you CAN do it inside a part....but ONLY to a sketch pattern.

Basically, you just have to delete the "Patterned" relation.  Then the pattern entities become just plain old sketch entities.

• ###### Re: How to improve linear pattern rebuild performance by ~10X

COOL!  I can work with that. Thanks @Dan Pihlaja.

• ###### Re: How to improve linear pattern rebuild performance by ~10X

Ken Burch wrote:

I like that method and use it on a smaller scale.

I have a related Question: Can one create a pattern then "break" it or "explode" it so you can have 3 or 4 or etc. ... identical items - in position, and one MODIFIED item (formerly a pattern member). Or a Mirror: one side a little diferent because (oh lets say) it needs to fit something better??

(If anyone has spent a lot of time in Adobe Illustrator -it's like "Object > Expand" )

No need to explode it. Just use the Instances to Vary option in a linear pattern. For more complex manipulations, use the Variable Pattern, where you can pattern not only features, but also sketches and planes.

• ###### Re: How to improve linear pattern rebuild performance by 10X

That's very interesting Shaodun, Thanks for sharing your findings.

Mark

• ###### Re: How to improve linear pattern rebuild performance by 10X

Here's my 2 cents:  don't use patterns.  In this case where there are too many instances, you may be stuck with it.  But I have found that the tedious process of inserting each bolt, each washer, each nut, etc. gives me a much faster assembly and actually saves time in the long run.

The example above looks as if it would benefit from some feature reduction if possible.

I have a problem with large pattern fill features, such as cut holes if we want to create a piece of expanded metal or a cooling vent with a honeycomb cutout.  I'm not sure it would be easy to break a fill up and pattern the fill?  Maybe?   And will that even help?

I believe that the software should be capable of doing what is discussed above: taking a user-inputted pattern and behind the scenes breaking up the pattern to optimize the performance.  The user would not even have to know what is happening.  I submitted an ER on this.

• ###### Re: How to improve linear pattern rebuild performance by 10X

Interesting !!! Thx for sharing Shaodun

Will play around with your study here !

• ###### Re: How to improve linear pattern rebuild performance by ~10X

What about using sketch pattern to pattern the sketch or sketch block, and then you only have a single extrude feature?  How does that help/hurt the filesize, opening times, and rebuild times?

• ###### Re: How to improve linear pattern rebuild performance by ~10X

All joking aside, sketch patterns are sketchy ... That is to say that it's been my experience to avoid sketch patterns whenever possible. Modifying or fine tuning sketch patterns can be a bit tricky as they aren't always as straight forward as you would figure they should be.

I would add however that since the release of SW2017 I have found their functionality to be much better. I have been burned by them too many times to count in the past though so I'm still a bit skeptical.

• ###### Re: How to improve linear pattern rebuild performance by ~10X

Thanks, Shaodun! Great stuff.

Are your colleagues working on making patterning more efficient, or is it a Parasolid limitation?

Can the patterning of features (not bodies) be multi-threaded, or all operations on one body are single threaded?

• ###### Re: How to improve linear pattern rebuild performance by ~10X

COOL!  I can work with that. Thanks Dan Pihlaja.

• ###### Re: How to improve linear pattern rebuild performance by ~10X

This in no way negates the expert advice provided above, which is far more useful for live design data. This is another method to improve performance from patterns, but only where it is a reference entity which does not and will not change or update. Yes, this is NOT for everyone or every design situation.

Zero patterns. Dumb it down. Save part as Parasolid. Import Parasolid to a part template, and save as part. Done.

I used this in a reference component that we use which represents only one curvy corner of diamond deck 'bump' shapes, to represent a small portion of the actual diamond deck without complicating the whole floor with thousands of irrelevant edges. The 430+ body patterned part had a rebuild time over 1 minute, and the dumb imported parasolid rebuilds in under 1 second.

• ###### Re: How to improve linear pattern rebuild performance by ~10X

Tom Gagnon wrote:

This in no way negates the expert advice provided above, which is far more useful for live design data. This is another method to improve performance from patterns, but only where it is a reference entity which does not and will not change or update. Yes, this is NOT for everyone or every design situation.

Zero patterns. Dumb it down. Save part as Parasolid. Import Parasolid to a part template, and save as part. Done.

I used this in a reference component that we use which represents only one curvy corner of diamond deck 'bump' shapes, to represent a small portion of the actual diamond deck without complicating the whole floor with thousands of irrelevant edges. The 430+ body patterned part had a rebuild time over 1 minute, and the dumb imported parasolid rebuilds in under 1 second.

That makes sense, because there is nothing to rebuild on an Imported Geometry Feature.