1 -- Created by: Tanya COOL
2 -- Copyright (c) 2000-2012 OPEN CASCADE SAS
4 -- The content of this file is subject to the Open CASCADE Technology Public
5 -- License Version 6.5 (the "License"). You may not use the content of this file
6 -- except in compliance with the License. Please obtain a copy of the License
7 -- at http://www.opencascade.org and read it completely before using this file.
9 -- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
10 -- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
12 -- The Original Code and all software distributed under the License is
13 -- distributed on an "AS IS" basis, without warranty of any kind, and the
14 -- Initial Developer hereby disclaims all such warranties, including without
15 -- limitation, any warranties of merchantability, fitness for a particular
16 -- purpose or non-infringement. Please see the License for the specific terms
17 -- and conditions governing the rights and limitations under the License.
20 class Angle from Prs2d inherits Dimension from Prs2d
22 ---Purpose: Constructs the primitive Angle
26 Drawer from Graphic2d,
27 GraphicObject from Graphic2d,
30 ExtendedString from TCollection,
32 TypeOfArrow from Prs2d,
37 CircleDefinitionError from Graphic2d
40 Create( aGraphicObject: GraphicObject from Graphic2d;
41 anAttachPnt1 : Pnt2d from gp;
42 anAttachPnt2 : Pnt2d from gp;
43 anAttachPnt3 : Pnt2d from gp;
44 aRadius : Length from Quantity;
45 aText : ExtendedString from TCollection;
46 aTxtScale : Real from Standard = 3.0;
47 anArrAngle : Real from Standard = 15.0;
48 anArrLength : Real from Standard = 10.0;
49 anArrType : TypeOfArrow from Prs2d = Prs2d_TOA_OPENED;
50 anArrow : ArrowSide from Prs2d = Prs2d_AS_BOTHAR;
51 IsReverseArrow: Boolean from Standard = Standard_False )
53 returns mutable Angle from Prs2d;
55 ---Purpose: create an angle:
56 -- between the line defined by the points
57 -- anAttachtPnt1 and anAttachPnt2 and
58 -- the line defined by the points
59 -- anAttachPnt1 and anAttachPnt3
60 -- Radius of this angle is the distance
61 -- between <anAttachPnt1> and <anOffsetPoint> points.
62 -- <anArrAngle> in degree
64 --------------------------------------
65 -- Category: Inquire methods
66 --------------------------------------
68 Values( me; aPnt1, aPnt2, aPnt3: out Pnt2d from gp;
69 aRad: out Length from Quantity );
71 ---Purpose: allows to get the properties of the angle
73 CalcTxtPos(me:mutable; theFromAbs: Boolean
74 from Standard=Standard_False)
76 is redefined protected;
78 --------------------------------------
79 -- Category: Draw and Pick
80 --------------------------------------
82 Draw( me : mutable; aDrawer: Drawer from Graphic2d )
85 ---Purpose: Draws the angle <me>.
87 DrawElement( me : mutable; aDrawer: Drawer from Graphic2d;
88 anIndex: Integer from Standard)
89 is redefined protected;
91 ---Purpose: Draws element <anIndex> of the angle <me>.
93 DrawVertex( me : mutable; aDrawer: Drawer from Graphic2d;
94 anIndex: Integer from Standard)
95 is redefined protected;
97 ---Purpose: Draws vertex <anIndex> of the angle <me>.
99 Pick( me : mutable; X, Y: ShortReal from Standard;
100 aPrecision: ShortReal from Standard;
101 aDrawer: Drawer from Graphic2d)
102 returns Boolean from Standard
105 ---Purpose: Returns Standard_True if the angle <me> is picked,
106 -- Standard_False if not.
108 Save( me; aFStream: in out FStream from Aspect ) is virtual;
112 myCentX : ShortReal from Standard;
113 myCentY : ShortReal from Standard;
114 myRad : ShortReal from Standard;
115 myFAngle : ShortReal from Standard;
116 mySAngle : ShortReal from Standard;
118 end Angle from Prs2d;