From efc8335e67a32962257f4f82e6cca31515a4c60c Mon Sep 17 00:00:00 2001 From: finn Date: Fri, 18 Oct 2024 14:59:34 -0700 Subject: [PATCH] bad triglide --- outdoor/headlampv3.scad | 124 ++++++++++++++++++++++++++++++++++++++++ outdoor/triglide-d.scad | 75 ++++++++++++++++++++++++ 2 files changed, 199 insertions(+) create mode 100644 outdoor/headlampv3.scad create mode 100644 outdoor/triglide-d.scad diff --git a/outdoor/headlampv3.scad b/outdoor/headlampv3.scad new file mode 100644 index 0000000..d353673 --- /dev/null +++ b/outdoor/headlampv3.scad @@ -0,0 +1,124 @@ +// Headlamp bracket to mount lamp to nylon strap v3 +// mostly tested with 21mm light and 20mm strap +// requires tweaking of plateScale when changing strap width +// TODO: +// autoscale plate geometry with strapwidth, light cant +// +// PRINT: +1 base, +1 perimeter, 50% infill, random seam, slot overhangs barely work + +// downward light angle +lCant = 25; +// clipin angle +clipRot = -30; +// clip length: +clipLength = 29; +// light diameter, testing at 0.1 over measured +lDiam = 21.1; +// clip tightness, use 0.8 (tight) to 0.99 (no retention) +clippiness = 0.88; + +// plate thick +plateThick = 9; +// plate scale - how many times cliplength, affected by strap and cant +// 2.7 seems right for 25mm strap, 1.9 for 20mm strap +plateScale = 1.45; + +// strap width, rec 0.5mm under +strapWide = 19.5; +// strap thickness try 2mm +strapThick = 1.9; + +// head curve, puts slight curve in head side +hcRad = 175; +hcDepth = 5.5; + +minkRad = 2; +$fn = 20; +// mechanical interface facets should be high when printing +interfaceFacets = 35; + +// lop off several things, each gets comment +difference(){ + +minkowski(){ + + // begin plate: + rotate([0, -90, 0]){ + linear_extrude(plateThick - minkRad - plateThick / 2, scale = 1.15){ + // this polygon adjusts to cant angle and clip length + polygon([ [0, 0], + [clipLength * cos(lCant), -1 * clipLength * sin(lCant)], + [plateScale * clipLength - 3, strapWide + 4], + [plateScale * clipLength - 3, strapWide + 8], + [0, strapWide + 7] ]); + } + } + + +// this does the fillets +sphere(r = minkRad); +} + +// cut off below xy plane +translate([0, 0, -22]){ + cube([99, 99, 44], center = true); + } +// cut off back of plate channel for strap +translate([-44 - minkRad, strapWide / 2 + 8, 0]){ + cube([88, strapWide, 222], center = true); + } +// add top slot +translate([-2, strapWide / 2 + 8, (plateScale + 1) / 1.825 * clipLength * cos(lCant)]){ + rotate([0, 45, 0]){ + cube([16, strapWide, strapThick], center = true); + } + } +// add bottom slot +translate([-2, strapWide / 2 + 8, strapWide / 4]){ + rotate([0, -45, 0]){ + cube([16, strapWide, strapThick], center = true); + } + } +// head curve +translate([-1 * hcRad - plateThick + hcDepth, 0, (strapWide / 2 + (plateScale + 1) / 1.95 * clipLength * cos(lCant)) / 2 ]){ + rotate([90, 0, 0]){ + cylinder(r = hcRad, 99, center = true, $fn = 300); + } + } + +} // plane diff + +// add little lower bump + +difference(){ + minkowski(){ + translate([ (1.2 * lDiam / 2 - 2.5), -8, 0]){ + // rotate for cant + rotate([lCant, 0, 0]){ + // rotate clip entry + rotate([0, 0, clipRot]){ + color("Green"){ + difference(){ + // outer clip diameter account mink + cylinder(d = 1.2 * lDiam, 2 * clipLength, center = true); + + // minus light diam account mink + cylinder(d = lDiam + minkRad, 99, center = true, $fn = interfaceFacets); + // minus clip entry account mink, the cube y dimension coefficient is clip clippiness, try 0.8-0.95 + translate([44, 0, 0]){ + cube([88, clippiness * (lDiam + minkRad), 99], center = true); + } + } // end diff + } + } // rot clip + } // rot cant + } // trans in xy + + + sphere(r = minkRad); + } + // cut off below xy plane + translate([0, 0, -22]){ + cube([99, 99, 44], center = true); + } + } diff --git a/outdoor/triglide-d.scad b/outdoor/triglide-d.scad new file mode 100644 index 0000000..4f4a6cb --- /dev/null +++ b/outdoor/triglide-d.scad @@ -0,0 +1,75 @@ +// triglide. Target 20mm +// +// + +// thickness +rThick = 5; +// strap width, rec 0.5mm under +strapWide = 19.5; +// strap thickness try 2mm +strapThick = 2; +// hole diam +holeD = 10; +// head curve +hcDeep = 3; +hcRad = 200; + +// minkowski/fillet rad +minkRad = 1.2; + +$fn = 25; + +difference(){ + +minkowski(){ + difference(){ + //main + union(){ + cube([strapWide + 2 * rThick, 2 * strapThick + 3 * rThick + 10, (rThick - minkRad) * 2], center = true); + translate([0, strapThick + 1.5 * rThick + 8, 0]){ + cylinder(d = 1.7 * holeD, rThick, center = true); + } + } + + + // slot 1 + translate([0, rThick + strapThick / 2, 0]){ + cube([strapWide + 2 * minkRad, strapThick + 2 * minkRad, 99], center = true); + } + + // slot 2 + translate([0, -1 * (rThick + strapThick), 0]){ + cube([strapWide + 2 * minkRad, strapThick * 2 + 2 * minkRad, 99], center = true); + } + + // hole + translate([0, strapThick + 1.5 * rThick + 8, 0]){ + cylinder(d = holeD + 2 * minkRad, rThick * 2, center = true); + } + + // channel + translate([0, -44 - rThick - strapThick, rThick - strapThick]){ + cube([strapWide + 2 * minkRad, 88, strapThick + minkRad], center = true); + } + + // curvature + translate([0, 0, hcRad + rThick - hcDeep]){ + rotate([0, 90, 0]){ + cylinder(r = hcRad, 99, center = true, $fn = 300); + } + } + + } + + // mink + sphere(r = minkRad); + } + + + // bottom + translate([0, 0, -222]){ + cube([222, 222, 444], center = true); + } + + + }