7fd59977 |
1 | -- File: AIS_EqualDistanceRelation.cdl |
2 | -- Created: Sat Jan 24 18:23:51 1998 |
3 | -- Author: Julia GERASIMOVA |
4 | -- <jgv@leonox.nnov.matra-dtv.fr> |
5 | ---Copyright: Matra Datavision 1998 |
6 | |
7 | |
8 | class EqualDistanceRelation from AIS inherits Relation from AIS |
9 | |
10 | ---Purpose: A framework to display equivalent distances between |
11 | -- shapes and a given plane. |
12 | -- The distance is the length of a projection from the |
13 | -- shape to the plane. |
14 | -- These distances are used to compare shapes by this vector alone. |
15 | |
16 | uses |
17 | Shape from TopoDS, |
18 | Plane from Geom, |
19 | PresentationManager3d from PrsMgr, |
20 | Presentation from Prs3d, |
21 | Projector from Prs3d, |
22 | Transformation from Geom, |
23 | PresentationManager2d from PrsMgr, |
24 | GraphicObject from Graphic2d, |
25 | Selection from SelectMgr, |
26 | Pnt from gp, |
27 | Drawer from AIS, |
28 | ExtendedString from TCollection, |
29 | Edge from TopoDS, |
30 | Vertex from TopoDS, |
31 | Box from Bnd, |
32 | Dir from gp, |
33 | ArrowSide from DsgPrs, |
34 | TypeOfDist from AIS |
35 | |
36 | is |
37 | Create( aShape1 : Shape from TopoDS; |
38 | aShape2 : Shape from TopoDS; |
39 | aShape3 : Shape from TopoDS; |
40 | aShape4 : Shape from TopoDS; |
41 | aPlane : Plane from Geom ) |
42 | ---Purpose: Constructs a framework to display equivalent |
43 | -- distances between the shapes aShape1, aShape2, |
44 | -- aShape3, aShape4 and the plane aPlane. |
45 | -- The distance is the length of a projection from the |
46 | -- shape to the plane. |
47 | returns mutable EqualDistanceRelation from AIS; |
48 | |
49 | SetShape3( me: mutable; aShape : Shape from TopoDS ) |
50 | is static; |
51 | ---Purpose: |
52 | -- Sets the shape aShape to be used as the shape |
53 | -- aShape3 in the framework created at construction time. |
54 | ---C++: inline |
55 | |
56 | Shape3(me) returns Shape from TopoDS |
57 | is static; |
58 | ---Purpose: |
59 | -- Returns the shape aShape3 from the framework |
60 | -- created at construction time. |
61 | ---C++: return const & |
62 | ---C++: inline |
63 | |
64 | SetShape4( me: mutable; aShape : Shape from TopoDS ) |
65 | is static; |
66 | ---C++: inline |
67 | ---Purpose: |
68 | -- Sets the shape aShape to be used as the shape |
69 | -- aShape4 in the framework created at construction time. |
70 | |
71 | Shape4(me) returns Shape from TopoDS |
72 | is static; |
73 | ---C++: return const & |
74 | ---C++: inline |
75 | ---Purpose: |
76 | -- Returns the shape aShape4 from the framework |
77 | -- created at construction time. |
78 | |
79 | -- Methods from PresentableObject |
80 | |
81 | Compute( me : mutable; |
82 | aPresentationManager: PresentationManager3d from PrsMgr; |
83 | aPresentation : mutable Presentation from Prs3d; |
84 | aMode : Integer from Standard= 0 ) |
85 | is redefined static private; |
86 | |
87 | Compute( me : mutable; |
88 | aProjector : Projector from Prs3d; |
89 | aPresentation : mutable Presentation from Prs3d ) |
90 | is redefined static private; |
91 | |
92 | Compute( me : mutable; |
93 | aPresentationManager : PresentationManager2d from PrsMgr; |
94 | aPresentation : mutable GraphicObject from Graphic2d; |
95 | aMode : Integer from Standard = 0 ) |
96 | is redefined static private; |
97 | |
98 | Compute(me : mutable; |
99 | aProjector : Projector from Prs3d; |
100 | aTrsf : Transformation from Geom; |
101 | aPresentation : mutable Presentation from Prs3d) |
102 | is redefined; |
103 | ---Purpose: Computes the presentation according to a point of view |
104 | -- given by <aProjector>. |
105 | -- To be Used when the associated degenerated Presentations |
106 | -- have been transformed by <aTrsf> which is not a Pure |
107 | -- Translation. The HLR Prs can't be deducted automatically |
108 | -- WARNING :<aTrsf> must be applied |
109 | -- to the object to display before computation !!! |
110 | |
111 | -- Methods from SelectableObject |
112 | |
113 | ComputeSelection( me : mutable; |
114 | aSelection : mutable Selection from SelectMgr; |
115 | aMode : Integer from Standard) |
116 | is private; |
117 | -- ota -- begin |
118 | ComputeTwoEdgesLength (myclass; |
119 | aPresentation : mutable Presentation from Prs3d; |
120 | aDrawer : Drawer from AIS; |
121 | ArrowSize : Real from Standard; |
122 | FirstEdge : Edge from TopoDS; |
123 | SecondEdge : Edge from TopoDS; |
124 | Plane : Plane from Geom; |
125 | AutomaticPos : Boolean from Standard; |
126 | IsSetBndBox : Boolean from Standard; |
127 | BndBox : Box from Bnd; |
128 | Position : out Pnt from gp; |
129 | FirstAttach : out Pnt from gp; |
130 | SecondAttach : out Pnt from gp; |
131 | FirstExtreme : out Pnt from gp; |
132 | SecondExtreme : out Pnt from gp; |
133 | SymbolPrs : out ArrowSide from DsgPrs ); |
134 | ---Purpose: Computes the location of an intreval between |
135 | -- between two edges. FirstAttach , SecondAttach |
136 | -- are the returned extreme points of the interval. |
137 | |
138 | ComputeTwoVerticesLength(myclass; |
139 | aPresentation : mutable Presentation from Prs3d; |
140 | aDrawer : Drawer from AIS; |
141 | ArrowSize : Real from Standard; |
142 | FirstVertex : Vertex from TopoDS; |
143 | SecondVertex : Vertex from TopoDS; |
144 | Plane : Plane from Geom; |
145 | AutomaticPos : Boolean from Standard; |
146 | IsSetBndBox : Boolean from Standard; |
147 | BndBox : Box from Bnd; |
148 | TypeDist : TypeOfDist from AIS; |
149 | Position : out Pnt from gp; |
150 | FirstAttach : out Pnt from gp; |
151 | SecondAttach : out Pnt from gp; |
152 | FirstExtreme : out Pnt from gp; |
153 | SecondExtreme : out Pnt from gp; |
154 | SymbolPrs : out ArrowSide from DsgPrs ); |
155 | ---Purpose: Computes the interval position between two vertexs. FirstAttach, |
156 | -- SecondAttach are the returned extreme points of the interval. |
157 | |
158 | ComputeOneEdgeOneVertexLength(myclass; |
159 | aPresentation : mutable Presentation from Prs3d; |
160 | aDrawer : Drawer from AIS; |
161 | ArrowSize : Real from Standard; |
162 | FirstShape : Shape from TopoDS; |
163 | SecondShape : Shape from TopoDS; |
164 | Plane : Plane from Geom; |
165 | AutomaticPos : Boolean from Standard; |
166 | IsSetBndBox : Boolean from Standard; |
167 | BndBox : Box from Bnd; |
168 | Position : out Pnt from gp; |
169 | FirstAttach : out Pnt from gp; |
170 | SecondAttach : out Pnt from gp; |
171 | FirstExtreme : out Pnt from gp; |
172 | SecondExtreme : out Pnt from gp; |
173 | SymbolPrs : out ArrowSide from DsgPrs ); |
174 | ---Purpose: Compute the interval location between a vertex and an edge. Edge may be |
175 | -- a line or a circle. |
176 | |
177 | -- ota -- end |
178 | |
179 | fields |
180 | |
181 | myShape3 : Shape from TopoDS; |
182 | myShape4 : Shape from TopoDS; |
183 | |
184 | myAttachPoint1 : Pnt from gp; -- the start points of constraint curves |
185 | myAttachPoint2 : Pnt from gp; |
186 | myAttachPoint3 : Pnt from gp; |
187 | myAttachPoint4 : Pnt from gp; |
188 | |
189 | myPoint1 : Pnt from gp; -- the end points constraint curves |
190 | myPoint2 : Pnt from gp; |
191 | myPoint3 : Pnt from gp; |
192 | myPoint4 : Pnt from gp; |
193 | |
194 | end EqualDistanceRelation; |