b311480e |
1 | -- Created by: TCL |
2 | -- Copyright (c) 2000-2012 OPEN CASCADE SAS |
3 | -- |
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. |
8 | -- |
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. |
11 | -- |
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. |
18 | |
7fd59977 |
19 | |
20 | class ToleranceFrame from Prs2d inherits Line from Graphic2d |
21 | |
22 | uses |
23 | |
24 | GraphicObject from Graphic2d, |
25 | Drawer from Graphic2d, |
26 | Length from Quantity, |
27 | ExtendedString from TCollection, |
28 | TypeOfTolerance from Prs2d, |
29 | Tolerance from Prs2d, |
30 | Array1OfShortReal from TShort, |
31 | FStream from Aspect, |
32 | Pnt2d from gp, |
33 | HArray1OfPnt2d from TColgp |
34 | is |
35 | ------------------------- |
36 | -- Category: Constructors |
37 | ------------------------- |
38 | |
39 | Create( aGO : GraphicObject from Graphic2d; |
40 | aX, aY : Length from Quantity; |
41 | aHeight : Length from Quantity; |
42 | aTolType : TypeOfTolerance from Prs2d = Prs2d_TOT_NONE; |
43 | aTolTxt : CString from Standard = ""; |
44 | aTxt1 : CString from Standard = ""; |
45 | aTxt2 : CString from Standard = ""; |
46 | anAngle : Real from Standard = 0.0; |
47 | aScale : Real from Standard = 1.0 ); |
48 | |
49 | ---Level: Public |
50 | ---Purpose: Creates a frame with a type of tolerance <aTolType>, |
51 | -- tolerance <aTolTxt>, the reference point is <aXPosition>, <aYPosition |
52 | -- <aX>, <aY> - the center of left vertical edge of this frame |
53 | ---Category: Constructor |
54 | |
55 | -------------------------- |
56 | -- Category: Draw and Pick |
57 | -------------------------- |
58 | |
59 | Draw( me : mutable; aDrawer: Drawer from Graphic2d ) |
60 | is static protected; |
61 | ---Level: Internal |
62 | ---Purpose: Draws the angle <me>. |
63 | |
64 | Pick( me : mutable; X, Y: ShortReal from Standard; |
65 | aPrecision: ShortReal from Standard; |
66 | aDrawer: Drawer from Graphic2d) |
67 | returns Boolean from Standard |
68 | is static protected; |
69 | ---Level: Internal |
70 | ---Purpose: Returns Standard_True if the tolerance frame <me> is picked, |
71 | -- Standard_False if not. |
72 | |
73 | SetHeight( me: mutable; aHSize: Real from Standard ); |
74 | ---Level: Public |
75 | ---Purpose: Defines the height of the frame |
76 | |
77 | Height( me ) returns Real from Standard; |
78 | ---Level: Public |
79 | ---Purpose: Indicates the current height of the frame |
80 | |
81 | --------------------------------------------------- |
82 | |
83 | Save( me; aFStream: in out FStream from Aspect ) is virtual; |
84 | |
85 | ArrayOfPnt2d( me ) returns HArray1OfPnt2d from TColgp; |
86 | ---Level: Public |
87 | ---C++: return const |
88 | ---Purpose: Returns array of 2d points, which produce frame for tolerance |
89 | -- Size of array == 4 |
90 | |
91 | SetTolText( me: mutable; aText: CString from Standard ); |
92 | ---Level: Public |
93 | ---Purpose: Sets the text to this tolerance |
94 | |
95 | SetText1( me: mutable; aText: CString from Standard ); |
96 | ---Level: Public |
97 | |
98 | SetText2( me: mutable; aText: CString from Standard ); |
99 | ---Level: Public |
100 | |
101 | |
102 | TolText( me ) returns ExtendedString from TCollection; |
103 | ---Level: Public |
104 | ---Purpose: Returns text and array, which contain points of cell |
105 | -- which separates the text from other parameters |
106 | |
107 | Text1( me ) returns ExtendedString from TCollection; |
108 | ---Level: Public |
109 | |
110 | Text2( me ) returns ExtendedString from TCollection; |
111 | ---Level: Public |
112 | |
113 | TextScale( me ) returns Real from Standard; |
114 | ---Level: Public |
115 | |
116 | |
117 | fields |
118 | |
119 | myX : ShortReal from Standard; |
120 | myY : ShortReal from Standard; |
121 | myTolTxt : ExtendedString from TCollection; |
122 | myTxt1 : ExtendedString from TCollection; |
123 | myTxt2 : ExtendedString from TCollection; |
124 | myHeight : ShortReal from Standard; |
125 | myAngle : ShortReal from Standard; |
126 | myScale : ShortReal from Standard; |
127 | myHTol : Tolerance from Prs2d; |
128 | |
129 | myXVert : Array1OfShortReal from TShort; |
130 | myYVert : Array1OfShortReal from TShort; |
131 | |
132 | |
133 | end ToleranceFrame from Prs2d; |