0023365: Name collision of global IsEqual() leads to overriding user's definition
[occt.git] / src / AIS / AIS_LengthDimension.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
22class LengthDimension from AIS inherits Relation from AIS
23
24 ---Purpose: A framework to display lengths.
25 -- These can be lengths along a face or edge, or
26 -- between two faces or two edges.
27 -- The value of the length is given in a text figuring in this display.
28
29uses Shape from TopoDS,
30 Face from TopoDS,
31 Presentation from Prs3d,
32 PresentationManager3d from PrsMgr,
33 Selection from SelectMgr,
34 Dir from gp,
35 Pnt from gp,
36 Projector from Prs3d,
37 Transformation from Geom,
38 PresentationManager2d from PrsMgr,
39 GraphicObject from Graphic2d,
40 ExtendedString from TCollection,
41 Plane from Geom,
42 TypeOfDist from AIS,
43 ArrowSide from DsgPrs,
44 KindOfDimension from AIS,
45 Drawer from Prs3d,
46 Edge from TopoDS,
47 Box from Bnd,
48 Drawer from AIS,
49 Vertex from TopoDS
50is
51
52
53
54 Create (aFirstFace : Face from TopoDS;
55 aSecondFace : Face from TopoDS;
56 aVal : Real from Standard; -- is defined while first compute, may be any Real
57 aText : ExtendedString from TCollection)
58 ---Purpose: Constructs a length display object defined by the first
59 -- face aFShape, the second face aSShape, the dimension aVal, and the text aText.
60
61 returns mutable LengthDimension from AIS;
62
63 Create (aFirstFace : Face from TopoDS;
64 aSecondFace : Face from TopoDS;
65 aVal : Real from Standard; -- is defined while first compute, may be any Real
66 aText : ExtendedString from TCollection;
67 aPosition : Pnt from gp;
68 aSymbolPrs : ArrowSide from DsgPrs;
69 anArrowSize : Real from Standard = 0.0)
70 ---Purpose: Constructs a length display object defined by the first
71 -- face aFShape, the second face aSShape, the
72 -- dimension aVal, the position aPosition, the arrow
73 -- aSymbolPrs with the size anArrowSize and the text aText.
74 returns mutable LengthDimension from AIS;
75
76 Create (Face : Face from TopoDS;
77 Edge : Edge from TopoDS;
78 Val : Real from Standard;
79 Text : ExtendedString from TCollection)
80 ---Purpose: Constructs a length display object defined by the first
81 -- edge or vertex aFShape, the second edge or vertex
82 -- aSShape, the dimension aVal,and the plane aPlane.
83 returns mutable LengthDimension from AIS;
84
85 Create (aFShape : Shape from TopoDS;
86 aSShape : Shape from TopoDS;
87 aPlane : Plane from Geom;
88 aVal : Real from Standard;
89 aText : ExtendedString from TCollection)
90 ---Purpose: -- Constructs a length display object defined by the first
91 -- edge or vertex aFShape, the second edge or vertex
92 -- aSShape, the dimension aVal,and the plane aPlane.
93 returns mutable LengthDimension from AIS;
94
95 Create (aFShape : Shape from TopoDS;
96 aSShape : Shape from TopoDS;
97 aPlane : Plane from Geom;
98 aVal : Real from Standard;
99 aText : ExtendedString from TCollection;
100 aPosition : Pnt from gp;
101 aSymbolPrs : ArrowSide from DsgPrs;
102 aTypeDist : TypeOfDist from AIS;
103 anArrowSize : Real from Standard = 0.0)
104 ---Purpose: Constructs a length display object defined by the first
105 -- edge or vertex aFShape, the second edge or vertex
106 -- aSShape, the dimension aVal, the position aPosition,
107 -- the type of distance aTypeDist, the type of arrow
108 -- aSymbolPrs with the size anArrowSize, and the plane aPlane.
109 returns mutable LengthDimension from AIS;
110
111 SetFirstShape( me: mutable; aFShape : Shape from TopoDS )
112 is redefined static;
113
114 SetSecondShape( me: mutable; aSShape : Shape from TopoDS )
115 is redefined static;
116
117 KindOfDimension(me)
118 returns KindOfDimension from AIS
119 is redefined;
120 ---Purpose: Indicates that we are concerned with a length.
121
122 IsMovable(me) returns Boolean from Standard
123 is redefined;
124 ---Purpose: Returns true if the length dimension is movable.
125
126 TypeOfDist (me)
127 ---C++: inline
128 --- Purpose:
129 -- Returns the type of distance of the length primitive.
130 returns TypeOfDist from AIS
131 is static;
132
133 SetTypeOfDist(me: mutable;aTypeDist: TypeOfDist from AIS)
134 ---C++: inline
135 --- Purpose:
136 -- Returns true if the length dimension is movable.
137 is static;
138
139
140 -- Methods from PresentableObject
141
142 Compute(me : mutable;
143 aPresentationManager : PresentationManager3d from PrsMgr;
144 aPresentation : mutable Presentation from Prs3d;
145 aMode : Integer from Standard= 0)
146 is redefined private;
147
148 Compute(me : mutable;
149 aProjector : Projector from Prs3d;
150 aPresentation : mutable Presentation from Prs3d)
151 is redefined static private;
152
153 Compute(me:mutable;
154 aPresentationManager: PresentationManager2d from PrsMgr;
155 aPresentation: mutable GraphicObject from Graphic2d;
156 aMode: Integer from Standard = 0)
157 is redefined static private;
158
159 Compute(me : mutable;
160 aProjector : Projector from Prs3d;
161 aTrsf : Transformation from Geom;
162 aPresentation : mutable Presentation from Prs3d)
163 is redefined;
164 ---Purpose: computes the presentation according to a point of view
165 -- given by <aProjector>.
166 -- To be Used when the associated degenerated Presentations
167 -- have been transformed by <aTrsf> which is not a Pure
168 -- Translation. The HLR Prs can't be deducted automatically
169 -- WARNING :<aTrsf> must be applied
170 -- to the object to display before computation !!!
171
172
173 -- Methods from SelectableObject
174
175 ComputeSelection(me : mutable;
176 aSelection : mutable Selection from SelectMgr;
177 aMode : Integer from Standard)
178 is redefined private;
179
180
181
182 -- Computation private methods
183
184 ComputeOneFaceLength(me : mutable;
185 aPresentation : mutable Presentation from Prs3d)
186 is private;
187
188 ComputeOneEdgeLength(me : mutable;
189 aPresentation : mutable Presentation from Prs3d)
190 is private;
191
192 ComputeTwoFacesLength(me: mutable;
193 aPresentation : mutable Presentation from Prs3d)
194 is private;
195
196
197 ComputeEdgeFaceLength (me: mutable;
198 aPresentation : mutable Presentation from Prs3d)
199 is private;
200
201
202 ComputeTwoEdgesLength (myclass;
203 aPresentation : mutable Presentation from Prs3d;
204 aDrawer : Drawer from AIS;
205 aText : ExtendedString from TCollection;
206 ArrowSize : Real from Standard;
207 FirstEdge : Edge from TopoDS;
208 SecondEdge : Edge from TopoDS;
209 Plane : Plane from Geom;
210 AutomaticPos : Boolean from Standard;
211 IsSetBndBox : Boolean from Standard;
212 BndBox : Box from Bnd;
213 ExtShape : out Integer from Standard;
214 Val : out Real from Standard;
215 DirAttach : out Dir from gp;
216 Position : out Pnt from gp;
217 FirstAttach : out Pnt from gp;
218 SecondAttach : out Pnt from gp;
219 SymbolPrs : out ArrowSide from DsgPrs );
220
221 ComputeOneEdgeOneVertexLength(myclass;
222 aPresentation : mutable Presentation from Prs3d;
223 aDrawer : Drawer from AIS;
224 aText : ExtendedString from TCollection;
225 ArrowSize : Real from Standard;
226 FirstShape : Shape from TopoDS;
227 SecondShape : Shape from TopoDS;
228 Plane : Plane from Geom;
229 AutomaticPos : Boolean from Standard;
230 IsSetBndBox : Boolean from Standard;
231 BndBox : Box from Bnd;
232 ExtShape : out Integer from Standard;
233 Val : out Real from Standard;
234 DirAttach : out Dir from gp;
235 Position : out Pnt from gp;
236 FirstAttach : out Pnt from gp;
237 SecondAttach : out Pnt from gp;
238 SymbolPrs : out ArrowSide from DsgPrs );
239
240 ComputeTwoVerticesLength(myclass;
241 aPresentation : mutable Presentation from Prs3d;
242 aDrawer : Drawer from AIS;
243 aText : ExtendedString from TCollection;
244 ArrowSize : Real from Standard;
245 FirstVertex : Vertex from TopoDS;
246 SecondVertex : Vertex from TopoDS;
247 Plane : Plane from Geom;
248 AutomaticPos : Boolean from Standard;
249 IsSetBndBox : Boolean from Standard;
250 BndBox : Box from Bnd;
251 TypeDist : TypeOfDist from AIS;
252 ExtShape : out Integer from Standard;
253 Val : out Real from Standard;
254 DirAttach : out Dir from gp;
255 Position : out Pnt from gp;
256 FirstAttach : out Pnt from gp;
257 SecondAttach : out Pnt from gp;
258 SymbolPrs : out ArrowSide from DsgPrs );
259
260
261--
262-- Computation Selection private methods
263--
264
265 ComputeFaceSelection(me : mutable;
266 aSelection : mutable Selection from SelectMgr)
267 is private;
268
269 ComputeEdgeVertexSelection( me : mutable;
270 aSelection : mutable Selection from SelectMgr)
271 is private;
272
273
274fields
275
276 myNbShape : Integer from Standard;
277 myFAttach : Pnt from gp;
278 mySAttach : Pnt from gp;
279 myDirAttach: Dir from gp;
280 myTypeDist : TypeOfDist from AIS;
281
282end LengthDimension;