From: eap Date: Mon, 27 Jun 2011 09:12:06 +0000 (+0000) Subject: Author: Roman Lygin, roman.lygin@gmail.com X-Git-Tag: V5_1_6~5 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=ba1f9b42c46860e08a6fdb432bf7ef29a4edbe35;p=modules%2Fsmesh.git Author: Roman Lygin, roman.lygin@gmail.com fixS020 - Summary: Invalid computation of edge length on periodic curve leads to wrong tessellation - Detailed description: SMESH_Algo returns incorrect edge length (1e-08) for an edge lying beyond periodic curve range. Afterwards the number of segments is computed as ~ 1/lentgh and becomes 1.9M leading to running out of memory or failure to produce 2D mesh. - Reproducer: Try to mesh f-percrvedge.brep with 1D Wire Discretization and default MaxSize hypothesis. --- diff --git a/src/SMESH/SMESH_Algo.cxx b/src/SMESH/SMESH_Algo.cxx index 3a6a4efd9..a29c0454c 100644 --- a/src/SMESH/SMESH_Algo.cxx +++ b/src/SMESH/SMESH_Algo.cxx @@ -171,7 +171,7 @@ double SMESH_Algo::EdgeLength(const TopoDS_Edge & E) return 0; TopLoc_Location L; Handle(Geom_Curve) C = BRep_Tool::Curve(E, L, UMin, UMax); - GeomAdaptor_Curve AdaptCurve(C); + GeomAdaptor_Curve AdaptCurve(C, UMin, UMax); //range is important for periodic curves double length = GCPnts_AbscissaPoint::Length(AdaptCurve, UMin, UMax); return length; }