From aeb4e0cbd17c61e135349af837c14e074edfa248 Mon Sep 17 00:00:00 2001 From: "Schoenberger, Philipp" Date: Wed, 27 Mar 2019 21:38:08 +0100 Subject: [PATCH] improve battery charger plug --- 3d/quad_charge_plug.scad | 54 +++++++++++++++++++++++----------------- 3d/stick.scad | 14 +++++++---- 2 files changed, 40 insertions(+), 28 deletions(-) diff --git a/3d/quad_charge_plug.scad b/3d/quad_charge_plug.scad index 5418632..c480034 100644 --- a/3d/quad_charge_plug.scad +++ b/3d/quad_charge_plug.scad @@ -4,36 +4,44 @@ use ; module plug_surface () { projection() translate([0,0,10]) - intersection() { plug(); - translate([-10,-10,-10]) - ;//cube([20,20,10]); } } module plug() { - - rotate([-90,0,0]) + rotate([270,0,0]) import("quad_plug.stl"); } -translate([0,0,-10+10*$t]) -rotate([180,0,180]) -%plug() ; -difference () { - aligned_cube([8,5,5]); - union() { - translate([0,0,-0.1]) - scale([1.05,1.1,1]) - linear_extrude(4) - plug_surface(); - } +module charger_plug() { + difference () { + // hull + aligned_cube([9,6,5]); + + // plug cut + translate([0,0,1]) + union() { + scale([1.2,1.3,1]) + linear_extrude(5) + plug_surface(); + } - // pin cuts - for (i= [1,-1]) { - translate([1*i,0,0]) - aligned_cube([1,1,50]); - translate([1*i,0,-1]) - aligned_cube([2,2,5]); + // pin cuts + for (i= [1,-1]) { + translate([1*i,0,-0.01]) + aligned_cube([0.85,0.85,50]); + translate([1*i,0,1]) + aligned_cube([2,2,5]); + } } -} \ No newline at end of file + translate([0,1.9,-0.01]) + aligned_cube([9,2,5]); +} + + + +translate([0,0,5+10*$t]) +rotate([0,0,0]) +%plug() ; + +charger_plug(); \ No newline at end of file diff --git a/3d/stick.scad b/3d/stick.scad index b9492b8..ef54acc 100644 --- a/3d/stick.scad +++ b/3d/stick.scad @@ -7,9 +7,9 @@ use // draw itself stick(); -module stick(h=10,is_ps2_shaft=0) +module stick(h=10,is_ps2_shaft=1) { - $fn=32; + $fn=128; translate([0,0,15-3]) { cylinder(d=5,h=h); translate([0,0,h]) @@ -22,7 +22,7 @@ module stick(h=10,is_ps2_shaft=0) } // dust protector - translate([0,0,-3+2.9]) { + translate([0,0,0]) { resize([30,30,22]) protector_cone(thickness=0.4*2.5); } @@ -77,13 +77,17 @@ module stick_mount(is_ps2_shaft=0) { difference() { color([1,0,1]) { - translate([0,0,5]) - cylinder_flange_sphere($fn=32,r2=5, r1=3, h=5); + translate([0,0,4]) + cylinder_flange_sphere($fn=32,r2=8, r1=3, h=4.5); + translate([0,0,8.5]) + cylinder_flange_sphere($fn=32,r2=3, r1=8, h=4.5); + if ( is_ps2_shaft ) { cylinder(d=6.75,h=10); } else { cylinder(d=6,h=10); } + //cylinder(d=15,h=0.1); } translate([0,0,-eps]) if ( is_ps2_shaft ) {