0024166: Unable to create file with "Save" menu of voxeldemo Qt sample
[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-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
21
22
23 class EqualDistanceRelation from AIS inherits Relation from AIS
24
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.
30
31 uses
32     Shape from TopoDS,
33     Plane from Geom,
34     PresentationManager3d from PrsMgr,
35     Presentation from Prs3d,
36     Projector from Prs3d,
37     Transformation        from Geom,
38     Selection from SelectMgr,
39     Pnt from gp,
40     Drawer from AIS,
41     ExtendedString from TCollection,
42     Edge from TopoDS,
43     Vertex from TopoDS,
44     Box from Bnd,
45     Dir from gp,
46     ArrowSide from DsgPrs,
47     TypeOfDist from AIS 
48     
49 is
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;
61
62     SetShape3( me: mutable; aShape : Shape from TopoDS )
63     is static;
64         ---Purpose:
65         -- Sets the shape aShape to be used as the shape
66         -- aShape3 in the framework created at construction time.
67         ---C++: inline
68
69     Shape3(me) returns Shape from TopoDS 
70     is static;
71         ---Purpose:
72         -- Returns the shape aShape3 from the framework
73         -- created at construction time.
74         ---C++: return const &    
75         ---C++: inline
76     
77     SetShape4( me: mutable; aShape : Shape from TopoDS )
78     is static;
79         ---C++: inline
80         ---Purpose:
81         -- Sets the shape aShape to be used as the shape
82         -- aShape4 in the framework created at construction time.
83     
84     Shape4(me) returns Shape from TopoDS 
85     is static;
86         ---C++: return const &    
87         ---C++: inline
88         ---Purpose:
89         -- Returns the shape aShape4 from the framework
90         -- created at construction time.
91     
92 -- Methods from PresentableObject
93
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;
99     
100     Compute( me            : mutable;
101              aProjector    : Projector from Prs3d;
102              aPresentation : mutable Presentation from Prs3d )
103     is redefined static private;
104     
105     Compute(me            : mutable;
106             aProjector    : Projector from Prs3d;
107             aTrsf         : Transformation from Geom;
108             aPresentation : mutable Presentation from Prs3d)
109     is redefined;
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  !!!
117
118 -- Methods from SelectableObject
119
120     ComputeSelection( me         : mutable;
121                       aSelection : mutable Selection from SelectMgr;
122                       aMode      : Integer from Standard)
123     is private;
124 -- ota -- begin
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.
144                                     
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.
164                                     
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.
183         
184 -- ota -- end                                   
185                                
186 fields
187
188     myShape3 : Shape from TopoDS;
189     myShape4 : Shape from TopoDS;
190     
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;
195     
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;
200     
201 end EqualDistanceRelation;