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