From d2c2ef178b43a257de16395f6a3456381b72c4d5 Mon Sep 17 00:00:00 2001 From: Felix Riestra Date: Mon, 21 Sep 2026 18:55:42 +0200 Subject: [PATCH] docs: record cadcodec PR #51 for the text and dimension style DXF fixes Co-Authored-By: Claude Sonnet 5 --- docs/cadcodec-reader-gaps.md | 10 +++++++--- docs/plugin-host-model-completion-plan.md | 9 +++++++++ plugins/opencad-python/PLUGIN.md | 3 ++- 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/docs/cadcodec-reader-gaps.md b/docs/cadcodec-reader-gaps.md index f446c121e..7e2f45406 100644 --- a/docs/cadcodec-reader-gaps.md +++ b/docs/cadcodec-reader-gaps.md @@ -199,9 +199,12 @@ These are format constraints or OCS-side issues, not reader bugs: emits group 41 only when `flags.rational` is set, so the host must set that flag when weights are present (fixed in OCS). -### Text and dimension style findings (2026-09-21, not filed) +### Text and dimension style findings (2026-09-21) -Found by `audit_python_text_and_dim_styles_over_real_ipc`; each is pinned by a canary. +Found by `audit_python_text_and_dim_styles_over_real_ipc`; each is pinned by a canary. The first +three are fixed in [HakanSeven12/cadcodec#51](https://github.com/HakanSeven12/cadcodec/pull/51) +(independent of #48); the last two are not filed, because fixing them needs the XDATA layout +AutoCAD expects and that cannot be checked here. - **`STYLE` generation flags:** the DXF writer hard-codes group 71 to 0, so a text style's `flags.backward` and `flags.upside_down` are lost on every DXF save (DWG keeps them). @@ -212,5 +215,6 @@ Found by `audit_python_text_and_dim_styles_over_real_ipc`; each is pinned by a c resolves `dimtxsty` from it, so the name reopens as `Standard` (the handle is right; DWG resolves both). - **`TextStyle::true_type_font`** is never written or read by either codec, so it lives only in memory. - **`BLOCK_RECORD` description:** the DXF codec does not carry `BlockRecord::description` - (found by `audit_python_blocks_over_real_ipc`, pinned by a canary); DWG keeps it. + (found by `audit_python_blocks_over_real_ipc`, pinned by a canary); DWG keeps it. Not filed, for + the same reason as `true_type_font`. diff --git a/docs/plugin-host-model-completion-plan.md b/docs/plugin-host-model-completion-plan.md index d861fe9e7..dd1bcc146 100644 --- a/docs/plugin-host-model-completion-plan.md +++ b/docs/plugin-host-model-completion-plan.md @@ -320,3 +320,12 @@ to a helper thread would be unsound here (the editor state is not `Send` and som a stack-growing dependency such as `stacker`, adds a crate to H7's tree to guard a case that cannot occur. The 64 MiB thread in the PEDIT audit stays, because a test thread gets only 2 MiB. +### 2026-09-21: cadcodec PR #51 (text and dimension style DXF fixes) + +Second small upstream PR, [HakanSeven12/cadcodec#51](https://github.com/HakanSeven12/cadcodec/pull/51): STYLE generation +flags (group 71 was hard-coded to 0), the STYLE oblique angle (group 50 is degrees; it was written and read as raw radians) +and the DIMSTYLE text-style name (resolved from the group 340 handle). Three commits, three regression tests, independent of +#48 (merged locally with it; the combined suite passes). Not included: `true_type_font` and the block description, which need +an XDATA layout that cannot be verified here. OCS still pins the unfixed revision, so the canaries in +`audit_python_text_and_dim_styles_over_real_ipc` still assert the wrong result until #51 is merged and OCS repins. + diff --git a/plugins/opencad-python/PLUGIN.md b/plugins/opencad-python/PLUGIN.md index 4394d47d6..e9fa2de9a 100644 --- a/plugins/opencad-python/PLUGIN.md +++ b/plugins/opencad-python/PLUGIN.md @@ -181,7 +181,8 @@ positive, and `dimtxsty` must name an existing text style. `Standard` is never renamed or deleted; a style that is current or still referenced is never deleted; a case-only rename is refused. Style operations act on the active document. -Known persistence limits (cadcodec, see `docs/cadcodec-reader-gaps.md`): a DXF +Known persistence limits (cadcodec, see `docs/cadcodec-reader-gaps.md`; the first two are fixed in +an open upstream pull request but OCS has not yet adopted it): a DXF save drops the backward/upside-down flags of a text style and does not restore a dimension style's `dimtxsty` name (the handle link survives); DWG keeps both.