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
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.
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
25 -- X/YAxis() returns AIS_Line instead of AIS_Axis
28 class PlaneTrihedron from AIS inherits InteractiveObject from AIS
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.
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.
50 Presentation from Prs3d,
51 PresentationManager3d from PrsMgr,
52 NameOfColor from Quantity,
54 Selection from SelectMgr,
56 Transformation from Geom,
58 PresentationManager2d from PrsMgr,
59 GraphicObject from Graphic2d,
63 KindOfInteractive from AIS,
64 AsciiString from TCollection
68 Create(aPlane : Plane from Geom)
69 returns mutable PlaneTrihedron from AIS;
70 ---Purpose: Initializes the plane aPlane. The plane trihedron is
71 -- constructed from this and an axis.
73 Component(me: mutable) returns Plane from Geom
75 ---Purpose: Returns the component specified in SetComponent.
77 SetComponent(me: mutable;aPlane : Plane from Geom)
79 ---Purpose: Creates an instance of the component object aPlane.
81 XAxis (me) returns Line from AIS;
82 ---Purpose : Returns the "XAxis".
84 YAxis (me) returns Line from AIS;
85 ---Purpose : Returns the "YAxis".
87 Position (me) returns Point from AIS;
88 ---Purpose : Returns the point of origin of the plane trihedron.
90 SetLength(me : mutable;
91 theLength : Real from Standard);
92 ---Purpose: Sets the length of the X and Y axes.
95 ---Purpose: Returns the length of X and Y axes.
96 returns Real from Standard;
98 AcceptDisplayMode(me;aMode:Integer from Standard) returns Boolean from Standard is redefined static;
99 ---Purpose: Returns true if the display mode selected, aMode, is valid.
101 Compute(me : mutable;
102 aPresentationManager: PresentationManager3d from PrsMgr;
103 aPresentation : mutable Presentation from Prs3d;
104 aMode : Integer from Standard = 0)
105 is redefined protected;
108 aProjector: Projector from Prs3d;
109 aPresentation: mutable Presentation from Prs3d)
110 is redefined static private;
113 aPresentationManager: PresentationManager2d from PrsMgr;
114 aPresentation: mutable GraphicObject from Graphic2d;
115 aMode: Integer from Standard = 0)
116 is redefined static private;
118 Compute(me : mutable;
119 aProjector : Projector from Prs3d;
120 aTrsf : Transformation from Geom;
121 aPresentation : mutable Presentation from Prs3d)
123 ---Purpose: computes the presentation according to a point of view
124 -- given by <aProjector>.
125 -- To be Used when the associated degenerated Presentations
126 -- have been transformed by <aTrsf> which is not a Pure
127 -- Translation. The HLR Prs can't be deducted automatically
128 -- WARNING :<aTrsf> must be applied
129 -- to the object to display before computation !!!
131 -- Methods from SelectableObject
133 ComputeSelection(me : mutable;
134 aSelection : mutable Selection from SelectMgr;
135 aMode : Integer from Standard)is private;
137 -- Methods from InteractiveObject
139 Signature(me) returns Integer from Standard is redefined;
142 Type(me) returns KindOfInteractive from AIS is redefined;
144 ---Purpose: Returns datum as the type of Interactive Object.
146 SetColor(me :mutable; aColor : NameOfColor from Quantity)
147 is redefined static ;
148 ---Purpose: Allows you to provide settings for the color aColor.
150 SetColor(me :mutable; aColor : Color from Quantity)
151 is redefined static ;
153 SetXLabel(me : mutable; aLabel : AsciiString from TCollection);
156 SetYLabel(me : mutable; aLabel : AsciiString from TCollection);
162 myPlane : Plane from Geom;
163 myShapes : InteractiveObject from AIS [3];
164 myXLabel : AsciiString from TCollection;
165 myYLabel : AsciiString from TCollection;
167 end PlaneTrihedron from AIS;