Integration of OCCT 6.5.0 from SVN
[occt.git] / src / AIS / AIS_Shape.cdl
CommitLineData
7fd59977 1-- File: AIS_Shape.cdl
2-- Created: Fri Dec 20 15:18:05 1996
3-- Author: Robert COUBLANC
4-- <rob@robox.paris1.matra-dtv.fr>
5-- GG : GER61351 17/11/1999 Change SetColor() with a compatible Quantity_Color instead
6-- the restricted NameOfColor.
7-- Redefines the Color(),Material(),Transparency() methods
8-- for taking in acount the current facing model.
9-- GG : BUC60536 The compute methods must be defined "protected"
10-- and no more "private"
11
12---Copyright: Matra Datavision 1996
13
14
15class Shape from AIS inherits InteractiveObject from AIS
16
17 ---Purpose: A framework to manage presentation and selection of shapes.
18 -- AIS_Shape is the interactive object which is used the
19 -- most by applications. There are standard functions
20 -- available which allow you to prepare selection
21 -- operations on the constituent elements of shapes -
22 -- vertices, edges, faces etc - in an open local context.
23 -- The selection modes specific to "Shape" type objects
24 -- are referred to as Standard Activation Mode. These
25 -- modes are only taken into account in open local
26 -- context and only act on Interactive Objects which
27 -- have redefined the virtual method
28 -- AcceptShapeDecomposition so that it returns true.
29 -- Several advanced functions are also available. These
30 -- include functions to manage deviation angle and
31 -- deviation coefficient - both HLR and non-HLR - of
32 -- an inheriting shape class. These services allow you to
33 -- select one type of shape interactive object for higher
34 -- precision drawing. When you do this, the
35 -- AIS_Drawer::IsOwn... functions corresponding to the
36 -- above deviation angle and coefficient functions return
37 -- true indicating that there is a local setting available
38 -- for the specific object.
39
40uses
41 NameOfColor from Quantity,
42 Color from Quantity,
43 Box from Bnd,
44 ShapeEnum from TopAbs,
45 Shape from TopoDS,
46 GraphicObject from Graphic2d,
47 NameOfMaterial from Graphic3d ,
48 ---NameOfPhysicalMaterial from Graphic3d ,
49 MaterialAspect from Graphic3d,
50 Presentation from Prs3d,
51 Projector from Prs3d,
52 PresentationManager2d from PrsMgr,
53 PresentationManager3d from PrsMgr,
54 Selection from SelectMgr,
55 KindOfInteractive from AIS,
56 Transformation from Geom,
57 Drawer from Prs3d
58 is
59
60 Create(shap: Shape from TopoDS)
61 returns mutable Shape from AIS;
62 ---Purpose: Initializes construction of the shape shap from wires,
63 -- edges and vertices.
64
65 Signature(me) returns Integer from Standard is redefined virtual ;
66 ---Purpose: Returns index 0. This value refers to SHAPE from TopAbs_ShapeEnum
67
68 Type(me) returns KindOfInteractive from AIS is redefined virtual;
69 ---Purpose: Returns Object as the type of Interactive Object.
70
71 AcceptShapeDecomposition(me) returns Boolean from Standard is redefined virtual;
72 ---Purpose: Returns true if the Interactive Object accepts shape decomposition.
73
74 Set(me:mutable;ashap : Shape from TopoDS) is static;
75 ---Purpose: Constructs an instance of the shape object ashape.
76 ---C++: inline
77
78 Shape(me) returns Shape from TopoDS ;
79 ---Purpose: Returns this shape object.
80 ---C++: inline
81 ---C++: return const&
82
83
84 ---------------------------------------------------------------------
85 SetOwnDeviationCoefficient(me: mutable) returns Boolean from Standard ;
86 ---Purpose: Sets a local value for deviation coefficient for this specific shape.
87 SetOwnHLRDeviationCoefficient(me: mutable) returns Boolean from Standard ;
88 ---Purpose: Sets a local value for HLR deviation coefficient for this specific shape.
89 SetOwnDeviationAngle(me: mutable) returns Boolean from Standard ;
90 ---Purpose: Sets a local value for deviation angle for this specific shape.
91
92 SetOwnHLRDeviationAngle(me: mutable) returns Boolean from Standard ;
93 ---Purpose: Sets a local value for HLR deviation angle for this specific shape.
94
95
96 SetOwnDeviationCoefficient(me: mutable; aCoefficient: Real from Standard) ;
97 ---Purpose: Sets a local value for deviation coefficient for this specific shape.
98
99 SetOwnHLRDeviationCoefficient(me: mutable; aCoefficient : Real from Standard) ;
100 ---Purpose: sets myOwnHLRDeviationCoefficient field in AIS_Drawer &
101 -- recomputes presentation
102
103 SetAngleAndDeviation(me: mutable; anAngle: Real from Standard) ;
104 ---Purpose: this compute a new angle and Deviation from the value anAngle
105 -- and set the values stored in myDrawer with these that become local to the shape
106
107 UserAngle(me) returns Real from Standard;
108 ---Purpose: gives back the angle initial value put by the User.
109
110 SetOwnDeviationAngle(me: mutable; anAngle: Real from Standard) ;
111 ---Purpose: sets myOwnDeviationAngle field in AIS_Drawer & recomputes presentation
112
113
114 SetHLRAngleAndDeviation(me: mutable; anAngle: Real from Standard) ;
115 ---Purpose: this compute a new Angle and Deviation from the value anAngle for HLR
116 -- and set the values stored in myDrawer for with these that become local to the shape
117
118 SetOwnHLRDeviationAngle(me: mutable; anAngle: Real from Standard) ;
119 ---Purpose: sets myOwnHLRDeviationAngle field in AIS_Drawer & recomputes presentation
120
121
122 OwnDeviationCoefficient(me; aCoefficient : out Real from Standard ;
123 aPreviousCoefficient : out Real from Standard ) returns Boolean from Standard;
124 ---Purpose: Returns true and the values of the deviation
125 -- coefficient aCoefficient and the previous deviation
126 -- coefficient aPreviousCoefficient. If these values are
127 -- not already set, false is returned.
128
129 OwnHLRDeviationCoefficient(me; aCoefficient : out Real from Standard;
130 aPreviousCoefficient : out Real from Standard ) returns Boolean from Standard;
131 ---Purpose: Returns true and the values of the HLR deviation
132 -- coefficient aCoefficient and the previous HLR
133 -- deviation coefficient aPreviousCoefficient. If these
134 -- values are not already set, false is returned.
135
136 OwnDeviationAngle(me; anAngle: out Real from Standard;
137 aPreviousAngle : out Real from Standard ) returns Boolean from Standard;
138 ---Purpose: Returns true and the values of the deviation angle
139 -- anAngle and the previous deviation angle aPreviousAngle.
140 -- If these values are not already set, false is returned.
141
142
143 OwnHLRDeviationAngle(me; anAngle : out Real from Standard ;
144 aPreviousAngle : out Real from Standard ) returns Boolean from Standard;
145 ---Purpose: Returns true and the values of the HLR deviation
146 -- angle anAngle and of the previous HLR deviation
147 -- angle aPreviousAngle. If these values are not
148 -- already set, false is returned.
149
150
151
152
153
154 ---Category: Redefine Compute Methods...
155
156 Compute(me : mutable;
157 aPresentationManager : PresentationManager3d from PrsMgr;
158 aPresentation : mutable Presentation from Prs3d;
159 aMode : Integer from Standard = 0)
160 is redefined virtual protected;
161
162 Compute(me : mutable;
163 aPresentationManager : PresentationManager2d from PrsMgr;
164 aPresentation : mutable GraphicObject from Graphic2d;aMode:Integer from Standard = 0)
165 is redefined virtual protected;
166
167 Compute(me : mutable;
168 aProjector : Projector from Prs3d;
169 aPresentation : mutable Presentation from Prs3d)
170 is redefined virtual protected;
171
172 Compute(me : mutable;
173 aProjector : Projector from Prs3d;
174 aTrsf : Transformation from Geom;
175 aPresentation : mutable Presentation from Prs3d)
176 is redefined virtual protected;
177
178
179
180 ComputeSelection(me : mutable;
181 aSelection : mutable Selection from SelectMgr;
182 aMode : Integer from Standard)
183 is redefined virtual protected;
184
185
186 ---Category: The Attributes to be redefined
187
188
189 SetColor(me:mutable;aColor:NameOfColor from Quantity)
190 is redefined virtual;
191 ---Purpose: Sets the color aColor in the reconstructed
192 -- compound shape. Acts via the Drawer methods below on the appearance of:
193 -- - free boundaries:
194 -- AIS_Drawer_FreeBoundaryAspect,
195 -- - isos: AIS_Drawer_UIsoAspect,
196 -- AIS_Drawer_VIsoAspect,
197 -- - shared boundaries:
198 -- AIS_Drawer_UnFreeBoundaryAspect,
199 -- - shading: AIS_Drawer_ShadingAspect,
200 -- - visible line color in hidden line mode:
201 -- AIS_Drawer_SeenLineAspect
202 -- - hidden line color in hidden line mode:
203 -- AIS_Drawer_HiddenLineAspect.
204
205 SetColor(me:mutable;aColor:Color from Quantity)
206 is redefined virtual;
207
208 UnsetColor(me:mutable) is redefined virtual;
209 ---Purpose: Removes settings for color in the reconstructed compound shape.
210
211 SetWidth(me:mutable; aValue:Real from Standard) is redefined virtual;
212 ---Purpose: Sets the value aValue for line width in the reconstructed compound shape.
213 UnsetWidth(me:mutable) is redefined virtual;
214 ---Purpose: Removes the setting for line width in the reconstructed compound shape.
215
216 SetMaterial(me:mutable;aName:NameOfMaterial from Graphic3d) is redefined virtual;
217
218 SetMaterial(me:mutable;aName:MaterialAspect from Graphic3d) is redefined virtual;
219 ---Purpose: Allows you to provide settings for the material aName
220 -- in the reconstructed compound shape.
221
222 UnsetMaterial(me:mutable) is redefined virtual;
223 --- Purpose: Removes settings for material in the reconstructed compound shape.
224
225 SetTransparency(me:mutable;aValue : Real from Standard=0.6) is redefined virtual;
226 ---Purpose: Sets the value aValue for transparency in the reconstructed compound shape.
227
228 UnsetTransparency(me:mutable) is redefined virtual;
229 ---Purpose: Removes the setting for transparency in the reconstructed compound shape.
230
231 BoundingBox(me:mutable) returns Box from Bnd is virtual;
232 ---Purpose: Constructs a bounding box with which to reconstruct
233 -- compound topological shapes for presentation.
234 ---C++: return const &
235
236 Color(me) returns NameOfColor from Quantity is redefined;
237 ---Purpose: Returns the NameOfColor attributes of the shape accordingly to
238 -- the current facing model;
239
240 Color(me; aColor: out Color from Quantity) is redefined;
241 ---Purpose: Returns the Color attributes of the shape accordingly to
242 -- the current facing model;
243
244 Material(me) returns NameOfMaterial from Graphic3d is redefined;
245 ---Purpose: Returns the NameOfMaterial attributes of the shape accordingly to
246 -- the current facing model;
247
248 Transparency(me) returns Real from Standard is redefined;
249 ---Purpose: Returns the transparency attributes of the shape accordingly to
250 -- the current facing model;
251
252
253 ---Category:
254
255
256 SelectionType(myclass; aDecompositionMode : Integer from Standard)
257 returns ShapeEnum from TopAbs;
258 ---Purpose: Activates the same TopAbs shape enumerations as
259 -- those used by SelectionMode assigning a type to the mode aDecompositionMode.
260
261 SelectionMode(myclass; aShapeType : ShapeEnum from TopAbs)
262 returns Integer from Standard;
263 ---Purpose: Establishes an equivalence between a mode and the
264 -- type, aShapeType, of selection. The correspondences are as follows:
265 -- - mode 0 - Shape
266 -- - mode 1 - Vertex
267 -- - mode 2 - Edge
268 -- - mode 3 - Wire
269 -- - mode 4 - Face
270 -- - mode 5 - Shell
271 -- - mode 6 - Solid
272 -- - mode 7 - Compsolid
273 -- - mode 8 - Compound
274
275 LoadRecomputable(me:mutable;TheMode : Integer from Standard) is static private;
276
277 Compute(me : mutable;
278 aProjector : Projector from Prs3d;
279 aPresentation : mutable Presentation from Prs3d;
280 ashape : Shape from TopoDS) is static private;
281
282 GetDeflection(myclass; aShape : Shape from TopoDS;
283 aDrawer : Drawer from Prs3d)
284 returns Real from Standard;
285
286 DisplayBox(myclass; aPrs : Presentation from Prs3d;
287 aBox : Box from Bnd;
288 aDrawer : Drawer from Prs3d) is protected;
289
290
291fields
292 myshape : Shape from TopoDS is protected;
293 myBB : Box from Bnd is protected;
294 myCompBB : Boolean from Standard is protected;
295 myInitAng : Real from Standard;
296end Shape;