The document gets a bspline entity (control point ids, degree) that becomes add_bspline_rsketch; the solve returns each
B-spline as the SDK samples it (sample_curve_rcurvature), so the editor draws the SDK's curve, its control polygon (the
points are the handles: dragging one reshapes the curve) and, for a picked spline, its curvature comb. Loops and faces through
B-splines are the SDK's profiles.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The preview's nodes carry color/opacity (a body colour, else the material's);
the viewer draws a node in properties.color (preview or package scene), else
the material tint, else the default grey, see-through below opacity 1. The
colour slot is a picker (sRGB #rrggbb) converted to the SDK's linear RGB.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The edits finish through finalize_tracked with the entries of the rebuild's history (modification_history, the
entries next to modification_delta), so tags on the face and its edges follow with or without a recorder, as for the
tracked solid ops. Stubs regenerated (pybind11-stubgen 2.5.5), API pages generated by tools/auto_docs_gen.py, the
graph JSON spec lists the 14 recorded ops and their params/delta, and the skill gains
references/domains/curve-surface-editing.md (read, convert, edit, check; trimming; tags), linked from
part-modeling.md and references/README.md. CHANGELOG under Unreleased.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On top of the merge: the bindings it touched (cut_rsolid on_split, make_part_rpart body/bodies) take the typed signature
vocabulary; a kind = "part" notebook's implicit Part is made of all its open bodies (named by their variables, the pieces of a
split cut <name>_1..n) and is recorded in the definition (one result node, so its content hash is stable across cache hits);
product values are walked through their own children, not as plain dataclasses; the skill says how bodies and the implicit Part
work; the editor marks every body of the implicit Part as the product.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A tag assignment is a graph node (apply_tag_rselection, every op-kwarg tag); the tags an entity of a node's
output carries from upstream are now computed from that node's graph, not copied per operation:
- scad::reactive tag view (reactive/tag_view.cpp): per node, from its inputs' views and its TopoDelta,
witness by witness, as each binding's lineage policy allows (continuation_fragment: every piece of a split
face); identity ops pass it on; memoised per immutable node, O(delta entries) per node. Installed as the
topo layer's history-witness provider, so has_tag / list_tags / list_tag_bindings / explain_tag and every
ql.tag see it with no API change.
- Scopes: effective (the default) = local + inherited + lineage.
- One path per binding: a recorded assignment's continuation is the view's only; the per-op copy in
autotag.cpp now carries only what shapes alone know (imported provenance, sketch topology names, tags
outside a session, replayed values) and an op's naming of what it generates (fillet patch, extrude side).
- merge_topo_deltas composes the steps of an N-ary boolean, so names and references cross the chain.
- Effect (audit, every family): plain face tags survive booleans, blends, shell, copies, patterns,
transform/scale/offset/draft; op-kwarg tags survive blends and copies; primitive role tags follow their
face. Changed expectations: nine Python-port goldens gain exactly those carried tags (only additions,
reviewed); test_tagging_refactor / test_semantic_tagging / test_tagging.cpp / test_finalize.cpp assert
effective includes lineage.
- Skill: ql-playbook ground rules 3 and 5 and the boundaries, ql-recipes, geometric-validation, ql.tag
docstring and API page; design 3.1, 3.2 (target API), 6; SDK_DEFECTS 21 fixed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The three branches had each grown a helper header (Typed/Shown, Renamed/Named, TypedObject/Choice/...); they are one
semantic_types.hpp now, with Length, Angle, Point3, Direction3, Vector3, Count, Choice and the plain-double/Vec3 variants as
names over the two tools. test_catalog now requires that no parameter of any operation reads "object". Stubs and API pages
regenerated. Full suite: 2494 passed, 63 skipped (the 7 collection errors are the untracked stale test files that predate
this work).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- A cut that splits the body is no longer refused: cut_rsolid(on_split="pieces")
(the default) returns every piece as list[Solid] ordered by centroid, recorded as
make_cut_rsolid_list with piece_order=centroid and replayed in that order;
on_split="error" keeps the strict contract. One-piece cuts are unchanged.
- Pieces become bodies: make_part_rpart(body=pieces) -> body_1..n,
bodies={"bar": pieces} -> bar_1..n.
- Overlapping bodies are allowed and warned: inspect_body_overlaps_rlist and a
BodyOverlapWarning when the definition is built.
- Multi-body definitions use profile simplecad-part-definition-3 (new schema);
profile 2 is back to its dev bytes, so profile-2 readers refuse them.
- part_from_bodies: the implicit-Part rule (all open bodies, named by variable).
- Skill pages, API docs, stubs, design doc section 9, SDK defect 24.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
query_history emitted preserved only for an input with neither Modified nor Generated images, so a shell's
kept face (unchanged, and the seed of its offset face) had no successor and shell.body_face was never proven
(owner decision on the kept-face gap: option a). Changed expectations, each reviewed:
- tracking goldens shell / extrude_rect / extrude_circle / loft / loft_ruled: the kept shell faces and rim
edges, and the profile edges that bound the start cap of a prism or loft, gain a preserved witness (they
are IsSame in the result); shell gains five shell.body_face roles.
- test_tracking_behaviour: loft toward a point 4 -> 8 entries (the base edges stay as the cap boundary);
shell.body_face 0 -> 5 (the old comment 'every kept face was re-created' was wrong).
- Python-port goldens ops_features_shell / tag_projection: face.shell.body_face on the kept faces;
blend_failures.shell_role no longer fails; test_operation_output_roles now asserts body_faces_tag tags the
five kept faces instead of raising.
- shell_rsolid docstring and API page name the four roles; design 7.2; SDK_DEFECTS 23 fixed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- modification_delta (semantic/tracking_modify.cpp) turns the retained OCCT history of the builders that
finish through finish_solid into face and edge witnesses; transform_rsolid (rigid and affine: Copy +
GTransform merged), scale_rsolid (uniform and per axis), offset_rsolid and draft_rsolid record it, so
references follow faces through them (an offset or drafted face, generated in OCCT terms, continues its
source face). The helical sweep was already covered by its tracked sweep node.
- Stable anchors: (feature, op, occurrence-among-ancestors) + params digest tie-break + kernel role;
trace_to_birth anchors a picked entity where it was born. An operation inserted earlier in the cell no
longer shifts the anchor; two indistinguishable candidates are lost(anchor_ambiguous), never a guess.
- Splits are an error with candidates (element_ref.require / ElementRefError / describe), lost references
offer guard-ranked look-alikes.
- Docstrings and API pages of the four ops say they now carry history; SDK_DEFECTS 24 fixed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Spike of design-docs/multi-solid-design.md. make_part_rpart(bodies={id: solid})
keeps several solids apart in one Part (not an assembly): Body values with
stable ids, Part.bodies / get_body / body_ids; Part.body raises on a multi-body
part instead of returning one body. Recorded and replayed, pickled for the cell
cache, previewed as one node per body (node/<part>/body:<id>), packaged with a
BRep and topology snapshot per body (solid_cache.bodies; one-body manifests are
byte-identical), drawn as solid child nodes in the package scene, exported to
STEP as one product holding every solid, flattened into assemblies, and weighed
per body by the new measure_part_mass_rmassreport.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The crossings are the ones trim_rsketch cuts at (the same solved geometry and intersection code), returned by the sketch solve the
editor already calls. The frontend's own intersection module is gone; its end-to-end coincidence tests moved to sketch-chain.test.ts.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The canvas found bounded faces of the line/arc graph itself and matched them to the solver's profiles by area and
centroid; the SDK offers only simple loops and chains, so a branched or tangent-trimmed sketch showed loops the SDK
did not have and 'the profile is still being matched' never cleared. The solve now returns the SDK's own list (indices
are the ones make_face_from_sketch_rface takes) plus why an edge set is none, and the canvas draws exactly those.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
fillet_corner/chamfer_corner round or bevel the corner of two lines that share a point (tangent and radius/length constraints keep
it defined); project_rsketch brings geometry from another sketch or from the edges of a shape into a sketch as fixed construction
geometry, which is how sketches in different planes are related; explode_rassembly returns an assembly with the component
placements displaced for an exploded view (factor, centre or axis, per-component directions and weights). C++, bound,
recorded, replayable, stubbed, documented and tested like trim/extend.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Sketching happens in the viewport (the camera turns to the chosen plane or face, the model stays visible and orbitable, the
drawing is an SVG overlay projected through the live camera); the separate canvas panel is gone. The sketch plane can be a face
frame. Trim and extend are not editor features: sketch_doc.apply_edit builds the SDK Sketch from the document, calls
scad.<op>_rsketch and turns the result back; the command line (sca sketch op) and /api/sketch/op are the same thin bridge.
Cut/boss/extrude from a sketch accept 'against the normal'; profiles carry a plane label; an edit that removes parameters writes
the feature cell before the params cell so no cell reads a name that is gone.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Trim removes the part of a line, circle or arc that contains a point, between the nearest crossings (or the ones named in
against); extend lengthens a line until it meets the next entity. Both work on the solved geometry, keep the sketch connected
(point_on ties, horizontal/vertical kept, dimensions that cannot hold dropped), are recorded in the operation graph and replay
from model JSON. diff_sketch_rsketchdiff reports what an edit created, removed and changed. C++ in src/cpp/src/sketch/edit.cpp,
bound in bind_sketch.cpp, with doctest cases, Python tests and API pages; the two operations join the canonical core op set.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
sca new --kind blank writes a part notebook with no cells; the first GUI feature adds the product cell that builds the Part
from it, and later features that consume that body move it along. editor-collaboration.md says what a GUI cell looks like,
that GUI commands never overwrite an edit made in between, and how the inline selection recipes behave.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The skill entry is rebuilt around how an agent reads: SKILL.md is a 94-line router whose route
table gives the batch to read for each workflow; the first batch is 488-881 compiled lines
(was a median of 1,493). Long workflows are split into role pages (single-part 1157 -> outline
+ role pages, drawing-reconstruction 586 -> outline + stage pages); ql-playbook and
notebook-runtime are split by job. Every workflow has Read now / Read when / Unattended mode,
and discipline/operating-modes.md says what replaces each gate when nobody can answer.
New: scan-reconstruction workflow, core-rules.md (rule IDs), parallel-read blocks for
claudecode, zcode, opencode and codex.
docs/skill-design.md is the contract; skillbuild --check enforces it (src/simplecadapi/skill/lint.py,
opt in through [lint] in skillproj.toml).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Version in pyproject.toml, the project entry of uv.lock and SKILL.md; the CHANGELOG heading; docs/updates/2.2.7 (EN and
zh-CN); the update notes of both READMEs replaced with this version's.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
A new discipline file with the rules, the reason for each and the error you get when it is broken; wired into SKILL.md,
the single-part and assembly workflows, the feature tree convention and the runtime guide.
Written from what the agents actually did (26 sessions in Langfuse): float(NAME) around every Var (119 times), and the
template's NameError when sca cell put replaces the params cell while the base cell still reads RADIUS (6 sessions).
Every statement about Var was checked against the SDK: units convert (2 in = 50.8 mm), mixing length and angle in an
expression or unit and unitless variables raises when evaluated, but a Var is not checked against the parameter it is
passed to; the package definition does not record the parameters, so the file does not claim it.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2.2.6 gave them symbolic arithmetic only; int(), round(), comparisons, max/min/sorted, range(n), [0] * n, lst[n - 1],
//, %, f"{r:.2f}" raised, and r == 5.0 / r in [5.0] answered False for a Var whose value is 5.0 (an agent lost ten
minutes in a scan-to-CAD run to a ql predicate with a Var-derived value that matched nothing).
Arithmetic stays an Expr (the formula); decisions read the value the expression has now (the value float(x) gives).
Two expressions compare by formula, an expression and a number by value; numpy scalars are accepted as operands.
Unchanged: bool(var) raises (an old test pins it), json.dumps(var) raises. There is no __array__ on purpose: marimo keys
an object that has one by its value alone, so a changed name, unit, tolerance or comment would no longer redo the cells
that read it (caught by test_cell_cache_store). __rmul__ hands list / str repetition back to Python.
A matrix test runs each usage with a number, a Var and an Expr and asserts the same answer. DEVIATIONS.md lists what
changed against 2.2.6; the notebook-runtime guide tells a model how to use a scad.var.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
verify.to_ocp / from_ocp now delegate to the bridge of this branch (_glue.bridge), which also backs shape.wrapped when
OCP is installed: one conversion, one place. The verifier-scripts skill reference and the CHANGELOG say that
shape.wrapped is an OCP shape with the extra (PR #67 described it as the SDK's own binding). CI: the verifier-bridge
step is kept next to the C++ parity and stub steps.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
- use(): two notebooks run under one graph id replace each other's memo entry (the registry holds one run's nodes
per graph id; the older entry handed out a product whose nodes were gone).
- Editor: a post that is not a readable preview is answered 400, not 409; the server's model is one value replaced
atomically; the signing of a publish is handed out once, so a stray second post cannot be filed under it.
- Cell memory: set_metadata/auto_tag_faces change a value in place, so an entry holding a value they changed is
dropped (it was handed out changed); the marimo hook checks the signature it re-implements and says so when it
cannot; the length reads under the lock.
- Handled failures print a [sca] line (preview warm-up, lineage record, cache entry delete, preview frame, signing,
damaged kept model) instead of passing silently.
- Tests: a damaged preview, bytes that are no preview, the single model value, the signing handed out once, a
moved and turned solid keeps its location and face orientation through .wrapped, saved values in the digests of a
real notebook, the marimo hook, a value changed in place.
- Docs: docs/environment.md lists every SCA_* switch; CHANGELOG states the one-time rebuild of notebooks with saved
parameters, the copy semantics of .wrapped, the memory limit.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
With the verify extra installed, wrapped returns an OCP TopoDS_Shape of the class of its kind (as CadQuery's does), so the
OCCT code an agent writes for verifier scripts runs as written. It is a copy made through BinTools; without OCP it stays
the SDK's own OCCT shape, and SCA_WRAPPED=native|ocp chooses. The SDK's own layers take _native_wrapped, and the
inspect.brep queries, the STEP export and the kernel geometry helpers accept either kind of shape.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
shape.wrapped is the SDK's own binding, so OCP functions reject it and verifier scripts that did
BRepGProp.VolumeProperties_s(solid.wrapped, ...) stopped working with the C++ engine. simplecadapi.verify.to_ocp / from_ocp
bridge through OpenCASCADE's binary format; the verify extra installs OCP 7.9 without VTK. The SDK itself never imports OCP.
The skill gets references/discipline/verifier-scripts.md, whose code the tests execute.
The fem extra (gmsh, ccx2paraview[VTK]) is removed with the README steps that used it; vtk is out of the lock file.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
matplotlib moves to the core dependencies; the inspect extra stays as an empty alias so older
install commands work. The wheel smoke test renders a STEP through inspect.brep.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
A cut that splits the body returned only the first solid from cut_rsolid, silently losing the rest
(a slot through a bar reported half the volume). cut_rsolid_list returns all pieces (empty when the
body is consumed), is recorded as make_cut_rsolid_list and replays. cut_rsolid now raises when the
result is not exactly one solid and names cut_rsolid_list. Tests that relied on the dropped sliver
of a tangent cut use a tool that does not touch the walls.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Entity-map callouts re-anchor onto their own geometry when occluded; the
VTK dependency, worker process and xvfb steps are gone.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
cadquery-ocp used to install VTK; without it the BREP-rendering tests failed in CI. vtk goes into the inspect
extra (users) and the dev group (tests).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Beta: the first release with prebuilt wheels (Linux x86_64 and aarch64, macOS arm64, Windows x86_64,
Python 3.10-3.13). Version in pyproject.toml, the uv.lock project entry and SKILL.md; CHANGELOG, update notes
(English and 中文), README update notes.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The modeling API (shapes, operators, sketches, products, queries, the reactive graph) is implemented in
C++20 on OpenCASCADE (src/cpp) and ships inside the wheel as simplecadapi._cpp. The Python layers that stay
Python (runtime, build, artifacts, editor, inspect, exporter, translators, scene) run on it unchanged; the
previous Python test suite passes on the new engine.
Layout: src/cpp and src/simplecadapi side by side, one distribution built by scikit-build-core.
simplecadapi.core, .operators.*, .ql, .std.* and the other legacy modules are real forwarding modules; the
Python adapter layer is simplecadapi/_glue. OCP is no longer a dependency and nothing imports it.
Release: .github/workflows/release.yml builds wheels for Linux x86_64 and aarch64, macOS arm64 and Windows
x86_64 (Python 3.10-3.13) against one static OCCT, runs the test suite on the Linux wheels and publishes to
GitHub and PyPI; ci.yml caches the static OCCT for the test jobs.
Errors: every message the library writes is English; the tag-validation and semantic-query errors render in
full with possible causes and fixes.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Move scale/transform/boolean_rsolidlist/offset/draft/extrude_taper/extrude_until/
sweep_multisection into the module of their family (old module paths remain as
deprecated aliases); the API reference is generated for every operator.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Four operators modules (deformation, draft, limited_extrusion, section_features)
were missing from the generator's source list and its table of public
functions, so the docs of scale/transform/offset/boolean_rsolidlist/draft/
extrude_until/extrude_taper/sweep_multisection were hand-kept and the generator
deleted them. operators/ is now discovered, a function the package exports is
public, the content of the hand-written docs moved into the docstrings (Args,
Raises, Examples), and tests check that every operators function has a doc
and that the committed docs equal the generator's output.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Regenerated with tools/auto_docs_gen.py. (The generator also deletes the docs of
draft/offset/scale/transform/extrude_taper/extrude_until/sweep_multisection, which
are kept by hand; those deletions are not part of this.)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
An agent working a multi-notebook workspace had to leave the CLI to keep
working: every switch of the editor's open notebook was a raw curl to
/api/workspace/open found by reading the installed server's source, the
viewport image was read out of .sca-editor/ by hand, and a write refused
while another notebook was open left no in-CLI way out.
- sca cell open NOTEBOOK switches the running editor and waits for the
notebook's kernel (SCA_EDITOR_OPEN_WAIT or --wait, default 120s), so
the following write does not race the boot. Re-opening the notebook
that is already open and ready does not restart the kernel.
- sca cell put/insert/rm/run take --open to switch and write in one
step; a refused write now names sca cell open as the remedy.
- /api/cells reports kernel, so a caller can tell a booted notebook
from one whose name has flipped while the kernel still boots.
- sca viewport [WORKSPACE] [--out PATH] reports the viewport image's
path, age and size, and copies it out for an agent's image reader.
- The bundled skill's editor-collaboration reference documents all three.
Printing an inspection now shows a one-line digest (the per-face records are
to_dict()/.faces). The skill says what an agent in a shared editor needed
told: while an editor runs, sca cell is the only way to change a regular
cell — the file only when no editor runs or for the cells sca cell refuses.
dof=0 says the constraint system closed, not that the shape is right
(mirror solutions); verify by measurement. And a modeling project is managed
like software: git from the first file, commits at verified milestones,
generated state ignored.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Subfolders of any depth are listed; names decide what is skipped
(dot/underscore-prefixed, node_modules, venv, site-packages, build, dist).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>