0022627: Change OCCT memory management defaults
[occt.git] / src / AIS / AIS_AngleDimension.cdl
1 -- File:        AIS_AngleDimension.cdl
2 -- Created:     Tue Dec  3 17:37:06 1996
3 -- Author:      Arnaud BOUZY/Odile Olivier
4 --              <odl@sacadox.paris1.matra-dtv.fr>
5 ---Copyright:    Matra Datavision 1996
6
7
8 class AngleDimension from AIS inherits Relation from AIS
9
10       
11          ---Purpose: A framework to define display of angles.
12          -- These displays are particularly useful in viewing draft prisms.
13          -- The angle displayed may define an intersection
14          -- can be between two edges or two faces of a shape
15          -- or a plane. The display consists of arrows and text.
16
17 uses Shape                 from TopoDS,
18      Presentation          from Prs3d,
19      PresentationManager3d from PrsMgr,
20      Selection             from SelectMgr,
21      Pnt                   from gp,
22      Dir                   from gp,
23      Circ                  from gp,
24      Line                  from Geom,
25      Ax1                   from gp,
26      Projector             from Prs3d,
27     Transformation        from Geom,
28      PresentationManager2d from PrsMgr,
29      GraphicObject         from Graphic2d,
30      Plane                 from Geom,
31      Surface               from Geom,
32      ExtendedString        from TCollection,
33      ArrowSide             from DsgPrs,
34      KindOfDimension       from AIS,   
35      Edge                  from TopoDS,    
36      Face                  from TopoDS    
37 is
38
39     Create (aFirstEdge       : Edge           from TopoDS;
40             aSecondEdge      : Edge           from TopoDS;
41             aPlane           : Plane          from Geom;
42             aVal             : Real           from Standard;
43             aText            : ExtendedString from TCollection)    
44          ---Purpose:  Constructs the angle display object defined by the
45          -- shapes aFShape, aSShape, the plane aPlane, the
46          -- value aVal and the text aText.
47          -- aFShape and aSShape are edges.
48     returns mutable AngleDimension from AIS;
49     
50  
51     Create (aFirstEdge       : Edge           from TopoDS;
52             aSecondEdge      : Edge           from TopoDS;
53             aPlane           : Plane          from Geom;
54             aVal             : Real           from Standard;
55             aText            : ExtendedString from TCollection;    
56             aPosition        : Pnt            from gp;
57             aSymbolPrs       : ArrowSide      from DsgPrs;    
58             anArrowSize      : Real           from Standard = 0.0)
59          ---Purpose: Constructs the angle display object defined by the
60          -- shapes aFShape, aSShape, the plane aPlane, the
61          -- value aVal, the text aText, the point aPosition, the
62          -- type of arrow aSymbolPrs, and the arrow length anArrowSize.
63          -- aFShape and aSShape are edges.
64     returns mutable AngleDimension from AIS;
65
66     Create (aCone       : Face           from TopoDS;
67             aVal        : Real           from Standard;
68             aText       : ExtendedString from TCollection)    
69          ---Purpose:  Angle of cone  
70     returns mutable AngleDimension from AIS;
71     
72    
73     Create (aCone            : Face           from TopoDS;
74             aVal             : Real           from Standard;
75             aText            : ExtendedString from TCollection;
76             aPosition        : Pnt            from gp;
77             aSymbolPrs       : ArrowSide      from DsgPrs;    
78             anArrowSize      : Real           from Standard = 0.01 )    
79          ---Purpose:  Angle of cone  
80     returns mutable AngleDimension from AIS;
81  --===================================================================       
82     
83     Create (aFirstFace  : Face           from TopoDS;
84             aSecondFace : Face           from TopoDS;
85             anAxis      : Ax1            from gp;
86             aVal        : Real           from Standard;
87             aText       : ExtendedString from TCollection)    
88           ---Purpose:  TwoPlanarFaceAngle dimension
89     returns mutable AngleDimension from AIS;
90
91     Create (aFirstFace  : Face           from TopoDS;
92             aSecondFace : Face           from TopoDS;
93             anAxis      : Ax1            from gp;
94             aVal        : Real           from Standard;
95             aText       : ExtendedString from TCollection;          
96             aPosition   : Pnt            from gp;
97             aSymbolPrs  : ArrowSide      from DsgPrs;    
98             anArrowSize : Real           from Standard = 0.0)
99           ---Purpose: TwoPlanarFacesAngle dimension  with   position
100           --           and text Face  can be Plane or Extrusion of line
101           --           or Offset of  those
102     returns mutable AngleDimension from AIS;
103
104
105     Create (aFFace      : Face           from TopoDS;
106             aSFace      : Face           from TopoDS;
107             aVal        : Real           from Standard;
108             aText       : ExtendedString from TCollection)    
109           ---Purpose:  Angle dimension between two curvilinear faces
110           --           Warning:
111           --           Requaired 0 <= aVal < PI,
112           --                     aVal must be defined exactly.
113     returns mutable AngleDimension from AIS;
114
115     Create (aFFace      : Face           from TopoDS;
116             aSFace      : Face           from TopoDS;
117             aVal        : Real           from Standard;
118             aText       : ExtendedString from TCollection;          
119             aPosition   : Pnt            from gp;
120             aSymbolPrs  : ArrowSide      from DsgPrs;    
121             anArrowSize : Real           from Standard = 0.001)
122          ---Purpose:  Angle dimension between two curvilinear faces
123          --           with position and text. Face can be Cone, Cylinder
124          --           Offset of Cone, Offset of Cylinder 
125     returns mutable AngleDimension from AIS;
126
127
128     Axis (me) 
129          ---Purpose:
130          -- Returns the axis set by the SetAxis method, which
131          -- serves to locate the angle between two faces.
132          ---C++: return const &
133          ---C++: inline 
134     returns Ax1 from gp 
135     is static;
136
137     SetAxis(me: mutable;anAxis : Ax1 from gp)
138          ---C++: inline
139          ---Purpose:
140          -- Sets the axis, anAxis, which serves to locate the
141          -- angle between two faces.
142     is static;
143
144     SetConeFace( me: mutable; aConeFace : Face from TopoDS )
145     is  static;
146
147     SetFirstShape( me: mutable; aFShape : Shape from TopoDS )
148     is redefined static;
149
150     SetSecondShape( me: mutable; aSShape : Shape from TopoDS )
151     is redefined static;
152
153
154     KindOfDimension(me) 
155          ---Purpose: Returns PLANEANGLE as the kind of dimension.
156          ---C++: inline
157     returns KindOfDimension from AIS 
158     is redefined;
159
160     IsMovable(me) returns Boolean from Standard 
161          ---C++: inline    
162          ---Purpose: Returns true if the angle dimension is movable.
163         
164     is redefined;
165     
166   -- Methods from PresentableObject
167
168     Compute(me            : mutable;
169             aPresentationManager: PresentationManager3d from PrsMgr;
170             aPresentation : mutable Presentation from Prs3d;
171             aMode         : Integer from Standard= 0) 
172     is redefined static private;
173     
174     Compute(me:mutable;
175                 aProjector: Projector from Prs3d;
176                 aPresentation: mutable Presentation from Prs3d)
177     is redefined static private;     
178
179     Compute(me:mutable;
180             aPresentationManager: PresentationManager2d from PrsMgr;
181             aPresentation: mutable GraphicObject from Graphic2d;
182             aMode: Integer from Standard = 0)
183     is redefined static private;        
184     
185     Compute(me            : mutable;
186             aProjector    : Projector from Prs3d;
187             aTrsf         : Transformation from Geom;
188             aPresentation : mutable Presentation from Prs3d)
189     is redefined;
190          ---Purpose: Computes the presentation according to a point of view
191          --          given by <aProjector>. 
192          --          This method should be used when the associated degenerated Presentations 
193          --          have been transformed by <aTrsf> which is not a Pure
194          --          Translation. The HLR Prs can't be deducted automatically
195          --          WARNING :<aTrsf> must be applied
196          --           to the object to display before computation  !!!
197
198 -- Methods from SelectableObject
199
200     ComputeSelection(me         : mutable;
201                      aSelection : mutable Selection from SelectMgr;
202                      aMode      : Integer from Standard)
203     is redefined private;
204
205     
206 --
207 --     Computation private methods
208 --
209
210     ComputeConeAngle(me: mutable; 
211                         aPresentation : mutable Presentation from Prs3d)
212     is private;
213
214     ComputeTwoFacesAngle(me: mutable;
215                           aPresentation : mutable Presentation from Prs3d)
216     is private;
217     
218     ComputeTwoPlanarFacesAngle(me: mutable;
219                           aPresentation : mutable Presentation from Prs3d)
220     is private;
221     
222     ComputeTwoCurvilinearFacesAngle(me: mutable;
223                           aPresentation : mutable Presentation from Prs3d)
224     is private;
225     
226     ComputeTwoEdgesAngle(me: mutable;
227                           aPresentation : mutable Presentation from Prs3d)
228     is private;
229     ComputeTwoEdgesNullAngle(me: mutable;
230                             aPresentation : mutable Presentation from Prs3d;  
231                             l1    : Line from Geom;
232                             l2    : Line from Geom;
233                             ptat11 : Pnt from gp;
234                             ptat12 : Pnt from gp;
235                             ptat21 : Pnt from gp;
236                             ptat22 : Pnt from gp;
237                             isInf1 : Boolean from Standard;
238                             isInf2 : Boolean from Standard )                        
239     is private;
240     
241     ComputeTwoEdgesNotNullAngle(me: mutable;
242                             aPresentation : mutable Presentation from Prs3d;  
243                             l1    : Line from Geom;
244                             l2    : Line from Geom;
245                             ptat11 : Pnt from gp;
246                             ptat12 : Pnt from gp;
247                             ptat21 : Pnt from gp;
248                             ptat22 : Pnt from gp;
249                             isInf1 : Boolean from Standard;
250                             isInf2 : Boolean from Standard )                        
251     is private;
252
253     Compute3DSelection(me         : mutable;
254                        aSelection : mutable Selection from SelectMgr)
255     is private;
256     
257     Compute2DSelection(me         : mutable;
258                        aSelection : mutable Selection from SelectMgr)
259     is private;
260     ComputeNull2DSelection(me         : mutable;
261                            aSelection : mutable Selection from SelectMgr; 
262                            distFS     : Real from Standard)
263     is private;
264
265     ComputeConeAngleSelection(me         : mutable;
266                               aSelection : mutable Selection from SelectMgr)
267     is private;    
268
269 fields
270
271     myNbShape  : Integer from Standard;
272     myCenter   : Pnt     from gp;
273     myFAttach  : Pnt     from gp;
274     mySAttach  : Pnt     from gp;
275     myFDir     : Dir     from gp;
276     mySDir     : Dir     from gp;
277     myAxis     : Ax1     from gp;
278     myCone     : Face    from TopoDS;
279    
280 end AngleDimension;