Browse documentation
Docs/Language

Programmable CAD descriptions

CAD constructors make immutable, typed design descriptions. They are ordinary pure Grid functions executed by the native compiled formula runtime. They do not solve a sketch, create a solid,…

Programmable CAD descriptions

CAD constructors make immutable, typed design descriptions. They are ordinary pure Grid functions executed by the native compiled formula runtime. They do not solve a sketch, create a solid, authenticate an external reference, or save a result. Geometry support remains operation-specific in the CAD capability catalog.

The experimental CAD notation writes reusable descriptions with unit-checked sketches, profiles, datums and extruded bodies. Explicit CAD.EVALUATE(description, "composition") admits the bounded first-package graph and realizes independent bodies through the existing native owners. Importing the source library alone does not start geometry. General layout solvers, attachments and repair retain their separate admission contracts.

input A1 = 2
A2 = CAD.PARAMETER({id: "depth", value: {kind: "length", value: A1, unit: "millimeter"}, ownership: "input"})
A3 = CAD.DESIGN({schemaVersion: 2, id: "part", revision: "r1", lengthUnit: "mm", parameters: [A2]})
A4 = GET(A3, "parameters.0.value.value")

Changing A1 regenerates the dependent description; it does not invoke a geometry kernel. The revision string identifies authored data, not a trusted native model revision. Likewise, ownership: "input" declares an overridable request parameter, not permission to replace a formula-owned model cell.

Current M2 delivery status

The bounded M2 implementation and both editable deliverables are complete. The 34-requirement audit accepts all 34 items in the documented local scope. Native/compiler/Host and real workbench lifecycle cases pass. Rational-machining save-to-all-body-preview p95 is 0.794 s against the unchanged 1.000 s budget in dev/debug-0 Lite; all rational save/open/STEP/RSS budgets pass with unchanged output hashes. Retained optimized native ordinary and default-off resource checks keep their original source scopes. Historical M3/full-Core and optimized Host results are not claimed. Experimental maturity remains unchanged. Older source-bound notes below retain their original scope; the audit identifies current evidence.

M2 part sources for 0.73.0 (Experimental development)

The CAD workbench's Create body operation form selects a design declaration and explicit target body, then creates separate result identities for a hole, rectangular rib, transform, mirror, keyed pattern or Boolean combination. Pattern keys and output IDs remain explicit even when excluded. Signed-axis placements offer all 24 proper orientations. Hole entry Z points inward from the target face; countersinks use entry radius/depth rather than a rounded angle. Native regeneration must accept the complete design before a solid save. Draft saves retain intent only. The native authoring contract records current refusals and deferred verification; the reviewed UI does not promote these developing envelopes to Supported.

The workbench's Repair reference form retargets one existing local reference. Enter its design declaration (for example A2), reference ID and a new design revision, then choose an explicit replacement of the same kind. For canonical source 32, mounting-face can select body base, topology base-pad:cap:start instead of base-pad:cap:end. Native validation and regeneration determine whether the replacement is usable; Grid does not select a nearest face. Current local revision pins advance together, while foreign pins remain intact. Foreign retargets, kind changes, cycles and unrelated stale pins refuse. The proposal survives refusal; Check saved revision and keep proposal can unlock it against an unchanged saved revision without submitting it again. A repaired unfinished draft stays a draft until Complete saved draft. Structurally broken source that cannot construct a CAD definition still needs source editing. The form is approved; final native lifecycle and resource acceptance remain open.

The dependent composition example uses one construction sketch to drive a face-attached, two-sided tab and a second projected sketch attached to the tab's native end cap. Load the complete source, select Enable target-aware extents for this source save, and regenerate. A1 changes the parent depth; master_width and master_height change both projected outlines. Select result A3 and measure or export base, tab or tip individually. At the defaults their volumes are 512, 96 and 64 mm³, and centroid Z coordinates are 2, 4.5 and 7 mm. The authored 1 × 1 placeholders stay in source; regeneration derives the actual dependent coordinates without rewriting them.

The same source can be saved as an unfinished extent draft and later completed explicitly. Reference repair, saved undo/redo and reopen use the existing source owner. Plain projection saves permit dependent face frames; they do not activate extents without that explicit choice. Through-all uses actual native targets; up-to-face still requires finite-face coverage. Missing/stale roles, cycles, constrained projections, unsupported curved coverage and unrelated unused geometry refuse. This remains Experimental; final native/product and resource acceptance is tracked in the M2 ledger. CAD description notation and changed-body part targets retain their separate composition contracts.

The curved dependent extent example uses circular stock, a projected circular follower and a second attached circle. Enable target-aware extents for the complete source save. A1 changes stock length; master_radius changes both projected circles. At the defaults, volumes for stock, follower and tip are 256π, 4π and 2π mm³; their centroid Z values are 2, 2 and 5 mm. The overlapping bodies are separate New features. Native through-all proves the stock's actual axial support from its carriers. Curved profiles can also end at a finite polygonal face when their exact conservative enclosure fits that face, including its holes. Unproved fits refuse.

Selected source editing additionally supports exact line/endpoint-arc trim and extension against finite lines, circles and endpoint arcs, point-defined arc splits, and connected line/arc offset copies. Mixed circle/slot outer boundaries and holes preserve their authored curves. Radian arcs keep their separate representation. All of this remains Experimental: local native/workbench acceptance passes. Packaged-product QA is separate; unsupported representations and required constraint repairs refuse. The approved workbench forms expose point/angle arc splits, connected boundary offsets and curve trim/extend. The independent-offset form keeps its separate single-entity contract.

CAD.RATIONAL_DESIGN({definition: CAD.DESIGN({...}), frames: [...], outputOperations: [...]}) selects exact integer-quaternion workplanes and placements through resident CAD.EVALUATE, source saves, measurements, preview and STEP. Each datum has one exact origin/quaternion description. Independent blind face-attached sketches can have distinct rational orientations; parent transforms, mirrors and strictly interior holes feed their exact face poses. Unconstrained polygon projections and target extents can use independent rational charts. Parallel complete curve copies and congruently placed Boolean/ profile-rib operands now retain their native owners; unrelated curved charts keep their explicit refusal. The optional forms retain their signed-axis and coordinate-bisector envelopes; the complete-source editor preserves the rational wrapper and its operations.

The oblique fastener example chains plain, counterbored and countersunk holes, then transforms and mirrors the plate. plate_depth drives regeneration. Hole frames use the current body's local chart. Native admission proves finite material between parallel prism caps and separation from previous cuts. Entry conics and cavity surfaces stay rational; pi and square roots appear only in bounded measurements. Adjacent-face exits, intersecting cavities and unproved targets refuse. Direct native cases and compiler/resident/save/workbench lifecycle cases pass. The current audit records local M2 correctness and measured budgets; these paths remain Experimental.

The machined-parent bracket adds a fixture hole and exact parent placement before resolving the bracket support. Changing fixture_depth to 7.3 retains the exact support offset and independent child orientation. The parent is sealed before its original planar face is consumed; an invalid cut refuses the complete candidate. Direct-native controls, resident saves and native workbench lifecycle cases pass within the documented envelope.

The rational dependent-target example projects a construction rectangle, then reads a fixture after drilling, transform and mirror. Up-to-face retains the sloped finite end; Through-all reads current support. Both remain exact through measurement, preview and STEP. Change fixture_depth from 4 to 7.3, or edit master_width to change the projected body. Depth 5 makes the end plane cross the sketch and refuses the candidate. Select target-aware extents for the source save. This developing polygon recipe has explicit authoring, operation and resource limits; integrated lifecycle cases pass in local acceptance. Performance meets the current audit’s local budgets; optimized Host evidence is not claimed.

