1 -- File: AIS_OffsetDimension.cdl
2 -- Created: Tue Mar 4 09:33:10 1997
3 -- Author: Jean-Pierre COMBE
4 -- <jpr@chariox.paris1.matra-dtv.fr>
5 ---Copyright: Matra Datavision 1997
8 class OffsetDimension from AIS inherits Relation from AIS
10 ---Purpose: A framework to display dimensions of offsets.
11 -- The relation between the offset and the basis shape
12 -- is indicated. This relation is displayed with arrows and
13 -- text. The text gives the dsitance between the offset
14 -- and the basis shape.
18 Presentation from Prs3d,
20 Transformation from Geom,
21 PresentationManager3d from PrsMgr,
22 PresentationManager2d from PrsMgr,
23 Selection from SelectMgr,
24 GraphicObject from Graphic2d,
28 KindOfDimension from AIS,
29 ExtendedString from TCollection
32 Create (FistShape, SecondShape : Shape from TopoDS;
33 aVal : Real from Standard;
34 aText : ExtendedString from TCollection)
35 returns mutable OffsetDimension from AIS;
36 ---Purpose: Constructs the offset display object defined by the
37 -- first shape aFShape, the second shape aSShape, the
38 -- dimension aVal, and the text aText.
41 aPresentationManager: PresentationManager3d from PrsMgr;
42 aPresentation : mutable Presentation from Prs3d;
43 aMode : Integer from Standard= 0)
47 aProjector: Projector from Prs3d;
48 aPresentation: mutable Presentation from Prs3d)
49 is redefined static private;
52 aPresentationManager: PresentationManager2d from PrsMgr;
53 aPresentation: mutable GraphicObject from Graphic2d;
54 aMode: Integer from Standard = 0)
55 is redefined static private;
58 aProjector : Projector from Prs3d;
59 aTrsf : Transformation from Geom;
60 aPresentation : mutable Presentation from Prs3d)
62 ---Purpose: computes the presentation according to a point of view
63 -- given by <aProjector>.
64 -- To be Used when the associated degenerated Presentations
65 -- have been transformed by <aTrsf> which is not a Pure
66 -- Translation. The HLR Prs can't be deducted automatically
67 -- WARNING :<aTrsf> must be applied
68 -- to the object to display before computation !!!
70 -- Methods from SelectableObject
72 ComputeSelection(me : mutable;
73 aSelection : mutable Selection from SelectMgr;
74 aMode : Integer from Standard)
79 -- Indicates that the dimension we are concerned with is an offset.
81 returns KindOfDimension from AIS
86 ---Purpose: Returns true if the offset datum is movable.
87 returns Boolean from Standard
90 SetRelativePos (me:mutable; aTrsf: Trsf from gp);
92 ---Purpose: Sets a transformation aTrsf for presentation and
93 -- selection to a relative position.
95 ComputeTwoFacesOffset(me: mutable;
96 aPresentation : mutable Presentation from Prs3d;
100 ComputeTwoAxesOffset(me: mutable;
101 aPresentation : mutable Presentation from Prs3d;
102 aTrsf : Trsf from gp)
105 ComputeAxeFaceOffset(me: mutable;
106 aPresentation : mutable Presentation from Prs3d;
107 aTrsf : Trsf from gp)
112 myFAttach : Pnt from gp;
113 mySAttach : Pnt from gp;
114 myDirAttach : Dir from gp;
115 myDirAttach2 : Dir from gp;
116 myRelativePos : Trsf from gp;