I try to sew faces together to obtain a closed shell. I am very suprised to see that there ara no free boundaries, but the shell is not closed !
My code looks like this:
BRepOffsetAPI_Sewing aSewingMeth(Precision); // API to sew faces
for (ii=1; iiLength(); ii++)
aSewingMeth.Add(HGoodFaces->Value(ii)); // adding all the faces to sew
aSewingMeth.Perform(); // Calculate the result
TopoDS_Shape TmpSewedShape=aSewingMeth.SewedShape(); // Getting the result.
TypeError("Invalid shape"); // No message here => I presume the shape is valid
Standard_Integer TheNbFreeEdges=aSewingMeth.NbFreeEdges(); // Getting the number of free edges.
if (TheNbFreeEdges==0) // Testing to see if the shape is closed.
if (TmpSewedShape.ShapeType()==TopAbs_SHELL // To be sure we have a shell
TypeError("Unclosed shape with no free edge !"); // This message is displayed ! How is it possible ?
Is there anybody who can explain to me how it is possible ? Did I do something wrong ?
Thanks for your help.