pocketCut a recess into a solid by removing a pad-shaped volume of specified length. Handles through-wall cuts, shelled bodies, and warns if the cut removes nothing or the entire body.
Instructions
Subtract a pad of length mm from the body. through_all ignores length.
through ('wall'|'body'): preferred over through_all. 'wall' ray-casts the
body to find the first exit boundary and cuts exactly one wall thick —
correct for solids (one wall = full thickness) AND shelled bodies. 'body'
is the legacy ThroughAll; on a shelled body it punches through every wall
and ruins the cavity. Implies direction='into_body'. Result carries
wall_depth_mm so the caller can verify.
direction (preferred over reversed): 'into_body' makes the cut actually
remove material; 'away_from_body' extrudes outside the body. The tool
probes both Reversed values and picks the one matching intent.
reversed: legacy raw flag, used only if neither through nor direction
is set.
strict: raise instead of warning on a degenerate pocket (see below).
Returns {handle, name, volume, removed_volume, volume_ratio}, plus
warnings ONLY when the pocket removed the whole body or removed nothing
(the same two degenerate outcomes as boolean_op's cut). Warn-don't-fail is
the default; pass strict=True in a scripted recipe to turn both into an
error instead. direction='away_from_body' is an explicit request to remove
nothing, so it never warns and never raises.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | ||
| length | No | ||
| sketch | Yes | ||
| strict | No | ||
| through | No | ||
| reversed | No | ||
| direction | No | ||
| through_all | No |