b311480e |
1 | -- Created on: 1996-12-05 |
2 | -- Created by: Flore Lantheaume/Odile Olivier |
3 | -- Copyright (c) 1996-1999 Matra Datavision |
973c2be1 |
4 | -- Copyright (c) 1999-2014 OPEN CASCADE SAS |
b311480e |
5 | -- |
973c2be1 |
6 | -- This file is part of Open CASCADE Technology software library. |
b311480e |
7 | -- |
d5f74e42 |
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 |
973c2be1 |
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. |
b311480e |
13 | -- |
973c2be1 |
14 | -- Alternatively, this file may be used under the terms of Open CASCADE |
15 | -- commercial license or contractual agreement. |
7fd59977 |
16 | |
17 | class Chamf2dDimension from AIS inherits Relation from AIS |
18 | |
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. |
23 | |
24 | |
25 | uses |
26 | |
27 | PresentationManager3d from PrsMgr, |
28 | Presentation from Prs3d, |
29 | Selection from SelectMgr, |
30 | Shape from TopoDS, |
31 | Pnt from gp, |
32 | Plane from Geom, |
33 | Dir from gp, |
34 | Projector from Prs3d, |
35 | Transformation from Geom, |
7fd59977 |
36 | ExtendedString from TCollection, |
37 | ArrowSide from DsgPrs, |
38 | KindOfDimension from AIS |
39 | |
40 | is |
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. |
48 | |
6e33d3ce |
49 | returns Chamf2dDimension from AIS; |
7fd59977 |
50 | |
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. |
6e33d3ce |
63 | returns Chamf2dDimension from AIS; |
7fd59977 |
64 | |
65 | KindOfDimension(me) |
66 | ---Purpose: Indicates that we are concerned with a 2d length. |
67 | ---C++: inline |
68 | returns KindOfDimension from AIS |
69 | is redefined; |
70 | |
71 | IsMovable(me) returns Boolean from Standard |
72 | ---Purpose: Returns true if the 2d chamfer dimension is movable. |
73 | ---C++: inline |
74 | is redefined; |
75 | |
76 | -- Methods from PresentableObject |
77 | |
78 | Compute(me : mutable; |
79 | aPresentationManager: PresentationManager3d from PrsMgr; |
6e33d3ce |
80 | aPresentation : Presentation from Prs3d; |
7fd59977 |
81 | aMode : Integer from Standard= 0) |
82 | is redefined static private; |
83 | |
84 | Compute(me:mutable; |
85 | aProjector: Projector from Prs3d; |
6e33d3ce |
86 | aPresentation: Presentation from Prs3d) |
7fd59977 |
87 | is redefined static private; |
88 | |
7fd59977 |
89 | Compute(me : mutable; |
90 | aProjector : Projector from Prs3d; |
91 | aTrsf : Transformation from Geom; |
6e33d3ce |
92 | aPresentation : Presentation from Prs3d) |
7fd59977 |
93 | is redefined; |
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 !!! |
101 | |
102 | ComputeSelection(me : mutable; |
6e33d3ce |
103 | aSelection : Selection from SelectMgr; |
7fd59977 |
104 | aMode : Integer from Standard) |
105 | is redefined private; |
106 | |
107 | |
108 | |
109 | fields |
110 | |
111 | myPntAttach : Pnt from gp; |
112 | myDir : Dir from gp; |
113 | |
114 | end Chamf2dDimension; |