+//modified by NIZNHY-PKV Fri Jan 21 10:55:42 2005 f
+//=======================================================================
+//function : HasNewSubShape
+//purpose :
+//=======================================================================
+Standard_Boolean GEOMAlgo_Gluer::HasNewSubShape(const TopoDS_Shape& aS)const
+{
+ Standard_Boolean bRet;
+ Standard_Integer i, aNbSS;
+ TopTools_IndexedMapOfShape aMSS;
+ //
+ GetSubShapes(aS, aMSS);
+ //
+ bRet=Standard_False;
+ aNbSS=aMSS.Extent();
+ for (i=1; i<=aNbSS; ++i) {
+ const TopoDS_Shape& aSS=aMSS(i);
+ if (aSS.ShapeType()==TopAbs_WIRE) {
+ continue;
+ }
+ //
+ bRet=!myOrigins.IsBound(aSS);
+ if (bRet) {
+ return bRet;
+ }
+ //
+ const TopoDS_Shape& aSSIm=myOrigins.Find(aSS);
+ bRet=!aSSIm.IsSame(aSS);
+ if (bRet) {
+ return bRet;
+ }
+ }
+ return bRet;
+}
+//=======================================================================
+//function : GetSubShapes
+//purpose :
+//=======================================================================
+void GetSubShapes(const TopoDS_Shape& aS,
+ TopTools_IndexedMapOfShape& aMSS)
+{
+ Standard_Integer aR;
+ TopAbs_ShapeEnum aType;
+ TopoDS_Iterator aIt;
+ //
+ aType=aS.ShapeType();
+ aR=(Standard_Integer)aType+1;
+ if (aR>TopAbs_VERTEX) {
+ return;
+ }
+ //
+ aIt.Initialize(aS);
+ for (; aIt.More(); aIt.Next()) {
+ const TopoDS_Shape& aSS=aIt.Value();
+ aMSS.Add(aSS);
+ GetSubShapes(aSS, aMSS);
+ }
+}
+//=======================================================================
+//function : Modified
+//purpose :
+//=======================================================================
+const TopTools_ListOfShape& GEOMAlgo_Gluer::Modified (const TopoDS_Shape& aS)
+{
+ TopAbs_ShapeEnum aType;
+ //
+ myGenerated.Clear();
+ //
+ aType=aS.ShapeType();
+ if (aType==TopAbs_FACE ||
+ aType==TopAbs_EDGE ||
+ aType==TopAbs_VERTEX) {
+ if(myOrigins.IsBound(aS)) {
+ const TopoDS_Shape& aSnew=myOrigins.Find(aS);
+ if (!aSnew.IsSame(aS)) {
+ myGenerated.Append(aSnew);
+ }
+ }
+ }
+ //
+ return myGenerated;
+}
+//=======================================================================
+//function : Generated
+//purpose :
+//=======================================================================
+const TopTools_ListOfShape& GEOMAlgo_Gluer::Generated(const TopoDS_Shape& )
+{
+ myGenerated.Clear();
+ return myGenerated;
+}
+//=======================================================================
+//function : IsDeleted
+//purpose :
+//=======================================================================
+Standard_Boolean GEOMAlgo_Gluer::IsDeleted (const TopoDS_Shape& aS)
+{
+ Standard_Boolean bRet=Standard_False;
+ //
+ const TopTools_ListOfShape& aL=Modified(aS);
+ bRet=!aL.IsEmpty();
+ //
+ return bRet;
+}
+//modified by NIZNHY-PKV Fri Jan 21 10:59:21 2005 t