00a7b4775e1266c410d437f4380ea3d354f2f784
[occt.git] / src / AIS / AIS_OffsetDimension.cdl
1 -- Created on: 1997-03-04
2 -- Created by: Jean-Pierre COMBE
3 -- Copyright (c) 1997-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 OffsetDimension from AIS inherits Relation from AIS
24
25         ---Purpose: A framework to display dimensions of offsets.
26         -- The relation between the offset and the basis shape
27         -- is indicated. This relation is displayed with arrows and
28         -- text. The text gives the dsitance between the offset
29         -- and the basis shape.
30         
31 uses
32      Shape                 from TopoDS,
33      Presentation          from Prs3d,
34      Projector             from Prs3d,
35     Transformation        from Geom,
36      PresentationManager3d from PrsMgr,
37      PresentationManager2d from PrsMgr,
38      Selection             from SelectMgr,
39      GraphicObject         from Graphic2d,
40      Dir                   from gp,
41      Pnt                   from gp,
42      Trsf                  from gp,
43      KindOfDimension       from AIS,
44      ExtendedString        from TCollection     
45      
46 is
47     Create (FistShape, SecondShape : Shape          from TopoDS;
48             aVal                   : Real           from Standard;
49             aText                  : ExtendedString from TCollection)
50     returns mutable OffsetDimension from AIS;
51         ---Purpose: Constructs the offset display object defined by the
52         -- first shape aFShape, the second shape aSShape, the
53         -- dimension aVal, and the text aText.    
54
55     Compute(me            : mutable;
56             aPresentationManager: PresentationManager3d from PrsMgr;
57             aPresentation : mutable Presentation from Prs3d;
58             aMode         : Integer from Standard= 0) 
59     is redefined private;
60
61     Compute(me:mutable;
62                 aProjector: Projector from Prs3d;
63                 aPresentation: mutable Presentation from Prs3d)
64     is redefined static private;     
65
66     Compute(me:mutable;
67             aPresentationManager: PresentationManager2d from PrsMgr;
68             aPresentation: mutable GraphicObject from Graphic2d;
69             aMode: Integer from Standard = 0)
70     is redefined static private;        
71     
72     Compute(me            : mutable;
73             aProjector    : Projector from Prs3d;
74             aTrsf         : Transformation from Geom;
75             aPresentation : mutable Presentation from Prs3d)
76     is redefined;
77         ---Purpose: computes the presentation according to a point of view
78         --          given by <aProjector>. 
79         --          To be Used when the associated degenerated Presentations 
80         --          have been transformed by <aTrsf> which is not a Pure
81         --          Translation. The HLR Prs can't be deducted automatically
82         --          WARNING :<aTrsf> must be applied
83         --           to the object to display before computation  !!!
84
85 -- Methods from SelectableObject
86
87     ComputeSelection(me         : mutable;
88                      aSelection : mutable Selection from SelectMgr;
89                      aMode      : Integer from Standard)
90     is redefined private;
91
92     KindOfDimension(me)
93         ---Purpose:
94         -- Indicates that the dimension we are concerned with is an offset.
95         ---C++: inline
96     returns KindOfDimension from AIS 
97     is redefined;
98     
99     IsMovable(me) 
100        ---C++: inline       
101        ---Purpose: Returns true if the offset datum is movable. 
102             returns Boolean from Standard 
103     is redefined;    
104     
105     SetRelativePos (me:mutable; aTrsf: Trsf from gp);
106         ---C++: inline
107         ---Purpose: Sets a transformation aTrsf for presentation and
108         -- selection to a relative position.
109
110     ComputeTwoFacesOffset(me: mutable;
111                           aPresentation : mutable Presentation from Prs3d;
112                           aTrsf         : Trsf from gp)
113     is private;
114     
115     ComputeTwoAxesOffset(me: mutable;
116                           aPresentation : mutable Presentation from Prs3d;
117                           aTrsf         : Trsf from gp)
118     is private;
119
120     ComputeAxeFaceOffset(me: mutable;
121                           aPresentation : mutable Presentation from Prs3d;
122                           aTrsf         : Trsf from gp)
123     is private;
124
125 fields
126
127     myFAttach     : Pnt  from gp;
128     mySAttach     : Pnt  from gp;
129     myDirAttach   : Dir  from gp;
130     myDirAttach2  : Dir  from gp;
131     myRelativePos : Trsf from gp;
132
133 end OffsetDimension;