The Boolean bracket uses explicit boolean features to join a foot and upright and subtract a rectangular pocket tool. Its feature payload names target_feature, tool_feature, mode: "union" | "subtract" | "intersect" and operation: "new"; the outer targetBodies names the target body. Declare each operand and result as a separate CAD.BODY. Select bracket for the final result. This developing source recipe accepts exact world-axis boxes or earlier certified rectilinear results. A separately selected contained-column recipe also accepts curved-profile operands with the same extrusion span, as in canonical 61. The overlapping-profile example adds exact circular-boundary Union, Cut and Intersect, including a tool crossing an existing opening and a later hole. stock_depth drives all six bodies; choose each result explicitly for measurement and STEP. The selected recipe requires equal spans and representable exact intersections. Tangencies, disconnected/empty results and unproved boundary families refuse. The chained-boundary example adds line/arc contours and reuses a clipped result in a second Boolean before drilling. Whole native carrier proofs and exact winding retain the actual boundaries. Noncircular polynomial intersections and native coefficients outside the exact representation still refuse. See the operation contract.

The keyed pattern uses v2 part features with transform, mirror and pattern actions. Each names a sourceFeature. Patterns contain {key,placement} instances and an optional list of excluded keys. Declare every instance as CAD.BODY({id,producer:{kind:"instance",featureId,instanceKey}}), including excluded keys. Those exclusions retain their source identity without current geometry. Instance order does not own identity. The named spacing input edits active placements; there is no implicit combined pattern body. This developing contract supports exact signed-axis placements/mirrors and certified native profile carriers. These plain frame payloads retain signed-axis rotations; CAD.RATIONAL_DESIGN supplies the broader exact placements described above. See the placement contract.

The machining example uses a part action with kind:"hole", sourceFeature, placement, radius, extent and optional entry. The outer targetBodies selects the source body; declare each cut result separately. extent is {kind:"blind",depth} or {kind:"through_all"}. entry defaults to {kind:"plain"}, or names kind:"counterbore"/"countersink" with a larger radius and an entry depth. The proper frame's positive Z enters a proven target face. This developing contract covers exact signed-axis cuts on native boxes and previous disjoint cuts; later transforms/mirrors preserve their native cavity descriptions. Selected profile-target cuts preserve original openings, as in canonical 60. Intersecting or unproved cuts refuse. Part actions can select one explicit keyed pattern body with outer targetBodies (required for holes/ribs), as in the keyed-target example; an excluded copy cannot supply geometry. See the machining contract.

The ribbed panel uses a part action {kind:"rib",sourceFeature,placement,size} with three positive local dimensions and an explicit outer targetBodies. Each result remains separate from its operand. This developing contract joins rectangular stiffeners to native boxes or prior certified rectilinear results, requires added material and one connected manifold body, and preserves exact native measurements and STEP. Selected triangular and polynomial cubic webs are also authored in canonical 57, with native contact/material proof and later changed-target consumers. General tolerance CSG is not implied. See the rib contract.

The three-body enclosure keeps separate walls, floor and lid, with six named dimension inputs and an explicit raised lid datum. The face-sketched L bracket has two circular openings and a foot slot, and follows the reusable fixture's named cap face. Fixture and bracket remain separate bodies. These examples do not claim joined-body machining, arbitrary drilling directions or countersinks.

Load these files through Complete CAD source, save explicitly, and use Inspect parameters and outputs to discover its named input fields. Each body requires its own selection for measurement/export. The existing code and parameter editor retain the formulas. The selected native output recipe now recognizes small rectilinear part outlines; older explicit plate recipes retain their output selection. Native, actual editor and save/restart scenarios pass within the current audit scope. Local M2 acceptance does not graduate a Supported envelope.

Constructors

Each constructor takes exactly one object using the native v2 schema:

Function Description
CAD.DESIGN Complete definition; validates dependencies, cycles, units and identity
CAD.PARAMETER Typed length, angle or count and request ownership
CAD.DATUM Right-handed orthonormal frame with optional parent/attachment
CAD.SKETCH Datum-bound entities, constraints and declared projections
CAD.PROFILE Ordered outer curve IDs and hole loops in one sketch
CAD.FEATURE Existing typed operation plus profile, body and dependency references
CAD.BODY Stable identity and feature/imported producer
CAD.REFERENCE Explicit source revision and topology/design selection
CAD.CONFIGURATION Configuration plus typed parameter overrides
CAD.MODEL_BINDING Declarative symbol provenance; native ownership still must be checked
CAD.INSTANCE_ID Stable string identity from node kind, reusable definition key, instance path and authored key

For a generated node, derive its ID with CAD.INSTANCE_ID({kind: "feature", definitionKey: "bolt", instancePath: ["left"], key: "shank"}) and retain the matching origin: {kind: "generated", definitionKey: "bolt", instancePath: ["left"], key: "shank"} on the node. Keys must be authored identities, not coordinates or current array positions. Reordering a keyed collection then preserves identity; reusing the same full key for two nodes is a whole-definition error.

You can compose these constructors in reusable DEF functions. Their compiler contract permits pure incremental reuse, so an input edit rebuilds the affected description through the same native compiled formula path. This does not authorize geometry execution or make a constructor constant-cost: validation scales with the admitted description, and whole-design checks also inspect its dependencies.

The complete reusable pad example constructs two rectangular-pad descriptions with independent design identities from one DEF. An input edit updates their typed depth parameters. It is an authoring example, not a claim that a CAD region has generated or exported solids.

Endpoint-defined arc intent (Experimental geometry)

CAD.SKETCH can retain an endpoint_arc entity with id, center, positive radius, distinct start/end points and an explicit clockwise boolean. Unknown endpoint-arc fields refuse. This representation is distinct from the existing arc with start_angle/end_angle; it never snaps trigonometric endpoints into line joins. See the endpoint slot description.

Construction validates finite description data, not circle incidence or a solid. A separately selected native profile API now proves exact circle incidence, closed line/endpoint-arc boundaries and strict nonnested holes. Endpoint coordinates must satisfy the circle equation exactly, not within a tolerance. Both traversal directions and major arcs are supported by that proof. It uses the shared count, byte, identity and coordinate budgets and a bounded exact intersection/winding work allowance. Full-circle curves keep the circle family.

Local revision-bound sketch_entity references can now drive dependent native sketch projections through explicit entityId/referenceId projection records. Edit the original inputs; projected geometry is recomputed from its source rather than from the target's seed coordinates. The dependent slot example keeps both bodies and uses an offset quarter-turn chart. Circle/endpoint-arc projections require parallel admitted planes. Constraint repair, broader chart composition and final native/editor acceptance remain under development. The referenced sketch may also remain construction-only: omit its extrusion feature and output body. Projection references still follow its current inputs; the original sketch and descriptive profile stay in authored source.

The selected host source-operation recipe now recognizes endpoint solids and explicit drafts. Its native geometry and recipe tests pass; the full product save/restart test is implemented but not yet exercised. Legacy solving, older explicit solid producers, and mirror/offset tools that lack this representation refuse it rather than omit arcs or create faceted geometry. A separately selected native API can now extrude certified endpoint regions into exact rational solids with bounded volume, surface area, center of mass and lossless STEP for representable controls. It also places those solids in exact signed-axis frames without rounding their rational controls. Explicit native typed-source realization binds the full design and body identity to those solids and caches their own measurements and retained storage census. An explicit native mixed-body policy can compose these owners with existing rectangle, linear, circle and polynomial bodies. An explicitly selected internal Core resident recipe now regenerates slot depth/spacing and mixed cap-attached bodies through canonical compiled formula, retaining source/input-bound reuse and stale/cancellation protections. See the Experimental slot-part example. Drafts retain editable descriptions but cannot measure/export or silently become solids. Host persistence and workbench slot editing pass within the current audit. Unrepresentable native caps and STEP controls refuse rather than round. Optimized Host and platform evidence are not claimed; no geometry capability is promoted.

Constructor value carriers

Authored objects, nested constructor results and supported native records are accepted. An unmarked two-column array is not treated as an object. Row and column vectors are accepted as lists; genuine matrices retain their rows. Ragged arrays, nonfinite values and resident geometry/Tree handles refuse construction. Encoded constructor children are accepted after bounded description-only decoding; unrelated encoded objects are refused. Unsupported dense-numeric Cell-array carriers inside records still refuse rather than silently turning those values into text; ordinary authored object/array composition supports nested constructors. See the carrier contract for the exact boundary.

