BRepMesh_IncrementalMesh gets stuck

Hi,

Please test with the attached STEP file. BRepMesh_IncrementalMesh gets stuck with the following parameter setup.

BRepMesh_IncrementalMesh bMesh(shape, 0.5, false, 0.2, true);

Here, angular deflection under 0.2 always makes it stuck. It might be running but taking forever due to the (nearly) infinite number of meshes.

Is there a guideline to set up the feasible linear and angular deflection combination, or for each?

I use the angular deflection between 0.2 ~ 0.8. I calculate the linear deflection by using the function below.

double GetDeflection(const TopoDS_Shape& shape)
{
    Bnd_Box bndBox = ComputeBoundingBox(shape);

    bndBox = bndBox.FinitePart();

    gp_Pnt minPnt = bndBox.CornerMin();
    gp_Pnt maxPnt = bndBox.CornerMax();

    double deviationCoefficient = 0.001;

    double deflection = Prs3d::GetDeflection(Graphic3d_Vec3d(minPnt.X(), minPnt.Y(), minPnt.Z()), Graphic3d_Vec3d(maxPnt.X(), maxPnt.Y(), maxPnt.Z()), deviationCoefficient);

    return Max(deflection, Precision::Confusion());
}

Thank you!

Attachments: 
Mikhail Sazonov's picture

I was able to mesh your shape using parameters deflection 0.5, angular 0.5. With angular 0.3 it is also successful. With angular 0.2 it hangs.

You are welcome to report a bug in the bug tracker.

Soonjo Kwon's picture

Thanks for the reply.
I've just reported a bug in the tracker.

https://tracker.dev.opencascade.org/view.php?id=33082