1 // File: GEOMAlgo_PassKeyShape.cxx
3 // Author: Peter KURNEV
7 #include <GEOMAlgo_PassKeyShape.ixx>
12 #include <TopTools_ListIteratorOfListOfShape.hxx>
13 #include <TColStd_ListOfInteger.hxx>
15 //=======================================================================
18 //=======================================================================
19 GEOMAlgo_PassKeyShape::GEOMAlgo_PassKeyShape()
24 GEOMAlgo_PassKey::Clear();
26 //=======================================================================
29 //=======================================================================
30 void GEOMAlgo_PassKeyShape::SetIds(const TopoDS_Shape& aS1)
33 Standard_Integer anId1;
35 anId1=aS1.HashCode(myUpper);
36 GEOMAlgo_PassKey::SetIds(anId1);
38 //=======================================================================
41 //=======================================================================
42 void GEOMAlgo_PassKeyShape::SetIds(const TopoDS_Shape& aS1,
43 const TopoDS_Shape& aS2)
45 Standard_Integer anId1, anId2;
47 anId1=aS1.HashCode(myUpper);
48 anId2=aS2.HashCode(myUpper);
50 GEOMAlgo_PassKey::SetIds(anId1, anId2);
52 //=======================================================================
55 //=======================================================================
56 void GEOMAlgo_PassKeyShape::SetIds(const TopoDS_Shape& aS1,
57 const TopoDS_Shape& aS2,
58 const TopoDS_Shape& aS3)
60 Standard_Integer anId1, anId2, anId3;
62 anId1=aS1.HashCode(myUpper);
63 anId2=aS2.HashCode(myUpper);
64 anId3=aS3.HashCode(myUpper);
66 GEOMAlgo_PassKey::SetIds(anId1, anId2, anId3);
68 //=======================================================================
71 //=======================================================================
72 void GEOMAlgo_PassKeyShape::SetIds(const TopoDS_Shape& aS1,
73 const TopoDS_Shape& aS2,
74 const TopoDS_Shape& aS3,
75 const TopoDS_Shape& aS4)
77 Standard_Integer anId1, anId2, anId3, anId4;
79 anId1=aS1.HashCode(myUpper);
80 anId2=aS2.HashCode(myUpper);
81 anId3=aS3.HashCode(myUpper);
82 anId4=aS4.HashCode(myUpper);
84 GEOMAlgo_PassKey::SetIds(anId1, anId2, anId3, anId4);
86 //=======================================================================
89 //=======================================================================
90 void GEOMAlgo_PassKeyShape::SetIds(const TopTools_ListOfShape& aLS)
92 Standard_Integer anId;
93 TopTools_ListIteratorOfListOfShape aIt;
94 TColStd_ListOfInteger aLI;
97 //if (aNb<1 || aNb > myNbMax) {
106 for (; aIt.More(); aIt.Next()) {
107 const TopoDS_Shape& aS=aIt.Value();
108 anId=aS.HashCode(myUpper);
111 GEOMAlgo_PassKey::SetIds(aLI);