Repository navigation
v1.1.90
Added
cad_examples: the code engine's cookbook, twelve worked build123d designs from a cable clip to a trigger capo, each modelled on a bought product with its concept, the published sizes it used and its script. It lists them, or returns one by name.cad_designnames each in one line (about 2 KB for the twelve), so a design worker reads the script that works like its request instead of every script riding in the prompt. Every example builds valid throughcad_runon Linux (Ubuntu 26.04); none has been printed.cad_runreturns a perspective view (renders.perspective): three-quarter, from the front right and above, depth-buffered, smooth-shaded across facets that meet within 40 degrees, outlined at steps and creases. The contact sheet shows it large beside the six orthographic views (2668 x 1602). It adds about 0.3 to 1 s to a run and holds the inspection process to about 0.6 GB at its peak.design_guidance: the on-demand guidance (fdm_fit,fdm_flexures,fdm_assembly,fdm_multicolor,fdm_after_slice,fdm_capability) as a read-only tool, for a design worker that is given tools but not prompts or resources.cad_runchecks that a solid result's STEP holds at least one solid body (checks.step_solids). A sketch rounded by growing and shrinking it withoffset()built a solid whose STEP came back as bare shells withvalid: trueandsolid_count: 0.
Changed
cad_designputs form first: write the concept (the bought product, its mechanism, the load path, the print orientation) before geometry; build the product's shape with loft, sweep, revolve and fillet rather than a profile pushed up; extrude a flat profile only for a real plate or lever or an in-plane mechanism, and say that reason. It names the cookbook's patterns, records what the cookbook taught about the engine (several bodies asCompound([a, b])with a real gap, chamfer where a fillet fails, no grow-and-shrink rounding), and says to judge the form from the perspective view first.fdm_designasks for the concept in writing before any geometry and gives the product's form the same standing as its function: curves where hands and objects touch, no reduction to a flat profile or a box with holes, a flat in-plane layout only for the element that needs it. It tells a worker without attached prompts to readfdm_fitandfdm_flexureswithdesign_guidancewhen they apply.
Fixed
- An update that changes only the code engine's own files no longer leaves it "not set up" until someone runs setup again (scan-to-make #609). When the installed runtime still matches
requirements.lockexactly with the same interpreter,cad_status,cad_setupwithoutinstall, and the firstcad_runorcad_check_fitre-run setup's confined build, STL and STEP round trip by themselves (it imports the runtime's libraries inside the confinement; the separate unconfined import check is setup's alone), with nothing installed or downloaded. Then they report ready withreverified. Markers from earlier versions qualify by the exact package match; newer markers also record the lock's hash and the interpreter, and a change to either still needscad_setupwithinstall: true. A failed re-check is reported once rather than retried on every status read. A call that finds any other CAD operation holding the engine (often the same re-check from another process) waits up to 25 s and tries again, then reports not ready with "ask again shortly" rather than a failure. Tested with a stubbed runtime and confinement, and on a real pinned runtime verified by the previous engine. cad_setupon Linux with bubblewrap 0.11 (Ubuntu 26.04) failed with "CAD confinement did not reject write": bubblewrap makes the folders above each bind on its own root tmpfs, which was writable inside the sandbox (never on the host). The sandbox's root is now remounted read-only, and the forbidden-write proof accepts a read-only-filesystem refusal.
The re-check before a cad_run or cad_check_fit stays within that call's timeout_ms (its waiting and its confined subprocess included). Running out of time is reported and not cached, and the next call completes it.
Validation
- Full suite on macOS arm64 with the pinned CAD runtime. The real code-CAD, render, bodies, scan touch-up and cookbook build tests ran, and every cookbook example builds valid. CI on Linux.
- The automatic re-check was tested with a stubbed runtime and confinement, and on a copy of the installed runtime that the previous engine verified. It reported ready in 14 to 22 s with nothing installed, and two racing status reads were both ready in 18 s. It reported not ready when an installed package no longer matched the lock.
- No printer contacted; no physical print.