if( anError )
return false;
+ //std::cout << "History:" << std::endl;
// analysis of the history
// a. to fill map of shapes which come from the new face
- NCollection_IndexedMap<TopoDS_Shape> aShapesFromNewFace;
- //std::cout << "new: " << theNewShape << " " << theNewType << std::endl;
+ NCollection_IndexedMap<int> aShapesFromNewFace;
+ //std::cout << "from NEW " << theNewShape << ":" << theNewType << std::endl;
TopTools_ListOfShape aModified = aBuilder.Modified( theNewShape );
TopTools_ListIteratorOfListOfShape aMIt( aModified );
for( ; aMIt.More(); aMIt.Next() )
{
//std::cout << " " << aMIt.Value() << std::endl;
- aShapesFromNewFace.Add( aMIt.Value() );
+ int aKey = (int)aMIt.Value().TShape().operator->();
+ aShapesFromNewFace.Add( aKey );
}
// b. to fill map of parts except parts from new face
for( ; anIt.More(); anIt.Next() )
{
QString aSType = anIt.StricklerType();
- //std::cout << anIt.Face() << " " << anIt.StricklerType() << std::endl;
+ //std::cout << "from " << anIt.Face() << ": " << anIt.StricklerType() << std::endl;
TopTools_ListOfShape aModified = aBuilder.Modified( anIt.Face() );
+ if( aModified.Extent() == 0 )
+ aModified.Append( anIt.Face() );
+
TopTools_ListIteratorOfListOfShape aMIt( aModified );
for( ; aMIt.More(); aMIt.Next() )
{
TopoDS_Shape aShape = aMIt.Value();
bool isFace = aShape.ShapeType()==TopAbs_FACE;
- bool isAlsoFromNew = aShapesFromNewFace.Contains( aShape );
+ int aKey = (int)aShape.TShape().operator->();
+ bool isAlsoFromNew = aShapesFromNewFace.Contains( aKey );
//std::cout << " " << aShape << " " << isAlsoFromNew << std::endl;
if( isFace && !isAlsoFromNew )
aNewFaces.Add( TopoDS::Face( aShape ), aSType );