CAD.PROFILE holes additionally accept a vector of boundary vectors, whose individual loops may have different lengths. Their order is preserved; empty loops and deeper or mixed scalar/loop nesting refuse. This exception is local to profile-hole descriptions, not a change to ordinary array semantics.

Child constructors check local structure. They may name nodes not yet assembled into a design. CAD.DESIGN checks those references against the complete graph. A profile description does not certify curve closure, winding, intersection or geometric accuracy. Attached-face references are not resolved during construction. Constructors refuse unknown v2 wrapper fields and oversized descriptions. Nested legacy entity, feature and configuration payloads retain their existing v1 parsing contract; explicit migration also retains the full original source. The selected encoded input carrier and normalized output each fit an independent 2 MiB budget; wire quoting can therefore make a near-limit encoded input refuse even when its decoded description would fit. Actual JSON nesting, including encoded child content, is bounded at 128 containers.

Explicit migration and rollback

CAD.MIGRATE_V1(designId, revision, originalJsonText) migrates a Sketch v1 document into the v2 authoring schema. The original UTF-8 text is retained, including whitespace and metadata, so CAD.RESTORE_V1(migratedDefinition) returns those exact original bytes. It does not encode subsequent edits back into v1. A native v2 definition with no retained v1 source refuses rollback. Retaining both representations can exceed the description byte budget even when the original v1 request alone fitted it.

Evaluation declaration (syntax-only)

A3 = CAD.EVALUATE(A2) declares a read-only result of the design description in A2. Named description and result cells are also accepted. The declaration must be the complete expression of a formula-owned cell, with a direct reference to a separate, existing producer. Put reusable DEF calls and description constructors in that producer cell. Nested evaluation calls, evaluation inside a reusable function, ranges, inline descriptions and input-owned results are refused. CAD dependency cycles are rejected, including paths through ordinary formulas and callable bodies.

The optional literal result selector CAD.EVALUATE(A2, "bodies") declares individual body mass snapshots keyed by their declared IDs. The default one-argument form retains its original single-part result; it never silently becomes a body set. The second argument cannot be a reference, computation, different string or a geometry/resource policy. Source-bound native admission must match this result contract. Older bytecode readers refuse the new body region schema; legacy declaration bytes remain unchanged.

# Independent native bodies, not a Boolean union or aggregate mass.
A3 = CAD.EVALUATE(A2, "bodies")
A4 = CAD_VOLUME(GET(A3, "bodies.base"))
A5 = CAD_VOLUME(GET(A3, "bodies.side"))

See the workplane pair for a complete Experimental example. In the selected CAD source editor, choose the result target and enter the exact body declaration to measure or export it. Leave the body field blank for legacy single-part results. Explicit body reads never fall back to a first body, sum of bodies or mesh approximation. Current workplane body execution admits rectangular extrusions and the experimental straight-edged and whole-circle regions below in proper signed-axis frames; broader angles and modeling operations remain under development. Successful syntax or admission is not capability graduation.

Editing authored sketch fields (Experimental)

Starting a source-owned part

Load the model's saved source, then select Blank part or Example mounting plate. Confirm replacing the local source proposal. Neither action saves or authorizes geometry. Unsaved edits disable starter replacement.

The blank starter has an empty XY sketch and no CAD parameters. Set the literal thickness in the graphical extrusion controls. Use Save unfinished CAD draft to retain it without measurement/export authority. The reference starter uses a reusable mounting_plate definition and named dimensions: 48 × 24 mm, two radius-2 holes at (8,12)/(40,12), a radius-2 slot between (20,12)/(28,12), and 4 mm thickness. Its independent volume is 4480 - 48*pi mm³. Circles use exact endpoint-defined semicircles, never facets.

Regenerate and save explicitly, then inspect the named inputs to propose a dimension change. Those inputs own the reusable definition's geometry; the editor must not rewrite generated edges. Invalid geometry must refuse native measurement/export. These starters are development examples, not evidence that the graphical drawing workflow or the complete 0.69.0 envelope is Supported. Native Core tests verify the reference volume, centroid, exact STEP and invalid openings at thicknesses 1, 4 and 32 mm. Selected endpoint-solid admission retains bounded numeric addition/subtraction used by those parameter formulas; the canonical evaluator still computes them. Native graphical creation, edits, history/restart and reusable-input workflows now pass, including the maximum eight-opening design on all 24 signed principal frames. The current local browser journeys also pass, including Apple M4 hardware rendering and graphics-loss fallback. Local optimized measurements meet the bounded latency and memory targets; broader packaged/platform coverage and historical ordinary-path attribution remain unproven.

Draw and edit the bounded plate (Experimental)

The source-owned CAD editor now includes Open graphical CAD sketch for a directly authored design. It reuses the platform's Scene renderer for a saved native 3D wireframe; the older Sketch surface continues to own its separate document. Native and browser functional acceptance pass for the bounded workflow. These controls remain Experimental while the broader platform envelope and ordinary-path performance attribution are evaluated.

To construct the reference plate without entering internal identifiers:

  1. Load saved source, choose Blank part, confirm the local replacement, and choose Save unfinished CAD draft.
  2. Open the graphical sketch and choose Draw rectangle. Enter X = 0, Y = 0, WIDTH = 48 and HEIGHT = 24, then Apply rectangle and save.
  3. Draw and apply circles at X = 8, Y = 12 and X = 40, Y = 12, each with RADIUS = 2. Draw a horizontal slot at X = 20, Y = 12 with second center coordinate 28 and RADIUS = 2.
  4. Under Choose plate and openings, check the three openings and choose Apply plate and openings. Native geometry checks closure, containment and separation; choosing a boundary does not certify it.
  5. Set Thickness to 4 and choose Extrude rectangle 1, then Complete saved draft. The independently calculated volume is 4480 - 48*pi mm³. Measure or download STEP from the saved checkpoint.
  6. Choose Preview saved part in 3D to inspect sampled native boundaries. Orbit, tilt, zoom and fit use the shared Scene renderer. The displayed sampling is an approximation; native measurements and exact STEP remain separate operations.

Pointer input uses the visible 0.25 mm grid. Click rectangle corners, a circle center and horizontal radius, or two slot centers and a perpendicular radius. Arrow keys move the cursor by 0.25 mm; Enter places a point and Escape cancels. Escape also discards a proposal from its numeric, opening or thickness controls and returns keyboard focus to the canvas. Applying a saved proposal restores canvas focus when it remains in the graphical editor. Drawing over an existing edge places the next point in the active tool; selecting a saved shape requires the selection tool.

The novice envelope permits zero through eight openings. The complete curved outline of each circle or slot must fit within ±128 mm, including the round ends beyond the slot centers. Removing the last opening retains the rectangular part. These product admission rules do not widen independently selected native recipes or the advanced authored-slot operation's separate coordinate budget.

Use Fit sketch, zoom and pan to bring distant shapes into view. These controls change the view only; they do not move geometry or save source. Numeric fields override these values. Pointer movement stays local and starts no native regeneration. Only explicit Apply submits the proposal.

Select a whole rectangle, circle or slot in the outline or canvas to change its location and dimensions. Applying edits regenerates every dependent native boundary in one source transaction. Delete selected shape asks before removing an opening from every profile that consumes it. Deleting the consumed rectangle also removes its one extrusion and body and returns the design to an unfinished draft. Cancel shape proposal discards local changes. Only one shape, opening-selection or thickness proposal can be active at a time. For an existing authored extrusion, Apply thickness and save updates its literal depth in that same transaction. A computed or input-bound depth remains read-only here; edit its controlling input or source instead. Cancelling a proposal restores the saved thickness shown in the properties. Saved openings controlled directly by source remain in the part when changing other opening checkboxes; edit their source to change them.

