Create parametric mechanical components — enclosures, gears, snap-fits, hinges, dovetails, and labels. Use when the user wants to generate a ready-made functional component with configurable dimensions.
Help the user create ready-made functional components with configurable parameters. These tools generate complete parts that can be used standalone or combined with other models.
| Tool | Use Case |
|---|---|
create_enclosure | Electronics project boxes with snap or screw lids |
create_gear | Involute spur gears with configurable module, teeth, bore |
create_snap_fit | Cantilever snap-fit joints for tool-free assembly |
create_hinge | Two-part pin hinge assemblies |
create_dovetail | Male or female dovetail joints for interlocking parts |
generate_label | 3D-printable labels with text and optional QR codes |
measure_model to verify dimensionsanalyze_printability to confirm FDM suitabilitycombine_models to integrate with other partscreate_enclosure generates a body and lid as separate models (name_body and name_lid).
Lid types:
"snap" — Snap-fit ridge on lid, groove on body (no screws needed)"screw" — Corner screw posts with holesFeatures (JSON array):
"vent_slots" — Ventilation slots on side walls"cable_hole" — Cable passthrough hole"mounting_tabs" — External mounting tabs with screw holes"screw_posts" — Internal corner screw postsExample:
create_enclosure(name="project_box", inner_width=80, inner_depth=50,
inner_height=30, wall=2.0, lid_type="snap",
features='["vent_slots", "cable_hole"]')
create_gear uses bd_warehouse's involute gear profile for accurate tooth geometry.
Key parameters:
module — Tooth size (1.0 = small, 2.0 = medium, 3.0 = large). Meshing gears must share the same module.teeth — Number of teeth. More teeth = larger gear, smoother motion.pressure_angle — Usually 20° (standard) or 14.5° (legacy). Keep at 20° for FDM.bore — Center hole diameter for shaft mounting.Gear ratio: ratio = teeth_driven / teeth_driver. E.g., 40T driven by 20T = 2:1 ratio.
Example — 2:1 gear pair:
create_gear(name="driver", module=2.0, teeth=20, thickness=8, bore=5)
create_gear(name="driven", module=2.0, teeth=40, thickness=8, bore=5)
create_snap_fit creates cantilever beam snap-fit clips. Pass params as JSON:
beam_length — Length of the cantilever beam (longer = more flexible)beam_width — Width of the beambeam_thickness — Thickness (thinner = easier snap, but weaker)hook_depth — Depth of the hook catchFDM tip: Print with the beam oriented vertically for best layer adhesion along the flex axis.
create_hinge generates two interlocking leaves (name_leaf_a and name_leaf_b) with a shared pin hole.
Parameters (JSON):
leaf_width, leaf_height, leaf_thicknesspin_diameter — Add 0.2mm clearance for FDMnum_knuckles — More knuckles = stronger but harder to printcreate_dovetail generates male or female dovetail joints.
dovetail_type="male" for the protruding keydovetail_type="female" for the receiving slotclearance=0.2 for FDM printing tolerancecombine_models to boolean-subtract the female shape from your partgenerate_label creates a flat plate with raised text, optionally with a QR code.
size — JSON array [width, height, thickness] in mmfont_size — Text height in mm (8-12 works well for FDM)qr_data — Optional URL or text to encode as QR code on the labelExample:
generate_label(name="wifi_label", text="Guest WiFi", size="[60, 30, 2]",
font_size=8, qr_data="WIFI:T:WPA;S:MyNetwork;P:password123;;")