Problems with solid unions in C# script

Hi!

I’m trying to make a solid union from multiple (8) breps. I will finally need to do it by C# script (there is hundreds of different brep clusters), but I face similar issues with manual try. The breps are cylinders.

When I do it manually, I’m able to perform the union depending on which order I unite the solids and how many at the time. Usually, there is one problem brep that need to be united with certain other brep to finally unite with union of the rest. I don’t notice anything special in the problem breps.

By script, I have tried to:

  • check that brep orientation is always outwards
  • change tolerance runtime
  • shuffle the breplist etc.

If avoidable, I don’t want to go too deep into randomizing the union process, because it’s a deep rabbit hole.

Would there be better ways to try first?

Thank you for your time and effort in advance!

Can you post one or a few examples that are problematic?

Here is one:

SolidUnionDebug.3dm (4.3 MB)

All of the separate breps unites individually to others, but the full union causes problems. So i.e. not all breps unite individually to the union of others.

Yes, I see that too. There is an existing YouTrack issue for this problem - I have added your example to this issue.

What is the expected benefit of the solid union in your case?

The parts will be manufactured as one machined solid objects. So I need to prepare stp-files for that. Also, I’m using the united cluster to cut other objects, and it works better when they are united.

2 Likes