add_bolt_circle
Creates a bolt circle pattern of holes in a single sketch and extrude cut. Specify center, bolt circle diameter, hole count, and individual hole diameter.
Instructions
Agregar un círculo de pernos — N barrenos en círculo, en una operación.
Composes a single sketch with N circles placed at (cx + r·cos θ, cy + r·sin θ) plus one extrude_cut. Sketch-based (not feature-pattern- based) so it works for any center position — not restricted to origin-centered geometry.
Args: plane: Sketch plane. Same name conventions as other composites. center_x_mm, center_y_mm: Center of the bolt circle in sketch coords. circle_diameter_mm: Diameter of the bolt circle (the imaginary circle the BOLT CENTERS sit on — NOT the individual hole diameter). Must be > 0 and > hole_diameter_mm. hole_count: Total number of holes (3..24 typical). Must be >= 3. hole_diameter_mm: Individual through-hole diameter. Must be > 0 and < circle_diameter_mm. angle_offset_deg: Rotation of the first hole from the +X axis. Default 0 = first hole on the +X side. Useful for aligning bolt patterns to existing geometry. end_condition: "through_all" (default) or "blind" with depth_mm. depth_mm: Required when end_condition="blind". reverse_direction: Flip the cut direction (escape hatch for when the parent body sits on the opposite side of the sketch plane and the holes would cut into air). Same semantics as extrude_cut. target_bodies: Restrict the cut to these body names (from get_active_part_info "bodies"); None lets SW cut every body the holes intersect — pass a list to scope a through pattern in a multi-body part.
Returns the resulting Cut-Extruir Feature info (single feature for all N holes — they share one sketch).
Caveat: NOT parametric. Changing hole_count requires deleting the feature and re-running the composite. For parametric counts use create_reference_axis + circular_pattern (origin-only axes for now).
Example — 6-bolt M8 clearance (8.5mm) on a O60mm bolt circle, Top plane: add_bolt_circle("top", 0, 0, 60, 6, 8.5)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| plane | Yes | ||
| depth_mm | No | ||
| hole_count | Yes | ||
| center_x_mm | Yes | ||
| center_y_mm | Yes | ||
| end_condition | No | through_all | |
| target_bodies | No | ||
| angle_offset_deg | No | ||
| hole_diameter_mm | Yes | ||
| reverse_direction | No | ||
| circle_diameter_mm | Yes |