0023365: Name collision of global IsEqual() leads to overriding user's definition
[occt.git] / src / AIS / AIS_DiameterDimension.cdl
CommitLineData
b311480e 1-- Created on: 1996-12-05
2-- Created by: Jacques MINOT/Odile Olivier/Serguei ZARITCHNY
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-- Modified Mon 12-january-98
7fd59977 22-- <odl@sacadox.paris1.matra-dtv.fr>,
7fd59977 23
24
25class DiameterDimension from AIS inherits Relation from AIS
26
27
28 ---Purpose: A framework to display diameter dimensions.
29 -- A diameter is displayed with arrows and text. The
30 -- text gives the length of the diameter.
31 -- The algorithm takes a length along a face and
32 -- analyzes it as an arc. It then reconstructs the circle
33 -- corresponding to the arc and calculates the
34 -- diameter of this circle. This diameter serves as a
35 -- relational reference in 3d presentations of the surface.
36
37uses
38
39 Shape from TopoDS,
40 Circ from gp,
41 Pnt from gp,
42 Pln from gp,
43 Plane from Geom,
44 Surface from Geom,
45 Presentation from Prs3d,
46 PresentationManager3d from PrsMgr,
47 Selection from SelectMgr,
48 Projector from Prs3d,
49 Transformation from Geom,
50 PresentationManager2d from PrsMgr,
51 GraphicObject from Graphic2d,
52 ExtendedString from TCollection,
53 ArrowSide from DsgPrs,
54 KindOfSurface from AIS,
55 KindOfDimension from AIS
56
57raises ConstructionError from Standard
58
59is
60 Create (aShape : Shape from TopoDS;
61 aVal : Real from Standard;
62 aText : ExtendedString from TCollection)
63 ---Purpose: Constructs a diameter display object defined by the
64 -- shape aFShape, the dimension aVal and the text aText.
65 returns mutable DiameterDimension from AIS;
66
67 Create (aShape : Shape from TopoDS;
68 aVal : Real from Standard;
69 aText : ExtendedString from TCollection;
70 aPosition : Pnt from gp;
71 aSymbolPrs : ArrowSide from DsgPrs;
72 aDiamSymbol : Boolean from Standard;
73 anArrowSize : Real from Standard = 0.0)
74 ---Purpose: Constructs a diameter display object defined by the
75 -- shape aFShape, the dimension aVal and the text
76 -- aText, the point of origin of the diameter aPosition,
77 -- and the type of arrow aSymbolPrs with the size anArrowSize.
78 -- If the Boolean aDiamSymbol is true.
79 returns mutable DiameterDimension from AIS;
80
81 KindOfDimension(me) returns KindOfDimension from AIS
82 ---C++: inline
83 ---Purpose:
84 -- Indicates that we are concerned with a length.
85 is redefined;
86
87 IsMovable(me) returns Boolean from Standard
88 ---C++: inline
89 ---Purpose:
90 -- Returns true if the diameter dimension is movable
91 is redefined;
92
93 DiamSymbol(me: mutable) returns Boolean from Standard
94 ---C++: inline
95 ---Purpose:
96 -- Returns the symbol for diameter dimension. This will
97 -- be either arrow, text, or a combination of both.
98 is static;
99
100 SetDiamSymbol(me: mutable;aDiamSymbol: Boolean from Standard)
101 ---C++: inline
102 ---Purpose:
103 -- Sets the symbol for diameter dimension aDiamSymbol.
104 -- This can be an arrow, a text or both.
105 is static;
106
107-- SetPlane(me: mutable; aPlane : Plane from Geom)
108-- is static;
109-- ---C++: inline
110
111-- Plane(me) returns any Plane from Geom
112-- is static;
113-- ---C++: inline
114-- ---C++: return const &
115
116
117-- Methods from PresentableObject
118
119 Compute(me : mutable;
120 aPresentationManager: PresentationManager3d from PrsMgr;
121 aPresentation : mutable Presentation from Prs3d;
122 aMode : Integer from Standard= 0)
123 is redefined private;
124
125 Compute(me:mutable;
126 aProjector: Projector from Prs3d;
127 aPresentation: mutable Presentation from Prs3d)
128 is redefined static private;
129
130 Compute(me:mutable;
131 aPresentationManager: PresentationManager2d from PrsMgr;
132 aPresentation: mutable GraphicObject from Graphic2d;
133 aMode: Integer from Standard = 0)
134 is redefined static private;
135
136 Compute(me : mutable;
137 aProjector : Projector from Prs3d;
138 aTrsf : Transformation from Geom;
139 aPresentation : mutable Presentation from Prs3d)
140 is redefined;
141 ---Purpose: computes the presentation according to a point of view
142 -- given by <aProjector>.
143 -- To be Used when the associated degenerated Presentations
144 -- have been transformed by <aTrsf> which is not a Pure
145 -- Translation. The HLR Prs can't be deducted automatically
146 -- WARNING :<aTrsf> must be applied
147 -- to the object to display before computation !!!
148
149-- Methods from SelectableObject
150
151 ComputeSelection(me : mutable;
152 aSelection : mutable Selection from SelectMgr;
153 aMode : Integer from Standard)
154 is redefined private;
155
156--
157-- Computation private methods
158--
159
160 ComputeOneFaceDiameter(me: mutable;
161 aPresentation : mutable Presentation from Prs3d)
162 is private;
163
164 ComputeOneCylFaceDiameter(me: mutable;
165 aPresentation : mutable Presentation from Prs3d;
166 aSurfType : KindOfSurface from AIS;
167 aSurf : Surface from Geom )
168 is private;
169
170 ComputeOnePlanarFaceDiameter(me: mutable;
171 aPresentation : mutable Presentation from Prs3d )
172 is private;
173
174 ComputeOneEdgeDiameter(me: mutable;
175 aPresentation : mutable Presentation from Prs3d)
176 is private;
177
178 ComputeCircleDiameter(me: mutable;
179 aPresentation : mutable Presentation from Prs3d)
180 is private;
181
182 ComputeArcDiameter(me: mutable;
183 aPresentation : mutable Presentation from Prs3d;
184 ptFirst : Pnt from gp;
185 ptend : Pnt from gp)
186 is private;
187
188 ComputeArcSelection(me : mutable;
189 aSelection : mutable Selection from SelectMgr)
190 is private;
191
192fields
193
194 myCircle : Circ from gp;
195 myIsAnArc : Boolean from Standard;
196 myDiamSymbol : Boolean from Standard;
197 myFirstPar : Real from Standard;
198 myLastPar : Real from Standard;
199
200end DiameterDimension;