
Tue, 01/28/2025 - 19:58
Forums:
Is it possible to merge cylindrical faces of two bodies that are joined together. Currently it forms a seam which is undesired. I tried BRepAlgoAPI_Fuse to join two bodies and ShapeUpgrade_UnifySameDomain to merge faces. Bodies are joined but faces are not merged. Attaching the result I am getting. Does ShapeUpgrade_UnifySameDomain work only for coplanar faces? Any other way to merge faces? Thanks in advance.
BRepAlgoAPI_Fuse fuseOperation(allShapes[0], allShapes[1]);
fuseOperation.Build();
if (fuseOperation.IsDone())
{
// Get result.
TopoDS_Shape mergedShape = fuseOperation.Shape();
ShapeUpgrade_UnifySameDomain sUnifier;
sUnifier.Initialize(mergedShape, true, true, true);
sUnifier.SetSafeInputMode(true);
sUnifier.AllowInternalEdges(false);
sUnifier.SetLinearTolerance(1.e-4);
sUnifier.SetAngularTolerance(1.e-6);
sUnifier.Build();
TopoDS_Shape unifyShape = sUnifier.Shape();
}
Attachments: