1 -- Created on: 1996-12-05
2 -- Created by: Flore Lantheaume/Odile Olivier
3 -- Copyright (c) 1996-1999 Matra Datavision
4 -- Copyright (c) 1999-2014 OPEN CASCADE SAS
6 -- This file is part of Open CASCADE Technology software library.
8 -- This library is free software; you can redistribute it and/or modify it under
9 -- the terms of the GNU Lesser General Public License version 2.1 as published
10 -- by the Free Software Foundation, with special exception defined in the file
11 -- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 -- distribution for complete text of the license and disclaimer of any warranty.
14 -- Alternatively, this file may be used under the terms of Open CASCADE
15 -- commercial license or contractual agreement.
17 class Chamf2dDimension from AIS inherits Relation from AIS
19 ---Purpose: A framework to define display of 2D chamfers.
20 -- A chamfer is displayed with arrows and text. The text
21 -- gives the length of the chamfer if it is a symmetrical
22 -- chamfer, or the angle if it is not.
27 PresentationManager3d from PrsMgr,
28 Presentation from Prs3d,
29 Selection from SelectMgr,
35 Transformation from Geom,
36 ExtendedString from TCollection,
37 ArrowSide from DsgPrs,
38 KindOfDimension from AIS
41 Create (aFShape : Shape from TopoDS;
42 aPlane : Plane from Geom;
43 aVal : Real from Standard;
44 aText : ExtendedString from TCollection)
45 ---Purpose: Constructs the display object for 2D chamfers.
46 -- This object is defined by the face aFShape, the
47 -- dimension aVal, the plane aPlane and the text aText.
49 returns Chamf2dDimension from AIS;
51 Create (aFShape : Shape from TopoDS;
52 aPlane : Plane from Geom;
53 aVal : Real from Standard;
54 aText : ExtendedString from TCollection;
55 aPosition : Pnt from gp;
56 aSymbolPrs : ArrowSide from DsgPrs;
57 anArrowSize : Real from Standard = 0.0)
58 ---Purpose: Constructs the display object for 2D chamfers.
59 -- This object is defined by the face aFShape, the plane
60 -- aPlane, the dimension aVal, the position aPosition,
61 -- the type of arrow aSymbolPrs with the size
62 -- anArrowSize, and the text aText.
63 returns Chamf2dDimension from AIS;
66 ---Purpose: Indicates that we are concerned with a 2d length.
68 returns KindOfDimension from AIS
71 IsMovable(me) returns Boolean from Standard
72 ---Purpose: Returns true if the 2d chamfer dimension is movable.
76 -- Methods from PresentableObject
79 aPresentationManager: PresentationManager3d from PrsMgr;
80 aPresentation : Presentation from Prs3d;
81 aMode : Integer from Standard= 0)
82 is redefined static private;
85 aProjector: Projector from Prs3d;
86 aPresentation: Presentation from Prs3d)
87 is redefined static private;
90 aProjector : Projector from Prs3d;
91 aTrsf : Transformation from Geom;
92 aPresentation : Presentation from Prs3d)
94 ---Purpose: computes the presentation according to a point of view
95 -- given by <aProjector>.
96 -- To be Used when the associated degenerated Presentations
97 -- have been transformed by <aTrsf> which is not a Pure
98 -- Translation. The HLR Prs can't be deducted automatically
99 -- WARNING :<aTrsf> must be applied
100 -- to the object to display before computation !!!
102 ComputeSelection(me : mutable;
103 aSelection : Selection from SelectMgr;
104 aMode : Integer from Standard)
105 is redefined private;
111 myPntAttach : Pnt from gp;
114 end Chamf2dDimension;