b311480e |
1 | -- Created on: 1996-12-13 |
2 | -- Created by: Jean-Pierre COMBE/Odile Olivier |
3 | -- Copyright (c) 1996-1999 Matra Datavision |
4 | -- Copyright (c) 1999-2012 OPEN CASCADE SAS |
5 | -- |
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. |
10 | -- |
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. |
13 | -- |
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. |
20 | |
7fd59977 |
21 | -- GG : GER61351 17/11/1999 Change SetColor() with a compatible Quantity_Color instead |
22 | -- the restricted NameOfColor. |
23 | -- SAV : OCC218 06/03/02 : Added two fields and methods to be able to change |
24 | -- axes labels. |
25 | -- X/YAxis() returns AIS_Line instead of AIS_Axis |
26 | -- (SAMTECH specific) |
7fd59977 |
27 | |
28 | class PlaneTrihedron from AIS inherits InteractiveObject from AIS |
29 | |
30 | ---Purpose: To construct a selectable 2d axis system in a 3d |
31 | -- drawing. This can be placed anywhere in the 3d |
32 | -- system, and provides a coordinate system for |
33 | -- drawing curves and shapes in a plane. |
34 | -- There are 3 selection modes: |
35 | -- - mode 0 selection of the whole plane "trihedron" |
36 | -- - mode 1 selection of the origin of the plane "trihedron" |
37 | -- - mode 2 selection of the axes. |
38 | -- Warning |
39 | -- For the presentation of planes and trihedra, the |
40 | -- millimetre is default unit of length, and 100 the default |
41 | -- value for the representation of the axes. If you modify |
42 | -- these dimensions, you must temporarily recover the |
43 | -- Drawer object. From inside it, take the Aspects in |
44 | -- which the values for length are stocked, for example, |
45 | -- PlaneAspect for planes and FirstAxisAspect for |
46 | -- trihedra. Change these values and recalculate the presentation. |
47 | |
48 | |
49 | uses |
50 | Presentation from Prs3d, |
51 | PresentationManager3d from PrsMgr, |
52 | NameOfColor from Quantity, |
53 | Color from Quantity, |
54 | Selection from SelectMgr, |
55 | Projector from Prs3d, |
56 | Transformation from Geom, |
57 | Drawer from Prs3d, |
7fd59977 |
58 | Line from AIS, |
59 | Point from AIS, |
60 | Plane from Geom, |
61 | KindOfInteractive from AIS, |
62 | AsciiString from TCollection |
63 | |
64 | is |
65 | |
66 | Create(aPlane : Plane from Geom) |
67 | returns mutable PlaneTrihedron from AIS; |
68 | ---Purpose: Initializes the plane aPlane. The plane trihedron is |
69 | -- constructed from this and an axis. |
70 | |
71 | Component(me: mutable) returns Plane from Geom |
72 | is static; |
73 | ---Purpose: Returns the component specified in SetComponent. |
74 | |
75 | SetComponent(me: mutable;aPlane : Plane from Geom) |
76 | is static; |
77 | ---Purpose: Creates an instance of the component object aPlane. |
78 | |
79 | XAxis (me) returns Line from AIS; |
80 | ---Purpose : Returns the "XAxis". |
81 | |
82 | YAxis (me) returns Line from AIS; |
83 | ---Purpose : Returns the "YAxis". |
84 | |
85 | Position (me) returns Point from AIS; |
86 | ---Purpose : Returns the point of origin of the plane trihedron. |
87 | |
88 | SetLength(me : mutable; |
89 | theLength : Real from Standard); |
90 | ---Purpose: Sets the length of the X and Y axes. |
91 | |
92 | GetLength(me) |
93 | ---Purpose: Returns the length of X and Y axes. |
94 | returns Real from Standard; |
95 | |
96 | AcceptDisplayMode(me;aMode:Integer from Standard) returns Boolean from Standard is redefined static; |
97 | ---Purpose: Returns true if the display mode selected, aMode, is valid. |
98 | |
99 | Compute(me : mutable; |
100 | aPresentationManager: PresentationManager3d from PrsMgr; |
101 | aPresentation : mutable Presentation from Prs3d; |
102 | aMode : Integer from Standard = 0) |
103 | is redefined protected; |
104 | |
105 | Compute(me:mutable; |
106 | aProjector: Projector from Prs3d; |
107 | aPresentation: mutable Presentation from Prs3d) |
108 | is redefined static private; |
109 | |
7fd59977 |
110 | |
111 | Compute(me : mutable; |
112 | aProjector : Projector from Prs3d; |
113 | aTrsf : Transformation from Geom; |
114 | aPresentation : mutable Presentation from Prs3d) |
115 | is redefined; |
116 | ---Purpose: computes the presentation according to a point of view |
117 | -- given by <aProjector>. |
118 | -- To be Used when the associated degenerated Presentations |
119 | -- have been transformed by <aTrsf> which is not a Pure |
120 | -- Translation. The HLR Prs can't be deducted automatically |
121 | -- WARNING :<aTrsf> must be applied |
122 | -- to the object to display before computation !!! |
123 | |
124 | -- Methods from SelectableObject |
125 | |
126 | ComputeSelection(me : mutable; |
127 | aSelection : mutable Selection from SelectMgr; |
128 | aMode : Integer from Standard)is private; |
129 | |
130 | -- Methods from InteractiveObject |
131 | |
132 | Signature(me) returns Integer from Standard is redefined; |
133 | ---C++: inline |
134 | |
135 | Type(me) returns KindOfInteractive from AIS is redefined; |
136 | ---C++: inline |
137 | ---Purpose: Returns datum as the type of Interactive Object. |
138 | |
139 | SetColor(me :mutable; aColor : NameOfColor from Quantity) |
140 | is redefined static ; |
141 | ---Purpose: Allows you to provide settings for the color aColor. |
142 | |
143 | SetColor(me :mutable; aColor : Color from Quantity) |
144 | is redefined static ; |
145 | |
146 | SetXLabel(me : mutable; aLabel : AsciiString from TCollection); |
147 | ---C++: inline |
148 | |
149 | SetYLabel(me : mutable; aLabel : AsciiString from TCollection); |
150 | ---C++: inline |
151 | |
152 | |
153 | fields |
154 | |
155 | myPlane : Plane from Geom; |
156 | myShapes : InteractiveObject from AIS [3]; |
157 | myXLabel : AsciiString from TCollection; |
158 | myYLabel : AsciiString from TCollection; |
159 | |
160 | end PlaneTrihedron from AIS; |