Skip to content

v1.38.0 — cut-ready DXF units, and a core that proves it bundles

Choose a tag to compare

@shunyagatha shunyagatha released this 15 Aug 05:49
· 31 commits to main since this release

Two plan items, both about turning a claim into something checkable.

A part, not a drawing

Every DXF this exporter has ever written said nothing about units — silently. When a file omits $INSUNITS, LightBurn, LibreCAD and Fusion each apply a different default, so the same DXF cuts at three different sizes depending on what opened it. The maker finds out after the cut, in material.

vecline convert logo.png part.dxf --units mm --physical-width 80

That writes a real HEADER declaring $INSUNITS (and $MEASUREMENT, which some importers read instead) and emits every coordinate at physical scale. The flag asks for the finished width, because that is how a maker thinks — not in pixels-per-unit. Omitting it prints a notice rather than staying quiet, since silence is exactly how the wrong-size part happens.

The gate parses the coordinates back out of the file and asserts the geometry spans the promised distance. That is the assertion that matters: a header claiming millimetres over pixel coordinates passes every other check and cuts ten times too big. It caught a real defect immediately — the first version scaled the CIRCLE and ELLIPSE coordinates and missed the LWPOLYLINE vertices, which are the bulk of any real file.

The zero-dependency core now proves itself by bundling

The existing portability test reads source and walks imports. That is a good proxy and still a proxy — it trusts that the walk sees every edge, and that no dependency pulls something in behind it. The claim users actually rely on is narrower and directly testable: this bundles for a browser. So it is now bundled for a browser in CI, with no externals and no Node platform, and the output asserted free of node: specifiers and Node globals.

85.4 KB minified, with a size tripwire either side.

Also

Fixed in the test rather than the code: the DXF coordinate parser scanned line by line, but DXF is strictly code/value alternating — a coordinate whose value happened to be 10 was read as an X group code, and two runs disagreed on how many coordinates existed.

508 tests · smoke clean · corpus problems: 0