b311480e |
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 |
5 | -- |
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. |
10 | -- |
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. |
13 | -- |
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. |
20 | |
7fd59977 |
21 | |
22 | |
23 | class Image from BRepAlgo |
24 | |
25 | ---Purpose: Stores link between a shape <S> and a shape <NewS> |
26 | -- obtained from <S>. <NewS> is an image of <S>. |
27 | |
28 | uses |
29 | Shape from TopoDS, |
30 | ShapeEnum from TopAbs, |
31 | ListOfShape from TopTools, |
32 | DataMapOfShapeListOfShape from TopTools, |
33 | DataMapOfShapeShape from TopTools |
34 | |
35 | raises |
36 | ConstructionError from Standard |
37 | |
38 | is |
39 | Create; |
40 | |
41 | SetRoot (me : in out; S : Shape from TopoDS) |
42 | is static; |
43 | |
44 | |
45 | Bind (me : in out; OldS : Shape from TopoDS; |
46 | NewS : Shape from TopoDS) |
47 | ---Purpose: Links <NewS> as image of <OldS>. |
48 | raises |
49 | ConstructionError -- if Olds has image. |
50 | is static; |
51 | |
52 | |
53 | Bind (me : in out; OldS : Shape from TopoDS; |
54 | NewS : ListOfShape from TopTools) |
55 | ---Purpose: Links <NewS> as image of <OldS>. |
56 | raises |
57 | ConstructionError -- if Olds has image. |
58 | is static; |
59 | |
60 | |
61 | Add (me : in out; OldS : Shape from TopoDS; |
62 | NewS : Shape from TopoDS) |
63 | ---Purpose: Add <NewS> to the image of <OldS>. |
64 | raises |
65 | ConstructionError -- if Olds has not image. |
66 | is static; |
67 | |
68 | |
69 | Add (me : in out; OldS : Shape from TopoDS; |
70 | NewS : ListOfShape from TopTools) |
71 | ---Purpose: Add <NewS> to the image of <OldS>. |
72 | raises |
73 | ConstructionError -- if Olds has not image. |
74 | is static; |
75 | |
76 | Clear(me : in out) |
77 | is static; |
78 | |
79 | Remove(me : in out; S : Shape from TopoDS) |
80 | ---Purpose: Remove <S> to set of images. |
81 | raises |
82 | ConstructionError -- if S is not an image. |
83 | is static; |
84 | |
85 | Roots (me) |
86 | ---C++: return const & |
87 | returns ListOfShape from TopTools |
88 | is static; |
89 | |
90 | IsImage (me; S : Shape from TopoDS) |
91 | returns Boolean from Standard |
92 | is static; |
93 | |
94 | ImageFrom (me; S : Shape from TopoDS) |
95 | ---Purpose: Returns the generator of <S> |
96 | ---C++: return const & |
97 | returns Shape from TopoDS |
98 | is static; |
99 | |
100 | Root (me; S : Shape from TopoDS) |
101 | ---Purpose: Returns the upper generator of <S> |
102 | ---C++: return const & |
103 | returns Shape from TopoDS |
104 | is static; |
105 | |
106 | HasImage (me; S : Shape from TopoDS) |
107 | returns Boolean from Standard |
108 | is static; |
109 | |
110 | Image (me; S : Shape from TopoDS) |
111 | ---Purpose: Returns the Image of <S>. |
112 | -- Returns <S> in the list if HasImage(S) is false. |
113 | ---C++: return const & |
114 | returns ListOfShape from TopTools |
115 | is static; |
116 | |
117 | LastImage (me; S : Shape from TopoDS; |
118 | L : in out ListOfShape from TopTools) |
119 | ---Purpose: Stores in <L> the images of images of...images of <S>. |
120 | -- <L> contains only <S> if HasImage(S) is false. |
121 | is static; |
122 | |
123 | Compact (me : in out) |
124 | ---Purpose: Keeps only the link between roots and lastimage. |
125 | is static; |
126 | |
127 | Filter (me : in out; |
128 | S : Shape from TopoDS; |
129 | ShapeType : ShapeEnum from TopAbs); |
130 | ---Purpose: Deletes in the images the shape of type <ShapeType> |
131 | -- which are not in <S>. |
132 | -- Warning: Compact() must be call before. |
133 | |
134 | fields |
135 | |
136 | roots : ListOfShape from TopTools; |
137 | up : DataMapOfShapeShape from TopTools; |
138 | down : DataMapOfShapeListOfShape from TopTools; |
139 | |
140 | end Image; |