0024133: Development of improvement of dimensions implementation; new length, radius...
[occt.git] / src / AIS / AIS_Relation.cdl
CommitLineData
b311480e 1-- Created on: 1997-02-27
2-- Created by: Odile Olivier
3-- Copyright (c) 1997-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-- GG : GER61351 17/11/1999 Change SetColor() with a compatible Quantity_Color instead
22-- the restricted NameOfColor.
23-- GG : BUC60915 05/06/01 Enable to compute the requested arrow size if any
24-- in all dimensions, add a field myArrowSizeIsDefined.
7fd59977 25
26deferred class Relation from AIS inherits InteractiveObject from AIS
27
28 ---Purpose: One of the four types of interactive object in
29 -- AIS,comprising dimensions and constraints. Serves
30 -- as the abstract class for the seven relation classes as
31 -- well as the seven dimension classes.
32 -- The statuses available for relations between shapes are as follows:
33 -- - 0 - there is no connection to a shape;
34 -- - 1 - there is a connection to the first shape;
35 -- - 2 - there is a connection to the second shape.
36 -- The connection takes the form of an edge between the two shapes.
37
38uses
39 TypeOfPresentation3d from PrsMgr,
40 Shape from TopoDS,
41 Edge from TopoDS,
42 Vertex from TopoDS,
43 Pnt from gp,
44 ExtendedString from TCollection,
45 Plane from Geom,
46 ArrowSide from DsgPrs,
47 KindOfDimension from AIS,
48 Presentation from Prs3d,
49 Curve from Geom,
50 NameOfColor from Quantity,
a6eb515f 51 Color from Quantity,
7fd59977 52 TypeOfLine from Aspect,
53 TypeOfMarker from Aspect,
54 KindOfInteractive from AIS,
55
56 Pln from gp,
57 Surface from Geom,
58 KindOfSurface from AIS,
59 Box from Bnd
60is
61 Initialize(aTypeOfPresentation3d: TypeOfPresentation3d from PrsMgr = PrsMgr_TOP_AllView) ;
62
63 SetColor(me :mutable; aColor : NameOfColor from Quantity)
64 is redefined static;
65 ---Purpose: Allows you to provide settings for the color aColor
66 -- of the lines representing the relation between the two shapes.
67
68 SetColor(me :mutable; aColor : Color from Quantity)
69 is redefined static;
70
71 UnsetColor(me:mutable)
72 is redefined static;
73 ---Purpose: Allows you to remove settings for the color of the
74 -- lines representing the relation between the two shapes.
75
76 Type(me) returns KindOfInteractive from AIS is redefined;
77 ---C++: inline
78
79 KindOfDimension(me) returns KindOfDimension from AIS is virtual;
80 ---Purpose: Indicates that the type of dimension is unknown.
81
82 IsMovable(me) returns Boolean from Standard is virtual;
83 ---Purpose: Returns true if the interactive object is movable.
84
85 FirstShape(me) returns Shape from TopoDS
86 is static;
87 ---C++: return const &
88 ---C++: inline
89
90 SetFirstShape(me: mutable;aFShape : Shape from TopoDS)
91 is virtual;
92
93 SecondShape(me) returns Shape from TopoDS
94 is static;
95 ---Purpose: Returns the second shape.
96 ---C++: inline
97 ---C++: return const &
98
99 SetSecondShape(me: mutable;aSShape : Shape from TopoDS)
100 is virtual;
101 --- Purpose: Allows you to identify the second shape aSShape
102 -- relative to the first.
103
104 SetBndBox( me: mutable; Xmin, Ymin, Zmin, Xmax, Ymax, Zmax : Real from Standard );
105 ---C++: inline
106
107 UnsetBndBox( me: mutable );
108 ---C++: inline
109
110 Plane(me) returns any Plane from Geom
111 is static;
112 ---Purpose: Returns the plane.
113 ---C++: inline
114 ---C++: return const &
115
116 SetPlane(me: mutable;aPlane : Plane from Geom)
117 is static;
118 ---Purpose:
119 -- Allows you to set the plane aPlane. This is used to
120 -- define relations and dimensions in several daughter classes.
121 ---C++: inline
122
123 Value(me) returns Real from Standard
124 is static;
125 ---Purpose: Returns the value of each object in the relation.
126 ---C++: inline
127
128 SetValue(me: mutable;aVal : Real from Standard)
129 is static;
130 ---Purpose: Allows you to provide settings for the value aVal for
131 -- each object in the relation.
132 ---C++: inline
133
134 Position(me) returns Pnt from gp
135 is static;
136 ---Purpose: Returns the position set using SetPosition.
137 ---C++: inline
138 ---C++: return const &
139
140 SetPosition(me: mutable;aPosition: Pnt from gp)
141 is static;
142 ---Purpose:
143 -- Allows you to provide the objects in the relation with
144 -- settings for a non-default position.
145 ---C++: inline
146
147 Text(me) returns ExtendedString from TCollection
148 is static;
149 ---Purpose: Returns settings for text aspect.
150 ---C++: inline
151 ---C++: return const &
152
153 SetText(me: mutable;aText:ExtendedString from TCollection)
154 is static;
155 ---Purpose: Allows you to provide the settings aText for text aspect.
156 ---C++: inline
157
158 ArrowSize (me) returns Real from Standard
159 is static;
160 ---Purpose:
161 -- Returns the value for the size of the arrow identifying
162 -- the relation between the two shapes.
163 ---C++: inline
164
165 SetArrowSize(me: mutable;anArrowSize: Real from Standard)
166 is static;
167 ---C++: inline
168 ---Purpose:
169 -- Allows you to provide settings for the size of the
170 -- arrow anArrowsize identifying the relation between the two shapes.
171
172 SymbolPrs (me) returns ArrowSide from DsgPrs
173 is static;
174 ---C++: inline
175 ---Purpose:
176 -- Returns the value of the symbol presentation. This will be one of:
177 -- - AS_NONE - none
178 -- - AS_FIRSTAR - first arrow
179 -- - AS_LASTAR - last arrow
180 -- - AS_BOTHAR - both arrows
181 -- - AS_FIRSTPT - first point
182 -- - AS_LASTPT - last point
183 -- - AS_BOTHPT - both points
184 -- - AS_FIRSTAR_LASTPT - first arrow, last point
185 -- - AS_FIRSTPT_LASTAR - first point, last arrow
186
187 SetSymbolPrs(me: mutable;aSymbolPrs: ArrowSide from DsgPrs)
188 is static;
189 ---C++: inline
190 ---Purpose:
191 -- Allows you to provide settings for the symbol presentation.
192
193 SetExtShape(me:mutable; aIndex : Integer from Standard);
194 ---C++: inline
195 ---Purpose:
196 -- Allows you to set the status of the extension shape by
197 -- the index aIndex.
198 -- The status will be one of the following:
199 -- - 0 - there is no connection to a shape;
200 -- - 1 - there is a connection to the first shape;
201 -- - 2 - there is a connection to the second shape.
202
203 ExtShape(me)
204 returns Integer from Standard;
205 ---Purpose:
206 -- Returns the status index of the extension shape.
207 ---C++: inline
208
209 AcceptDisplayMode(me;aMode:Integer from Standard) returns Boolean from Standard is redefined virtual;
210 ---Purpose:
211 -- Returns true if the display mode aMode is accepted
212 -- for the Interactive Objects in the relation.
213 -- ComputeProjPresentation(me;
214 -- aPres : mutable Presentation from Prs3d;
215 -- Curve1 : Curve from Geom;
216 -- Curve2 : Curve from Geom;
217 -- FirstP1 : Pnt from gp;
218 -- LastP1 : Pnt from gp;
219 -- FirstP2 : Pnt from gp;
220 -- LastP2 : Pnt from gp;
221 -- aColor : NameOfColor from Quantity = Quantity_NOC_PURPLE;
222 -- aWidth : Real from Standard = 2;
223 -- aProjTOL : TypeOfLine from Aspect = Aspect_TOL_DASH;
224 -- aCallTOL : TypeOfLine from Aspect = Aspect_TOL_DOT)
225 --is protected;
226
227 ComputeProjEdgePresentation(me;
228 aPres : mutable Presentation from Prs3d;
229 anEdge : Edge from TopoDS;
230 ProjCurve: Curve from Geom;
231 FirstP : Pnt from gp;
232 LastP : Pnt from gp;
233 aColor : NameOfColor from Quantity = Quantity_NOC_PURPLE;
234 aWidth : Real from Standard = 2;
235 aProjTOL : TypeOfLine from Aspect = Aspect_TOL_DASH;
236 aCallTOL : TypeOfLine from Aspect = Aspect_TOL_DOT)
237 is protected;
238 ---Purpose: Calculates the presentation aPres of the the edge
239 -- anEdge and the curve it defines, ProjCurve. The later
240 -- is also specified by the first point FirstP and the last point LastP.
241 -- The presentation includes settings for color aColor,
242 -- type - aProjTOL and aCallTOL - and width of line, aWidth.
243
244 ComputeProjVertexPresentation(me;
245 aPres : mutable Presentation from Prs3d;
246 aVertex : Vertex from TopoDS;
247 ProjPoint: Pnt from gp;
248 aColor : NameOfColor from Quantity = Quantity_NOC_PURPLE;
249 aWidth : Real from Standard = 2;
250 aProjTOM : TypeOfMarker from Aspect = Aspect_TOM_PLUS;
251 aCallTOL : TypeOfLine from Aspect = Aspect_TOL_DOT)
252 is protected;
253
254 ---Purpose: Calculates the presentation aPres of the the vertex
255 -- aVertex and the point it defines, ProjPoint.
256 -- The presentation includes settings for color aColor,
257 -- type - aProjTOM and aCallTOL - and width of line, aWidth.
258
259 SetAutomaticPosition ( me : mutable ; aStatus : Boolean from Standard );
260 ---C++: inline
261
262 AutomaticPosition ( me )
263 returns Boolean from Standard ;
264 ---C++: inline
265
266fields
267
268 myFShape : Shape from TopoDS is protected;
269 mySShape : Shape from TopoDS is protected;
270 myPlane : Plane from Geom is protected;
271 myVal : Real from Standard is protected;
272 myPosition : Pnt from gp is protected;
273 myText : ExtendedString from TCollection is protected;
274 myArrowSize: Real from Standard is protected;
275 myAutomaticPosition : Boolean from Standard is protected;
276 mySymbolPrs: ArrowSide from DsgPrs is protected;
277 myExtShape : Integer from Standard is protected;
278 ---purpose: (0 no attachment,1 attachment with first shape, 2 attachment with second shape)
279
280 myFirstPlane : Pln from gp is protected;
281 mySecondPlane : Pln from gp is protected;
282 myFirstBasisSurf : Surface from Geom is protected;
283 mySecondBasisSurf : Surface from Geom is protected;
284
285 myFirstSurfType : KindOfSurface from AIS is protected;
286 mySecondSurfType : KindOfSurface from AIS is protected;
287
288 myFirstOffset : Real from Standard is protected;
289 mySecondOffset : Real from Standard is protected;
290
291 myBndBox : Box from Bnd is protected;
292 myIsSetBndBox : Boolean from Standard is protected;
293 myArrowSizeIsDefined: Boolean from Standard is protected;
294
295end Relation;