1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
|
--
-- File : GeneralNote.cdl
-- Created : Wed 13 Jan 1993
-- Author : CKY / Contract Toubro-Larsen ( Deepak PRABHU )
--
---Copyright : MATRA-DATAVISION 1993
--
class GeneralNote from IGESDimen inherits IGESEntity
---Purpose: defines GeneralNote, Type <212> Form <0-8, 100-200, 105>
-- in package IGESDimen
-- Used for formatting boxed text in different ways
uses
TextFontDef from IGESGraph,
HAsciiString from TCollection,
Pnt from gp,
XYZ from gp,
HArray1OfHAsciiString from Interface,
HArray1OfReal from TColStd,
HArray1OfInteger from TColStd,
HArray1OfXYZ from TColgp,
HArray1OfTextFontDef from IGESGraph
raises DimensionMismatch, OutOfRange
is
Create returns mutable GeneralNote;
-- Specific Methods pertaining to the class
Init (me : mutable;
nbChars : HArray1OfInteger;
widths, heights : HArray1OfReal;
fontCodes : HArray1OfInteger;
fonts : HArray1OfTextFontDef;
slants, rotations : HArray1OfReal;
mirrorFlags, rotFlags : HArray1OfInteger;
start : HArray1OfXYZ;
texts : HArray1OfHAsciiString)
raises DimensionMismatch;
---Purpose : This method is used to set the fields of the class
-- GeneralNote
-- - nNbChars : number of chars strings
-- - widths : Box widths
-- - heights : Box heights
-- - fontCodes : Font codes, default = 1
-- - fonts : Text Font Definition Entities
-- - slants : Slant angles in radians
-- - rotations : Rotation angles in radians
-- - mirrorFlags : Mirror flags
-- - rotFlags : Rotation internal text flags
-- - start : Text start points
-- - texts : Text strings
-- raises exception if there is mismatch between the various
-- Array Lengths.
SetFormNumber (me : mutable; form : Integer) raises OutOfRange;
---Purpose : Changes FormNumber (indicates Graphical Representation)
-- Error if not in ranges [0-8] or [100-102] or 105
NbStrings (me) returns Integer;
---Purpose : returns number of text strings in General Note
NbCharacters (me ; Index : Integer) returns Integer
raises OutOfRange;
---Purpose : returns number of characters of string or zero
-- raises exception if Index <= 0 or Index > NbStrings()
BoxWidth (me; Index : Integer) returns Real
raises OutOfRange;
---Purpose : returns Box width of string
-- raises exception if Index <= 0 or Index > NbStrings()
BoxHeight (me; Index : Integer) returns Real
raises OutOfRange;
---Purpose : returns Box height of string
-- raises exception if Index <= 0 or Index > NbStrings()
IsFontEntity (me; Index : Integer) returns Boolean
raises OutOfRange;
---Purpose : returns False if Value, True if Entity
-- raises exception if Index <= 0 or Index > NbStrings()
FontCode (me; Index : Integer) returns Integer
raises OutOfRange;
---Purpose : returns Font code (default = 1) of string
-- returns 0 if IsFontEntity () is True
-- raises exception if Index <= 0 or Index > NbStrings()
FontEntity (me; Index : Integer) returns TextFontDef
raises OutOfRange;
---Purpose : returns Text Font Definition Entity of string
-- returns a Null Handle if IsFontEntity () returns False
-- raises exception if Index <= 0 or Index > NbStrings()
SlantAngle (me; Index : Integer) returns Real
raises OutOfRange;
---Purpose : returns Slant angle of string in radians
-- default value = PI/2
-- raises exception if Index <= 0 or Index > NbStrings()
RotationAngle (me; Index : Integer) returns Real
raises OutOfRange;
---Purpose : returns Rotation angle of string in radians
-- raises exception if Index <= 0 or Index > NbStrings()
MirrorFlag (me; Index : Integer) returns Integer
raises OutOfRange;
---Purpose : returns Mirror Flag of string
-- 0 = no mirroring
-- 1 = mirror axis is perpendicular to the text base line
-- 2 = mirror axis is text base line
-- raises exception if Index <= 0 or Index > NbStrings()
RotateFlag (me; Index : Integer) returns Integer
raises OutOfRange;
---Purpose : returns Rotate internal text Flag of string
-- 0 = text horizontal
-- 1 = text vertical
-- raises exception if Index <= 0 or Index > NbStrings()
StartPoint (me ; Index : Integer) returns Pnt
raises OutOfRange;
---Purpose : returns text start point of Index'th string
-- raises exception if Index <= 0 or Index > NbStrings()
TransformedStartPoint (me ; Index : Integer) returns Pnt
raises OutOfRange;
---Purpose : returns text start point of Index'th string after Transformation
-- raises exception if Index <= 0 or Index > NbStrings()
ZDepthStartPoint (me; Index : Integer) returns Real
raises OutOfRange;
---Purpose : returns distance from Start Point plane of string
-- raises exception if Index <= 0 or Index > NbStrings()
Text (me ; Index : Integer) returns HAsciiString from TCollection
raises OutOfRange;
---Purpose : returns text string
-- raises exception if Index <= 0 or Index > NbStrings()
fields
--
-- Class : IGESDimen_GeneralNote
--
-- Purpose : Declaration of variables specific to the definition
-- of the Class GeneralNote.
--
-- Reminder : A GeneralNote instance is defined by :
-- - number of chars strings
-- - Box widths
-- - Box heights
-- - Font codes, default = 1
-- - Text Font Definition Entities
-- - Slant angles in radians
-- - Rotation angles in radians
-- - Mirror flags
-- - Rotation internal text flags
-- - Text start points
-- - Text strings
-- An GeneralNote Entity consists of one or more text strings. Each text
-- string contains text, a start point, a text size, and an angle of
-- rotation of the text.
theNbChars : HArray1OfInteger;
theBoxWidths : HArray1OfReal;
theBoxHeights : HArray1OfReal;
theFontCodes : HArray1OfInteger;
theFontEntities : HArray1OfTextFontDef;
theSlantAngles : HArray1OfReal;
theRotationAngles : HArray1OfReal;
theMirrorFlags : HArray1OfInteger;
theRotateFlags : HArray1OfInteger;
theStartPoints : HArray1OfXYZ;
theTexts : HArray1OfHAsciiString;
end GeneralNote;
|