diff --git a/designs/drum_tension_lug/family.json b/designs/drum_tension_lug/family.json new file mode 100644 index 0000000..b9b2a66 --- /dev/null +++ b/designs/drum_tension_lug/family.json @@ -0,0 +1,8 @@ +{ + "family": "drum_tension_lug", + "standard": null, + "base_plane": "XY", + "description": "Drum-shell tension lug: a radiused cast body that bolts to the shell with two centreline screws and receives the tension rod in a threaded insert bore at the head end (both ends for a double-ended tube lug).", + "source": "SD Sparedrum L-series lug catalogue (body, hole spacing, mount + rod bores); Pearl spare-parts catalogue rod threads; proportion for corner radius", + "contributor": "BenchCAD-org" +} diff --git a/designs/drum_tension_lug/part.py b/designs/drum_tension_lug/part.py new file mode 100644 index 0000000..4beeb63 --- /dev/null +++ b/designs/drum_tension_lug/part.py @@ -0,0 +1,43 @@ +"""drum_tension_lug — the parametric part. + +A drum-shell tension lug: a compact cast/chromed body that bolts to the outside +of the drum shell and receives the tension rod that tightens the drumhead. The +body sits on the shell (z=0, extending radially out in +Z), is mounted by two +screws on its centreline into the shell, and carries a rod-thread insert bore at +the head end (both ends when it is a double-ended tube lug). Corners are radiused +for the cast look. + +Interface + examples: docs/DESIGN_SPEC.md +""" + +import cadquery as cq + + +def build(body_len, body_h, body_w, hole_spacing, mount_hole_d, rod_bore, fillet_r, double_ended): + # cast body, sitting on the shell face (z=0), extending radially out to z=body_h + result = cq.Workplane("XY").box(body_w, body_len, body_h).translate((0.0, 0.0, body_h / 2.0)) + result = result.edges("|Z").fillet(fillet_r) + + # two mounting screws on the centreline, blind up from the shell face + result = ( + result.faces("Y") + .workplane(centerOption="CenterOfBoundBox") + .hole(rod_bore, depth=body_len * 0.45) + ) + if double_ended: + # tube lug: a second rod bore at the opposite end + result = ( + result.faces(" list[str]: + """Engineering constraints (empty = valid). Each cites its rule.""" + bad = [] + + # mounting holes must sit on the body with edge material at both ends + if p["hole_spacing"] > p["body_len"] - 12.0: + bad.append("hole_spacing > body_len-12: mounting holes need >=6 mm edge to each end") + + # the two mounting holes must not merge into one + if p["hole_spacing"] < p["mount_hole_d"] + 4.0: + bad.append("hole_spacing < mount_hole_d+4: the two mounting holes would break through") + + # corner radius must be under half the smaller footprint dimension + if p["fillet_r"] > 0.4 * min(p["body_w"], p["body_len"]): + bad.append("fillet_r > 0.4*min(body_w,body_len): corner radius too large for the footprint") + + # mounting hole leaves body wall across the width + if p["mount_hole_d"] > p["body_w"] - 6.0: + bad.append("mount_hole_d > body_w-6: <3 mm wall beside the mounting hole") + + # rod bore leaves body wall through the height + if p["rod_bore"] > p["body_h"] - 6.0: + bad.append("rod_bore > body_h-6: <3 mm wall around the rod insert") + + return bad