From cfa10cf92ca5cf9507b78c9b51958336d3355f45 Mon Sep 17 00:00:00 2001 From: jfa Date: Fri, 21 Nov 2008 07:32:50 +0000 Subject: [PATCH] Bug 0020057: EDF GEOM: Impossible to explode an object to faces. Infinite loop. --- src/GEOMImpl/GEOMImpl_IShapesOperations.cxx | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/GEOMImpl/GEOMImpl_IShapesOperations.cxx b/src/GEOMImpl/GEOMImpl_IShapesOperations.cxx index 3555de11c..14d347857 100644 --- a/src/GEOMImpl/GEOMImpl_IShapesOperations.cxx +++ b/src/GEOMImpl/GEOMImpl_IShapesOperations.cxx @@ -3093,6 +3093,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 ) { @@ -3125,13 +3126,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<<" > "<