1 -- Created on: 1995-02-07
2 -- Created by: Arnaud BOUZY
3 -- Copyright (c) 1995-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 -- Modifs by ROB : Added one Method to take into Account Units in
24 class AnglePresentation from DsgPrs
25 ---Purpose: A framework for displaying angles.
27 Presentation from Prs3d,
32 ExtendedString from TCollection,
33 ArrowSide from DsgPrs,
39 Add( myclass; aPresentation: Presentation from Prs3d;
40 aDrawer: Drawer from Prs3d;
41 aVal: Real from Standard;
42 aText: ExtendedString from TCollection;
43 aCircle: Circ from gp;
44 aPosition: Pnt from gp;
46 VminCircle: Circ from gp;
47 VmaxCircle: Circ from gp;
48 aArrowSize: Real from Standard );
49 ---Purpose: Draws the presenation of the full angle of a cone.
50 -- VminCircle - a circle at V parameter = Vmin
51 -- VmaxCircle - a circle at V parameter = Vmax
52 -- aCircle - a circle at V parameter from projection of aPosition to axis of the cone
55 Add( myclass; aPresentation: Presentation from Prs3d;
56 aDrawer: Drawer from Prs3d;
57 theval: Real from Standard;
58 CenterPoint : Pnt from gp;
59 AttachmentPoint1: Pnt from gp;
60 AttachmentPoint2: Pnt from gp;
63 OffsetPoint: Pnt from gp);
64 ---Purpose: Draws the representation of the angle
65 -- defined by dir1 and dir2, centered on
66 -- CenterPoint, using the offset point OffsetPoint.
67 -- Lines are drawn to points AttachmentPoint1 and AttachmentPoint2
70 Add( myclass; aPresentation: Presentation from Prs3d;
71 aDrawer: Drawer from Prs3d;
72 theval: Real from Standard;
73 thevalstring : ExtendedString from TCollection;
74 CenterPoint : Pnt from gp;
75 AttachmentPoint1: Pnt from gp;
76 AttachmentPoint2: Pnt from gp;
79 OffsetPoint: Pnt from gp);
80 ---Purpose: Same as above, but <thevalstring> contains conversion
81 -- in Session units....
82 Add( myclass; aPresentation: Presentation from Prs3d;
83 aDrawer: Drawer from Prs3d;
84 theval: Real from Standard;
85 thevalstring : ExtendedString from TCollection;
86 CenterPoint : Pnt from gp;
87 AttachmentPoint1: Pnt from gp;
88 AttachmentPoint2: Pnt from gp;
91 OffsetPoint: Pnt from gp;
92 ArrowSide : ArrowSide from DsgPrs);
93 ---Purpose: Same as above, may add one or
94 -- two Arrows according to <ArrowSide> value
96 Add( myclass; aPresentation: Presentation from Prs3d;
97 aDrawer: Drawer from Prs3d;
98 theval: Real from Standard;
99 thevalstring : ExtendedString from TCollection;
100 CenterPoint : Pnt from gp;
101 AttachmentPoint1: Pnt from gp;
102 AttachmentPoint2: Pnt from gp;
105 axisdir: Dir from gp;
106 OffsetPoint: Pnt from gp);
107 ---Purpose: Same as above, but axisdir contains the axis direction
108 -- useful for Revol that can be opened with 180 degrees
110 Add( myclass; aPresentation : Presentation from Prs3d;
111 aDrawer : Drawer from Prs3d;
112 theval : Real from Standard;
113 thevalstring : ExtendedString from TCollection;
114 CenterPoint : Pnt from gp;
115 AttachmentPoint1 : Pnt from gp;
116 AttachmentPoint2 : Pnt from gp;
119 axisdir : Dir from gp;
120 isPlane : Boolean from Standard;
121 AxisOfSurf : Ax1 from gp;
122 OffsetPoint : Pnt from gp;
123 ArrowSide : ArrowSide from DsgPrs);
124 ---Purpose: Same as above,may add one or
125 -- two Arrows according to <ArrowSide> value
127 Add( myclass; aPresentation: Presentation from Prs3d;
128 aDrawer:Drawer from Prs3d;
129 theval: Real from Standard;
130 theCenter,AttachmentPoint1:Pnt from gp;
132 ArrowSide: ArrowSide from DsgPrs);
133 ---Purpose: simple representation of a poor lonesome angle dimension
134 -- Draw a line from <theCenter> to <AttachmentPoint1>, then operates
135 -- a rotation around the perpmay add one or
136 -- two Arrows according to <ArrowSide> value. The
137 -- attributes (color,arrowsize,...) are driven by the Drawer.
140 end AnglePresentation;