From ba0856b24edea6bcff6fe93894d49a8ec4f44e55 Mon Sep 17 00:00:00 2001 From: jgv Date: Wed, 20 Oct 2010 08:31:47 +0000 Subject: [PATCH] 0020987: EDF 1553 GEOM: GetInPlace doesn't return all the faces it should return --- src/GEOMImpl/GEOMImpl_IShapesOperations.cxx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/GEOMImpl/GEOMImpl_IShapesOperations.cxx b/src/GEOMImpl/GEOMImpl_IShapesOperations.cxx index 851186aba..a0e0be546 100644 --- a/src/GEOMImpl/GEOMImpl_IShapesOperations.cxx +++ b/src/GEOMImpl/GEOMImpl_IShapesOperations.cxx @@ -3229,7 +3229,7 @@ Handle(GEOM_Object) GEOMImpl_IShapesOperations::GetInPlace (Handle(GEOM_Object) bool isFound = false; Standard_Integer iType = TopAbs_SOLID; Standard_Integer compType = TopAbs_SOLID; - Standard_Real aWhat_Mass = 0., aWhere_Mass = 0.; + //Standard_Real aWhat_Mass = 0., aWhere_Mass = 0.; Standard_Real tab_aWhat[4], tab_aWhere[4]; Standard_Real dl_l = 1e-3; Standard_Real min_l, Tol_0D, Tol_1D, Tol_2D, Tol_3D, Tol_Mass; @@ -3310,6 +3310,7 @@ Handle(GEOM_Object) GEOMImpl_IShapesOperations::GetInPlace (Handle(GEOM_Object) else if ( iType == TopAbs_FACE ) Tol_Mass = Tol_2D; // Compute the ShapeWhat Mass + /* for ( ; Exp_aWhat.More(); Exp_aWhat.Next() ) { if ( iType == TopAbs_VERTEX ) { aWhat_Mass += 1; @@ -3320,6 +3321,7 @@ Handle(GEOM_Object) GEOMImpl_IShapesOperations::GetInPlace (Handle(GEOM_Object) else BRepGProp::VolumeProperties(Exp_aWhat.Current(), aProps); aWhat_Mass += aProps.Mass(); } + */ // Searching for the sub-shapes inside the ShapeWhere shape TopTools_MapOfShape map_aWhere; @@ -3361,12 +3363,13 @@ Handle(GEOM_Object) GEOMImpl_IShapesOperations::GetInPlace (Handle(GEOM_Object) if ( isFound ) { aWhereIndex = aWhereIndices.FindIndex(Exp_aWhere.Current()); aModifiedList.Append(aWhereIndex); - aWhere_Mass += tab_aWhere[3]; + //aWhere_Mass += tab_aWhere[3]; isFound = false; break; } } - if ( fabs( aWhat_Mass - aWhere_Mass ) <= Tol_Mass ) break; + //if ( fabs( aWhat_Mass - aWhere_Mass ) <= Tol_Mass ) + //break; } if (aModifiedList.Extent() == 0) { // Not found any Results -- 2.39.2