1 -- File: AIS_Chamf2dDimension.cdl
2 -- Created: Thu Dec 5 09:19:29 1996
3 -- Author: Flore Lantheaume/Odile Olivier
4 -- <odl@sacadox.paris1.matra-dtv.fr>
5 ---Copyright: Matra Datavision 1996
8 class Chamf2dDimension from AIS inherits Relation from AIS
10 ---Purpose: A framework to define display of 2D chamfers.
11 -- A chamfer is displayed with arrows and text. The text
12 -- gives the length of the chamfer if it is a symmetrical
13 -- chamfer, or the angle if it is not.
18 PresentationManager3d from PrsMgr,
19 Presentation from Prs3d,
20 Selection from SelectMgr,
26 Transformation from Geom,
27 PresentationManager2d from PrsMgr,
28 GraphicObject from Graphic2d,
29 ExtendedString from TCollection,
30 ArrowSide from DsgPrs,
31 KindOfDimension from AIS
34 Create (aFShape : Shape from TopoDS;
35 aPlane : Plane from Geom;
36 aVal : Real from Standard;
37 aText : ExtendedString from TCollection)
38 ---Purpose: Constructs the display object for 2D chamfers.
39 -- This object is defined by the face aFShape, the
40 -- dimension aVal, the plane aPlane and the text aText.
42 returns mutable Chamf2dDimension from AIS;
44 Create (aFShape : Shape from TopoDS;
45 aPlane : Plane from Geom;
46 aVal : Real from Standard;
47 aText : ExtendedString from TCollection;
48 aPosition : Pnt from gp;
49 aSymbolPrs : ArrowSide from DsgPrs;
50 anArrowSize : Real from Standard = 0.0)
51 ---Purpose: Constructs the display object for 2D chamfers.
52 -- This object is defined by the face aFShape, the plane
53 -- aPlane, the dimension aVal, the position aPosition,
54 -- the type of arrow aSymbolPrs with the size
55 -- anArrowSize, and the text aText.
56 returns mutable Chamf2dDimension from AIS;
59 ---Purpose: Indicates that we are concerned with a 2d length.
61 returns KindOfDimension from AIS
64 IsMovable(me) returns Boolean from Standard
65 ---Purpose: Returns true if the 2d chamfer dimension is movable.
69 -- Methods from PresentableObject
72 aPresentationManager: PresentationManager3d from PrsMgr;
73 aPresentation : mutable Presentation from Prs3d;
74 aMode : Integer from Standard= 0)
75 is redefined static private;
78 aProjector: Projector from Prs3d;
79 aPresentation: mutable Presentation from Prs3d)
80 is redefined static private;
83 aPresentationManager: PresentationManager2d from PrsMgr;
84 aPresentation: mutable GraphicObject from Graphic2d;
85 aMode: Integer from Standard = 0)
86 is redefined static private;
89 aProjector : Projector from Prs3d;
90 aTrsf : Transformation from Geom;
91 aPresentation : mutable Presentation from Prs3d)
93 ---Purpose: computes the presentation according to a point of view
94 -- given by <aProjector>.
95 -- To be Used when the associated degenerated Presentations
96 -- have been transformed by <aTrsf> which is not a Pure
97 -- Translation. The HLR Prs can't be deducted automatically
98 -- WARNING :<aTrsf> must be applied
99 -- to the object to display before computation !!!
101 ComputeSelection(me : mutable;
102 aSelection : mutable Selection from SelectMgr;
103 aMode : Integer from Standard)
104 is redefined private;
110 myPntAttach : Pnt from gp;
113 end Chamf2dDimension;