TopoDS_Shape F1, F2;
// get a face sharing edge1 (F1)
- TopoDS_Shape FF2[2];
TopTools_ListIteratorOfListOfShape ancestIt1( edgeToFace1.FindFromKey( edge1 ));
for ( ; F1.IsNull() && ancestIt1.More(); ancestIt1.Next() )
if ( ancestIt1.Value().ShapeType() == TopAbs_FACE )
RETURN_BAD_RESULT(" Face1 not found");
// get 2 faces sharing edge2 (one of them is F2)
+ TopoDS_Shape FF2[2];
TopTools_ListIteratorOfListOfShape ancestIt2( edgeToFace2.FindFromKey( edge2 ));
for ( int i = 0; FF2[1].IsNull() && ancestIt2.More(); ancestIt2.Next() )
if ( ancestIt2.Value().ShapeType() == TopAbs_FACE )
// ----------------------------------
ProjectionUtils::TShapeShapeMap shape2ShapeMaps[2];
- if ( !ProjectionUtils::FindSubShapeAssociation( innerShell, &aMesh,
- outerShell, &aMesh,
- shape2ShapeMaps[0])
- &&
- !ProjectionUtils::FindSubShapeAssociation( innerShell.Reversed(), &aMesh,
- outerShell, &aMesh,
- shape2ShapeMaps[1]))
+ bool mapOk1 = ProjectionUtils::FindSubShapeAssociation( innerShell, &aMesh,
+ outerShell, &aMesh,
+ shape2ShapeMaps[0]);
+ bool mapOk2 = ProjectionUtils::FindSubShapeAssociation( innerShell.Reversed(), &aMesh,
+ outerShell, &aMesh,
+ shape2ShapeMaps[1]);
+ if ( !mapOk1 && !mapOk2 )
return error(COMPERR_BAD_SHAPE,"Topology of inner and outer shells seems different" );
int iMap;