build_threaded_boss
Creates a cylindrical boss with a centered ISO metric threaded hole for mounting screws or inserts. Supports blind or through tap.
Instructions
Saliente roscado — cylindrical boss with a centered tap hole, in one call. Standard autoparts pattern: torres roscadas en carcasas (threaded posts on housings), salientes para tornillos, mounting bosses on stamped/cast brackets, sensor mounts.
Junior workflow: "agrega un saliente roscado M8 en el centro, Ø20mm × 12mm de altura, rosca 10mm". Composes: outer disk -> extrude_sketch (the boss body) tap hole -> extrude_cut (ISO 2306 tap-drill diameter)
Args: plane: Sketch plane — "front"/"top"/"right" (English) or "Alzado"/"Planta"/"Vista lateral" (Spanish), or a custom "Plano1" returned by create_reference_plane. center_x_mm, center_y_mm: Boss center in sketch coords. outer_diameter_mm: Boss OD. Must be > 0 and > tap-drill diameter (the boss must have a wall around the tap). height_mm: Boss extrusion height. Must be > 0. thread_size: ISO Metric — 'M5' | 'M6' | 'M8' | 'M10' | 'M12'. The tap-drill diameter is looked up from ISO 2306 coarse- pitch (M5 → 4.2, M6 → 5.0, M8 → 6.8, M10 → 8.5, M12 → 10.2). thread_depth_mm: Tap depth in mm. Default = 0.8 × height_mm (leaves 20% of the boss as solid base — typical for cast/ machined bosses). Must be ≤ height_mm if blind. end_condition: 'blind' (depth-controlled, default) or 'through_all' (passes through the boss + any material below). reverse_extrude: If True, the boss grows opposite the SW-default direction along the sketch plane normal. Useful when the boss should sit on the opposite side of the parent body. tap_target_bodies: Restrict the tap cut to these body names (from get_active_part_info "bodies"); None lets SW cut every body the tap intersects. Pass [the boss/parent body] to keep a through_all tap from punching unintended bodies below it.
Returns dict: boss: Feature info for the cylinder (type=boss_extrude). tap_hole: Feature info for the tap (type=cut_extrude). thread_size, tap_drill_diameter_mm, thread_depth_mm: echo back the standard data for LLM verification.
Caveat (v1): the tap hole shows as a 'Cortar-Extruir' feature, NOT a 'Taladro roscado' Hole-Wizard feature. No cosmetic threads (rosca visualization). For a Hole-Wizard tap with cosmetic threads, use hole_wizard directly on the boss face after building the boss with build_flange_boss.
Example — M8 threaded boss on top face, Ø20×12mm, 10mm tap: build_threaded_boss('top', 0, 0, 20, 12, 'M8', thread_depth_mm=10)
Example — M6 through-tapped boss for a brass insert: build_threaded_boss('top', 25, 0, 16, 8, 'M6', end_condition='through_all')
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| plane | Yes | ||
| height_mm | Yes | ||
| center_x_mm | Yes | ||
| center_y_mm | Yes | ||
| thread_size | Yes | ||
| end_condition | No | blind | |
| reverse_extrude | No | ||
| thread_depth_mm | No | ||
| outer_diameter_mm | Yes | ||
| tap_target_bodies | No |