After reopening a saved design, the editor discovers its declared bodies through the native source projection. A single body is selected automatically; choose explicitly when the design declares several. Measurement, preview and STEP still require the selected native body and current saved revision. The selected eight-opening native STEP envelope allows up to 256 KiB of exact output. Other exports retain their existing 64 KiB allowance, and independently selected native callers can impose stricter limits. This bounded output policy does not certify geometry or establish completed native acceptance.

Enable Keep native undo history before edits to retain bounded source history. Undo and redo regenerate the restored revision; stale measurement, preview and export responses cannot become current authority. A failed save retains the proposal and requires Check saved revision and keep proposal before an explicit correction and retry. Generated geometry in the reusable mounting plate remains controlled by its named input values, and is not flattened into editable edges.

The toolbar is confined to one rectangle, up to eight circular or horizontal/ vertical slot openings, millimetres, coordinates within ±128 and one blind extrusion of depth 1–32. Native ownership, exact-representation and geometry checks can impose stricter refusals. General curves, constraints, Boolean operations, arbitrary workplanes and multi-body editing are outside this bounded workflow. No Supported operating envelope is claimed here.

Experimental workplane properties

After saving a source-owned CAD checkpoint, Edit workplanes explicitly asks the compiler for directly authored workplanes. Select a named workplane; no internal identifier entry is required. Edit its X/Y/Z offsets or choose an XY, XZ or YZ orientation, then apply them together in one save transaction. Offsets use the parent frame's coordinates and the design's length unit. Typed values are not silently rounded. Native regeneration can refuse a frame or placement outside the admitted geometry contract.

Only literal, source-owned fields are editable. Formula-owned fields remain read-only; change their controlling source or parameters instead. Workplanes inside generated definitions or indirect lists are not flattened into editable copies. Discard changes to cancel a proposal. A failed save retains the proposal but revokes its cached save/export authority. Check the saved revision as described below before retrying: a lost response does not prove that nothing was saved. Optional native history retains the compound edit as one step. Bounded native save/history/restart workflows pass; the interface remains Experimental and broader platform acceptance is unproven.

Recover a failed save without losing a proposal

After a failed save, choose Check saved revision and keep proposal. This is a read-only check, not a retry. Source text, parameter proposals and the current sketch/workplane form stay in place. Editing becomes available again only when the saved source, hash, working revision, checkpoint status, draft status and extent selection still match the failed operation's original basis.

If they match, correct the proposal and explicitly apply it again. Unsaved changes still prevent current measurement/export; an earlier visible result is not proof of the proposed geometry. Circle and slot refusals include plain-language guidance and retain their diagnostic code. Unknown failures retain their original detail.

If the saved design changed, the check fails, or the model context changed, no save is retried and no proposal is silently rebased onto a different design. Your retained source remains available to copy. Discard local edits and load saved source deliberately replaces the proposal with the current saved design. The editor never assumes that a lost acknowledgement means a save did not commit. Recovery of other operations, such as reopening a checkpoint or saving an imported library, still requires loading saved state; they are not source-save retries.

After saving a CAD checkpoint, choose Edit authored sketch coordinates. Enter the design declaration (for example, A2), the exact sketch ID and an entity ID, then choose Inspect and add sketch fields. This discovers literal coordinates and radii without evaluating or rewriting the design in the browser.

For the circular plate, select design A2, sketch plate-outline and entity hole-two. Change radius from 2 to 1.5, then choose Apply sketch fields, regenerate and save. Only the authored numeric token changes; comments, definitions and other source remain intact. Measure result A3, body plate, to inspect the saved geometry.

You can add multiple entities to one field selection before saving. When moving a shared line endpoint, edit both adjoining coordinates in the same batch. Native regeneration checks the complete candidate; an invalid curve, open boundary, stale revision or exceeded limit refuses the entire save. Unsaved field edits disable measurement/export. Discard sketch field selection drops only that local selection; loading saved source discards all local editor drafts.

The endpoint-arc field editor implementation exposes center.x, center.y, radius, start.x, start.y, end.x and end.y. These are point coordinates, not aliases for the radian start_angle/end_angle fields of older arcs. For the canonical slot, select design A2, sketch slot, and add all four entities to one selection. To change its radius from 2 to 3 without moving the centers, enter this complete batch before saving:

Entity Field(s) New value
bottom a.y, b.y -3
top a.y, b.y 3
right radius, end.y 3
right start.y -3
left radius, start.y 3
left end.y -3

Changing a radius alone leaves its endpoints off-circle and must refuse a solid save. There is no browser-side endpoint repair or tangency solve. Frontend batching, compiler source-edit and native authoring checks pass. Bounded graphical slot edits and refusal/recovery now pass through real native saving and restart. This broader field-editing interface remains Experimental.

Formula-owned and generated geometry must be edited through its owning parameter or complete source. Projected geometry, endpoint references and nonempty constraint sets are not scalar-editable through this control. Field inspection does not certify arc/spline solids. The separate split, mirror and line trim/extend and polygon controls below have their own native checks. Offset, slot and broader constraint/repair tools remain under development.

Create an authored polygon (Experimental)

Load a saved CAD checkpoint and choose Create authored polygon. Select the design declaration (for example, A2), an existing authored sketch, a new design revision and, optionally, a fresh profile ID. Enter at least three vertices in boundary order, each with numeric X/Y literals in local sketch coordinates. The final edge closes to the first vertex; do not repeat that vertex. Add polygon vertex and Remove vertex change the row count. Leave every edge ID empty to request native collision-checked names, or supply all edge IDs explicitly. Partial custom naming is refused. Automatic naming is experimental and still awaits native-process validation.

Native checks accept simple concave or convex line boundaries, preserving exact input values and existing geometry/constraints. Crossing, touching, backtracking or degenerate boundaries refuse. Coordinates have absolute value at most 256; there are at most 256 vertices. Formulas, snapping, automatic regular-polygon generation, Boolean union and implicit bodies are not part of this control. Construction polygons cannot create a selected solid profile.

Create polygon and save draft retains draft status. A closed polygon alone does not permit measurement or export: author the desired feature/body and explicitly complete the draft. For a solid checkpoint, Create polygon, regenerate and save requires the complete design to remain valid. Opt-in native history supports undo/redo. A refused save preserves the local form; Discard polygon draft resets it without modifying saved source. This tool adds no new Grid formula and does not graduate broader sketch or solid capabilities.

Create an authored slot (Experimental)

The development workbench includes Create authored slot. Choose a saved design and authored sketch, and a new revision. Supply two distinct arc centers and a positive radius as numeric literals in sketch-local units. Optionally name a new profile; construction slots cannot create profiles. The browser sends intent only, not computed geometry or a correctness proof. Leave all four edge IDs empty for native collision-checked names, or supply all four explicitly. Names are chosen from the captured native definition during the same source transaction; they are not browser-generated identities or proof that the resulting edges may be edited as a group.

Native construction produces two tangent lines and two exact semicircles. For example, centers (0, 0) and (8, 0) with radius 2 describe the canonical slot part. Coordinates and radius are bounded by 256 local units; every final tangent point must be exactly representable. Unsupported directions refuse rather than snap or round. There is no automatic union, body or constraint association.

Create slot and save draft retains draft status. Use Create extrusion body with the new profile, then explicitly complete the draft to request a solid. Failed saves retain the form; Discard slot draft resets local intent. Frontend, compiler projection and native slot-authoring checks pass. Native workbench save/history/restart and bounded graphical slot workflows also pass. Broader slot editing and optimized evidence remain incomplete; this is not Supported graduation.

Create an authored circle (Experimental)

The advanced source editor includes Create authored circle. Select a saved design and authored sketch, supply the next revision, and enter a center and positive radius as numeric literals. Native code chooses fresh edge identities and constructs two exact counterclockwise semicircles. The complete circle must fit within ±128 sketch-local units; nonrepresentable pole coordinates refuse instead of rounding. No mesh, snapping or browser-computed geometry is submitted.

