hole
Drill a parametric cylindrical cutout from a sketch with configurable depth, counterbore, countersink, threading, and through-wall direction.
Instructions
Drill a parametric Hole from a sketch (one or more circles).
sketch: handle of a sketch placed on a face of an existing body feature.
depth_type: 'Dimension' (use depth) or 'ThroughAll'.
cut_type: 'None' | 'Counterbore' | 'Countersink' | 'Counterdrill'.
When non-None, cut_diameter (head clearance) and cut_depth apply.
threaded=True applies a tap. thread_type / thread_size are COUPLED enums —
valid thread_size values DEPEND on thread_type ('M4' fits 'ISOMetricProfile'
but not 'UNC'). Use list_thread_options() to discover thread_type values
and list_thread_options(thread_type=...) for that type's valid sizes.
intended_for ('print'|'machine'|'drawing'): drives ModelThread default when
threaded=True so the caller doesn't have to know what ModelThread means.
print → ModelThread=True. Required for 3D-printed threaded holes —
the screw must engage the printed thread geometry; a smooth
pilot won't tap itself.
machine → ModelThread=False. CAM software reads thread metadata and
drives a physical tap. Modeling thread bloats files and
fights patterns/fillets.
drawing → ModelThread=False. Drawings annotate threads symbolically.
Explicit model_thread overrides intended_for.
through ('wall'|'body'): preferred over depth_type/depth. 'wall' ray-casts
to the first exit boundary and drills exactly one wall thick — critical on
shelled bodies where 'body' (ThroughAll) would destroy the cavity. Implies
direction='into_body'. Result carries wall_depth_mm.
direction (preferred over reversed): 'into_body' picks the Reversed value
that actually removes material; 'away_from_body' picks the value that
removes none. Hole and Pocket interpret the raw flag differently.
reversed: legacy raw flag, used only if neither through nor direction
is set.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Hole | |
| depth | No | ||
| sketch | Yes | ||
| through | No | ||
| cut_type | No | None | |
| diameter | No | ||
| reversed | No | ||
| threaded | No | ||
| cut_depth | No | ||
| direction | No | ||
| depth_type | No | ThroughAll | |
| thread_size | No | ||
| thread_type | No | ||
| cut_diameter | No | ||
| intended_for | No | ||
| model_thread | No |