build_flange_boss
Creates a cylindrical boss on a specified plane, with optional through-bore centered on the boss. Ideal for flanges, bearing seats, and similar features.
Instructions
Crear un saliente cilíndrico (con barreno opcional pasante).
Junior workflow: "agrega un saliente de O40mm x 8mm en el centro, con barreno O20mm". Composes a sketch+circle+extrude_sketch for the boss, plus an optional sketch+circle+extrude_cut for the through bore.
Args: plane: Sketch plane the boss sits on. Same name conventions as build_rectangular_pocket. center_x_mm, center_y_mm: Boss center in sketch coords. outer_diameter_mm: Outer diameter of the boss cylinder. > 0. height_mm: Boss extrusion height (positive). bore_diameter_mm: If set, drills a through-bore at the boss centerline. Must be > 0 and < outer_diameter_mm. The bore is colinear with the boss by construction (same sketch plane, same center coords). 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. bore_target_bodies: Restrict the through-bore to these body names (from get_active_part_info "bodies"). None (default) lets SW cut every body the bore intersects — pass [the boss/parent body] to stop the through_all bore from punching unintended bodies in a multi-body / multi-wall part (the caveat below).
Returns: {"boss": Feature info, "bore": Feature info | None}.
Caveat: the bore (when requested) goes "through_all" so it punches through everything in its path unless bore_target_bodies scopes it. For blind bores, call extrude_cut separately after this composite.
Example — bearing seat O40mm x 8mm with O20mm through-bore on Top plane: build_flange_boss("top", 0, 0, 40, 8, bore_diameter_mm=20)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| plane | Yes | ||
| height_mm | Yes | ||
| center_x_mm | Yes | ||
| center_y_mm | Yes | ||
| reverse_extrude | No | ||
| bore_diameter_mm | No | ||
| outer_diameter_mm | Yes | ||
| bore_target_bodies | No |