- //Done();
-}
-
-//=======================================================================
-//function : Shape
-//purpose : give the resulting shape
-//=======================================================================
-const TopoDS_Shape& ShapeUpgrade_UnifySameDomain::Shape() const
-{
- return myShape;
-}
-
-//=======================================================================
-//function : Generated
-//purpose : returns the new shape from the old one
-//=======================================================================
-const TopTools_ListOfShape& ShapeUpgrade_UnifySameDomain::Generated(const TopoDS_Shape& aShape)
-{
- const TopoDS_Shape* aNewShape;
- myHistShapes.Clear();
- aNewShape = myOldToGeneratedShapes.Seek(aShape);
- if (aNewShape) {
- if (myContext->IsRecorded(*aNewShape))
- myHistShapes.Append(myContext->Apply(*aNewShape));
- else
- myHistShapes.Append(*aNewShape);
- }
- return myHistShapes;
-}
-
-//=======================================================================
-//function : Modified
-//purpose : returns the new modified shape from the old one shape
-//=======================================================================
-const TopTools_ListOfShape& ShapeUpgrade_UnifySameDomain::Modified(const TopoDS_Shape& aShape)
-{
- TopoDS_Shape aNewShape;
- Standard_Integer aModifiedStatus;
- myHistShapes.Clear();
- if (!myOldToGeneratedShapes.Seek(aShape) &&
- !myRemovedShapes.Contains(aShape) &&
- myContext->IsRecorded(aShape)){
- aModifiedStatus = myContext->Status(aShape, aNewShape, Standard_True);
- if (aModifiedStatus > 0)
- myHistShapes.Append(aNewShape);
+ if (!myHistory.IsNull())
+ {
+ myHistory->Merge(myContext->History());
+ for (TopTools_MapOfShape::Iterator aIt(myRemoved);
+ aIt.More(); aIt.Next())
+ {
+ myHistory->Remove(aIt.Value());
+ }