Files
craft-libs/crates/dxf/tests/data/drawing_empty_r12.dxf
FredAppsandDylan M. Taylor 8bd1412eaa craft-dxf: add VectorCraft's ASCII drawing writer (#1588)
* craft-dxf: add VectorCraft's ASCII drawing writer

Move the incremental file writer from vectorcraft-cad (crates/cad/src/writer.rs)
into craft_dxf::drawing. It writes the HEADER/TABLES/BLOCKS/OBJECTS skeleton
around a pre-built ENTITIES section, which is the format API VectorCraft's
scene mapper already uses. The existing model::write tag serializer is
unchanged.

Golden files lock the bytes for empty and one-LINE drawings in R12, 2000 and
2018. Part of #791 / #778.

* test(dxf): preserve exact golden bytes on Windows checkout

* fix(dxf): preserve BYBLOCK and use valid image dictionary keys

* test(dxf): clone images before write in dictionary-key test

Drawing::write takes self, so the assertions have to use a clone of
the image list. The rest of the test is unchanged.

---------

Co-authored-by: Dylan M. Taylor <dylan@dylanmtaylor.com>
2026-11-15 19:07:46 +01:00

251 lines
1.0 KiB
Plaintext

0
SECTION
2
HEADER
9
$ACADVER
1
AC1009
9
$DWGCODEPAGE
3
ANSI_1252
9
$INSBASE
10
0
20
0
30
0
9
$EXTMIN
10
0
20
0
30
0
9
$EXTMAX
10
200
20
100
30
0
9
$LIMMIN
10
0
20
0
9
$LIMMAX
10
200
20
100
0
ENDSEC
0
SECTION
2
TABLES
0
TABLE
2
VPORT
70
1
0
VPORT
2
*ACTIVE
70
0
10
0
20
0
11
1
21
1
12
100
22
50
13
0
23
0
14
1
24
1
15
10
25
10
16
0
26
0
36
1
17
0
27
0
37
0
40
146.666667
41
1.5
42
50
43
0
44
0
50
0
51
0
71
0
72
1000
73
1
74
3
75
0
76
0
77
0
78
0
0
ENDTAB
0
TABLE
2
LTYPE
70
3
0
LTYPE
2
ByBlock
70
0
3
72
65
73
0
40
0
0
LTYPE
2
ByLayer
70
0
3
72
65
73
0
40
0
0
LTYPE
2
Continuous
70
0
3
Solid line
72
65
73
0
40
0
0
ENDTAB
0
TABLE
2
LAYER
70
2
0
LAYER
2
0
70
0
62
7
6
Continuous
0
LAYER
2
Layer1
70
0
62
1
6
Continuous
0
ENDTAB
0
TABLE
2
STYLE
70
1
0
STYLE
2
Standard
70
0
40
0
41
1
50
0
71
0
42
2.5
3
txt
4
0
ENDTAB
0
ENDSEC
0
SECTION
2
ENTITIES
0
ENDSEC
0
EOF