From 127cc1f0a1c80cbc94ea761ed74e00300b23075e Mon Sep 17 00:00:00 2001 From: oan Date: Thu, 17 Sep 2015 14:58:40 +0300 Subject: [PATCH] 0026532: Meshing of edge with minSize parameter leads to incorrect result Fix missed parameter. Test case for issue CR26532 --- src/BRepMesh/BRepMesh_IncrementalMesh.cxx | 3 ++- tests/bugs/mesh/bug26532 | 28 +++++++++++++++++++++++ 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 tests/bugs/mesh/bug26532 diff --git a/src/BRepMesh/BRepMesh_IncrementalMesh.cxx b/src/BRepMesh/BRepMesh_IncrementalMesh.cxx index 5a826da735..8347b70fb6 100644 --- a/src/BRepMesh/BRepMesh_IncrementalMesh.cxx +++ b/src/BRepMesh/BRepMesh_IncrementalMesh.cxx @@ -244,7 +244,8 @@ void BRepMesh_IncrementalMesh::discretizeFreeEdges() BRepAdaptor_Curve aCurve(aEdge); GCPnts_TangentialDeflection aDiscret(aCurve, aCurve.FirstParameter(), - aCurve.LastParameter(), myAngle, aEdgeDeflection, 2, myMinSize); + aCurve.LastParameter(), myAngle, aEdgeDeflection, 2, + Precision::PConfusion(), myMinSize); Standard_Integer aNodesNb = aDiscret.NbPoints(); TColgp_Array1OfPnt aNodes (1, aNodesNb); diff --git a/tests/bugs/mesh/bug26532 b/tests/bugs/mesh/bug26532 new file mode 100644 index 0000000000..6ab8bef745 --- /dev/null +++ b/tests/bugs/mesh/bug26532 @@ -0,0 +1,28 @@ +puts "========" +puts "OCC26532" +puts "========" +puts "" +####################################################################### +# Meshing of edge with minSize parameter leads to incorrect result +####################################################################### + +restore [locate_data_file bug26533_aal2.brep] a + +vinit +vdisplay a +vfit +vdump ${imagedir}/${casename}_1.png + +# with min size +# => ugly curve +vclear +incmesh a 0.3 -min 0.06 +vdisplay a +vdump ${imagedir}/${casename}_2.png + +# without min size +# => nice curve +vclear +incmesh a 0.3 +vdisplay a +vdump ${imagedir}/${casename}_3.png