millisketch

Sketch

Extrude a profile

extrude_profile

Pulls a sketch shape up into a body, the shapes inside it as through holes.

EditorTools tabAgentMCP
Needs
A closed profile picked in the sketch.
In the editor
Sketch, a closed profile picked: Extrude, its distance typed, with a box to keep the shapes inside it solid.
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 extrude_profile, each call one step to undo. Over MCP it also takes project, editor and request_id.

What it does

A body made by pulling a closed shape up off the ground plane by the height asked. Closed shapes directly inside it are cut out as through holes, unless cut_holes is false; a profile and its inward offset make a wall.

The body's origin is the sketch's origin: a profile drawn centred on the origin places like any other body, and a position moves it from where it was drawn.

Inputs

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

InputTypeWhat it is
shapeneededstringThe id of the outer shape.
heightneedednumberHeight, in mm.
cut_holesbooleanCut out the shapes inside it.
position[x, y, z][x, y, z] in mm: where the middle of the body's underside goes, so z 0 stands it on the ground.
rotation[x, y, z][x, y, z] in degrees, applied in that order about the body's origin.
colorstring or null"#rrggbb"; null gives the default colour back.

Limits

  • The only way to a through hole is a profile inside a profile, or a tube: draw the holes before extruding. To add one to a body already made, draw it, extrude the outer shape again and delete the old body.
  • A profile that crosses itself, or holes that touch its edge, are refused with the reason. The body keeps the profile it was made from: changing the sketch afterwards does not change it.

Examples

A plate with a hole through its middle

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.

extrude_profile { "shape": "plate", "height": 4 }

Then: Extrude 1: a 40 × 20 × 4 mm plate with a 6 mm hole through it.