diff --git a/src/BRepMesh/BRepMesh_DefaultRangeSplitter.cxx b/src/BRepMesh/BRepMesh_DefaultRangeSplitter.cxx index a7359f8ee9..dee351928b 100644 --- a/src/BRepMesh/BRepMesh_DefaultRangeSplitter.cxx +++ b/src/BRepMesh/BRepMesh_DefaultRangeSplitter.cxx @@ -124,10 +124,12 @@ void BRepMesh_DefaultRangeSplitter::computeTolerance( const Standard_Real aDiffU = myRangeU.second - myRangeU.first; const Standard_Real aDiffV = myRangeV.second - myRangeV.first; + // Slightly increase exact resolution so to cover links with approximate + // length equal to resolution itself on sub-resolution differences. const Standard_Real aTolerance = BRep_Tool::Tolerance (myDFace->GetFace()); const Adaptor3d_Surface& aSurface = GetSurface()->Surface(); - const Standard_Real aResU = aSurface.UResolution (aTolerance); - const Standard_Real aResV = aSurface.VResolution (aTolerance); + const Standard_Real aResU = aSurface.UResolution (aTolerance) * 1.1; + const Standard_Real aResV = aSurface.VResolution (aTolerance) * 1.1; const Standard_Real aDeflectionUV = 1.e-05; myTolerance.first = Max(Min(aDeflectionUV, aResU), 1e-7 * aDiffU); diff --git a/tests/bugs/mesh/bug33060 b/tests/bugs/mesh/bug33060 new file mode 100644 index 0000000000..ba63924da5 --- /dev/null +++ b/tests/bugs/mesh/bug33060 @@ -0,0 +1,17 @@ +puts "========" +puts "0033060: Mesh - Sub-precisional links provoke f a i l u r e on face" +puts "========" +puts "" + +restore [locate_data_file bug33060.brep] result + +tclean result + +checkview -display result -3d -path ${imagedir}/${test_image}.png + +set log [tricheck result] +if { [llength $log] != 0 } { + puts "Error : Invalid mesh" +} else { + puts "Mesh is OK" +}