ShapeUpgrade_UnifySameDomain : possible problem ...

Hi Friends, Here is a very simple example, were ShapeUpgrade_UnifySameDomain produces a bad result.

The Blue solid has an invalid face after unifying.

I've joined BREP before & after Unify.

Thanks for your help !

Manuel Massing's picture

I think your best bet is to open a ticket to bring it to the attention of the developers.

Dmitrii Pasukhin's picture

Hello, can you provide occt version and parameters settings of calling ShapeUpgrade_UnifySameDomain.

If it is possible to reproduce on current masters - I create a ticket in bugtracker(if you can't).

Best regards, Dmitrii.

Vilo 176's picture

Hi Dmitrii,

OCCT version : 7.7.1
ShapeUpgrade_UnifySameDomain settings : all to default

Thanks Dmitrii for your help.

PS : I have no access to bugtracker

Dmitrii Pasukhin's picture
Andrey Kaftasev's picture

I've anylized current problem and here are some tips to avoid this problem:
1. You can use sewing algorithm before unifysamedomain. sewed.brep is the resulting shape.
2. Use fuse algorithm to combine all solids into general shape and after that, use unifysamedomain. unified(fully).brep is the resulting shape for current method.

Vilo 176's picture

Hi Andrey,

Thanks a lot for your time & help.

The workaround you're giving works, but misses the point.

Explanations :

1. I have a bunch of solids.

2. I apply GFA on it to make split parts, and make coincident geometry shared among solids.

The file "Unify (before).brep" is the result of that.

If I sew that brep, I lose all solids !

Here is one solid of "sewed.brep" => all internal faces are lost => Shell becomes invalid => Solid topology is not preserved

What I want Unify to do, is to merge Edges/Faces but without losing all the topology.

Maybe I've missed the point of ShapeUpgrade_UnifySameDomain ...

Vilo 176's picture

Tried some tricks, dead end => post deleted

Lahiru Dilshan's picture

Hi Vilo,

Have you tried "Glue" operation before attempting the "ShapeUpgrade_UnifySameDomain"? If not, please try that.

BOPAlgo_Builder aBuilder;
aBuilder.AddArgument(shape1); // add your shapes
aBuilder.AddArgument(shape2); // add your shapes
TopoDS_Shape resultantShape = aBuilder.Shape();

With that, solidity of the shapes will not get removed.

Then try "ShapeUpgrade_UnifySameDomain" on the "resultantShape".

If you get any result, please let me know.

Lahiru Dilshan.

Vilo 176's picture

Hi Lahiru,

The file "Unify (before).brep" is the result of the GFA of disjoint solids, so the input solids are already "glued" together before Unifying.
But thanks for help !