An optional fresh profile selects the two new arcs. This does not add an opening to an existing profile, infer grouped-edit ownership, create a body or change the existing whole-circle APIs. Construction circles cannot create profiles. Saving an unfinished design retains draft status and cannot authorize measurement or export. The existing source transaction compares the complete recompiled candidate before durable saving and uses the same optional history.

The bounded native/compiler foundation and host/editor save/history/restart workflows pass. The beginner pointer workflow and explicit profile openings are implemented and pass native/browser functional acceptance. No Supported graduation or broader geometry capability is claimed.

The separate native plate-profile selection foundation now validates an outer rectangle and up to eight disjoint circle/slot openings. Compiler-owned projection can create or edit directly authored profile lists, preserving comments and refusing formula-owned boundaries. The native host transaction and graphical selection controls are implemented; bounded native and browser acceptance pass. Selection does not infer ownership of curve groups or grant measurement/export authority to a saved draft.

Create an extrusion body (Experimental)

Load a saved checkpoint and choose Create extrusion body. Select its design declaration and an existing profile, then supply fresh feature/body IDs and the next design revision. The profile's outer boundary, holes and sketch workplane remain native-owned. This makes a separate body; it does not union with, cut, or implicitly select an existing body.

Enter a numeric depth in millimeters, or select Bind extrusion to length parameter and enter an existing parameter ID. Millimeter, centimeter, meter, inch and foot parameters keep their units and future input binding. A symmetric extrusion spans half the total depth on each side of the sketch plane; otherwise it runs from zero to the depth. The request's numeric bounds are 0.000001–256 mm, but the current solid lane still requires 1–32 mm and its established exact profile/workplane limits. A larger request bound does not grant geometry support.

Bounded numeric division such as A1 / 8 can supply a length parameter without rewriting the authored expression. Zero/error/nonfinite results cannot authorize a solid. The ordinary blind-only solid lane rejects unused parameters: save an intermediate parameter declaration as a draft, bind it to a feature, then explicitly complete the draft. Captured inputs and checkpoint-pinned imports govern saving and replay.

The host derives insertion fields from native state and compares the complete recompiled definition at captured inputs before saving. Authored comments, expressions and unrelated declarations are preserved. Computed feature/body array containers, unavailable profiles, duplicate IDs and unproved geometry refuse without changing saved state. Create extrusion and save draft keeps the checkpoint a draft; explicitly complete it before measurement/export. Solid saves require regeneration. Optional history uses the existing undo/redo transaction. Discard extrusion draft clears only the local form.

Through-all, asymmetric two-sided, up-to-face and existing-body Boolean targets are not provided by this control. It adds no formula or alternate geometry evaluator and does not graduate CAD capabilities.

Create a target-aware extrusion (Experimental)

Choose Create target-aware extrusion from a saved CAD checkpoint. Select the design declaration and existing profile, then supply fresh feature/body IDs and a design revision. Two-sided accepts an independent nonnegative literal distance or existing length-parameter ID for each side; at least one side must be positive. Literal text is in millimeters. Through all of target body retains the target body ID and positive, negative or both-direction choice, so later target edits regenerate the dependent part rather than freezing a depth. The request span is bounded to 256 mm; the current solid lane admits 1–32 mm.

This creates a separate New body, never a Boolean cut or join. Saving explicitly selects bounded extent admission for the candidate; the original checkpoint is read under its original recipe and captured inputs. Native planning, complete definition comparison, pinned imports, regeneration and durable saving remain authoritative. The extent solid lane currently refuses attached datums, even when the new profile is independent. Those designs can retain intent as drafts, but cannot complete in that lane.

Up to face accepts an existing revision-bound face-reference ID. The selected native owner must prove that the complete linear profile fits within the actual finite planar target face, including its holes and concavities. Authored cap or straight-side roles bind to current native geometry, not positional face IDs. Workplanes remain signed-axis frames; curved coverage, attached datums and Boolean cuts or joins refuse. Failed proof never exposes partial or stale bodies. The form preserves draft status and optional native history. Refusal retains local entries; Discard extent draft clears only that form. Broader geometry remains unfinished. The original blind/symmetric form remains separate and is unchanged.

Edit an existing target-aware extrusion (Experimental)

Choose Edit target-aware extrusion from a saved CAD checkpoint. Enter its design declaration, existing extent feature ID and new design revision, then select two-sided distances/bindings, a through-all body/direction, or an existing face reference. Apply extent edit, regenerate and save retains feature/body identity, labels, unrelated source and live expressions. Formula-owned values cannot be replaced with snapshots; edit their owning formula instead.

Native planning uses captured inputs and pinned imports, then compares the entire recompiled definition before regeneration and durable saving. A draft stays a draft; Edit extent and save draft grants no measurement/export authority. Optional native history survives restart. Refusals preserve the saved checkpoint, but the editor requires reloading after an uncertain save. Discard extent edit clears only the form.

The selected extent executor preserves declared parameters and face references when changing extent kind leaves them unused. Parameter values and configuration types remain validated. An unused face reference must still resolve to an exact authored role on the current native body; missing, stale, foreign or positional targets refuse. Reactivating the declaration uses its retained value or target, not a snapshot or replacement. Ordinary blind-only admission is unchanged. Attached-workplane extents and supported current Boolean targets pass within the M2 audit. Unproved curved face coverage and general CSG remain explicit refusals; optimized product measurements are separate. This form does not widen the admitted solid envelope or promote a capability.

Native v2 definition data can now retain Experimental extrude_extent intent: two_sided keeps literal or length-parameter distances, through_all keeps a body ID and direction, and up_to_face keeps a revision-bound face-reference ID. Definition checks retain and order those dependencies rather than saving only the current target depth. An explicitly selected native API can now realize one independent two-sided extrusion with linear, circular or supported cubic boundaries and holes, retaining current length parameters and parameter-only configuration inheritance. It reuses the existing exact producers, measurements and STEP; linked points and coincidence constraints must agree exactly. A native body-set entry now realizes two-sided and through-all New bodies in dependency order, using actual planar target geometry at the current source fingerprint. Curved targets refuse. Ordinary blind rectangles retain their existing owner; parameter-only configuration inheritance now also applies to mixed blind/extent sets. Active, explicit and Base selections use the original source identity; suppression, sketch-dimension and metadata overrides remain refused. An explicitly selected resident policy now admits bounded source descriptions and regenerates two-sided/planar-target through-all New bodies through the canonical evaluator, retaining literal or typed-parameter distances and target dependencies. An explicit native host-library recipe now connects this owner to the host registry, captured-input/source checks and cancellation. In the source editor, explicitly select Enable target-aware extents for this source save (experimental) before saving the target-extent example. This checkbox selects a complete-source save; the separate creation form above selects extent admission as part of its explicit creation request. The choice persists with the checkpoint and each recorded undo/redo entry; subsequent ordinary parameter/source edits retain it. Undo can restore a source that used the ordinary recipe. An unchanged source save is still refused. Unselected saves and legacy Sketch v1 keep their prior refusal rather than silently trying the extent recipe. Only New bodies are realized: through-all does not cut or fuse the target. Targets require the exact straight-edge planar single-shell proof; admitted workplanes remain signed-axis frames. Explicit extent draft saving retains intent without geometry authority; completion requires fresh solid admission and regeneration. Restart and history retain both extent selection and draft status. These checkpoints use schema 7 (solid) or 8 (draft), including when only retained history needs extents; older readers refuse them. Ordinary schemas 1–6 are unchanged. An explicit extent draft can retain bounded up_to_face descriptions and their revision-bound face reference without geometry authority. Try the face-extent draft with Enable target-aware extents and Save unfinished CAD draft. Measurement and export refuse until Complete saved draft performs fresh native proof. At its initial input, result A3, body part measures 16 mm³; changing A1 to 8 regenerates it to 32 mm³. Selected solid saving, new face-extent creation, undo/redo and restart use the same proof. Missing, stale, wrong-kind and dynamic references refuse. Retaining a description or checkpoint is never proof itself. Supported native Boolean families are described above; source configurations and unproved broader geometry remain outside this recipe. Existing extrude blind/symmetric definitions are unchanged. No capability is graduated. The explicitly selected source transaction now uses the native face-capable recipe for reference-bearing models. Reference-free models retain the prior extent producer after one bounded admission scan; ordinary source saves do not select either recipe. Geometry proof runs on changed-input regeneration, not unchanged-input reuse. This remains Experimental. The M2 audit records local latency/memory evidence and both editable deliverables; broader optimized/platform evidence is separate.

