From 4a03c47147f2aa8d2beec52c920701ece473551d Mon Sep 17 00:00:00 2001 From: NiJingzhe <1448976235@qq.com> Date: Wed, 14 Oct 2026 00:58:26 +0800 Subject: [PATCH 1/2] release: 2.2.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Version bump, changelog heading, update notes (EN/中文), SKILL.md metadata, README. Co-Authored-By: Claude Sonnet 5.5 --- CHANGELOG.md | 2 ++ README.md | 8 ++++++-- README.zh-CN.md | 7 +++++-- docs/skill/SKILL.md | 4 ++-- docs/updates/2.2.2.md | 27 +++++++++++++++++++++++++++ docs/updates/2.2.2.zh-CN.md | 25 +++++++++++++++++++++++++ pyproject.toml | 2 +- uv.lock | 2 +- 8 files changed, 69 insertions(+), 8 deletions(-) create mode 100644 docs/updates/2.2.2.md create mode 100644 docs/updates/2.2.2.zh-CN.md diff --git a/CHANGELOG.md b/CHANGELOG.md index 28e84b0..989b14f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ user-facing notes live in [`docs/updates/`](docs/updates/) (English and ## Unreleased +## 2.2.2 — 2026-10-14 + ### Added - Editor: code completion from the SDK itself. `scad.` (and `scad.ql.`, `scad.std.gear.`, `ql.`) diff --git a/README.md b/README.md index ad8d5cd..47337c5 100644 --- a/README.md +++ b/README.md @@ -149,11 +149,14 @@ the full crank cycle sweeps clean in the same sim · --- -## Update Notes (2.2.1) +## Update Notes (2.2.2) > Validate generated definitions, assembly constraints, and manufacturing > geometry before production use. +- **2.2.2.** The editor completes `scad.` from the SDK itself (a call is written with every required + parameter as `name=`, Tab moves between them) and creates notebooks from the workspace tab; see the + [update notes](docs/updates/2.2.2.md). - **New editor.** `sca edit` is part of the SDK now (`pip install "simplecadapi[editor]"`). It runs a workspace's notebooks in a marimo kernel with the SDK's own cell executor, previews the live model straight from the @@ -199,7 +202,7 @@ in a compact public API for creating solids, applying features, tagging semantic intent, querying topology, exporting manufacturing files, and translating recorded models into FreeCAD workflows. -Current release: `simplecadapi==2.2.1`. +Current release: `simplecadapi==2.2.2`. ## What It Provides @@ -714,6 +717,7 @@ and the [STEP reconstruction workflow](docs/skill/references/workflows/step-reco ## Documentation +- 2.2.2 update notes: [`docs/updates/2.2.2.md`](docs/updates/2.2.2.md) - 2.2.1 update notes: [`docs/updates/2.2.1.md`](docs/updates/2.2.1.md) - 2.1.3b1 update notes: [`docs/updates/2.1.3b1.md`](docs/updates/2.1.3b1.md) - 2.1.2 update notes: [`docs/updates/2.1.2.md`](docs/updates/2.1.2.md) diff --git a/README.zh-CN.md b/README.zh-CN.md index 161501c..ef7da77 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -133,10 +133,12 @@ CalculiX 静力 FEM(边界面按保真的 `interface.*` 标签选取,仿真 --- -## 更新日志(2.2.1) +## 更新日志(2.2.2) > 投入生产前请验证生成的定义、装配约束和制造几何。 +- **2.2.2。** 编辑器直接从 SDK 补全 `scad.`(调用会把每个必填参数写成 `name=`,Tab 在它们之间跳转),并能在工作区页面创建 + notebook;见[更新说明](docs/updates/2.2.2.zh-CN.md)。 - **新编辑器。** `sca edit` 现在是 SDK 的一部分(`pip install "simplecadapi[editor]"`)。它用 SDK 自己的 cell 执行器在 marimo 内核里运行工作 区的 notebook,直接由实体生成实时预览,把你在视口里的点选写成选择代码,并让 @@ -173,7 +175,7 @@ CalculiX 静力 FEM(边界面按保真的 `interface.*` 标签选取,仿真 SimpleCADAPI 是一个基于 OCP 的 Python CAD SDK,提供清晰的函数式建模操作和可重放的模型图。它在 OpenCascade 几何内核之上提供精简的公共 API,可用于创建实体、应用特征、添加语义标签、查询拓扑、导出制造文件,以及将记录的模型转换为 FreeCAD 工作流。 -当前版本:`simplecadapi==2.2.1`。 +当前版本:`simplecadapi==2.2.2`。 ## 核心能力 @@ -599,6 +601,7 @@ uv run --extra fem python examples/ap242_gmsh_volume_mesh/run_calculix.py ## 文档 +- 2.2.2 更新说明:[`docs/updates/2.2.2.zh-CN.md`](docs/updates/2.2.2.zh-CN.md) - 2.2.1 更新说明:[`docs/updates/2.2.1.zh-CN.md`](docs/updates/2.2.1.zh-CN.md) - 2.1.3b1 更新说明:[`docs/updates/2.1.3b1.zh-CN.md`](docs/updates/2.1.3b1.zh-CN.md) - 2.1.2 更新说明:[`docs/updates/2.1.2.zh-CN.md`](docs/updates/2.1.2.zh-CN.md) diff --git a/docs/skill/SKILL.md b/docs/skill/SKILL.md index 9cd131c..81dc3a8 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.1 + version: 2.2.2 package-name: simplecadapi - package-version: 2.2.1 + package-version: 2.2.2 --- # SimpleCAD SDK Skill diff --git a/docs/updates/2.2.2.md b/docs/updates/2.2.2.md new file mode 100644 index 0000000..bea6c78 --- /dev/null +++ b/docs/updates/2.2.2.md @@ -0,0 +1,27 @@ +# 2.2.2 Update Notes + +Two additions to the code-first editor (`sca edit`), and a fix that made one of them usable. + +## Code completion from the SDK + +`scad.` (and `scad.ql.`, `scad.std.gear.`, `ql.`, `Q.`) lists the real functions with their +signatures; the side panel shows every parameter with its default and the docstring. + +- Accepting a function, or typing `(` after a known name, writes the call with every + **required** parameter as `name=`: `scad.make_box_rsolid(width=, height=, depth=)`. + **Tab** moves to the next parameter. +- Inside a call, the parameters not given yet complete as `name=`, required ones first. +- The names come from the running package (`GET /api/sdk`), so they cannot drift from the code. + +## Create a notebook from the workspace tab + +A **new** action in the notebooks header starts a notebook from the SDK's template: a part, or an +assembly that uses the first two parts of the workspace. The name is checked as you type. An empty +workspace opens on that form, so `sca edit` on an empty directory is usable. + +## Fixed + +The cell editors rebuilt their configuration on every render, which dropped a snippet in progress +and could disturb typing; the editor's `onChange` and options are stable now. + +See the [changelog](../../CHANGELOG.md) for the complete list. diff --git a/docs/updates/2.2.2.zh-CN.md b/docs/updates/2.2.2.zh-CN.md new file mode 100644 index 0000000..c2592d9 --- /dev/null +++ b/docs/updates/2.2.2.zh-CN.md @@ -0,0 +1,25 @@ +# 2.2.2 更新说明 + +`sca edit` 编辑器的两项新增,以及一个让其中一项能正常使用的修复。 + +## 来自 SDK 的代码补全 + +输入 `scad.`(以及 `scad.ql.`、`scad.std.gear.`、`ql.`、`Q.`)会列出真实存在的函数和签名; +右侧面板显示每个参数、默认值和文档说明。 + +- 选中一个函数,或在已知函数名后输入 `(`,会把每个**必填**参数写成 `name=`: + `scad.make_box_rsolid(width=, height=, depth=)`。**Tab** 跳到下一个参数。 +- 在调用括号内,还没写的参数会补全成 `name=`,必填的排在最前。 +- 名字来自正在运行的包(`GET /api/sdk`),不会和代码不一致。 + +## 在工作区页面创建 notebook + +notebooks 标题处新增 **new**,按 SDK 模板创建 notebook:一个零件,或一个使用工作区前两个零件的装配。 +边输入边检查名字。空工作区会直接打开这个表单,所以对空目录运行 `sca edit` 也能用了。 + +## 修复 + +cell 编辑器每次渲染都会重建配置,导致进行中的占位跳转丢失,也可能干扰输入;现在编辑器的 +`onChange` 和选项都是稳定的。 + +完整列表见[更新日志](../../CHANGELOG.md)。 diff --git a/pyproject.toml b/pyproject.toml index 91a9e5e..461392f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "simplecadapi" -version = "2.2.1" +version = "2.2.2" description = "A simplified OCP-native CAD modeling Python API" readme = "README.md" license = { file = "LICENSE" } diff --git a/uv.lock b/uv.lock index 7d795ef..6650fff 100644 --- a/uv.lock +++ b/uv.lock @@ -3227,7 +3227,7 @@ wheels = [ [[package]] name = "simplecadapi" -version = "2.2.1" +version = "2.2.2" source = { editable = "." } dependencies = [ { name = "cadquery-ocp" }, From f2ef7fa2ab5ff3b6fc735fb23663612fb83df13a Mon Sep 17 00:00:00 2001 From: NiJingzhe <1448976235@qq.com> Date: Wed, 14 Oct 2026 00:59:47 +0800 Subject: [PATCH 2/2] docs(readme): the update notes cover only the latest version The section accumulated 2.2.1 and 2.1.3b1 items; it now describes 2.2.2 and points to the changelog and docs/updates for earlier versions. Co-Authored-By: Claude Sonnet 5.5 --- README.md | 42 +++++++++++++----------------------------- README.zh-CN.md | 31 +++++++++---------------------- 2 files changed, 22 insertions(+), 51 deletions(-) diff --git a/README.md b/README.md index 47337c5..430b377 100644 --- a/README.md +++ b/README.md @@ -154,35 +154,19 @@ the full crank cycle sweeps clean in the same sim · > Validate generated definitions, assembly constraints, and manufacturing > geometry before production use. -- **2.2.2.** The editor completes `scad.` from the SDK itself (a call is written with every required - parameter as `name=`, Tab moves between them) and creates notebooks from the workspace tab; see the - [update notes](docs/updates/2.2.2.md). -- **New editor.** `sca edit` is part of the SDK now (`pip install - "simplecadapi[editor]"`). It runs a workspace's notebooks in a marimo kernel - with the SDK's own cell executor, previews the live model straight from the - solids, writes your viewport picks as selection code, and lets an agent see - what you see (`sca snapshot`). **Re-Studio is removed**: the reverse- - engineering studio (the `Re-mode` workspace of the standalone sca-web-editor) - is gone, and the standalone sca-web-editor is replaced by `sca edit`. STEP - reconstruction continues through the inspection API and the skill's - step-reconstruction workflow. -- **One runtime, one cache.** The editor, `sca run` and - `simplecadapi.runtime.run_notebook()` share the per-cell cache, so what one - computed the others restore. Notebook parameters come from `# ---- params - ----` cells with an optional `# ui:` comment; local modules (shared - dimensions) get their own view in the editor. -- **Landing path.** `docs/landing.md` is the script an agent follows to install - the SDK and its skill and open an example; `sca example u_link` copies the - bundled workspace and `sca skill where` shows where the skill goes. -- Earlier: 2.1.3b1 shipped the addon ecosystem (`sca addon ...`, the - `sca-addon.toml` descriptor, the `.scadpkg` format spec); see its - [update notes](docs/updates/2.1.3b1.md). - -Every example model is a notebook; its export scripts load the product with -`run_notebook`, capture one `.scadpkg`, and translate AP242 `.step` and -editable `.FCStd` from that same package. The AP242/Gmsh example under -`examples/ap242_gmsh_volume_mesh/` exposes each export and FEM stage as a -separate directly runnable script. +- **Code completion from the SDK.** In the editor, `scad.` (and `scad.ql.`, + `scad.std.gear.`) lists the real functions with their signatures and + docstrings. Accepting one, or typing `(` after its name, writes the call with + every required parameter as `name=`, and Tab moves between them; inside a call + the parameters not given yet complete as `name=`. +- **New notebooks from the workspace tab.** A **new** action starts a part, or + an assembly that uses the first two parts, from the SDK's template; an empty + workspace opens on that form. +- **Fix.** The cell editors no longer rebuild their configuration on every + render, which dropped a snippet in progress. + +Full notes for this version: [`docs/updates/2.2.2.md`](docs/updates/2.2.2.md). +Earlier versions: the [changelog](CHANGELOG.md) and [`docs/updates/`](docs/updates/). --- diff --git a/README.zh-CN.md b/README.zh-CN.md index ef7da77..801891d 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -137,28 +137,15 @@ CalculiX 静力 FEM(边界面按保真的 `interface.*` 标签选取,仿真 > 投入生产前请验证生成的定义、装配约束和制造几何。 -- **2.2.2。** 编辑器直接从 SDK 补全 `scad.`(调用会把每个必填参数写成 `name=`,Tab 在它们之间跳转),并能在工作区页面创建 - notebook;见[更新说明](docs/updates/2.2.2.zh-CN.md)。 -- **新编辑器。** `sca edit` 现在是 SDK 的一部分(`pip install - "simplecadapi[editor]"`)。它用 SDK 自己的 cell 执行器在 marimo 内核里运行工作 - 区的 notebook,直接由实体生成实时预览,把你在视口里的点选写成选择代码,并让 - agent 看到你看到的(`sca snapshot`)。**Re-Studio 已移除**:逆向工程 studio - (独立 sca-web-editor 的 `Re-mode` 工作区)不再存在,独立的 sca-web-editor 由 - `sca edit` 取代。STEP 重建继续通过检查 API 和 skill 的 step-reconstruction - 工作流进行。 -- **一个运行时,一份缓存。** 编辑器、`sca run` 和 - `simplecadapi.runtime.run_notebook()` 共用逐 cell 缓存,一方算过的另一方直接 - 复用。notebook 参数来自 `# ---- params ----` cell,可加 `# ui:` 注释指定控件; - 本地模块(共用尺寸)在编辑器里有独立视图。 -- **落地路径。** `docs/landing.md` 是 agent 安装 SDK 和 skill、打开示例时遵循的 - 脚本;`sca example u_link` 复制内置工作区,`sca skill where` 显示 skill 的安装位置。 -- 之前:2.1.3b1 带来插件生态(`sca addon ...`、`sca-addon.toml` 描述文件、 - `.scadpkg` 格式规范),见[更新说明](docs/updates/2.1.3b1.zh-CN.md)。 - -每个示例模型都是 notebook;导出脚本用 `run_notebook` 载入产品,捕获一个 -`.scadpkg`,再从同一个产品包转换出 AP242 `.step` 和可编辑 `.FCStd`。 -`examples/ap242_gmsh_volume_mesh/` 下的 AP242/Gmsh 示例把每个导出和 FEM 阶段 -都做成可直接运行的独立脚本。 +- **来自 SDK 的代码补全。** 在编辑器里,输入 `scad.`(以及 `scad.ql.`、`scad.std.gear.`) + 会列出真实存在的函数、签名和文档说明。选中一个函数,或在函数名后输入 `(`,会把每个必填 + 参数写成 `name=`,Tab 在它们之间跳转;在调用括号内,还没写的参数会补全成 `name=`。 +- **在工作区页面创建 notebook。** 新增的 **new** 按 SDK 模板创建一个零件,或一个使用前两个 + 零件的装配;空工作区会直接打开这个表单。 +- **修复。** cell 编辑器不再每次渲染都重建配置,这会让进行中的占位跳转丢失。 + +本版本的完整说明:[`docs/updates/2.2.2.zh-CN.md`](docs/updates/2.2.2.zh-CN.md)。 +更早的版本:见[更新日志](CHANGELOG.md)和 [`docs/updates/`](docs/updates/)。 ---