Skip to content

DXF/DWG save drops $PSTYLEMODE: a named-plot-style drawing reads back as colour-dependent, and its plot gets thicker edges #2332

Closed

Description

@assamaral

Environment: cadcraft-cli built from main (0ff1b03) plus #1725/#2028/#2107/#2131/#2132, Windows 11; ZWCAD 2025 as the reader (black box). Observed on an 8-sheet production drawing (private, not attached).

What happens

The source DXF (written by ZWCAD) has $PSTYLEMODE = 0 (named plot styles; the layouts use Autodesk-Color.stb). The DXF CADCraft writes from it (convert in.dxf out.dxf) has no $PSTYLEMODE header at all, and the DWG it writes reads back in ZWCAD with PSTYLEMODE = 1 (colour-dependent). Layer and entity lineweights are unchanged (checked group by group).

Effect

Plotting layout 1 of the written DWG in ZWCAD with the same recipe as the original (A3 full bleed, monochrome.ctb) gives the same geometry (same path and character counts) but every text and table edge is about 1 px thicker at 110 dpi: 4.5 % of the ink differs by extents and 5.9 % by layout area, all of it edge thickness, none of it missing geometry. With the named .stb the difference would presumably be colour/pen assignments as well, which I have not measured.

Expected

$PSTYLEMODE written as read (0 for a named-plot-style drawing), so the plot style mode survives a save.

Found while verifying #2132 (comment there mentions it); related to the ZWCAD round-trip work in #1463.

Activity

  1. ticket-craft commented on Oct 27, 2026

    @ticket-craft

    Possibly related: #410, #2242 and #2244.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions