Skip to content

DXF/DWG preservation: track 27 pending checks and round-trip follow-ups #2238

Open

Description

@jonascloud

Purpose and evidence

Follow-up to #2237 (test sources). This is a tracking issue, not a claim that every failing assertion is a distinct interoperability bug.

Reproduced on 2026-10-27, macOS arm64, with acadrust 0.6.6, cargo-nextest 0.9.150, upstream base c3b8e7b7 plus test commit f6f79013d2b03c4dd1cd9c50ffc568272cd1feeb:

  • 207 active tests in the new roundtrip module pass.
  • The initial 27 explicitly ignored drawing checks fail when run explicitly, grouped into 19 findings without double-counting shared DXF/DWG failures. Review follow-up A16 adds two failing codec checks, bringing the total to 29 checks / 20 findings. A16 was validated separately at commit 6cf920cea304ec0057036ba02f18836cbfc63865; the original baseline above remains the evidence for A1–A15 and B1–B4.
  • All drawings and byte fixtures are synthetic. No reference CAD application was used for these reproductions. Native DWG-object inspection bypasses one CADCraft bridge direction but uses the same codec.
  • The failing families stop at their first failing case. The version/pass reported by an assertion is an observed witness, not evidence that every version and every case in that family was reached.

Current disposition

B4 (#2257) is resolved. B3 (#2256) awaits #2284. B2 (#2255) is a confirmed reader defect awaiting #1942; its field and legacy-placement regressions now run independently.

At ed37a1c8, the active matrix passes 215 tests; 25 drawing checks + 2 codec checks = 27 pending checks still fail explicitly. The additional placement check covers B2, not a new defect. PR #2237 remains test-only; historical baseline counts remain unchanged.

Reproduction

Until the test PR merges, check out its branch/head. The repository requires cargo-nextest >= 0.9.150.

# Run the remaining 25 pending drawing checks without stopping at the first failing test.
cargo nextest run -p cadcraft-io --test it \
  -E 'test(/^roundtrip::/)' --run-ignored ignored-only \
  --no-fail-fast --test-threads 2

# Run one exact check with cargo test instead (replace TEST with a name below).
cargo test -p cadcraft-io --test it 'roundtrip::TEST' -- --ignored --exact

A1–A15 and B1–B4 test names below are relative to roundtrip::; A16 uses the separate cadcraft-dxf codec test binary. Tests live under crates/io/tests/it/roundtrip/; shared authored cases live in cases.rs / cases/. Normal CI skips these pending checks; a green CI run is not a resolution of this issue.

Individual issue tracking

Split into separately actionable issues following the discussion below: 18 new issues plus existing #1921 for A1; review follow-up A16 reuses existing #1025. Each A/B entry links to its individual issue. All 29 originally failing checks are accounted for (27 drawing checks plus 2 codec checks); an additional independent placement check now covers B2; shared-format manifestations remain together. B1–B4 began as contract decisions/investigations; follow-up has since established editing/placement defects for B2 and B3, as recorded below. Checkboxes remain open until resolution, not merely ticket creation.

A. Confirmed losses and numerical mismatches

Prioritize silent data loss before display/property discrepancies. Checkboxes mean the finding has been resolved and the relevant tests enabled, not merely that it has been reproduced.

B. Observed changes requiring an explicit preservation contract

These findings began as reproduced differences requiring investigation; not every difference establishes geometric/content loss. B2 and B3 now have additional evidence of placement/editing defects. Decide the intended contract before changing either the implementation or expectations; do not blanket-normalize the first save.

Not failures to “fix” by expanding the format

The suite already gives explicit expectations/version domains for known representation limits: R2000 DWG has no true-color/transparency fields; native DWG TEXT has a single elevation for its two XY points; block metadata and other newer fields have explicit version gates. Do not turn those limits into blanket tolerances or treat them as additional defects in this list.

Coverage follow-up from review

Completion criteria

For each finding, link the fixing PR (or existing issue), run the exact regression plus passing neighboring families and supported versions/encodings, and remove the corresponding ignore when its intended contract is satisfied. For B1–B4, record why the chosen representation is correct and test reference integrity/geometry where canonicalization is allowed. Keep refusal explicit for cases that cannot be saved safely. Leave this tracker open until every listed check has a reviewed disposition.

Activity

  1. ticket-craft commented on Oct 27, 2026

    @ticket-craft

    Thanks! This ticket describes several separate problems:

    • DXF generated-handle exhaustion silently loses model entities
    • DWG silently drops an unregistered entity
    • Non-default extrusion omitted on the shared DXF path
    • ByBlock plot style becomes ByLayer
    • Named entity plot styles disappear through DWG
    • Named layer plot styles disappear through DWG

    It helps a lot if each one has its own ticket, so they can be tracked and fixed separately.

    Possibly related: #528, #941 and #223.

  2. jonascloud commented on Oct 27, 2026

    @jonascloud
    ContributorAuthor

    Split complete in response to the request above:

    The tracker remains open. Creating the individual tickets does not resolve their findings or enable the ignored tests. The independent text-placement coverage follow-up remains listed separately in the tracker.

  3. changed the title [-]DXF/DWG preservation: track 27 failing checks, data loss and unresolved contracts[/-] [+]DXF/DWG preservation: track 29 failing checks, data loss and unresolved contracts[/+] on Oct 27, 2026
  4. changed the title [-]DXF/DWG preservation: track 29 failing checks, data loss and unresolved contracts[/-] [+]DXF/DWG preservation: track 28 pending checks, data loss and unresolved contracts[/+] on Oct 27, 2026
  5. changed the title [-]DXF/DWG preservation: track 28 pending checks, data loss and unresolved contracts[/-] [+]DXF/DWG preservation: track 26 pending checks and round-trip follow-ups[/+] on Oct 27, 2026
  6. changed the title [-]DXF/DWG preservation: track 26 pending checks and round-trip follow-ups[/-] [+]DXF/DWG preservation: track 27 pending checks and round-trip follow-ups[/+] on Oct 27, 2026
  7. assamaral commented on Oct 28, 2026

    @assamaral
    Contributor

    ZWCAD 2025 (Windows 11) cross-check of the split issues, each with a minimal synthetic ezdxf drawing → cadcraft-cli convert (main 5654240 + #2333 fix) → ZWCAD OPEN + DXFOUT, groups compared with ezdxf against a control; details in each issue.

    Issue Result in ZWCAD
    #2240 Confirmed (DWG has 1 of 2 entities; CLI warns, DXF keeps)
    #2241 Confirmed (230 omitted, DXF + DWG)
    #2242 Confirmed (380 dropped, DXF + DWG)
    #2243 Confirmed (entity 390 gone in DWG; $PSTYLEMODE 0→1 too)
    #2244 Confirmed (layer 390 → Normal in DWG)
    #2245 Confirmed (Z → 0, DXF + DWG)
    #2246 Confirmed (ATTRIB 70 2 → 0, DXF + DWG)
    #2247 Confirmed (48 → ltscale; legacy column groups unreadable by ZWCAD too)
    #2248 Confirmed (R2018 embedded-object columns dropped; 44 = column width)
    #2249 Reproduced for R2004 DWG only; fit-only spline is a weak probe
    #2250 Not reproduced (R2018/R2004 DWG)
    #2251 Not reproduced as double decode; DXF path decodes once as well
    #2252 Confirmed (DWG $CLAYER → 0, ASCII name too)
    #2253 Not reproduced through ZWCAD (50 90.0 on both paths)
    #2254 Confirmed (DWG 11 = 0,0,0 → text at origin)
    #2255 Not reproduced (same placement as control)
    #2256 DXF 3→4, DWG 3→5 (stable); shape unchanged
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