From: jfa Date: Fri, 21 Nov 2008 07:37:05 +0000 (+0000) Subject: Bug 0020057: EDF GEOM: Impossible to explode an object to faces. Infinite loop. X-Git-Tag: V4_1_4rc2~19 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=1a9f6f8244dad462742a4f9e4c40c630e84f3690;p=modules%2Fgeom.git Bug 0020057: EDF GEOM: Impossible to explode an object to faces. Infinite loop. --- diff --git a/src/GEOMImpl/GEOMImpl_IShapesOperations.cxx b/src/GEOMImpl/GEOMImpl_IShapesOperations.cxx index a3f2353dc..89814e895 100644 --- a/src/GEOMImpl/GEOMImpl_IShapesOperations.cxx +++ b/src/GEOMImpl/GEOMImpl_IShapesOperations.cxx @@ -3130,6 +3130,7 @@ void GEOMImpl_IShapesOperations::SortShapes(TopTools_ListOfShape& SL) Sort = Standard_False; for (Index=1; Index < MaxShapes; Index++) { + exchange = Standard_False; Standard_Real dMidXYZ = MidXYZ(OrderInd(Index)) - MidXYZ(OrderInd(Index+1)); Standard_Real dLength = Length(OrderInd(Index)) - Length(OrderInd(Index+1)); if ( dMidXYZ >= tol ) { @@ -3162,13 +3163,14 @@ void GEOMImpl_IShapesOperations::SortShapes(TopTools_ListOfShape& SL) val1 = (aXmin+aXmax)*999 + (aYmin+aYmax)*99 + (aZmin+aZmax)*0.9; box2.Get(aXmin, aYmin, aZmin, aXmax, aYmax, aZmax); val2 = (aXmin+aXmax)*999 + (aYmin+aYmax)*99 + (aZmin+aZmax)*0.9; - exchange = val1 > val2; -// cout << "box: " << val1<<" > "< val2; + if ((val1 - val2) >= tol) { + exchange = Standard_True; + } + //cout << "box: " << val1<<" > "<