b311480e |
1 | -- Created on: 1995-10-26 |
2 | -- Created by: Yves FRICAUD |
3 | -- Copyright (c) 1995-1999 Matra Datavision |
973c2be1 |
4 | -- Copyright (c) 1999-2014 OPEN CASCADE SAS |
b311480e |
5 | -- |
973c2be1 |
6 | -- This file is part of Open CASCADE Technology software library. |
b311480e |
7 | -- |
973c2be1 |
8 | -- This library is free software; you can redistribute it and / or modify it |
9 | -- under the terms of the GNU Lesser General Public version 2.1 as published |
10 | -- by the Free Software Foundation, with special exception defined in the file |
11 | -- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT |
12 | -- distribution for complete text of the license and disclaimer of any warranty. |
b311480e |
13 | -- |
973c2be1 |
14 | -- Alternatively, this file may be used under the terms of Open CASCADE |
15 | -- commercial license or contractual agreement. |
7fd59977 |
16 | |
17 | class AsDes from BRepAlgo inherits TShared from MMgt |
18 | |
19 | ---Purpose: SD to store descendants and ascendants of Shapes. |
20 | |
21 | uses |
22 | DataMapOfShapeListOfShape from TopTools, |
23 | ListOfShape from TopTools, |
24 | Shape from TopoDS |
25 | |
26 | raises |
27 | ConstructionError from Standard |
28 | |
29 | is |
30 | Create returns mutable AsDes from BRepAlgo; |
31 | ---Purpose: Creates an empty AsDes. |
32 | |
33 | Clear(me : mutable); |
34 | |
35 | Add (me : mutable ; S : Shape from TopoDS; |
36 | SS : Shape from TopoDS) |
37 | ---Purpose: Stores <SS> as a futur subshape of <S>. |
38 | is static; |
39 | |
40 | Add (me : mutable ; S : Shape from TopoDS; |
41 | SS : ListOfShape from TopTools) |
42 | ---Purpose: Stores <SS> as futurs SubShapes of <S>. |
43 | is static; |
44 | |
45 | HasAscendant(me; S : Shape from TopoDS) |
46 | returns Boolean from Standard; |
47 | |
48 | HasDescendant(me; S : Shape from TopoDS) |
49 | returns Boolean from Standard; |
50 | |
51 | Ascendant (me; S : Shape from TopoDS) |
52 | ---Purpose: Returns the Shape containing <S>. |
53 | ---C++: return const & |
54 | returns ListOfShape from TopTools; |
55 | |
56 | Descendant (me; S : Shape from TopoDS) |
57 | ---Purpose: Returns futur subhapes of <S>. |
58 | ---C++: return const & |
59 | returns ListOfShape from TopTools; |
60 | |
61 | ChangeDescendant (me : mutable; S : Shape from TopoDS) |
62 | ---Purpose: Returns futur subhapes of <S>. |
63 | ---C++: return & |
64 | returns ListOfShape from TopTools; |
65 | |
66 | Replace ( me : mutable; OldS, NewS : Shape from TopoDS) |
67 | ---Purpose: Replace <OldS> by <NewS>. |
68 | -- <OldS> disapear from <me>. |
69 | is static; |
70 | |
71 | Remove (me : mutable; |
72 | S : Shape from TopoDS) |
73 | ---Purpose: Remove <S> from me. |
74 | raises |
75 | ConstructionError -- if <S> HasDescendant. |
76 | is static; |
77 | |
78 | HasCommonDescendant (me ; |
79 | S1 : Shape from TopoDS; |
80 | S2 : Shape from TopoDS; |
81 | LC : in out ListOfShape from TopTools) |
82 | ---Purpose: Returns True if (S1> and <S2> has common |
83 | -- Descendants. Stores in <LC> the Commons Descendants. |
84 | returns Boolean from Standard; |
85 | |
86 | BackReplace ( me : mutable; |
87 | OldS : Shape from TopoDS; |
88 | NewS : Shape from TopoDS; |
89 | L : ListOfShape from TopTools; |
90 | InUp : Boolean from Standard) |
91 | ---Purpose: Replace <OldS> by <NewS>. |
92 | -- <OldS> disapear from <me>. |
93 | is static private; |
94 | |
95 | |
96 | fields |
97 | |
98 | up : DataMapOfShapeListOfShape from TopTools; |
99 | down : DataMapOfShapeListOfShape from TopTools; |
100 | |
101 | end AsDes; |