Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.

First time visiting? Here are some places to start:
  1. Looking for a certain topic? Check out the categories filter or use Search (upper right).
  2. Need support? Ask a question to our Community Support category.
  3. Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
  4. Be respectful, on topic and if you see a problem, Flag it.

If you would like to contact our Community Manager personally, feel free to send a private message or an email.

Faster Patterns

NeilCookeNeilCooke Moderator, Onshape Employees Posts: 5,631
In the recent update (May 4th, 2018) we modified how Feature Patterns work to improve performance. We didn't shout about it in the forum post, but some of you discovered it anyway!

The new option is called "Apply per instance" which, by default, is off. When this option is selected, Feature Pattern works the way it always has, recalculating every instance. For a large pattern, a lot of feature recalculation is required which can cause unnecessary performance issues. 

In most cases, the geometry created by each Feature Pattern instance is identical, so the correct choice for pattern type should really be Face Pattern. However, if your features are complex, that would require a LOT of face selection to get the correct patterned geometry. Most users therefore use Feature Pattern instead of Face Pattern for convenience.

With this in mind, we changed the default behaviour of Feature Pattern to be the same as Face Pattern. With "Apply per instance" set to off (the default), selecting features to pattern will, behind the scenes, select all the faces belonging to the selected features and create a Face Pattern. This provides the convenience of Feature Pattern selection with Face Pattern speed.

Sometimes the pattern preview will show red geometry. This indicates that the "behind the scenes" Face Pattern was not successful, probably due to some geometry condition. When this happens, check "Apply per instance" to get the regular Feature Pattern behaviour. It may be slower, but it is more robust and has the added benefit of recalculating feature references each time to create a pattern with varying geometry.

Anyway, this post is not about Feature Pattern, it's about Part Patterns and ways you can speed them up!

Part Patterns are great and I will always try to use them where possible. However, there is one performance hit that Part Patterns suffer from and that is the number of boolean operations that take place when the "Add" option is being used.

Take this model of a tire tread:



It may not be too complex, but there is a lot of repeated geometry. In my first model, I revolved the tire profile without the tread, then created a small section of the tread by splitting a surface multiple times (using the Split Face feature), then used the Thicken feature. The resultant tread was then patterned once so I could add extra geometry, then again to get the full tread around the tire, then boolean subtracted from the revolved tire. This works fine, but is VERY slow. Why? Because there are 14 boolean operations going on with progressively increasing complexity. Time for Part regeneration ~42 seconds!



This is clearly not acceptable, so I created a second model, this time by creating a small section of the revolved tyre and creating the tread as before. This section was then patterned around. Much better performance at ~14s. However, there are still 28 boolean operations going on (though much simpler than the previous example).



So the task is to reduce the number of booleans. Instead of patterning the tire section shown in the above image 27 times to get the full revolved profile, creating 2 pattern features reduces the number of booleans and therefore increases performance. So, in the last model, I patterned the above section 3 times, then created a second pattern with 9 instances (getting the total of 27 segments as before), only this time there are only 12 booleans occurring and regeneration time is now a paltry 6s! 



Anyway, the moral of the story is that, by reducing the number of boolean operations created by the Pattern feature, you can dramatically improve the performance of your parts.

Thought I'd pass this little nugget along - the proof of the pudding can be found here:

https://cad.onshape.com/documents/04c350f0aacd4ba7a39f96a0/w/b2c72b1da6a9c50dd95c6e2f/e/4aed42b5742a79a6aceefc53
Senior Director, Technical Services, EMEAI

Comments

  • emagdalenaC2iemagdalenaC2i Member, Developers, Channel partner Posts: 863 ✭✭✭✭✭
    NeilCooke said:
    ..." which, by default, is off. When this option is selected, Feature Pattern works the way it always has, recalculating every instance. For a large pattern, a lot of feature recalculation is required which can cause unnecessary performance issues. 
    ...

    I'm glad that by default is the option that consumes less resources ... Unlike what happens in SolidWorks  >:)
    Un saludo,

    Eduardo Magdalena                         C2i Change 2 improve                         ☑ ¿Por qué no organizamos una reunión online?  
                                                                         Partner de PTC - Onshape                                     Averigua a quién conocemos en común
Sign In or Register to comment.