-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdwg_ac1_2.ksy
347 lines (347 loc) · 6.83 KB
/
dwg_ac1_2.ksy
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
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
meta:
id: dwg_ac1_2
title: AutoCAD r1.2 drawing (AC1.2)
application: AutoCAD
file-extension:
- dwg
xref:
justsolve: DWG
mime:
- application/x-dwg
- image/vnd.dwg
pronom:
fmt: 22
wikidata: Q27863107
license: CC0-1.0
endian: le
seq:
- id: header
type: header
- id: entities
type: entity
repeat: expr
repeat-expr: header.num_entities
types:
header:
seq:
- id: magic
contents: AC1.2
# [0x41, 0x43, 0x31, 0x2e, 0x32, 0x00]
doc: 0x0000-0x0005, $ACADVER
- id: zeros
size: 6
- id: insertion_base
type: point_3d
doc: 0x000c-0x0023
- id: num_bytes
type: s4
- id: num_entities
type: s2
doc: 0x0028-0x0029
- id: drawing_first
type: point_3d
- id: drawing_second
type: point_3d
- id: limits_min
type: point_2d
doc: 0x005a-0x0069
- id: limits_max
type: point_2d
doc: 0x006a-0x0079
- id: view_ctrl
type: point_3d
- id: view_size
type: f8
- id: snap_mode
type: s2
doc: 0x009a-0x009b
- id: snap_resolution
type: f8
doc: 0x009c-0x00a3
- id: grid_mode
type: s2
doc: 0x00a4-0x00a5
- id: grid_unit
type: f8
doc: 0x00a6-0x00ad
- id: ortho_mode
type: s2
doc: 0x00ae-0x00af
- id: regen_mode
type: s2
doc: 0x00b0-0x00b1 (XXX could be ffff)
- id: fill_mode
type: s2
doc: 0x00b2-0x00b3 (XXX could be ffff)
- id: text_size
type: f8
- id: trace_width
type: f8
- id: current_layer
type: s2
doc: 0x00c4-0x00c5
- id: cecolor
type: s2
doc: 0x00c6-0x00c7
- id: layer_colors
type: s2
repeat: expr
repeat-expr: 128
doc: 0x00c8-0x01c7
- id: dim_arrowsize
type: f8
doc: 0x01c8-0x01cf
- id: unknown1
type: f8
doc: 0x01d0-0x01d7
instances:
dwg_version:
value: 0
entity:
seq:
- id: entity_type
type: s2
enum: entities
- id: data
type:
switch-on: entity_type
cases:
'entities::arc': entity_arc
'entities::block_begin': entity_block_begin
'entities::block_end': entity_block_end
'entities::block_insert': entity_block_insert
'entities::circle': entity_circle
'entities::line': entity_line
'entities::load': entity_load
'entities::point': entity_point
'entities::repeat_begin': entity_repeat_begin
'entities::repeat_end': entity_repeat_end
'entities::shape': entity_shape
'entities::solid': entity_solid
'entities::text': entity_text
'entities::trace': entity_trace
'entities::tmp_arc': entity_arc
'entities::tmp_block_insert': entity_block_insert
'entities::tmp_circle': entity_circle
'entities::tmp_line': entity_line
'entities::tmp_point': entity_point
'entities::tmp_shape': entity_shape
'entities::tmp_solid': entity_solid
'entities::tmp_text': entity_text
'entities::tmp_trace': entity_trace
entity_arc:
seq:
- id: layer
type: s2
- id: x
type: f8
- id: y
type: f8
- id: radius
type: f8
- id: angle_from
type: f8
- id: angle_to
type: f8
entity_block_begin:
seq:
- id: layer
type: s2
- id: size
type: s2
- id: value
size: size
- id: x
type: f8
- id: y
type: f8
entity_block_end:
seq:
- id: layer
type: s2
entity_block_insert:
seq:
- id: layer
type: s2
- id: size
type: s2
- id: value
size: size
- id: x
type: f8
- id: y
type: f8
- id: x_scale
type: f8
- id: y_scale
type: f8
- id: rotation_angle
type: f8
entity_circle:
seq:
- id: layer
type: s2
- id: x
type: f8
- id: y
type: f8
- id: radius
type: f8
entity_line:
seq:
- id: layer
type: s2
- id: x1
type: f8
- id: y1
type: f8
- id: x2
type: f8
- id: y2
type: f8
entity_load:
seq:
- id: layer
type: s2
- id: size
type: s2
- id: value
size: size
entity_point:
seq:
- id: layer
type: s2
- id: x
type: f8
- id: y
type: f8
entity_repeat_begin:
seq:
- id: layer
type: s2
entity_repeat_end:
seq:
- id: layer
type: s2
- id: columns
type: s2
- id: rows
type: s2
- id: column_distance
type: f8
- id: row_distance
type: f8
entity_shape:
seq:
- id: layer
type: s2
- id: x
type: f8
- id: y
type: f8
- id: height
type: f8
- id: angle
type: f8
- id: item_num
type: s2
entity_solid:
seq:
- id: layer
type: s2
- id: from_x
type: f8
- id: from_y
type: f8
- id: from_and_x
type: f8
- id: from_and_y
type: f8
- id: to_x
type: f8
- id: to_y
type: f8
- id: to_and_x
type: f8
- id: to_and_y
type: f8
entity_text:
seq:
- id: layer
type: s2
- id: x
type: f8
- id: y
type: f8
- id: height
type: f8
- id: angle
type: f8
- id: size
type: s2
- id: value
size: size
entity_trace:
seq:
- id: layer
type: s2
- id: from_x
type: f8
- id: from_y
type: f8
- id: from_and_x
type: f8
- id: from_and_y
type: f8
- id: to_x
type: f8
- id: to_y
type: f8
- id: to_and_x
type: f8
- id: to_and_y
type: f8
point_2d:
seq:
- id: x
type: f8
- id: y
type: f8
point_3d:
seq:
- id: x
type: f8
- id: y
type: f8
- id: z
type: f8
enums:
entities:
-1: tmp_line
-2: tmp_point
-3: tmp_circle
-4: tmp_shape
-7: tmp_text
-8: tmp_arc
-9: tmp_trace
-11: tmp_solid
-14: tmp_block_insert
1: line
2: point
3: circle
4: shape
5: repeat_begin
6: repeat_end
7: text
8: arc
9: trace
10: load
11: solid
12: block_begin
13: block_end
14: block_insert
unit_types:
1: scientific
2: decimal
3: engineering
4: architectural