mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-01-01 04:10:34 +05:00
0020987: EDF 1553 GEOM: GetInPlace doesn't return all the faces it should return
This commit is contained in:
parent
25b91b8d9d
commit
ba0856b24e
@ -3229,7 +3229,7 @@ Handle(GEOM_Object) GEOMImpl_IShapesOperations::GetInPlace (Handle(GEOM_Object)
|
|||||||
bool isFound = false;
|
bool isFound = false;
|
||||||
Standard_Integer iType = TopAbs_SOLID;
|
Standard_Integer iType = TopAbs_SOLID;
|
||||||
Standard_Integer compType = 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 tab_aWhat[4], tab_aWhere[4];
|
||||||
Standard_Real dl_l = 1e-3;
|
Standard_Real dl_l = 1e-3;
|
||||||
Standard_Real min_l, Tol_0D, Tol_1D, Tol_2D, Tol_3D, Tol_Mass;
|
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;
|
else if ( iType == TopAbs_FACE ) Tol_Mass = Tol_2D;
|
||||||
|
|
||||||
// Compute the ShapeWhat Mass
|
// Compute the ShapeWhat Mass
|
||||||
|
/*
|
||||||
for ( ; Exp_aWhat.More(); Exp_aWhat.Next() ) {
|
for ( ; Exp_aWhat.More(); Exp_aWhat.Next() ) {
|
||||||
if ( iType == TopAbs_VERTEX ) {
|
if ( iType == TopAbs_VERTEX ) {
|
||||||
aWhat_Mass += 1;
|
aWhat_Mass += 1;
|
||||||
@ -3320,6 +3321,7 @@ Handle(GEOM_Object) GEOMImpl_IShapesOperations::GetInPlace (Handle(GEOM_Object)
|
|||||||
else BRepGProp::VolumeProperties(Exp_aWhat.Current(), aProps);
|
else BRepGProp::VolumeProperties(Exp_aWhat.Current(), aProps);
|
||||||
aWhat_Mass += aProps.Mass();
|
aWhat_Mass += aProps.Mass();
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
// Searching for the sub-shapes inside the ShapeWhere shape
|
// Searching for the sub-shapes inside the ShapeWhere shape
|
||||||
TopTools_MapOfShape map_aWhere;
|
TopTools_MapOfShape map_aWhere;
|
||||||
@ -3361,12 +3363,13 @@ Handle(GEOM_Object) GEOMImpl_IShapesOperations::GetInPlace (Handle(GEOM_Object)
|
|||||||
if ( isFound ) {
|
if ( isFound ) {
|
||||||
aWhereIndex = aWhereIndices.FindIndex(Exp_aWhere.Current());
|
aWhereIndex = aWhereIndices.FindIndex(Exp_aWhere.Current());
|
||||||
aModifiedList.Append(aWhereIndex);
|
aModifiedList.Append(aWhereIndex);
|
||||||
aWhere_Mass += tab_aWhere[3];
|
//aWhere_Mass += tab_aWhere[3];
|
||||||
isFound = false;
|
isFound = false;
|
||||||
break;
|
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
|
if (aModifiedList.Extent() == 0) { // Not found any Results
|
||||||
|
Loading…
Reference in New Issue
Block a user