1 -- Created on: 1998-01-24
2 -- Created by: Julia GERASIMOVA
3 -- Copyright (c) 1998-1999 Matra Datavision
4 -- Copyright (c) 1999-2012 OPEN CASCADE SAS
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.
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.
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.
23 class EqualDistanceRelation from AIS inherits Relation from AIS
25 ---Purpose: A framework to display equivalent distances between
26 -- shapes and a given plane.
27 -- The distance is the length of a projection from the
28 -- shape to the plane.
29 -- These distances are used to compare shapes by this vector alone.
34 PresentationManager3d from PrsMgr,
35 Presentation from Prs3d,
37 Transformation from Geom,
38 Selection from SelectMgr,
41 ExtendedString from TCollection,
46 ArrowSide from DsgPrs,
50 Create( aShape1 : Shape from TopoDS;
51 aShape2 : Shape from TopoDS;
52 aShape3 : Shape from TopoDS;
53 aShape4 : Shape from TopoDS;
54 aPlane : Plane from Geom )
55 ---Purpose: Constructs a framework to display equivalent
56 -- distances between the shapes aShape1, aShape2,
57 -- aShape3, aShape4 and the plane aPlane.
58 -- The distance is the length of a projection from the
59 -- shape to the plane.
60 returns mutable EqualDistanceRelation from AIS;
62 SetShape3( me: mutable; aShape : Shape from TopoDS )
65 -- Sets the shape aShape to be used as the shape
66 -- aShape3 in the framework created at construction time.
69 Shape3(me) returns Shape from TopoDS
72 -- Returns the shape aShape3 from the framework
73 -- created at construction time.
74 ---C++: return const &
77 SetShape4( me: mutable; aShape : Shape from TopoDS )
81 -- Sets the shape aShape to be used as the shape
82 -- aShape4 in the framework created at construction time.
84 Shape4(me) returns Shape from TopoDS
86 ---C++: return const &
89 -- Returns the shape aShape4 from the framework
90 -- created at construction time.
92 -- Methods from PresentableObject
94 Compute( me : mutable;
95 aPresentationManager: PresentationManager3d from PrsMgr;
96 aPresentation : mutable Presentation from Prs3d;
97 aMode : Integer from Standard= 0 )
98 is redefined static private;
100 Compute( me : mutable;
101 aProjector : Projector from Prs3d;
102 aPresentation : mutable Presentation from Prs3d )
103 is redefined static private;
105 Compute(me : mutable;
106 aProjector : Projector from Prs3d;
107 aTrsf : Transformation from Geom;
108 aPresentation : mutable Presentation from Prs3d)
110 ---Purpose: Computes the presentation according to a point of view
111 -- given by <aProjector>.
112 -- To be Used when the associated degenerated Presentations
113 -- have been transformed by <aTrsf> which is not a Pure
114 -- Translation. The HLR Prs can't be deducted automatically
115 -- WARNING :<aTrsf> must be applied
116 -- to the object to display before computation !!!
118 -- Methods from SelectableObject
120 ComputeSelection( me : mutable;
121 aSelection : mutable Selection from SelectMgr;
122 aMode : Integer from Standard)
125 ComputeTwoEdgesLength (myclass;
126 aPresentation : mutable Presentation from Prs3d;
127 aDrawer : Drawer from AIS;
128 ArrowSize : Real from Standard;
129 FirstEdge : Edge from TopoDS;
130 SecondEdge : Edge from TopoDS;
131 Plane : Plane from Geom;
132 AutomaticPos : Boolean from Standard;
133 IsSetBndBox : Boolean from Standard;
134 BndBox : Box from Bnd;
135 Position : out Pnt from gp;
136 FirstAttach : out Pnt from gp;
137 SecondAttach : out Pnt from gp;
138 FirstExtreme : out Pnt from gp;
139 SecondExtreme : out Pnt from gp;
140 SymbolPrs : out ArrowSide from DsgPrs );
141 ---Purpose: Computes the location of an intreval between
142 -- between two edges. FirstAttach , SecondAttach
143 -- are the returned extreme points of the interval.
145 ComputeTwoVerticesLength(myclass;
146 aPresentation : mutable Presentation from Prs3d;
147 aDrawer : Drawer from AIS;
148 ArrowSize : Real from Standard;
149 FirstVertex : Vertex from TopoDS;
150 SecondVertex : Vertex from TopoDS;
151 Plane : Plane from Geom;
152 AutomaticPos : Boolean from Standard;
153 IsSetBndBox : Boolean from Standard;
154 BndBox : Box from Bnd;
155 TypeDist : TypeOfDist from AIS;
156 Position : out Pnt from gp;
157 FirstAttach : out Pnt from gp;
158 SecondAttach : out Pnt from gp;
159 FirstExtreme : out Pnt from gp;
160 SecondExtreme : out Pnt from gp;
161 SymbolPrs : out ArrowSide from DsgPrs );
162 ---Purpose: Computes the interval position between two vertexs. FirstAttach,
163 -- SecondAttach are the returned extreme points of the interval.
165 ComputeOneEdgeOneVertexLength(myclass;
166 aPresentation : mutable Presentation from Prs3d;
167 aDrawer : Drawer from AIS;
168 ArrowSize : Real from Standard;
169 FirstShape : Shape from TopoDS;
170 SecondShape : Shape from TopoDS;
171 Plane : Plane from Geom;
172 AutomaticPos : Boolean from Standard;
173 IsSetBndBox : Boolean from Standard;
174 BndBox : Box from Bnd;
175 Position : out Pnt from gp;
176 FirstAttach : out Pnt from gp;
177 SecondAttach : out Pnt from gp;
178 FirstExtreme : out Pnt from gp;
179 SecondExtreme : out Pnt from gp;
180 SymbolPrs : out ArrowSide from DsgPrs );
181 ---Purpose: Compute the interval location between a vertex and an edge. Edge may be
182 -- a line or a circle.
188 myShape3 : Shape from TopoDS;
189 myShape4 : Shape from TopoDS;
191 myAttachPoint1 : Pnt from gp; -- the start points of constraint curves
192 myAttachPoint2 : Pnt from gp;
193 myAttachPoint3 : Pnt from gp;
194 myAttachPoint4 : Pnt from gp;
196 myPoint1 : Pnt from gp; -- the end points constraint curves
197 myPoint2 : Pnt from gp;
198 myPoint3 : Pnt from gp;
199 myPoint4 : Pnt from gp;
201 end EqualDistanceRelation;