From d88289e0ef79888dad9aa4f53197d87733fc776b Mon Sep 17 00:00:00 2001 From: Ni Jingzhe <1448976235@qq.com> Date: Tue, 10 Nov 2026 05:27:04 +0800 Subject: [PATCH] release: 2.2.9 (replaces the withdrawn 2.2.8) DECISION: release the one-solid Part and the fixes on dev as 2.2.9. The version number is 2.2.9, not 2.2.8 again and not 2.2.8.post1. WHY - THE DISCUSSION (owner and assistant, 2026-11-10) - 2.2.8 shipped a Part that could hold several bodies. The audit found such a Part could not take part in an assembly (no connectors, explode_rassembly raised); the owner judged the multi-body Part a wrong decision made for the editor's convenience, and the agreed answer was Part = one solid, the editor shows loose solids (design-docs/part-holds-one-solid.md, merged in the pull request "A Part holds exactly one solid"). - The owner deleted the GitHub release of 2.2.8 and yanked 2.2.8 on PyPI. The owner asked whether 2.2.8 could be published again: it cannot. PyPI keeps a version and its file names for ever, even when yanked or deleted, and does not accept another upload under them. So the fixed code needs a new number. - 2.2.9 rather than 2.2.8.post1: the change removes interface that 2.2.8 had (`bodies=`, `inspect_body_overlaps_rlist`, `part_shape`, profile 3), which a patch number says more plainly than a post-release of a withdrawn version; this repository's `.post1` / `.post2` releases (2.2.6) were for packaging fixes. WHAT CHANGES (the same files as "release: 2.2.8" touched) - pyproject.toml, uv.lock (the simplecadapi package entry), docs/skill/SKILL.md (version, package-version) and docs/skill/references/SDK_OVERVIEW.md: 2.2.8 -> 2.2.9. - CHANGELOG.md: the Unreleased entry of the one-solid change becomes 2.2.9 (2026-11-10), with a Fixed section for what else is on dev since the 2.2.8 tag: the Windows editor pid probe, GCC 14 and MinGW source builds, macOS wheels on macos-15. - docs/updates/2.2.9.md and 2.2.9.zh-CN.md: the update notes, which the release workflow turns into the release page. They say that 2.2.8 is withdrawn, why a Part holds one solid, what changes for users (the argument and helpers removed, SeveralOpenBodiesError, the editor's open solids) and what was fixed. Checked: nothing in the tests reads these files; the release workflow checks that the tag equals the pyproject version (v2.2.9). The wheels and the PyPI upload are built by the workflow when the tag is pushed. Co-Authored-By: Claude Sonnet 5.5 --- CHANGELOG.md | 10 +++++- docs/skill/SKILL.md | 4 +-- docs/skill/references/SDK_OVERVIEW.md | 4 +-- docs/updates/2.2.9.md | 50 +++++++++++++++++++++++++++ docs/updates/2.2.9.zh-CN.md | 44 +++++++++++++++++++++++ pyproject.toml | 2 +- uv.lock | 2 +- 7 files changed, 109 insertions(+), 7 deletions(-) create mode 100644 docs/updates/2.2.9.md create mode 100644 docs/updates/2.2.9.zh-CN.md diff --git a/CHANGELOG.md b/CHANGELOG.md index 9cf95d8b..99366250 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,9 @@ All notable changes to SimpleCADAPI are documented here. Per-version user-facing notes live in [`docs/updates/`](docs/updates/) (English and 中文). -## Unreleased +## 2.2.9 — 2026-11-10 + +Replaces 2.2.8, which was withdrawn (yanked on PyPI). User-facing notes: [`docs/updates/2.2.9.md`](docs/updates/2.2.9.md). ### Changed - A `Part` holds exactly one solid again. The multi-body Part of the withdrawn 2.2.8 release (`make_part_rpart(bodies=...)`, @@ -16,6 +18,12 @@ user-facing notes live in [`docs/updates/`](docs/updates/) (English and `SeveralOpenBodiesError` naming them. The editor draws them side by side ("N open solids") and its `use_as_product` makes the Part from the one you choose. Several solids as a deliverable are one Part each in an Assembly. +### Fixed +- On Windows `sca cell` no longer kills the editor it talks to: the editor pid is probed without signalling it + (`os.kill(pid, 0)` terminates the process on Windows). +- Building from source with GCC 14 (`operators_promote.cpp` includes ``) and MinGW (`_USE_MATH_DEFINES`; `build_occt.py` + picks Ninja when a MinGW `g++` is the compiler); the macOS wheels are built on `macos-15` (still targeting macOS 14.0). + ## 2.2.8 — 2026-11-09 User-facing notes: [`docs/updates/2.2.8.md`](docs/updates/2.2.8.md). diff --git a/docs/skill/SKILL.md b/docs/skill/SKILL.md index 4708a6df..2d26981c 100644 --- a/docs/skill/SKILL.md +++ b/docs/skill/SKILL.md @@ -4,9 +4,9 @@ description: Build, assemble, inspect, reconstruct, and export parametric CAD mo license: Apache-2.0 metadata: project: simplecadapi - version: 2.2.8 + version: 2.2.9 package-name: simplecadapi - package-version: 2.2.8 + package-version: 2.2.9 --- # SimpleCAD SDK Skill diff --git a/docs/skill/references/SDK_OVERVIEW.md b/docs/skill/references/SDK_OVERVIEW.md index b9eb6971..bc93c570 100644 --- a/docs/skill/references/SDK_OVERVIEW.md +++ b/docs/skill/references/SDK_OVERVIEW.md @@ -1,8 +1,8 @@ # SDK Overview - Project: `simplecadapi` -- Version: `2.2.8` -- Package distribution: `simplecadapi==2.2.8` +- Version: `2.2.9` +- Package distribution: `simplecadapi==2.2.9` ## What this skill bundles diff --git a/docs/updates/2.2.9.md b/docs/updates/2.2.9.md new file mode 100644 index 00000000..ba8cf453 --- /dev/null +++ b/docs/updates/2.2.9.md @@ -0,0 +1,50 @@ +# 2.2.9 Update Notes + +2.2.9 replaces 2.2.8, which has been withdrawn (yanked on PyPI, its GitHub release deleted). 2.2.8 let a `Part` hold several +bodies, and a Part like that could not take part in an assembly. In 2.2.9 a Part holds exactly one solid again, and the +editor keeps what it needed from the change: several solids can sit side by side in a notebook while a model is built. +Everything else in 2.2.8 is in 2.2.9; the 2.2.8 notes describe it. + +## Why a Part holds one solid + +The editor has to let several solids exist in one notebook with no assembly constraint between them: to pattern a tool and then +cut, there is a moment where more than one tool and the body exist together. In 2.2.8 that was solved inside the Part. But a +Part is the unit an assembly places, mates and gives connectors to, and a Part of several bodies could do none of that: + +* connectors on it were refused, so no mate or public connector could reach it; +* `explode_rassembly` raised `TypeError` on any assembly that held one; +* the older scene compiler read the single body of a Part in four places. + +The solids side by side are intermediate values of a notebook, not product items. So they are notebook values now, and the +Part is one solid. The full account is in `design-docs/part-holds-one-solid.md`; every commit of the change states its own +reason. + +## What changes for you + +* **`make_part_rpart(part_id, body, name=None)`** takes one Solid, a `Body` (a solid with a display name, colour and opacity), or + a list of exactly one piece of a split cut. Several solids raise `ValueError`, which says what to do: one Part per solid in + an Assembly (identity placements when they only sit together), or union / cut them into one solid first. +* **Removed** (they only existed in the withdrawn 2.2.8): the `bodies=` argument, `Part.multi_body`, `scad.part_shape`, + `inspect_body_overlaps_rlist`, `BodyOverlap`, `BodyOverlapWarning`, and the part definition profile + `simplecad-part-definition-3` with `solid_cache.bodies`. A part definition is profile 2 with one solid, as before 2.2.8. + A model JSON recorded with several solids in one Part is refused on replay, with the same guidance. +* **A part notebook with one open solid** (`kind = "part"`, no cell making the Part) still gets the implicit Part. **With several + open solids** there is no product: running it raises `SeveralOpenBodiesError`, which names the solids; make the Part from the + one that is the part (`scad.make_part_rpart(part_id=scad.notebook_id(), body=...)`), or make a Part of each and an Assembly + of them. +* **The editor** draws such open solids side by side and its header says "N open solids"; `use_as_product` makes the Part + from the solid you choose. One-body Parts, `Pieces` (the result of a splitting cut), connectors, mates and `explode_rassembly` + behave as they did. + +## Fixed + +* On Windows, `sca cell` no longer kills the editor it talks to: the editor's process id is probed without signalling it + (`os.kill(pid, 0)` on Windows terminates the process). +* Building from source: GCC 14 (`operators_promote.cpp` includes ``), MinGW (`_USE_MATH_DEFINES`, and + `build_occt.py` picks Ninja when a MinGW `g++` is the compiler), and the macOS wheels are built on `macos-15` (GitHub no + longer serves `macos-14`; the wheels still target macOS 14.0). + +## For contributors + +* `AGENT.md` records how to rebuild the C++ module on Windows and how commits are organised: one decision per commit, with the + reasons from the discussion that led to it. diff --git a/docs/updates/2.2.9.zh-CN.md b/docs/updates/2.2.9.zh-CN.md new file mode 100644 index 00000000..a0617d58 --- /dev/null +++ b/docs/updates/2.2.9.zh-CN.md @@ -0,0 +1,44 @@ +# 2.2.9 更新说明 + +2.2.9 取代 2.2.8。2.2.8 已被撤回(PyPI 上已 yank,GitHub 上的发布也已删除)。2.2.8 让一个 `Part` 可以持有多个 body, +而这样的 Part 没法参与装配。2.2.9 让 Part 重新只持有一个实体,同时保留编辑器需要的能力:建模过程中,笔记本里可以并排放着 +几个实体。2.2.8 的其余内容都在 2.2.9 里,请看 2.2.8 的更新说明。 + +## 为什么 Part 只持有一个实体 + +编辑器必须允许一个笔记本里同时存在几个实体,而且它们之间不需要装配约束:比如先阵列刀具再切割,总有一刻刀具有好几把, +本体也在。2.2.8 把这件事放进了 Part 里解决。但是 Part 是装配里被摆放、被配合、被挂接口的单位,而持有多个 body 的 Part 这些都做不到: + +* 它不能带连接器,所以任何配合或公开连接器都够不到它; +* 装配里只要有一个这样的 Part,`explode_rassembly` 就报 `TypeError`; +* 旧的场景编译器有四处直接读 Part 的唯一 body。 + +并排的几个实体只是笔记本里的中间值,不是产品里的零件。所以现在它们是笔记本里的普通值,Part 就是一个实体。完整的说明在 +`design-docs/part-holds-one-solid.md`,这次改动的每个提交都写明了各自的原因。 + +## 对你有什么影响 + +* **`make_part_rpart(part_id, body, name=None)`** 接受一个实体、一个 `Body`(带显示名、颜色和不透明度的实体),或者切割分裂后 + 恰好只有一块的列表。给多个实体会报 `ValueError`,并说明该怎么做:每个实体做成一个 Part 放进装配(只是放在一起时用单位位姿), + 或者先把它们合并、切割成一个实体。 +* **已移除**(它们只在被撤回的 2.2.8 里存在过):`bodies=` 参数、`Part.multi_body`、`scad.part_shape`、 + `inspect_body_overlaps_rlist`、`BodyOverlap`、`BodyOverlapWarning`,以及零件定义的 `simplecad-part-definition-3` 版式和 + `solid_cache.bodies`。零件定义回到 2.2.8 之前的第 2 版式,只含一个实体。记录了“一个 Part 里有多个实体”的模型 JSON, + 重放时会被拒绝,并给出同样的提示。 +* **零件笔记本里只有一个开放实体**(`kind = "part"`,没有任何单元格做出 Part)时,仍然自动得到隐式 Part。**有多个开放实体** + 时没有产品:运行会报 `SeveralOpenBodiesError`,并列出这些实体;请用真正作为零件的那个来做 Part + (`scad.make_part_rpart(part_id=scad.notebook_id(), body=...)`),或者给每个实体各做一个 Part,再放进装配。 +* **编辑器**会把这些开放实体并排画出来,标题栏显示“N 个开放实体”;`use_as_product` 会用你选的那个实体做出 Part。 + 单个实体的 Part、`Pieces`(切割分裂的结果)、连接器、配合和 `explode_rassembly` 的行为都和以前一样。 + +## 修复 + +* 在 Windows 上,`sca cell` 不会再杀掉它正在对话的编辑器:现在探测编辑器进程时不再发信号(Windows 上 + `os.kill(pid, 0)` 会直接终止进程)。 +* 从源码构建:GCC 14(`operators_promote.cpp` 补上 ``)、MinGW(定义 `_USE_MATH_DEFINES`,以及编译器是 MinGW 的 + `g++` 时 `build_occt.py` 选用 Ninja);macOS 的安装包改在 `macos-15` 上构建(GitHub 不再提供 `macos-14`,安装包仍然面向 + macOS 14.0)。 + +## 给贡献者 + +* `AGENT.md` 记录了在 Windows 上如何重新编译 C++ 模块,以及提交该怎么组织:一个决策一个提交,说明里写清楚促成这个决策的讨论和原因。 diff --git a/pyproject.toml b/pyproject.toml index 0d330400..a4b6eff0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "simplecadapi" -version = "2.2.8" +version = "2.2.9" description = "A simplified OpenCASCADE-native CAD modeling Python API" readme = "README.md" license = { file = "LICENSE" } diff --git a/uv.lock b/uv.lock index e1313337..a597e696 100644 --- a/uv.lock +++ b/uv.lock @@ -2996,7 +2996,7 @@ wheels = [ [[package]] name = "simplecadapi" -version = "2.2.8" +version = "2.2.9" source = { editable = "." } dependencies = [ { name = "cryptography" },