1 -- Created on: 1995-10-26
2 -- Created by: Yves FRICAUD
3 -- Copyright (c) 1995-1999 Matra Datavision
4 -- Copyright (c) 1999-2012 OPEN CASCADE SAS
6 -- The content of this file is subject to the Open CASCADE Technology Public
7 -- License Version 6.5 (the "License"). You may not use the content of this file
8 -- except in compliance with the License. Please obtain a copy of the License
9 -- at http://www.opencascade.org and read it completely before using this file.
11 -- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
12 -- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
14 -- The Original Code and all software distributed under the License is
15 -- distributed on an "AS IS" basis, without warranty of any kind, and the
16 -- Initial Developer hereby disclaims all such warranties, including without
17 -- limitation, any warranties of merchantability, fitness for a particular
18 -- purpose or non-infringement. Please see the License for the specific terms
19 -- and conditions governing the rights and limitations under the License.
23 class AsDes from BRepAlgo inherits TShared from MMgt
25 ---Purpose: SD to store descendants and ascendants of Shapes.
28 DataMapOfShapeListOfShape from TopTools,
29 ListOfShape from TopTools,
33 ConstructionError from Standard
36 Create returns mutable AsDes from BRepAlgo;
37 ---Purpose: Creates an empty AsDes.
41 Add (me : mutable ; S : Shape from TopoDS;
42 SS : Shape from TopoDS)
43 ---Purpose: Stores <SS> as a futur subshape of <S>.
46 Add (me : mutable ; S : Shape from TopoDS;
47 SS : ListOfShape from TopTools)
48 ---Purpose: Stores <SS> as futurs SubShapes of <S>.
51 HasAscendant(me; S : Shape from TopoDS)
52 returns Boolean from Standard;
54 HasDescendant(me; S : Shape from TopoDS)
55 returns Boolean from Standard;
57 Ascendant (me; S : Shape from TopoDS)
58 ---Purpose: Returns the Shape containing <S>.
59 ---C++: return const &
60 returns ListOfShape from TopTools;
62 Descendant (me; S : Shape from TopoDS)
63 ---Purpose: Returns futur subhapes of <S>.
64 ---C++: return const &
65 returns ListOfShape from TopTools;
67 ChangeDescendant (me : mutable; S : Shape from TopoDS)
68 ---Purpose: Returns futur subhapes of <S>.
70 returns ListOfShape from TopTools;
72 Replace ( me : mutable; OldS, NewS : Shape from TopoDS)
73 ---Purpose: Replace <OldS> by <NewS>.
74 -- <OldS> disapear from <me>.
78 S : Shape from TopoDS)
79 ---Purpose: Remove <S> from me.
81 ConstructionError -- if <S> HasDescendant.
84 HasCommonDescendant (me ;
85 S1 : Shape from TopoDS;
86 S2 : Shape from TopoDS;
87 LC : in out ListOfShape from TopTools)
88 ---Purpose: Returns True if (S1> and <S2> has common
89 -- Descendants. Stores in <LC> the Commons Descendants.
90 returns Boolean from Standard;
92 BackReplace ( me : mutable;
93 OldS : Shape from TopoDS;
94 NewS : Shape from TopoDS;
95 L : ListOfShape from TopTools;
96 InUp : Boolean from Standard)
97 ---Purpose: Replace <OldS> by <NewS>.
98 -- <OldS> disapear from <me>.
104 up : DataMapOfShapeListOfShape from TopTools;
105 down : DataMapOfShapeListOfShape from TopTools;