ShapeUpgrade_UnifySameDomain not working

Hello,

I am trying to unify a TopoDS_Shape consisting of a few neighbouring faces. I read that ShapeUpgrade_UnifySameDomain can be used for this. However, it does not do anything on my step file. This is the code that I am using:

ShapeUpgrade_UnifySameDomain unifyDomains(myShape);
unifyDomains.Build();
TopoDS_Shape unifiedShape = unifyDomains.Shape();

I have attached my shape step file as .txt (shape.txt. I was not allowed to upload step files, so please change the extention to ".stp").

Am I doing something wrong?

Thanks in advance,

Martijn

Attachments: 
martijn db's picture

Also, the documentation seems to be outdated.
ShapeUpgrade_UnifySameDomain does not have a Method Generated() (anymore?)
https://dev.opencascade.org/doc/overview/html/occt_user_guides__shape_he...

martijn db's picture

I am guessing it has something to do with tolerances? How can I increase tolerance?

Thomas Anderson's picture

No it is not about tolerance. Look at the contents of your shape. You have 9 shells each with it's own face. More importantly, None of the faces are connected. That is, they don't share edges so unify doesn't even try. You need to sew the faces into one shell and then unify should work, at least it did for me. Look at 'BRepBuilderAPI_Sewing'

Attachments: