-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdwg_ac1_40.ksy
357 lines (357 loc) · 7.67 KB
/
dwg_ac1_40.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
348
349
350
351
352
353
354
355
356
357
meta:
id: dwg_ac1_40
title: AutoCAD r1.40 drawing (AC1.40)
application: AutoCAD
file-extension:
- dwg
xref:
justsolve: DWG
mime:
- application/x-dwg
- image/vnd.dwg
pronom:
fmt: 24
wikidata: Q27863111
license: CC0-1.0
endian: le
seq:
- id: header
type: header
- id: entities
type: entity
repeat: expr
repeat-expr: header.num_entities
# padding slack to ignore
types:
header:
seq:
- id: magic
contents: AC1.40
# [0x41, 0x43, 0x31, 0x2e, 0x34, 0x30]
doc: 0x0000-0x0005, $ACADVER
- id: zeros
size: 6
- id: insertion_base
type: point_3d
doc: 0x000c-0x0023; $INSBASE/10|20|30
- id: num_bytes
type: s4
doc: address after entities
- id: num_entities
type: s2
doc: 0x0028-0x0029
- id: extmin
type: point_3d
doc: 0x0078-0x008f, $EXTMIN/10|20|30
- id: extmax
type: point_3d
doc: 0x0090-0x00a7, $EXTMAX/10|20|30
- id: limits_min
type: point_2d
doc: 0x005a-0x0069, $LIMMIN/10|20
- id: limits_max
type: point_2d
doc: 0x006a-0x0079, $LIMMAX/10|20
- id: view_ctrl
type: point_3d
doc: 0x0080-0x0098, $VIEWCTRL/10|20|30
- id: view_size
type: f8
doc: $VIEWSIZE/40
- id: snap_mode
type: s2
doc: 0x009a-0x009b, $SNAPMODE/70
- id: snap_resolution
type: f8
doc: 0x009c-0x00a3, $SNAPUNIT/10|20
- id: grid_mode
type: s2
doc: 0x00a4-0x00a5, $SNAPBASE/10|20
- id: grid_unit
type: f8
doc: 0x00a6-0x00ad, $GRIDUNIT/10|20
- id: ortho_mode
type: s2
doc: 0x00ae-0x00af, $ORTHOMODE
- id: regen_mode
type: s2
doc: 0x00b0-0x00b1, $REGENMODE
- id: fill_mode
type: s2
doc: 0x00b2-0x00b3, $FILLMODE
- id: text_size
type: f8
doc: $TEXTSIZE
- id: trace_width
type: f8
doc: $TRACEWID
- 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, DIMSCALE?
# r1_2 stops here
- id: linear_units_format
type: s2
enum: unit_types
doc: 0x01d8-0x01d9, $LUNITS
- id: linear_units_precision
type: s2
doc: 0x01da-0x01db, $LUPREC
- id: dim_text_within_dimension
type: s2
doc: 0x01dc-0x01dd
- id: dim_text_outside_of_dimension
type: s2
doc: 0x01de-0x01df
- id: axis_mode
type: s2
doc: 0x01e0-0x01e1
- id: axis_value
type: point_2d
doc: 0x01e2-0x01f1
- id: sketch_increment
type: f8
doc: 0x01f2-0x01f9, Default value is 0.1
- id: fillet_radius
type: f8
doc: 0x01fa-0x0202
instances:
dwg_version:
value: 2
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: name_size
type: s2
- id: name
type: str
size: name_size
encoding: ASCII
- id: base_pt
type: point_2d
entity_block_end:
seq:
- id: layer
type: s2
entity_block_insert:
seq:
- id: layer
type: s2
- id: name_size
type: s2
- id: name
type: str
size: name_size
encoding: ASCII
- id: ins_pt
type: point_2d
- id: x_scale
type: f8
- id: y_scale
type: f8
- id: rotation_angle
type: f8
entity_circle:
seq:
- id: layer
type: s2
- id: center_pt
type: point_2d
- id: radius
type: f8
entity_line:
seq:
- id: layer
type: s2
- id: start_pt
type: point_2d
- id: end_pt
type: point_2d
entity_load:
seq:
- id: layer
type: s2
- id: filename_size
type: s2
- id: filename
type: str
size: filename_size
encoding: ASCII
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: ins_pt
type: point_2d
- id: height
type: f8
- id: angle
type: f8
- id: item_num
type: s2
entity_solid:
seq:
- id: layer
type: s2
- id: corner1
type: point_2d
- id: corner2
type: point_2d
- id: corner3
type: point_2d
- id: corner4
type: point_2d
entity_text:
seq:
- id: layer
type: s2
- id: ins_pt
type: point_2d
- id: height
type: f8
- id: angle
type: f8
- id: value_size
type: s2
- id: value
size: value_size
entity_trace:
seq:
- id: layer
type: s2
- id: corner1
type: point_2d
- id: corner2
type: point_2d
- id: corner3
type: point_2d
- id: corner4
type: point_2d
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