You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
DWG: center-justified ATTDEF loses its insertion point (becomes the alignment point) #2464
Summary. On a combo build (v0.14.0 + #2107 + #2132 + #2400), a DXF converted to DWG loses the ATTDEF insertion point when the definition is center-justified (group 72 = 1) and the alignment point (group 11) is more than about 1.4 units from the insertion point. ZWCAD 2025 then reports the insertion point equal to the alignment point. The same DXF converted to DXF is unchanged.
Evidence (ZWCAD 2025, DXFOUT of the opened file, 88 ATTDEF in model space of a private production drawing).
Original DXF opened directly, and the same DXF saved as DWG by ZWCAD and reopened: all 88 ATTDEF unchanged (control).
cadcraft-cli convert in.dxf out.dxf: all 88 unchanged.
cadcraft-cli convert in.dxf out.dwg: 68 of 88 changed, 20 unchanged. Changed ones have (11.x - 10.x) between 1.94 and 4.53; unchanged ones between 0.97 and 1.36. Example: 10=(485.204,1660.310), 11=(488.019,1660.310) becomes 10=(488.019,1660.310), 11 unchanged. Height 2.5, text style ARIAL, flags 8, value empty.
Effect: plot pixel difference against the original rises from 1.2-2.3 % (DXF output) to 3.0-5.6 % (DWG output, 13 % on the sheet with most of these definitions).
Minimal input to try (not yet run by me on a synthetic file).
Convert to DWG, open in ZWCAD or AutoCAD, list the attribute definition: the insertion point should stay at (0,0) with the alignment point at (3,0).
The writer in acadrust 0.6.6 (write_text_entity_data) passes both points, so this may be on the reader side or in how the second point is encoded; I did not isolate it. Related: #2229 (justified TEXT in DWG).
Cause found, not in acadrust: the CADCraft DWG bridge replaces a justified text's insertion point by the computed baseline start when the stored one is not within 0.1 * width + 0.5 * height of it (#1050), and an ATTDEF with an empty default value has width 0, so the limit was half a height (1.25 at height 2.5, matching the 1.0 / 1.36 split above). Fixed in #2466, tested in ZWCAD 2025 with a synthetic drawing (main: group 10 equals group 11 in all four ATTDEFs; branch: kept).
Activity
assamaral commentedon Oct 29, 2026
Cause found, not in acadrust: the CADCraft DWG bridge replaces a justified text's insertion point by the computed baseline start when the stored one is not within 0.1 * width + 0.5 * height of it (#1050), and an ATTDEF with an empty default value has width 0, so the limit was half a height (1.25 at height 2.5, matching the 1.0 / 1.36 split above). Fixed in #2466, tested in ZWCAD 2025 with a synthetic drawing (main: group 10 equals group 11 in all four ATTDEFs; branch: kept).
ticket-craft commentedon Oct 30, 2026
This is being worked on in #2466.
Possibly related: #1050, #2229 and #1658.
fix(io): a centred ATTDEF keeps its insertion point in a DWG (#2464) (#…