Skip to content
ShapeAnywhere Wiki
AI & MCP

Edit and measure existing models with AI

Edit existing features and parameter rows, use current references and distinguish body distances from supporting-plane separation.

Updated:

Continue editing existing bodies

AI can change supported parameters of an existing body while preserving its ID. It does not need to delete and recreate the model. First ask it to read cad_get_history. The response lists actual feature IDs, editable parameters, a current historyToken and existing Parametric Builder rows. Long histories are paginated; nextOffset points to the next page.

Supported direct changes

Existing stepSupported parametersBehavior
BoxWidth, height, depthWidth and depth stay centered locally; height preserves the local lower face
Circular cylinderDiameter and heightDiameter stays centered; height preserves the local lower face
HollowingWall thicknessA wall-thickness-only change preserves the outside shape
Face offsetSigned distanceRe-evaluates the same stored face selection
Text emboss with a saved recipeText, font size, depthPreserves the emboss group's location and saved operation

Example: “Increase the existing box wall thickness from 2.5 to 3 mm. Preserve the outside dimensions and all other bodies. Then check geometry and image.” AI uses cad_update_feature with the actual feature ID. The result is validated and committed as one step. Impossible hollowing or an invalid later feature leaves the previous body unchanged.

Dependencies and limitations

Simple native feature chains can follow their actual immediate hosts: for a base with an added cylinder and a through-hole in that cylinder, the boss follows the base top and the hole follows the boss. Inspect these relationships in cad_get_history.featureDependencies. Hole diameters, blind pocket depths and explicitly driven child dimensions remain independent. Unambiguous old links are conservatively updated on the next parameter rebuild. Ambiguous intersections, freeform geometry and independent pattern copies do not receive inferred constraints. Always verify the actual geometry and design intent, not only solid validity. From v743, unambiguous concentric bores that eliminate the wall of their cylindrical boss are rejected; advisory designChecks flag calculated walls below 0.8 mm, nearby/overlapping holes, side breakouts and submerged features. This does not replace a complete wall-thickness or printability analysis. Imported snapshots, direct-edit histories and other unsupported feature types may appear as read-only. Follow the returned capabilities; do not invent IDs or parameters. Existing tools such as targeted face offset may suit other shapes. Complete tool reference. From v745, newly appended simple CAD features (such as bores) are included in the saved parametric baseline when existing references remain valid. Complex inner-shell chamfers still require safe edge correspondence: fixed wall insets provide an additional candidate, not a guarantee for arbitrary shape changes. Ambiguous matches leave the existing body unchanged. From v746, clearly matching rectangular hollow-operation bounds and positions also follow the resized base feature. This helps inner edges preserve their intended offset from outer walls. Freeform shells and ambiguous edges remain protected. From v747, this fixed-inset matching also covers simple rectangular boxes saved without an explicit profile field (including boxes created through MCP), but only when a matching hollow feature follows immediately. Complex and unrelated geometry stays excluded.

Sketches as bosses, pockets or intersections

From v752, cad_extrude_sketch can apply an existing closed profile directly to a target body: operation=add adds material, cut makes a pocket and intersect keeps the common shape. All three require targetId. With no target and operation=new (the default), it creates a new body as before. An existing target retains its name; name is allowed only for a new body.

Example: A bracket reaches X=10 mm. A closed circle or slot sketch lies at X=10 with normal +X. distance=-5 and operation=cut cut exactly 5 mm against the sketch normal into targetId. The sketch must already have the intended world placement; this tool does not automatically project it onto a face. Side and oblique planes use the same normal extrusion construction.

The target retains its ID, earlier features and edge treatments. The new step returns featureId and stays linked to its source by default; saved parameter rows remain. linked=false detaches this new source relation. consume=true deletes an unshared source after successful verification and creates no link; sources already driving another body are protected. Invalid, empty or multiple-solid results and operations without a material change roll back entirely. Execution creates one undo step. Through-all and up-to-face are not yet supported distance modes; direct-edit histories are not allowed as targets.

Change existing parameter rows

For a body managed by Parametric Builder, AI uses cad_set_parameters with existing row IDs and absolute values in the reported unit (millimeters or degrees). Frozen rows and follower-only rows are not overwritten. Unknown IDs and conflicting changes are rejected. Example: “Set the saved hole-diameter parameter to 8 mm and verify the body.” cad_add_parameter registers new rows for an actually supported feature dimension or saved edge operation. They also appear in the normal CAD parameter panel. cad_update_edge_operation directly changes fillet/chamfer amount while the body is not managed by rows. Variables from an earlier cad_execute_program call do not automatically become saved model parameters. See CAD rows and sketch links.

Body list after source edits

From v753, a successfully verified linked sketch edit also updates the affected existing body's center and dimensions. Example: An intersection initially measures 10 × 8 × 10 mm. Widening its profile to 12 mm makes cad_list_bodies report 12 × 8 × 10 mm instead of the original carrier dimensions. Moved sources, saved parameter edits and undo keep the appropriate list values as well.

The list remains a quick query of stored metadata. Reading it does not repair older projects and does not replace validity, collision or print checks. Use cad_audit_project or cad_inspect_assembly to independently read the current geometry. A bounding-box center may move after a shape edit and is not a fixed design anchor.

Interpret distances correctly

cad_measure still measures between two explicitly supplied points. cad_measure_geometry adds two distinct modes: 1. Two body IDs return native minimum body distance. Touching or overlapping bodies have zero distance. cad_check_interference still reports overlapping volume. 2. Two selected planar faces with current topology tokens return their acute angle and, for parallel supporting planes, their separation. This plane separation is neither minimum trimmed-face distance nor an automatic global wall-thickness check. Example: “Check the smallest gap between lid and box. Then measure wall thickness between these parallel inside and outside faces.” Offset faces can have closely spaced supporting planes while their bounded surfaces are far apart. AI must name the measurement mode. Precision and dimensions.

Current references and approval

Read history or topology again after changing geometry or parameters. Stale tokens cause rejection rather than an edit to the wrong element. History and measurements are read-only. Editing retains CAD approval or deliberately enabled automation. Small local models can load editing, text or inspection through cad_load_tools. Choose a connection.