// Remix by df5wc // Original version by dl2sba // https://www.thingiverse.com/thing:7146164 wallThickness = 2.4; // Fase ppDovetailHeight = 0.5; ppDovetailWidth = 3.4; ppDovetailLength = 12.3; // Gehäuse mit Fase ppHeight = 7.9 + ppDovetailHeight; ppWidth = 7.9 + ppDovetailHeight; ppLength = 24.8; ppConLength = 9.9; ppCaseLength = ppLength - ppConLength; ppPinRadius = 1.2; ppPinPos = ppConLength; // Batteriegröße batteryHeight = 39; // zwei Zellen übereinander batteryWidth = 77.5; // vier Zellen nebeneinander batteryLength = 75.5; // Zellenhöhe // Gehäusegröße caseHeight = batteryHeight / 2 + wallThickness; caseWidth = batteryWidth + 3 * wallThickness + ppWidth; caseDepth = batteryLength + 2 * wallThickness; caseRoundness = 1.0; // Platz für den Akkudraht wireWidth = 4; wireHeight = caseHeight - wallThickness; wireDepth = caseDepth - ppLength - wallThickness; wireStoreLength = 25.0; // Größe der Verriegelungsnut grooveWidth = 1.0; grooveHeight = 1.6; grooveClearance = 0.1; /* Hidden */ $fn = 50; eps = 0.001; module roundedcube(x, y, z, rad = 0.75) { hull() { translate([ rad, rad, rad]) sphere(rad); translate([x - rad, rad, rad]) sphere(rad); translate([ rad, y - rad, rad]) sphere(rad); translate([x - rad, y - rad, rad]) sphere(rad); translate([ rad, rad, z - rad]) sphere(rad); translate([x - rad, rad, z - rad]) sphere(rad); translate([ rad, y - rad, z - rad]) sphere(rad); translate([x - rad, y - rad, z - rad]) sphere(rad); } } module battery() { cube([batteryWidth, batteryLength, batteryHeight / 2]); } module groove(w, h, corr) { translate([wallThickness - w, wallThickness - w, 0]) { cube([ caseWidth - 2*wallThickness - ppWidth, w + corr, h ]); } translate([wallThickness - w, caseDepth - wallThickness - corr, 0]) { cube([ caseWidth + 2*w - 2*wallThickness, w + corr, h ]); } translate([wallThickness - w, wallThickness - w, 0]) { cube([ w + corr, caseDepth - 2*wallThickness + 2*w, h ]); } translate([caseWidth - wallThickness - corr, wallThickness - w, 0]) { cube([ w + corr, caseDepth - 2*wallThickness + 2*w, h ]); } } module case_base() { difference() { // außen roundedcube(caseWidth, caseDepth, caseHeight + caseRoundness, caseRoundness); // Oberen Teil mit gerundeten Ecken abschneiden translate([-eps, -eps, caseHeight]) { cube([caseWidth + 2*eps, caseDepth + 2*eps, caseRoundness + eps]); } } } module case_half() { difference() { // außen case_base(); // Batterie translate([wallThickness, wallThickness, wallThickness]) { battery(); } // powerpole translate([2 * wallThickness + batteryWidth, -eps, caseHeight - ppHeight]) { cube([ppWidth, ppLength + eps, ppHeight + eps]); } // Kabelschlitz translate([2 * wallThickness + batteryWidth + ppWidth / 2 - wireWidth / 2, ppLength - eps, wallThickness]) { cube([wireWidth, wireDepth + eps, wireHeight + eps]); } // Platz für Kabel unten an Batterie translate([wallThickness + batteryWidth - batteryHeight/2, caseDepth - wallThickness - wireStoreLength, wallThickness]) { cube([ ppWidth + wallThickness + batteryHeight/2, wireStoreLength, caseHeight - wallThickness + eps ]); } } // 1/2 pin translate([2 * wallThickness + batteryWidth + eps, ppPinPos, caseHeight - ppHeight]) { rotate([90, 0, 90]) { cylinder(h=ppWidth + 2*eps, d=2 * ppPinRadius); } } }; module top_half() { difference() { case_half(); translate([0, 0, caseHeight - grooveHeight - grooveClearance]) { groove( grooveWidth + grooveClearance, grooveHeight + grooveClearance + eps, eps ); } } } module bottom_half() { mirror([1, 0, 0]) { union() { case_half(); translate([0, 0, caseHeight - eps]) { groove(grooveWidth, grooveHeight + eps, 0); } } } } //////////////////////////////////////////////// // // uncomment for top part // translate([5,0,0]) { top_half(); }; //////////////////////////////////////////////// // // uncomment for bottom part // translate([-5,0,0]) { bottom_half(); }