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