From: eap Date: Wed, 24 Oct 2007 11:31:53 +0000 (+0000) Subject: PAL17233: Projection 2D doesn't work (bis) X-Git-Tag: V3_2_9rc1~21 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=3a65bf08374a5a16b55f1b55cb188f0eb24a4de0;p=modules%2Fgeom.git PAL17233: Projection 2D doesn't work (bis) fix SortShapes() --- diff --git a/src/GEOMImpl/GEOMImpl_IShapesOperations.cxx b/src/GEOMImpl/GEOMImpl_IShapesOperations.cxx index 1dac9214c..0eb5716c5 100644 --- a/src/GEOMImpl/GEOMImpl_IShapesOperations.cxx +++ b/src/GEOMImpl/GEOMImpl_IShapesOperations.cxx @@ -2821,6 +2821,7 @@ void GEOMImpl_IShapesOperations::SortShapes(TopTools_ListOfShape& SL) } MidXYZ.SetValue(Index, GPoint.X()*999 + GPoint.Y()*99 + GPoint.Z()*0.9); + //cout << Index << " L: " << Length(Index) << "CG: " << MidXYZ(Index) << endl; } // Sorting @@ -2834,10 +2835,14 @@ void GEOMImpl_IShapesOperations::SortShapes(TopTools_ListOfShape& SL) { Standard_Real dMidXYZ = MidXYZ(OrderInd(Index)) - MidXYZ(OrderInd(Index+1)); Standard_Real dLength = Length(OrderInd(Index)) - Length(OrderInd(Index+1)); - if ( dMidXYZ > 0 ) { + if ( dMidXYZ >= tol ) { +// cout << "MidXYZ: " << MidXYZ(OrderInd(Index))<< " > " < 0 ) { + else if ( Abs(dMidXYZ) < tol && dLength >= tol ) { +// cout << "Length: " << Length(OrderInd(Index))<< " > " < 0 ) { + if ( dSquareExtent >= tol ) { +// cout << "SquareExtent: " << box1.SquareExtent()<<" > "< val2; +// cout << "box: " << val1<<" > "<