Integration of OCCT 6.5.0 from SVN
[occt.git] / src / AIS / AIS_FixRelation.cdl
1 -- File:        AIS_FixRelation.cdl
2 -- Created:     Thu Dec  5 10:08:10 1996
3 -- Author:      Flore Lantheaume/Odile Olivier
4 --              <odl@sacadox.paris1.matra-dtv.fr>
5 ---Copyright:    Matra Datavision 1996
6
7 class FixRelation from AIS inherits Relation from AIS
8
9
10         ---Purpose: Constructs and manages a constraint by a fixed
11         -- relation between two or more interactive datums. This
12         -- constraint is represented by a wire from a shape -
13         -- point, vertex, or edge - in the first datum and a
14         -- corresponding shape in the second.
15         -- Warning: This relation is not bound with any kind of parametric 
16         --          constraint : it represents the "status" of an parametric
17         --          object.
18 uses
19
20     PresentationManager3d from PrsMgr,
21     Presentation          from Prs3d,
22     Selection             from SelectMgr,
23     Shape                 from TopoDS,
24     Vertex                from TopoDS,
25     Edge                  from TopoDS,
26     Wire                  from TopoDS,
27     Curve                 from Geom,
28     Circ                  from gp,
29     Lin                   from gp,
30     Pnt                   from gp,
31     Projector             from Prs3d,
32     Transformation        from Geom,
33     PresentationManager2d from PrsMgr,
34     GraphicObject         from Graphic2d,    
35     Plane                 from Geom
36
37 is
38     Create (aShape      : Shape          from TopoDS;
39             aPlane      : Plane          from Geom;
40             aWire       : Wire           from TopoDS)
41         ---Purpose:  initializes the vertex aShape, the
42         --   plane aPlane and the wire aWire, which connects
43         --   the two vertices in a fixed relation.
44     returns mutable FixRelation from AIS;
45
46     Create (aShape      : Shape          from TopoDS;
47             aPlane      : Plane          from Geom;
48             aWire       : Wire           from TopoDS;
49             aPosition   : Pnt            from gp;
50             anArrowSize : Real           from Standard = 0.01)
51         ---Purpose:  initializes the vertex aShape, the
52         --   plane aPlane and the wire aWire, the position
53         --   aPosition, the arrow size anArrowSize and the
54         -- wire aWire, which connects the two vertices in a fixed relation.
55     returns mutable FixRelation from AIS;
56     Create (aShape      : Shape          from TopoDS;
57             aPlane      : Plane          from Geom)
58         ---Purpose:  initializes the edge aShape and the plane aPlane.
59     returns mutable FixRelation from AIS;
60
61     Create (aShape      : Shape          from TopoDS;
62             aPlane      : Plane          from Geom;
63             aPosition   : Pnt            from gp;
64             anArrowSize : Real           from Standard = 0.01)
65         ---Purpose: initializes the edge aShape, the
66         --   plane aPlane, the position aPosition and the arrow
67         --   size anArrowSize.
68         
69     returns mutable FixRelation from AIS;
70
71     Wire(me: mutable) returns Wire from TopoDS 
72     is static;
73         ---Purpose: Returns the wire which connects vertices in a fixed relation.
74
75     SetWire(me: mutable;aWire : Wire from TopoDS)
76     is static;
77         --- Purpose: Constructs the wire aWire. This connects vertices
78         -- which are in a fixed relation.
79         
80     IsMovable(me) returns Boolean from Standard 
81         ---C++: inline    
82         ---Purpose: Returns true if the Interactive Objects in the relation
83         -- are movable.   
84     is redefined;    
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             aPresentationManager: PresentationManager2d from PrsMgr;
101             aPresentation: mutable GraphicObject from Graphic2d;
102             aMode: Integer from Standard = 0)
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 redefined private;
124     
125        
126     --
127     --             Computation private methods
128     --
129
130     ComputeVertex(me : mutable;
131                   FixVertex : Vertex from TopoDS;
132                   curpos    : out Pnt from gp)
133     ---Purpose: computes the presentation for <myFixShape> if it's a
134     --          vertex.
135     is private;
136     
137     
138     ComputePosition(me;
139                     curv1   : Curve from Geom;
140                     curv2   : Curve from Geom;
141                     firstp1 : Pnt   from gp;
142                     lastp1  : Pnt   from gp ;
143                     firstp2 : Pnt   from gp;
144                     lastp2  : Pnt   from gp)
145     returns Pnt from gp
146     is private;
147     
148     
149     ComputePosition(me;
150                     curv   : Curve from Geom;
151                     firstp : Pnt  from gp;
152                     lastp  : Pnt  from gp)
153     returns Pnt from gp
154     is private;
155     
156     
157     ComputeEdge(me : mutable;
158                 FixEdge : Edge from TopoDS;
159                 curpos    : out Pnt from gp)
160     ---Purpose: computes the presentation for <myFixShape> if it's a
161     --          edge.
162     is private;
163     
164     
165     ComputeLinePosition(me     : mutable;
166                         glin   : Lin from gp;
167                         pos    : out Pnt from gp;
168                         pfirst : out Real from Standard;
169                         plast  : out Real from Standard)
170     is private;
171     
172     
173     ComputeCirclePosition(me     : mutable;
174                           gcirc  : Circ from gp;
175                           pos    : out Pnt from gp;
176                           pfirst : out Real from Standard;
177                           plast  : out Real from Standard)
178     is private;
179
180     ConnectedEdges(myclass; aWire       : Wire     from TopoDS;
181                             aVertex     : Vertex   from TopoDS;
182                             Edge1,Edge2 : out Edge from TopoDS)
183     returns Boolean from Standard
184     is private;
185     
186    
187 fields
188
189     myWire      : Wire    from TopoDS;
190     myPntAttach : Pnt     from gp;
191     haspos      : Boolean from Standard;
192
193 end FixRelation;
194