diff --git a/CHANGELOG.md b/CHANGELOG.md
index 9feca027..da6ab6f4 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -6,6 +6,25 @@ user-facing notes live in [`docs/updates/`](docs/updates/) (English and
## Unreleased
+### Added
+- Editing existing curves and surfaces as recorded operations (the SDK half of NURBS control-point editing):
+ `inspect_curve_rcurvedata` / `inspect_surface_rsurfacedata` read degree, poles, weights, knots and trimming;
+ `set_*_poles`, `move_*_poles`, `set_*_weights`, `insert_*_knot`, `elevate_*_degree` (curves `_redge`, surfaces
+ `_rface`), `convert_to_bspline_redge/rface` (the explicit step for lines, circles, planes, cylinders) and
+ `rebuild_curve_redge/rface` return a new shape, record a topology delta (tags and references follow the face and
+ its edges) and replay from model JSON. A trimmed face keeps its trimming. `sample_curve_rcurvature` and
+ `sample_surface_risocurves` give an editor a curvature comb and clipped isocurves.
+
+### Changed
+- The editor offers its code mode only. Manual modelling (features, sketches, assemblies by buttons and dialogs) is built
+ but switched off (`editor-web/src/lib/manual-mode.ts`) until it has a plan of its own: no mode switch, command bar or
+ manual keys (`/`, `W`, Space, Ctrl+Z on features, `6`). The viewport keeps what was made for it: three's WebGPURenderer
+ (WebGL 2 as the fallback), level of detail (a part seen up close is tessellated again by the kernel from the in-memory
+ BREP, `POST /api/preview/refine`), instanced parts, BVH picking, and smooth shading from exact surface normals.
+
+### Fixed
+- A stable reference into a face or shell body (no solid) resolves; it raised `cannot resolve QL selector scope`.
+
## 2.2.7 — 2026-10-30
### Fixed
diff --git a/README.md b/README.md
index f573e0d4..6e43950c 100644
--- a/README.md
+++ b/README.md
@@ -2,9 +2,11 @@
Parametric CAD built for agents.
Efficient · Low-overhead · Agent-native
中文 · Changelog · Skill design · Paper
**Start here.** Paste this line to your coding agent (Claude Code, Codex, OpenCode, …): @@ -12,758 +14,135 @@ Read physpace.dev/sca/landing.md and landing me on this sdk. ``` -It installs the SDK, installs the skill for itself, opens a real example in the -code-first editor, and shows you how to work with it. SimpleCADAPI is a -parametric CAD SDK built for agents: a model is a notebook of code, every -dimension is a named parameter, selection is by what geometry *is*, and every -step reports back why it worked or failed. - -## What Can It Do - -Four capability pillars. Every case below is a **real, reproducible session**: -the replay demos are single-file offline HTML pages that faithfully replay the -full recorded conversation (user turns, agent thinking, every tool call and -patch, role switches) next to the exported 3D model — open them directly in a -browser. - -### 1 · Single-Part Modeling - -Parametric parts authored as readable [Feature Tree -Convention](docs/skill/references/discipline/feature-tree-convention.md) -feature blocks — named parameters with units, verifier-first staged modeling, -deterministic face tags that survive re-parameterization, and synchronized -`.scadpkg` / STEP AP242 / STL / editable FreeCAD exports. - -| Case | -First-turn requirement (excerpt) | -Delivered model · BRep turntable | -
|---|---|---|
| Robotic-arm U-link + motor mount 15 user turns · 601 tool calls ▶ Full session replay |
-"Build a parametric robotic-arm link that adapts to length changes and mounts motors generically: sweep a circular profile down D → right L → up D into a U; cut motor sockets with spheres; the mounting face must carry a deterministic name indexable by the query language; split the bottom cylinder into a half cylinder; then fillet everything." | -![]() |
-
| Parametric flange plate 2 user turns · 66 tool calls ▶ Full session replay |
-"Parametric flange: OD 100, thickness 10, hub ⌀55 top +30, bore ⌀30, 6×⌀11 bolt holes on PCD 78, hub-root R3 / rim R2 fillets; every dimension a named parameter; edge-selection cards printed before each fillet; parameter-feasibility guards; one feature per block." GIF shows the final 8-hole @PCD 84.5 state: turn 2 re-parameterized 6→8 holes; PCD 88 was rejected live by the guards and 85 excluded for fillet tangency. |
-![]() |
-
| Ribbed L-bracket (FEM main model) 2 user turns · 49 tool calls ▶ Full session replay |
-"Formalize the existing legacy L-bracket script through the single-part workflow: rebuild with FTC feature blocks and named parameters; geometric equivalence to the legacy model (volume delta < 0.1%); the interface.* FEM boundary tags must survive untouched — the downstream Gmsh/CalculiX pipeline selects faces by them." |
-![]() |
-
-![]() -Integrated BLDC joint actuator — assembled, studio render -29 components · 51 constraints, all solved · 20:1 two-stage planetary - |
-
-![]() -Same model, exploding turntable — four modules (ESC · motor · -two-stage reducer · output shaft) separate along the axis while -concentric parts peel into radius bands; camera circles on an inclined orbit - |
-
-![]() -u_link motor mount in sca edit — a picked cylindrical face, the
-selected_face cell the editor wrote for it, and its properties;
-sca example u_link copies this workspace out
- |
-
-![]() -L-bracket static FEM — CalculiX von Mises -meshed via Gmsh OpenCASCADE kernel from the AP242 export - |
-
-![]() -Four-bar linkage + MuJoCo — first assembly pass: -the links crash through each other mid-cycle; the assembly is wrong · -▶ full video - |
-
-![]() -After the virtual-collision correction — corrected assembly: -the full crank cycle sweeps clean in the same sim · -▶ full video - |
-
This repository is an artifact of
-- CADIR: A Cross-Backend Editable Intermediate Representation for Agentic CAD Generation -
-

+![]() +L-bracket static FEM CalculiX von Mises on the Gmsh mesh of the AP242 export; faces are chosen by interface.* tags that survive model changes
+ |
+
+![]() +Four-bar linkage, first pass MuJoCo shows the links crossing: the assembly is wrong + |
+
+![]() +After the collision pass the same crank cycle sweeps clean + |
+
-
-
-# SimpleCADAPI
+为 Agent 而生的参数化 CAD。
高效率 · 低开销 · Agent Native
English · 更新日志 · Skill 设计 · 论文
**从这里开始。** 把下面这句话发给你的 coding agent(Claude Code、Codex、OpenCode 等): @@ -12,639 +14,135 @@ Read physpace.dev/sca/landing.md and landing me on this sdk. ``` -它会帮你安装 SDK、为自己安装 skill、在 code-first 编辑器里打开一个真实示例,并 -教你怎么和它一起工作。SimpleCADAPI 是为 agent 设计的参数化 CAD SDK:模型就是一个 -代码 notebook,每个尺寸都是命名参数,按“几何是什么”来选择对象,每一步都会反馈 -成功或失败的原因。 - -## 它能做什么 - -四块能力支柱。下面每个 case 都是**真实、可复现的会话**:回放 demo 是单文件离线 -HTML,忠实回放完整录制的对话(用户输入、Agent 思考、每一次工具调用与补丁、角色 -切换),旁边就是导出的 3D 模型 —— 浏览器直接打开即可。 - -### 1 · 单零件建模 - -以可读的[特征树规约](docs/skill/references/discipline/feature-tree-convention.md) -特征块编写参数化零件 —— 带单位的命名参数、验证先行的分阶段建模、改参后仍然命中的 -确定性面标签,以及同步产出的 `.scadpkg` / STEP AP242 / STL / 可编辑 FreeCAD 工程。 - -| 案例 | -首轮需求(prompt 节选) | -交付模型 · BRep 旋转展示 | -
|---|---|---|
| 机械臂 U 形连杆 + 电机安装槽 15 轮用户输入 · 601 次工具调用 ▶ 完整会话回放 |
-“构建参数化的机械臂连杆,能适应长度变化、通用安装电机:圆形 profile 沿『下 D → 右 L → 上 D』扫掠成 U 形;两侧圆珠 boolean cut 切出电机安装槽,安装面必须有确定命名、可被查询语言索引;底部圆柱切成半圆柱;然后全局倒角平滑。” | -![]() |
-
| 参数化法兰盘 2 轮用户输入 · 66 次工具调用 ▶ 完整会话回放 |
-“参数化法兰盘:外径 100、厚 10、凸台 ⌀55 顶高 30、中心孔 ⌀30、6×⌀11 螺栓孔 @PCD 78、根部 R3 / 外缘 R2 圆角;所有尺寸走命名参数;每次圆角前打印选边卡;参数可行性守卫;一个 feature 一个块。” GIF 为终态 8 孔 @PCD 84.5:第 2 轮改参 6→8 孔,PCD 88 被守卫当场拒绝、85 因圆角相切排除。 |
-![]() |
-
| 筋板 L 形支架(FEM 主模型) 2 轮用户输入 · 49 次工具调用 ▶ 完整会话回放 |
-“把已有的 L 形直角连接件 legacy 脚本按 single-part-modeling 工作流正式化:FTC 特征块 + 命名参数重建;与旧版几何等价(体积偏差 < 0.1%);interface.* FEM 边界标签必须原样保留——下游 Gmsh/CalculiX 按标签选面。” |
-![]() |
-
-![]() -一体化 BLDC 关节执行器 —— 装配态(影棚渲染) -29 个组件 · 51 条约束全部解算 · 两级行星减速 20:1 - |
-
-![]() -同一模型 —— 爆炸旋转展示:四个模块(电调 · 电机 · -双级减速器 · 输出轴)沿轴向分离,模块内同心零件按半径 -分层剥离;相机沿倾斜圆轨道环绕 - |
-
-![]() - sca edit 中的 u_link 电机座 —— 选中的圆柱面、编辑器为它写出的
-selected_face cell,以及它的属性;
-sca example u_link 可把这个工作区复制出来
- |
-
-![]() -L 形支架静力 FEM —— CalculiX von Mises 云图 -经 Gmsh OpenCASCADE 内核从 AP242 导出体网格 - |
-
-![]() -四连杆 + MuJoCo —— 首次装配:连杆在运动中撞在一起,装配不对 · -▶ 完整视频 - |
-
-![]() -虚拟碰撞修正后 —— 同一仿真环境,修正后的装配全程干净运动 · -▶ 完整视频 - |
-
本仓库是以下论文工作的项目产物:
-- CADIR: A Cross-Backend Editable Intermediate Representation for Agentic CAD Generation -
-Computer-Aided Design 2026 接收
-

+![]() +L 形支架静力有限元 AP242 导出经 Gmsh 划分网格,CalculiX 算出 von Mises;边界面由模型改动后仍保留的 interface.* 标签选取
+ |
+
+![]() +四连杆,第一版 MuJoCo 里连杆互相穿过:装配是错的 + |
+
+![]() +碰撞修正之后 同一个曲柄周期,干净地转完 + |
+
-
-