add_drill_pattern
Drill multiple threaded, clearance, or counterbore holes at specified positions using ISO metric standards. Accepts face or plane selection, blind or through-all end conditions.
Instructions
Patrón de barrenos (drill pattern) — drill N holes at specified positions using ISO Metric standards.
Junior workflow: "drill 4 M8 tapped holes in the corners of this plate, 15mm deep". Builds the equivalent of N hole_wizard calls in one go, with bore diameters from ISO 2306 (tap), ISO 273 (clearance), ISO 4762 (counterbore for socket-head cap screws).
Args: hole_type: 'tap' (rosca / threaded), 'clearance' (paso para perno / pass-through), 'counterbore' (refrentado / recess for socket-head cap screws). size: ISO M5–M12 nominal. Tap + clearance accept M5/M6/M8/M10/M12; counterbore accepts M5/M6/M8/M10 (M12 not in v1). positions_mm: List of [x_mm, y_mm] points in the plane/face local frame. Minimum 1 point. No duplicates within 0.01mm. plane: Plane name — 'front'/'top'/'right' (lowercase English), Spanish UI ('Alzado'/'Planta'/'Vista lateral'), or a user-created plane ('Plano1'). Mutually exclusive with face_centroid_mm. face_centroid_mm: Face centroid from list_faces() — mutually exclusive with plane. Use this for face-anchored drilling (e.g. mounting holes on a body's top face). end_condition: 'blind' (depth-controlled, depth_mm required) or 'through_all' (passes through the body, depth ignored). depth_mm: Hole depth for blind. Required if end_condition='blind'. counterbore_depth_mm: CBORE recess depth (only for hole_type= 'counterbore'). Defaults to ISO 4762 head height for the size (M5→5, M6→6, M8→8, M10→10).
Returns dict: feature_names: 1 entry for tap/clearance, 2 for counterbore (the bore + the recess). hole_count: number of holes drilled. hole_diameter_mm: bore diameter (from ISO lookup). counterbore_diameter_mm: only for counterbore (else None). counterbore_depth_mm: actual depth used (else None).
Caveat (v1): holes show as 'Cortar-Extruir' features in the SW feature tree, NOT as 'Taladro roscado' / 'Refrentado' Hole Wizard features. No cosmetic threads (rosca visualization). For a single hole with proper Hole Wizard styling + cosmetic threads, use hole_wizard directly. This composite is for multi-position patterns where hole_wizard's single-hole-per-call limit makes it impractical.
Example — 4× M8 tap holes in a 50x50 plate's corners: add_drill_pattern( 'tap', 'M8', positions_mm=[[10, 10], [40, 10], [10, 40], [40, 40]], plane='front', end_condition='blind', depth_mm=15, )
Example — 2× M6 counterbore on the top face of an existing body: faces = list_faces() top = max((f for f in faces if f['normal'][2] > 0.9), key=lambda f: f['centroid_mm'][2]) add_drill_pattern( 'counterbore', 'M6', positions_mm=[[20, 20], [60, 20]], face_centroid_mm=top['centroid_mm'], end_condition='blind', depth_mm=10, )
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| size | Yes | ||
| plane | No | ||
| depth_mm | No | ||
| hole_type | Yes | ||
| positions_mm | Yes | ||
| end_condition | No | blind | |
| face_centroid_mm | No | ||
| counterbore_depth_mm | No |