mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2024-12-28 18:30:36 +05:00
Bug 0020057: EDF GEOM: Impossible to explode an object to faces. Infinite loop.
This commit is contained in:
parent
d613dabfc0
commit
1a9f6f8244
@ -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 << endl;
|
||||
//exchange = val1 > val2;
|
||||
if ((val1 - val2) >= tol) {
|
||||
exchange = Standard_True;
|
||||
}
|
||||
//cout << "box: " << val1<<" > "<<val2 << endl;
|
||||
}
|
||||
}
|
||||
else {
|
||||
exchange = Standard_False;
|
||||
}
|
||||
|
||||
if (exchange)
|
||||
{
|
||||
// cout << "exchange " << Index << " & " << Index+1 << endl;
|
||||
@ -3179,7 +3181,7 @@ void GEOMImpl_IShapesOperations::SortShapes(TopTools_ListOfShape& SL)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
for (Index=1; Index <= MaxShapes; Index++)
|
||||
SL.Append( aShapes( OrderInd(Index) ));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user