Selected source admission now recognizes declared face attachments and chooses a separate attached resident producer. Native/resident tests cover two-sided, through-all and up-to-face New bodies on exact current planar charts, with live parent edits and unchanged-input reuse. Ordinary independent recipes remain unchanged. Actual source-editor/native-request tests now cover saving, history, restart, failed storage, tampered checkpoint recovery and draft completion for this composition, including holed, circular and cubic profiles. Optimized and broader platform evidence remains open; this is not a Supported product claim.

For a small example, load the face-attached parts, then use Create target-aware extrusion with design A2, profile tab-region, new feature mounted-extent, new body attached-part, revision r2, negative distance 1 and positive distance 2. The new body has volume 96 mm³ and centre height 4.5 mm at the initial parent depth 4. Changing the parent depth to 6 moves that centre to 6.5 mm without changing its volume. These remain separate, potentially overlapping New bodies, not a Boolean-joined bracket. Selecting an up-to-face target coincident with the sketch plane still refuses a zero-span solid; retaining that intent in a draft never grants measurement/export authority.

Split an authored line (Experimental)

Load saved CAD source and choose Split authored line. For the face-sketched plate, use design A2, sketch plate-outline, line bottom, and split coordinates 6, 0. Supply fresh child IDs such as bottom-a, bottom-b, joint ID bottom-joint, and a new design revision such as split-2. Choose Split line, regenerate and save. The child IDs follow the original start-to-end direction. Measure result A3, body plate: the split retains the 304 mm³ volume at the example's original thickness.

The native operation proves that the point is strictly inside the original line; it never snaps an off-line point or accepts a different valid solid as a split. Comments, unrelated formulas, ordered profile boundaries and coincident endpoint relations are preserved. An unaffected face attachment advances to the new design revision; splitting a referenced parent requires explicit repair. Formula-owned/generated/projected geometry and affected dimensions are refused, not flattened or silently weakened. The reference-repair form selects an explicit semantic replacement and regenerates before saving; it never guesses a nearest face. Opt-in saved-edit undo/redo is described below.

Split drafts cannot be mixed with unsaved source, parameter or field edits. A refusal leaves saved source and geometry unchanged. Discard/reload explicitly before further live actions. This bounded straight-line tool does not certify curved splitting or a broader solid family.

A separate experimental native engineering API can now split an authored arc's angle interval while preserving its center, radius and directed curve. It reports constraint/reference repairs and updates profile IDs in a definition candidate. Compiler-owned source projection now preserves live shared expressions, comments, grouped records and profile order, with complete native-candidate agreement tests. Bounded draft admission can now retain arc descriptions, including mixed line/cubic records, without granting geometry, measurement or export. Native edit plans compare the complete recompiled description at captured inputs. Select Split authored arc to provide the design declaration, sketch/arc IDs, two new child IDs and the next design revision. Choose Radian arc · interior angle for an angle in the original unwrapped radian interval, or Endpoint arc · exact interior point for X/Y in sketch length units. Coordinates and angles are plain numeric Grid literals. Clockwise angular intervals decrease; angles are not converted from degrees. A point must lie exactly on the circle and strictly inside its directed sweep; no snapping is used. Both local drafts survive representation changes, and only the selected representation is sent. The native owner preserves source expressions and compares the complete result at captured inputs and pinned imports before saving. Draft saves retain draft status through undo/redo and restart and still refuse measurement, STEP and unsupported solid completion. Native constraint/reference refusals leave the saved source unchanged. This Experimental command does not authorize mixed arc solids or change the straight-line command above. See the native arc-split contract.

Create an independent offset copy (Experimental)

Authored endpoint arcs now use exact radial endpoint scaling as well as radius changes. Their direction and center survive; unrepresentable copies refuse. This extends the native/source command without an associative offset constraint. Endpoint cases have local native and workbench acceptance in the current audit.

Select Create independent offset copy, then enter the design declaration, sketch, line/circle/arc entity, signed distance, fresh copy ID and next design revision. Distance uses the sketch's length unit. Positive means left of a directed line and outward for a circle or arc. Native code refuses zero distance, collapsed radii and results requiring rounding in the current coordinate representation.

The original entity, constraints and explicit profiles remain unchanged; broad or implicit consumers require repair before insertion. The copy retains live scalar expressions and relative input changes around native captured values. It is not an associative offset constraint: later orientation changes do not rerun the offset operation, and copies are not automatically joined into a region. Saving preserves draft status or independently regenerates supported solids, with optional native history and pinned imports. See the offset contract. This command does not widen the supported geometry or performance envelope.

Offset a closed boundary (Experimental)

Select Offset closed boundary and enter the design declaration, sketch, next revision and a signed distance. List every directed line or endpoint arc in traversal order, without repeating the closing edge. Positive moves left of that traversal; negative moves right. This differs from the outward-positive convention of an independent circle/arc copy. Rust derives the joins and refuses unsupported, ambiguous, collapsed or unrepresentable results.

Leave every copy ID empty for collision-checked native naming, or supply one unused ID per edge. Construction offset boundary creates construction geometry. Otherwise, an optional new profile ID declares the copied region; an unfinished profile can require a draft before adding its extrusion. The original boundary and constraints remain unchanged. This is an independent copy, not an associative offset constraint.

For a concrete selection in the bracket example, use design A2, sketch bracket-outline, and the ordered IDs slot-bottom, slot-right, slot-top, slot-left. Distance 0.25 moves inward at the initial radius. Choose construction geometry and leave copy/profile IDs empty to retain the original part's profile selection. Saving still requires native validation of the complete candidate. Refusals retain the local proposal; Check saved revision and keep proposal restores edit authority only when its saved basis is unchanged.

Undo and redo saved edits (Experimental)

Select Keep native undo history for source, parameter and sketch saves before saving an edit. Then use Undo saved CAD edit or Redo saved CAD edit with no local drafts pending. For the face-sketched plate above, enable recording before splitting the line; undo restores the original authored source, and redo restores the split. Both regenerate through the native owner and save a new working revision. They never reduce the working revision or erase live input overrides. After a failed or uncertain save, explicitly check the saved revision before retrying, or discard the proposal and reload the saved source.

Recording is off by default. A save with recording off clears earlier history. The first pinned CAD checkpoint starts an empty history. Retention is bounded to 16 snapshots and 2 MiB of aggregate JSON payload (source, pinned imports and identity); JSON escaping counts toward that limit. Older distant entries are evicted, and a new recorded edit discards redo. A single snapshot too large to record refuses the save; you may explicitly turn recording off and save without undo. This is bounded editing history, not a backup or unlimited revision archive.

History lives in the native checkpoint and survives editor closure and host restart. Undo restores the exact pinned imports even when an import was removed and its live library later changed. The host recompiles and checks the historical compiled identity under current admission rules; it does not trust a browser geometry snapshot. Incompatible compiler output, ownership, constraints or resource limits refuse restoration. Older hosts that do not understand the history checkpoint format refuse it rather than silently loading a weaker state. This workflow remains Experimental; local M2 acceptance does not expand Supported geometry.

Mirror an authored sketch (Experimental)

Load a saved CAD checkpoint and choose Mirror authored sketch. Enter the design declaration (for example A2), sketch ID, two distinct axis points in the sketch's local coordinates, and a new design revision. Select Mirror sketch, regenerate and save. Numeric axis coordinates are binary64 numbers, not Grid expressions. This replaces the sketch while retaining its IDs; it does not create a mirrored copy or mirror an entire body.

