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-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 -- GG : GER61351 17/11/1999 Change SetColor() with a compatible Quantity_Color instead
18 -- the restricted NameOfColor.
19 -- SAV : OCC218 06/03/02 : Added two fields and methods to be able to change
21 -- X/YAxis() returns AIS_Line instead of AIS_Axis
24 class PlaneTrihedron from AIS inherits InteractiveObject from AIS
26 ---Purpose: To construct a selectable 2d axis system in a 3d
27 -- drawing. This can be placed anywhere in the 3d
28 -- system, and provides a coordinate system for
29 -- drawing curves and shapes in a plane.
30 -- There are 3 selection modes:
31 -- - mode 0 selection of the whole plane "trihedron"
32 -- - mode 1 selection of the origin of the plane "trihedron"
33 -- - mode 2 selection of the axes.
35 -- For the presentation of planes and trihedra, the
36 -- millimetre is default unit of length, and 100 the default
37 -- value for the representation of the axes. If you modify
38 -- these dimensions, you must temporarily recover the
39 -- Drawer object. From inside it, take the Aspects in
40 -- which the values for length are stocked, for example,
41 -- PlaneAspect for planes and FirstAxisAspect for
42 -- trihedra. Change these values and recalculate the presentation.
46 Presentation from Prs3d,
47 PresentationManager3d from PrsMgr,
48 NameOfColor from Quantity,
50 Selection from SelectMgr,
52 Transformation from Geom,
57 KindOfInteractive from AIS,
58 AsciiString from TCollection
62 Create(aPlane : Plane from Geom)
63 returns PlaneTrihedron from AIS;
64 ---Purpose: Initializes the plane aPlane. The plane trihedron is
65 -- constructed from this and an axis.
67 Component(me: mutable) returns Plane from Geom
69 ---Purpose: Returns the component specified in SetComponent.
71 SetComponent(me: mutable;aPlane : Plane from Geom)
73 ---Purpose: Creates an instance of the component object aPlane.
75 XAxis (me) returns Line from AIS;
76 ---Purpose : Returns the "XAxis".
78 YAxis (me) returns Line from AIS;
79 ---Purpose : Returns the "YAxis".
81 Position (me) returns Point from AIS;
82 ---Purpose : Returns the point of origin of the plane trihedron.
84 SetLength(me : mutable;
85 theLength : Real from Standard);
86 ---Purpose: Sets the length of the X and Y axes.
89 ---Purpose: Returns the length of X and Y axes.
90 returns Real from Standard;
92 AcceptDisplayMode(me;aMode:Integer from Standard) returns Boolean from Standard is redefined static;
93 ---Purpose: Returns true if the display mode selected, aMode, is valid.
96 aPresentationManager: PresentationManager3d from PrsMgr;
97 aPresentation : Presentation from Prs3d;
98 aMode : Integer from Standard = 0)
99 is redefined protected;
102 aProjector: Projector from Prs3d;
103 aPresentation: Presentation from Prs3d)
104 is redefined static private;
107 Compute(me : mutable;
108 aProjector : Projector from Prs3d;
109 aTrsf : Transformation from Geom;
110 aPresentation : Presentation from Prs3d)
112 ---Purpose: computes the presentation according to a point of view
113 -- given by <aProjector>.
114 -- To be Used when the associated degenerated Presentations
115 -- have been transformed by <aTrsf> which is not a Pure
116 -- Translation. The HLR Prs can't be deducted automatically
117 -- WARNING :<aTrsf> must be applied
118 -- to the object to display before computation !!!
120 -- Methods from SelectableObject
122 ComputeSelection(me : mutable;
123 aSelection : Selection from SelectMgr;
124 aMode : Integer from Standard)is private;
126 -- Methods from InteractiveObject
128 Signature(me) returns Integer from Standard is redefined;
131 Type(me) returns KindOfInteractive from AIS is redefined;
133 ---Purpose: Returns datum as the type of Interactive Object.
135 SetColor(me :mutable; aColor : NameOfColor from Quantity)
136 is redefined static ;
137 ---Purpose: Allows you to provide settings for the color aColor.
139 SetColor(me :mutable; aColor : Color from Quantity)
140 is redefined static ;
142 SetXLabel(me : mutable; aLabel : AsciiString from TCollection);
145 SetYLabel(me : mutable; aLabel : AsciiString from TCollection);
151 myPlane : Plane from Geom;
152 myShapes : InteractiveObject from AIS [3];
153 myXLabel : AsciiString from TCollection;
154 myYLabel : AsciiString from TCollection;
156 end PlaneTrihedron from AIS;