Complete
This commit is contained in:
+138
@@ -0,0 +1,138 @@
|
|||||||
|
/* ================================================================
|
||||||
|
Cable Grommet for Sheet Metal — TPU Print
|
||||||
|
================================================================
|
||||||
|
Protects cable insulation from sharp drilled-hole edges.
|
||||||
|
|
||||||
|
The grommet body fits inside the drilled hole while the two
|
||||||
|
flanges seat flush against each face of the sheet metal,
|
||||||
|
creating a smooth, rounded channel for the cable.
|
||||||
|
|
||||||
|
INSTALLATION:
|
||||||
|
Squeeze / fold the grommet (TPU flexibility makes this easy)
|
||||||
|
and press it through the hole until both flanges snap flat
|
||||||
|
against the sheet metal on each side.
|
||||||
|
|
||||||
|
TIPS FOR TPU PRINTING:
|
||||||
|
- 3–4 perimeters / walls for durability
|
||||||
|
- 20–40% infill
|
||||||
|
- No supports needed (prints flat on bottom flange)
|
||||||
|
- Slow print speed recommended (≤ 30 mm/s) for clean bridges
|
||||||
|
================================================================ */
|
||||||
|
|
||||||
|
|
||||||
|
// ================================================================
|
||||||
|
// USER PARAMETERS — edit these to match your application
|
||||||
|
// ================================================================
|
||||||
|
|
||||||
|
// Diameter of the hole drilled in the sheet metal (mm)
|
||||||
|
hole_diameter = 13;
|
||||||
|
|
||||||
|
// Thickness of the sheet metal (mm)
|
||||||
|
sheet_thickness = 1;
|
||||||
|
|
||||||
|
// Thickness of the grommet body wall (mm)
|
||||||
|
// This directly sets how large the cable hole is:
|
||||||
|
// cable hole = hole_diameter - 2 x wall_thickness
|
||||||
|
// Decrease to widen the cable hole; increase to narrow it.
|
||||||
|
wall_thickness = 2.0;
|
||||||
|
|
||||||
|
// How far each flange lip extends beyond the hole edge (mm)
|
||||||
|
// Larger value = more grip on the sheet metal.
|
||||||
|
flange_lips_overhang = 2.0;
|
||||||
|
|
||||||
|
// Thickness of each flange lip (mm)
|
||||||
|
flange_lips_thickness = 2.0;
|
||||||
|
|
||||||
|
// Chamfer radius at each cable entry/exit (mm)
|
||||||
|
// This is the most important feature for insulation protection.
|
||||||
|
// The chamfer creates a smooth funnel so the cable never contacts
|
||||||
|
// a sharp edge even under vibration or flex.
|
||||||
|
cable_chamfer = 0;
|
||||||
|
|
||||||
|
|
||||||
|
// ================================================================
|
||||||
|
// RENDERING QUALITY
|
||||||
|
// ================================================================
|
||||||
|
$fn = 128;
|
||||||
|
|
||||||
|
|
||||||
|
// ================================================================
|
||||||
|
// DERIVED VALUES (do not edit below this line)
|
||||||
|
// ================================================================
|
||||||
|
_body_d = hole_diameter;
|
||||||
|
_flange_d = hole_diameter + (2 * flange_lips_overhang);
|
||||||
|
_cable_d = _body_d - (2 * wall_thickness);
|
||||||
|
_body_len = sheet_thickness;
|
||||||
|
_total_h = (2 * flange_lips_thickness) + _body_len;
|
||||||
|
|
||||||
|
// Sanity-check echoes (visible in OpenSCAD console)
|
||||||
|
echo(str("=== Cable Grommet Summary ==="));
|
||||||
|
echo(str(" Body outer diameter : ", _body_d, " mm"));
|
||||||
|
echo(str(" Flange diameter : ", _flange_d, " mm"));
|
||||||
|
echo(str(" Cable hole diameter : ", _cable_d, " mm"));
|
||||||
|
echo(str(" Wall thickness : ", wall_thickness, " mm"));
|
||||||
|
echo(str(" Total height : ", _total_h, " mm"));
|
||||||
|
if (wall_thickness < 1.5) {
|
||||||
|
echo(" WARNING: Wall thickness is thin — consider increasing wall_thickness.");
|
||||||
|
}
|
||||||
|
if (_cable_d <= 0) {
|
||||||
|
echo(" ERROR: wall_thickness is too large — cable hole is zero or negative.");
|
||||||
|
}
|
||||||
|
if (cable_chamfer > flange_lips_thickness) {
|
||||||
|
echo(" WARNING: cable_chamfer is larger than flange_lips_thickness — chamfer will be clipped.");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ================================================================
|
||||||
|
// MODULE
|
||||||
|
// ================================================================
|
||||||
|
module grommet() {
|
||||||
|
difference() {
|
||||||
|
|
||||||
|
// ── OUTER SHELL ──────────────────────────────────────────
|
||||||
|
union() {
|
||||||
|
// Bottom flange
|
||||||
|
// Wider at the sheet metal face, narrower at the outer (free) face.
|
||||||
|
cylinder(d1 = _flange_d - 1.5, d2 = _flange_d, h = flange_lips_thickness);
|
||||||
|
|
||||||
|
// Body — the section that lives inside the drilled hole
|
||||||
|
translate([0, 0, flange_lips_thickness])
|
||||||
|
cylinder(d = _body_d, h = _body_len);
|
||||||
|
|
||||||
|
// Top flange
|
||||||
|
// Wider at the sheet metal face, narrower at the outer (free) face.
|
||||||
|
translate([0, 0, flange_lips_thickness + _body_len])
|
||||||
|
cylinder(d1 = _flange_d, d2 = _flange_d - 1.5, h = flange_lips_thickness);
|
||||||
|
}
|
||||||
|
|
||||||
|
// ── CABLE BORE ────────────────────────────────────────────
|
||||||
|
// Straight through-hole for the cable
|
||||||
|
translate([0, 0, -0.01])
|
||||||
|
cylinder(d = _cable_d, h = _total_h + 0.02);
|
||||||
|
|
||||||
|
// ── BOTTOM ENTRY CHAMFER ──────────────────────────────────
|
||||||
|
// Smooth funnel on the side the cable enters from.
|
||||||
|
translate([0, 0, -0.01])
|
||||||
|
cylinder(
|
||||||
|
d1 = _cable_d + (2 * cable_chamfer),
|
||||||
|
d2 = _cable_d,
|
||||||
|
h = cable_chamfer + 0.01
|
||||||
|
);
|
||||||
|
|
||||||
|
// ── TOP EXIT CHAMFER ──────────────────────────────────────
|
||||||
|
// Mirror chamfer on the other side — equally important when
|
||||||
|
// the cable flexes back toward the sheet metal.
|
||||||
|
translate([0, 0, _total_h - cable_chamfer + 0.01])
|
||||||
|
cylinder(
|
||||||
|
d1 = _cable_d,
|
||||||
|
d2 = _cable_d + (2 * cable_chamfer),
|
||||||
|
h = cable_chamfer + 0.01
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ================================================================
|
||||||
|
// RENDER
|
||||||
|
// ================================================================
|
||||||
|
grommet();
|
||||||
Reference in New Issue
Block a user