Native exact reflection covers authored lines, whole circles, supported spline controls, exact endpoint arcs and linked points. Endpoint traversal reverses without radian conversion; the endpoint-mirror lifecycle cases pass locally. Eligible constraints are preserved; radian arcs, affected references, unsupported directional constraints and unrepresentable exact coordinates refuse with a reason code. No snapping, faceting or automatic reference repair is performed. The complete recompiled definition is checked at captured inputs and regenerated before the existing atomic source save. Pinned imports and live input overrides are retained. Opt-in native undo/redo also covers mirrors. A refused save leaves saved geometry unchanged; check the saved revision or reload after a failed/uncertain response before further live actions.

For the face-sketched plate, select A2, sketch plate-outline, axis [0, 0] through [0, 1], and revision mirror-2. The plate reflects across local Y while its unchanged parent and attachment remain intact. Selecting base-outline requires reference repair because the child depends on that parent's face. Do not mix mirror drafts with source, parameter or library drafts. This remains Experimental and does not expand Supported geometry.

Trim or extend an authored curve (Experimental)

Load a saved CAD checkpoint and choose Trim/extend authored curve, then enter the design declaration, sketch, line/endpoint-arc ID, finite boundary curve ID and a new design revision. Select the endpoint to move (A or B) and Trim or Extend. A is the line's A or the arc's start; B is the line's B or the arc's end. Trim/extend curve, regenerate and save requests the first exact intersection with the selected finite line, circle or endpoint arc. The boundary is never extrapolated. The other endpoint and original traversal are retained. Trim must shorten the curve; Extend must lengthen it beyond the chosen endpoint. Endpoint/no-op, parallel, coincident and unrepresentable intersections refuse.

For a construction-line exercise, add this entity inside plate-outline in the face-sketched plate example, then regenerate and save the source:

{id: "guide", type: "line", construction: true,
  a: {x: 0, y: 2}, b: {x: 14, y: 2}},

Select design A2, sketch plate-outline, line guide, boundary right, endpoint B, Trim and revision trim-2. Its end moves exactly to [12, 2]; the construction flag, source comments, attachment and plate solid remain intact. Starting the guide at end [10, 2] exercises Extend instead. Construction lines cannot substitute for selected solid-profile edges.

The browser supplies selections, not coordinates or a proof. Native preparation uses captured inputs and pinned imports, compares the complete recompiled definition and regenerates before atomic saving. An edit that opens a solid profile refuses. Linked endpoints, affected constraints and dependent references may require repair; no snapping or implicit shared-point movement is performed. Opt-in native history also covers these saves. Do not mix this draft with other editor drafts; a refusal retains it, and an uncertain save requires reloading. This is not a new Grid formula or a Supported geometry promotion.

Unfinished sketch drafts (Experimental)

In an editable model, load saved source, enter the complete CAD source and choose Save unfinished CAD draft. The native owner checks the bounded typed description, but does not claim that it forms a solid. The draft checkpoint retains source, pinned libraries and input mapping across restart. Use Reopen checkpoint after restart to restore its native ownership. Generic model upload is not a shortcut for selected CAD draft admission.

You can begin with an empty sketch, without inventing a profile or body. Paste this complete source into the CAD source editor and save it as an unfinished draft:

INPUT A1 = 4

A2 = CAD.DESIGN({
  schemaVersion: 2, id: "part", revision: "draft-1", lengthUnit: "mm",
  parameters: [CAD.PARAMETER({id: "depth", ownership: "input",
    value: {kind: "length", value: A1, unit: "millimeter"}
  })],
  datums: [CAD.DATUM({id: "xy", frame: {
    origin: [0, 0, 0], xAxis: [1, 0, 0], yAxis: [0, 1, 0], zAxis: [0, 0, 1]
  }})],
  sketches: [CAD.SKETCH({id: "outline", datumId: "xy", entities: []})],
  profiles: [], features: [], bodies: []
})
A3 = CAD.EVALUATE(A2, "bodies")

Use Save draft changes as you add entities and then profiles, features and bodies. The definition must remain structurally valid: references cannot point to missing entities, and an empty profile boundary is not valid. There is no solid to complete, measure or export while the downstream lists are empty. This is code editing in the workbench, not a new point-and-click sketch tool. The input is retained as an explicit CAD parameter before a feature uses it; the selected source workflow's existing numeric-input contract still applies.

For a concrete exercise, use the face-sketched plate example above, changing the bottom line's end from [12, 0] to [14, 0] before saving as a draft. Select Trim/extend authored curve, design A2, sketch plate-outline, line bottom, boundary right, Trim, endpoint B and a new design revision. The native edit closes the outline at [12, 0]; Trim/extend curve and save draft still saves a draft, not a solid. Source, parameter and other sketch edits likewise preserve draft status.

With no unsaved edits, choose Complete saved draft. Fresh native admission and full regeneration must succeed before measurements or STEP export become available. A refused completion leaves the saved draft unchanged. Even a closed outline has no geometry authority until that explicit completion succeeds.

Optionally enable Keep native undo history before draft saves or completion. Undo/redo restores draft or solid status along with source and pinned libraries. Undoing completion restores a draft with no geometry authority; redoing it must regenerate successfully at current input overrides. The same 16-entry/2 MiB history limits apply. A failed save requires an explicit saved-revision check or reload before continuing in the editor. Recording off clears prior history. This workflow admits bounded unfinished descriptions, including initial empty sketches, not arbitrary unsupported geometry or a design with no datum and sketch.

Straight-edged regions with holes (Experimental)

The holed-plate example authors a six-edge L-shaped outline, two square holes and an independent rectangular base. In the CAD source editor, load the current model, paste the complete example and choose Regenerate and save source. Inspect its inputs, select result A3 and body plate, then measure or download native STEP. Change input A1 to edit thickness and regenerate. After a host restart, explicitly reopen the saved checkpoint before measuring it again.

Reopen checks compiled geometry against the saved source, not only matching file hashes. Substituted compiled definitions and persisted overrides of formula-owned CAD outputs refuse; measurement and export do not use those rejected checkpoints.

After a CAD source operation is selected, the host's /metrics endpoint exposes grid_cad_source_ counters for outcomes, refusals, logical work, elapsed seconds and request/response bytes, plus active-request and reserved-request-body-byte gauges. Labels are a fixed operation vocabulary, never model or geometry IDs. Ordinary formulas do not activate this telemetry. Reserved request bytes are not retained geometry memory, allocator overhead or process RSS; those broader memory and optimized performance measurements remain unfinished.

The plate's area is 76 mm² and its volume is 304 mm³ at thickness 4 mm, or 456 mm³ at 6 mm. base remains a separate body; overlapping bodies are not joined. Measurements are accuracy-checked interval midpoints of the exact line/plane boundary, not mesh estimates. The selected native profile method is shown with the measurements. STEP preserves straight edges, planar faces and hole trims without a faceted fallback; external-application interoperability has not been established for this new profile export.

This selected source route retains 1–32 mm extrusion depth and a 256 mm coordinate ceiling, at most 256 sketch lines and boundary IDs per profile, 32 holes, and 128 UTF-8 bytes per identifier, with additional aggregate work, storage and output refusals. These are admission ceilings, not a supported scale, speed or physical-memory envelope. Geometry validation may refuse within them. Mixed line/arc/spline regions, target-body Boolean operations, general-angle frames, mesh preview and collision certification remain unavailable in this broader profile family. M2 is not complete and no capability is promoted.

