From 924586b3f762d6cfae7abae474ea91b45597cc0e Mon Sep 17 00:00:00 2001 From: wholteza Date: Sat, 23 Aug 2025 15:20:16 +0200 Subject: [PATCH] Fixed offsets on aux --- rev2/3d-models/top-dampener.scad | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/rev2/3d-models/top-dampener.scad b/rev2/3d-models/top-dampener.scad index 63fef69..43189e4 100644 --- a/rev2/3d-models/top-dampener.scad +++ b/rev2/3d-models/top-dampener.scad @@ -23,6 +23,11 @@ $fingerStep = 5; $xBase = (($width + $space) * $columns) + $space; $yBase = (($length + $space) * $rows) + $space; +$pcbHeight = 1.6; +$dampenerHeight = 1; + +$pcbDampenerOffset = $pcbHeight + $dampenerHeight + $clearance; + module pin(){ cylinder(h=$holes, r=1, center=false); @@ -102,26 +107,33 @@ leftTopDampener(); module case(){ // Then adjust the shim, aux and pico. // Last add magnets, don't forget the clearance. - $baseHeight = 6; + $baseHeight = 6.2; module magnets(){ cylinder(h=$magnetHeight + $clearance, r=$magnetWidth + $clearance / 2); } module aux(){ - $topToCenterOfAux = 15.4; - $auxHoleRadius = 4; + $topLeftOfPcbToCenterOfAux = 15.4; + $measurementPcbPlaneToCenterOfAux = 2.8; + $auxClearanceFromBase = $measurementPcbPlaneToCenterOfAux - $dampenerHeight; + $auxHoleRadius = 3.15; $auxHoleLength = 17 + $shellWidth/2; + $auxCableRadius = 4.15; // Move to the position along the wall the aux will be - translate([-($shellWidth/2 + $clearance),$switchDistance * $rows - $topToCenterOfAux,0]) + translate([-($shellWidth/2 + $clearance),$switchDistance * $rows - $topLeftOfPcbToCenterOfAux,-$auxClearanceFromBase]) // Make cylinder perpendicular with the wall - rotate([0,90,0]) + rotate([0,90,0]){ + // Aux component clearance cylinder(h=$auxHoleLength,r=$auxHoleRadius); + // Aux cable housing clearance + cylinder(h=$shellWidth/2,r=$auxCableRadius ); + } // TODO: move magnets to somewhere else. translate([0,0,5]) magnets(); } module pico(){ - $edgeToCenterOfUsb = 23; + $topLeftEdgeOfPcbToCenterOfUsb = 23; $usbHoleWidth = 12; $usbHoleHeight = 9; $usbOffsetFromPcb = 2.4; @@ -129,7 +141,7 @@ module case(){ $picoWidth = 25; $picoLength = 53; // Move to position along the wall the usb will be - translate([$edgeToCenterOfUsb - ($usbHoleWidth/2), $switchDistance * $rows, -$usbOffsetFromPcb]){ + translate([$topLeftEdgeOfPcbToCenterOfUsb - ($usbHoleWidth/2), $switchDistance * $rows, -$usbOffsetFromPcb]){ union() { // Create a hole for the usb cable to go through cube([$usbHoleWidth,$shellWidth,$usbHoleHeight]); @@ -145,7 +157,7 @@ module case(){ $shimPoints = [ [0 - $shellWidth / 2, - $baseHeight], [$switchDistance * $columns + $shellWidth/2 + $clearance, 0], - [$switchDistance * $columns + $shellWidth/2 + $clearance, - $baseHeight] + [$switchDistance * $columns + $shellWidth/2 + $clearance, - ($baseHeight + $clearance)] ]; // Face z/x-plane rotate([90,0,0])