Merge pull request #84 from PhySpace/release/2.2.9
release: 2.2.9 (replaces the withdrawn 2.2.8)
This commit is contained in:
+9
-1
@@ -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 `<algorithm>`) 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).
|
||||
|
||||
+2
-2
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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 `<algorithm>`), 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.
|
||||
@@ -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` 补上 `<algorithm>`)、MinGW(定义 `_USE_MATH_DEFINES`,以及编译器是 MinGW 的
|
||||
`g++` 时 `build_occt.py` 选用 Ninja);macOS 的安装包改在 `macos-15` 上构建(GitHub 不再提供 `macos-14`,安装包仍然面向
|
||||
macOS 14.0)。
|
||||
|
||||
## 给贡献者
|
||||
|
||||
* `AGENT.md` 记录了在 Windows 上如何重新编译 C++ 模块,以及提交该怎么组织:一个决策一个提交,说明里写清楚促成这个决策的讨论和原因。
|
||||
+1
-1
@@ -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" }
|
||||
|
||||
Reference in New Issue
Block a user