Development now includes a separately selected native proof for closed line/cubic Bézier regions with holes. It checks whole curves and integrates their area and centroid exactly before enclosing the results in numeric bounds; it does not replace splines with line segments. A selected native prototype now extrudes those regions and exports exact spline carriers to STEP, refusing unrepresentable topology subdivisions or lossy decimal formatting. Explicit native measurement now supplies analytic volume/centroid bounds and adaptively certified surface-area bounds, and placement retains exact carriers through the existing 24 signed-axis orientations with exactly representable translation. This does not add general-angle rotation or a physical performance envelope. An explicit native typed-definition API also binds source identity, checks retained storage, and caches each body's own measurements. Selected native mixed-body sets can combine these families and attach dependent sketches to polynomial start/end caps and proven straight sides. Selected description admission now bounds line/cubic sketch construction, including control-coordinate errors; constructing a description does not prove or regenerate a solid. An explicitly selected internal Core resident API now regenerates admitted spline bodies from authored source, reuses unchanged results and binds measurements/STEP to that owner. The existing source editor now selects that recipe for admitted line/cubic regions and holes, including native control-point patches, source save/reopen and exact STEP. The spline-plate example has exact net area 153/32 mm² on a rectangular support. The displayed native method separates bounded analytic volume/centroid from adaptively bounded surface area; it supplies no mesh-preview or collision certificate. Linked line/cubic sketches may declare exact point links and already-satisfied endpoint coincidence; this verifies incidence, not general constraint solving. Split authored line can split top in the spline plate at (1, 3), preserving spline controls, the cubic hole, links and coincident metadata through save/reopen. Other affected constraints require repair. A straight authored side such as plate-pad:side:top can now support a dependent sketch, including when the parent has spline holes. Its complete native surface and edge carriers must prove an exact planar chart; curved sides such as plate-pad:side:curve still refuse. To reverse the example's dependency, give plate-outline datum xy, give base-outline datum support, and change the reference target to body plate, topology plate-pad:side:top. This mounts an independent rectangle on the side's plane; it does not trim the rectangle to the face or join the bodies. General-angle frames, mixed arcs and general spline constraint solving still refuse. No additional syntax, command or Supported geometry envelope is introduced; full M2 remains open.

Whole-circle regions with circular holes (Experimental)

The circular-plate example uses one radius-10 circle and two disjoint radius-1/radius-2 circular holes. Each boundary contains exactly one circle ID. The plate's area is 95π mm². Its sketch follows the rectangular base's base-pad:cap:end plane; the base remains an independent solid, not a Boolean union or subtraction. Attachment to a plane does not assert footprint containment or physical assembly clearance.

In the CAD source editor, save the complete example, inspect inputs, select result A3 and body plate, and measure or download STEP. At thickness 4 mm, volume is 380π mm³ and centre is [6/95, -12/95, 6] mm. Changing A1 to 6 regenerates volume 570π mm³ and centre [6/95, -12/95, 9] mm. Fresh-process reopening preserves the saved source and identical STEP bytes. Reopen refuses substituted compiled depth, geometry family or attachment and formula-owned output overrides, even if saved source/compiled-byte hashes are self-consistent.

Native geometry uses exact rational circular spans and swept surfaces, not a faceted circle approximation. Measurements use bounded analytic π calculations and are displayed as certified_circular_profile_analytic_midpoints. This body-result method is not accepted as a legacy whole-part measurement. Neither the measurement nor STEP export supplies a mesh-preview or collision certificate.

The selected source policy permits at most 33 circles in a region (one outer and up to 32 holes), 794 native records and the existing 1–32 mm depth and 256 mm coordinate ceilings. Holes must be strictly contained and pairwise disjoint; touching, crossing, mixed curve families, arcs, splines and unproved representations refuse. A region that passes geometry checks may still exceed aggregate work/storage or the source editor's 64 KiB STEP limit. No supported scale/latency/RSS envelope or external-application interoperability is claimed. The older explicit rectangle/linear APIs retain their circle refusals.

In this selected body-result path, a datum may name a literal parentDatum or an attachment, but not both. An attachment names a CAD.REFERENCE in the same design's references collection. The reference must name the same design ID and revision and select a datum or an exact planar face of a declared body:

# This is a description fragment; the supporting body belongs to the full design.
A6 = CAD.REFERENCE({
  id: "mounting-face",
  source: {designId: "bracket", revision: "draft"},
  target: {kind: "face", bodyId: "base", topologyId: "base-pad:cap:end"}
})

For the admitted rectangular extrusion, the native end-cap ID derives from its feature ID as shown above. Use a datum whose attachment is "mounting-face"; its local frame is composed with the actual native face's origin and axes. Editing the supporting extrusion then moves the dependent sketch. This selects the supporting plane, not clipping to the trimmed face, and creates a separate New body rather than joining it to the support. Missing, stale, foreign or cyclic attachments refuse; no nearest-face replacement occurs. Identifiers must be literal, nonblank, control-free and at most 128 UTF-8 bytes. External model IDs, edge attachments and broader angles are not admitted by this source path. The face-attached parts example demonstrates a base and a separate tab that follows the base's end face. In the selected source editor, measure or export the base and tab declarations individually. Regenerate-and-save realizes the prospective geometry with retained input overrides before replacing the saved checkpoint. A missing face refuses the save; reload the previous checkpoint explicitly to inspect its last-good geometry. Source editing, native measurement/STEP and fresh-process reopening are covered locally. This remains Experimental, not a joined mounting bracket, unrestricted face attachment or a supported performance envelope.

The selected dependent-profile path combines face attachments with straight-edged regions and holes. For a profile support, use semantic roles <feature>:cap:start, <feature>:cap:end or <feature>:side:<line-id>; position-based native truck:sN:fN IDs are refused. Cap roles use the feature's sketch chart at the cap height (start reverses Y/Z), so reordering boundary edges does not rotate the attachment. Side roles follow the named authored line and must match one exact native face. Removed or renamed lines require reference repair. Only signed-axis planar charts are admitted; no nearest-face or general-angle approximation is used. These selections choose an untrimmed support plane, not a Boolean join or an assurance that parts do not overlap.

The face-sketched holed-plate example places plate on base-pad:cap:end, with its parent declared after its child. Load and save the complete example in the CAD source editor, inspect inputs, select result A3 and body plate, and measure or download STEP. At thickness 4 mm the plate has volume 304 mm³ and centre [5, 78/19, 6] mm; changing A1 to 6 moves its centre to [5, 78/19, 9] mm and gives volume 456 mm³. The base remains a separate body with volume 768 mm³ and centre [8, 4, 3] mm at 6 mm.

Local real-process editor/host tests exercise that workflow and the reverse direction: a rectangular base attached to the holed plate's plate-pad:cap:end. Both survive fresh-process reopening with unchanged STEP bytes. After a host restart, load the saved source and explicitly choose Reopen checkpoint after restart before editing, measuring or exporting; loading source alone is not native geometry admission. Do not use that recovery action for an already-live owner. Invalid face roles refuse saving without replacing the checkpoint; reload the retained source explicitly. Reopen also rejects substituted compiled depth, geometry family or attachment, even with self-consistent hashes, and overrides of formula-owned CAD outputs. No supported capability, general desktop/browser coverage, or completed bracket/enclosure is claimed.

Declarations compile to guarded compiled formula. Ordinary runtime loading refuses execution with CAD_EVALUATION_UNAVAILABLE. No geometry, result, export or public request is enabled by compiling the declaration. The native selected execution contract remains Experimental; no geometry capability is promoted by this syntax. This is a compiler-owned declaration, not a new runtime builtin, and it is intentionally absent from the callable function catalog. Description-only programs keep their existing runtime behavior.

Remaining execution work

These constructors do not expose a resident geometry handle. Selected CAD.EVALUATE recipes and source-preserving workbench saves already exist within the Experimental envelopes described above. Broader native family composition and controlled external-reference resolution keep their explicit limits. Local M2 lifecycle acceptance passes; R5 retains the measured rational- machining save latency gap and unrun optimized Host scope. Description construction alone does not select those geometry or persistence operations. Existing CAD_MASS_PROPERTIES, CAD_VOLUME, CAD_SURFACE_AREA and CAD_CENTER_OF_MASS still read explicitly published native snapshots; description construction does not change their snapshot semantics.