1 -- Created on: 1996-12-05
2 -- Created by: Odile Olivier
3 -- Copyright (c) 1996-1999 Matra Datavision
4 -- Copyright (c) 1999-2012 OPEN CASCADE SAS
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.
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.
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.
23 class Chamf3dDimension from AIS inherits Relation from AIS
25 ---Purpose: A framework to define display of 3D chamfers.
26 -- A chamfer is displayed with arrows and text. The text
27 -- gives the length of the chamfer if it is a symmetrical
28 -- chamfer, or the angle if it is not.
33 PresentationManager3d from PrsMgr,
34 Presentation from Prs3d,
35 Selection from SelectMgr,
40 Transformation from Geom,
41 PresentationManager2d from PrsMgr,
42 GraphicObject from Graphic2d,
43 ExtendedString from TCollection,
44 ArrowSide from DsgPrs,
45 KindOfDimension from AIS
48 Create (aFShape : Shape from TopoDS;
49 aVal : Real from Standard;
50 aText : ExtendedString from TCollection)
51 ---Purpose: Constructs a display object for 3D chamfers.
52 -- This object is defined by the shape aFShape, the
53 -- dimension aVal and the text aText.
54 returns mutable Chamf3dDimension from AIS;
56 Create (aFShape : Shape from TopoDS;
57 aVal : Real from Standard;
58 aText : ExtendedString from TCollection;
59 aPosition : Pnt from gp;
60 aSymbolPrs : ArrowSide from DsgPrs;
61 anArrowSize : Real from Standard = 0.0)
62 ---Purpose: Constructs a display object for 3D chamfers.
63 -- This object is defined by the shape aFShape, the
64 -- dimension aVal, the text aText, the point of origin of
65 -- the chamfer aPosition, the type of arrow aSymbolPrs
66 -- with the size anArrowSize.
67 returns mutable Chamf3dDimension from AIS;
70 ---Purpose: Indicates that we are concerned with a 3d length.
72 returns KindOfDimension from AIS
75 IsMovable(me) returns Boolean from Standard
77 ---Purpose: Returns true if the 3d chamfer dimension is movable.
80 -- Methods from PresentableObject
83 aPresentationManager: PresentationManager3d from PrsMgr;
84 aPresentation : mutable Presentation from Prs3d;
85 aMode : Integer from Standard= 0)
86 is redefined static private;
89 aProjector: Projector from Prs3d;
90 aPresentation: mutable Presentation from Prs3d)
91 is redefined static private;
94 aPresentationManager: PresentationManager2d from PrsMgr;
95 aPresentation: mutable GraphicObject from Graphic2d;
96 aMode: Integer from Standard = 0)
97 is redefined static private;
99 aProjector : Projector from Prs3d;
100 aTrsf : Transformation from Geom;
101 aPresentation : mutable Presentation from Prs3d)
103 ---Purpose: computes the presentation according to a point of view
104 -- given by <aProjector>.
105 -- To be Used when the associated degenerated Presentations
106 -- have been transformed by <aTrsf> which is not a Pure
107 -- Translation. The HLR Prs can't be deducted automatically
108 -- WARNING :<aTrsf> must be applied
109 -- to the object to display before computation !!!
111 ComputeSelection(me : mutable;
112 aSelection : mutable Selection from SelectMgr;
113 aMode : Integer from Standard)
114 is redefined private;
120 myPntAttach : Pnt from gp;
123 end Chamf3dDimension;