millisketch

Sketch

Sketch a shape

add_sketch_shape

Draws a rectangle, circle or polyline on the sketch.

EditorTools tabAgentMCP
Needs
Nothing to pick: it works on the whole document.
In the editor
Sketch: Line (L), Rectangle (R) and Circle (C), placed by taps, or by typing a line's length and angle, a rectangle's width and height or a circle's diameter while drawing.
Tools tab
A form of its inputs, filled from what is picked; Run makes the change, one step to undo.
Agent and MCP
The chat's agent and MCP clients call add_sketch_shape, each call one step to undo. Over MCP it also takes project, editor and request_id.

What it does

A closed shape on the sketch, which lies on the ground plane: a rectangle by its lower-left corner (x, y) and its size (w, h); a circle by its centre (cx, cy) and its diameter; a polyline by its corners in order, closed back to the first. The reply gives the shape's id, which Extrude a profile and Revolve a profile take.

A closed shape drawn directly inside another becomes a hole through it when the outer one is extruded.

Inputs

As the agent and MCP clients send them. One left out takes the default its description gives.

InputTypeWhat it is
kindneededone of "rect", "circle", "polyline"Shape.
xnumberCorner X, in mm.
ynumberCorner Y, in mm.
wnumberWidth, in mm.
hnumberHeight, in mm.
cxnumberCentre X, in mm.
cynumberCentre Y, in mm.
diameternumberDiameter, in mm.
pointsa list of 3 or more [x, y]Corners, in mm.

Limits

  • No arcs, fillets or splines, and no constraints: retyping a length moves that edge's end and nothing else follows.
  • One sketch, on the ground plane: not on a body's face or another plane. Shapes stay in the sketch after a body is made from them.

Examples

An 80 × 20 mm bar's outline, centred on the origin

Given: An empty document.

add_sketch_shape { "kind": "rect", "x": -40, "y": -10, "w": 80, "h": 20 }

Then: A rectangle from (-40, -10) to (40, 10).

A 6 mm hole near one end

Given: A sketch holding a 40 × 20 mm rectangle centred on the origin (id plate) with a 6 mm circle in its middle (hole), and a 4 mm square (ring) 30 mm along X.

add_sketch_shape { "kind": "circle", "cx": -14, "cy": 0, "diameter": 6 }

Then: A circle inside the plate's outline: a second hole through it once the plate is extruded.