BRepBuilderAPI_Sewing.SewedShape() delivers different results in otherwise identical computers

Hello,

the following code snippet produces different results in two separate computers with exactly the same setup: Win 7 Pro, x64, OCC 6.9.1

TopoDS_Shape* OpenCascadeModeler::sewFacesToSolid(std::vector<TopoDS_Face*> faces)
{
    if(faces.size() == 1)
        return faces.at(0);

    BRepBuilderAPI_Sewing sewing(1e-6);
    for (int i = 0; i < faces.size(); i++)
        sewing.Add(*(faces.at(i)));

    sewing.Perform();
    TopoDS_Shape resultshape = sewing.SewedShape();

With the same model geometry consisting of 129 faces (a house with blind windows, blind doors and some dormers) one computer delivers a resultshape of type TopAbs_SHELL (right) while the other delivers a TopAbs_COMPOUND (wrong) consisting of 7(!) shells.

I compared source code, model geometry, OCC library version and computer setup between both machines and they are identical as far as I can see. Am I overlooking something? Is there some non-deterministic behavior in the SewedShape() method?

Thanks a lot in advance.

Forum supervisor's picture

Dear i1015191,

I would like to confirm that sewing is a deterministic  algorithm and with the same input data it gives the same result.
All input data should be checked including tolerances of input vertices , edges and faces.

So, I may just suggest you to debug carefully both cases and try to identify the real reason (may be hidden at the moment) of described anomaly.

Best regards

FSR