refactor: remove trailing whitespace
This commit is contained in:
@@ -21,13 +21,13 @@ mirror()
|
||||
bottom();
|
||||
//translate([13,11,2.1])
|
||||
// magsafe_ring();
|
||||
|
||||
|
||||
// The exported board from KiCad, for debug
|
||||
//translate([0,0,0])
|
||||
// board();
|
||||
|
||||
switches(true);
|
||||
|
||||
|
||||
diodes();
|
||||
|
||||
rj45();
|
||||
@@ -57,4 +57,4 @@ mirror()
|
||||
translate([-43,36.8,0]) magnet();
|
||||
translate([-43,-0.2,0]) magnet();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,13 +20,13 @@ difference()
|
||||
bottom();
|
||||
//translate([13,11,2.1])
|
||||
//magsafe_ring();
|
||||
|
||||
|
||||
// The exported board from KiCad, for debug
|
||||
//translate([0,0,0])
|
||||
//board();
|
||||
|
||||
switches(false);
|
||||
|
||||
|
||||
diodes();
|
||||
|
||||
rj45();
|
||||
|
||||
@@ -44,9 +44,9 @@ translate([0,0,1.6])
|
||||
color("pink")
|
||||
translate([0,0,5.1])
|
||||
linear_extrude(1.5)
|
||||
offset( delta=0.5)
|
||||
offset( delta=0.5)
|
||||
base();
|
||||
|
||||
|
||||
*/
|
||||
|
||||
module base_line_extruded (factor, extrusion)
|
||||
|
||||
@@ -11,23 +11,23 @@ linear_extrude(height=3.05)
|
||||
translate([-3.175,-0.36,0])
|
||||
linear_extrude(height=3.05)
|
||||
circle(d=3);
|
||||
|
||||
|
||||
// Body
|
||||
linear_extrude(height=thickness)
|
||||
square([11.1,4.2], center=true);
|
||||
square([11.1,4.2], center=true);
|
||||
|
||||
translate([0,1.9,0])
|
||||
linear_extrude(height=thickness)
|
||||
square([5.65, 2.09]);
|
||||
square([5.65, 2.09]);
|
||||
|
||||
// Metal soldering parts
|
||||
translate([5.45,1.04,0])
|
||||
linear_extrude(height=thickness)
|
||||
square([2.5, 2.55]);
|
||||
square([2.5, 2.55]);
|
||||
|
||||
translate([-7.95,-1.7,0])
|
||||
linear_extrude(height=thickness)
|
||||
square([2.5, 2.55]);
|
||||
square([2.5, 2.55]);
|
||||
}
|
||||
|
||||
module column() {
|
||||
@@ -37,36 +37,36 @@ translate([0, 19, 0]) switch();
|
||||
|
||||
translate([0, 38, 0]) switch();
|
||||
}
|
||||
|
||||
|
||||
module switch() {
|
||||
// hotswap socket
|
||||
color("#ff7f0e")
|
||||
translate([0,0,1.85])
|
||||
rotate([180,0,0])
|
||||
hotswap_mx();
|
||||
|
||||
|
||||
// main pin of switch
|
||||
// 4mm d, 2.8mm high, 1.6mm pcb
|
||||
// means 1.2 of it sticks below, 1.3 for margin
|
||||
// 4mm d, 2.8mm high, 1.6mm pcb
|
||||
// means 1.2 of it sticks below, 1.3 for margin
|
||||
color("#2ca02c")
|
||||
translate([-0.57, -4.7, 0])
|
||||
linear_extrude(height=1)
|
||||
circle(d=4.2);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// The two switch alignment pins
|
||||
// They will need to be snipped if too long
|
||||
color("#d62728")
|
||||
translate([-5.74, -4.7, 0])
|
||||
linear_extrude(height=1)
|
||||
circle(d=1.8);
|
||||
|
||||
|
||||
color("#d62728")
|
||||
translate([4.45, -4.7, 0])
|
||||
linear_extrude(height=1)
|
||||
circle(d=1.8);
|
||||
|
||||
|
||||
}
|
||||
|
||||
module diode() {
|
||||
@@ -153,10 +153,10 @@ module mounting_hole() {
|
||||
|
||||
module bumper() {
|
||||
color("#17becf")
|
||||
translate([41, 29, 2.5])
|
||||
translate([41, 29, 2.5])
|
||||
cylinder(h=2, r=5);
|
||||
color("#17becf")
|
||||
translate([41, 29, 1.3])
|
||||
translate([41, 29, 1.3])
|
||||
cylinder(h=1.2, r1=4.5, r2=5);
|
||||
}
|
||||
|
||||
@@ -168,6 +168,6 @@ module magnet() {
|
||||
hotswap_mx();
|
||||
|
||||
color("green")
|
||||
translate([0,0,0])
|
||||
translate([0,0,0])
|
||||
import("hotswap.stl");
|
||||
*/
|
||||
@@ -10,9 +10,9 @@ module bottom()
|
||||
color("pink")
|
||||
translate([0,0,0])
|
||||
linear_extrude(bottom_plate_thickness)
|
||||
offset( delta=0)
|
||||
offset( delta=0)
|
||||
base();
|
||||
}
|
||||
}
|
||||
|
||||
module base()
|
||||
{
|
||||
@@ -39,23 +39,23 @@ module hotswap_mx() {
|
||||
translate([-3.175,-0.36,0])
|
||||
linear_extrude(height=3.05)
|
||||
circle(d=3);
|
||||
|
||||
|
||||
// Body
|
||||
linear_extrude(height=thickness)
|
||||
square([11.1,4.2], center=true);
|
||||
square([11.1,4.2], center=true);
|
||||
|
||||
translate([0,1.9,0])
|
||||
linear_extrude(height=thickness)
|
||||
square([5.65, 2.09]);
|
||||
square([5.65, 2.09]);
|
||||
|
||||
// Metal soldering parts
|
||||
translate([5.45,1.04,0])
|
||||
linear_extrude(height=thickness)
|
||||
square([2.5, 2.55]);
|
||||
square([2.5, 2.55]);
|
||||
|
||||
translate([-7.95,-1.7,0])
|
||||
linear_extrude(height=thickness)
|
||||
square([2.5, 2.55]);
|
||||
square([2.5, 2.55]);
|
||||
}
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@ translate([0, 19, 0]) switch(bottom);
|
||||
|
||||
translate([0, 38, 0]) switch(bottom);
|
||||
}
|
||||
|
||||
|
||||
module switch(bottom) {
|
||||
// hotswap socket
|
||||
color("#ff7f0e")
|
||||
@@ -74,29 +74,29 @@ module switch(bottom) {
|
||||
rotate([180,0,0])
|
||||
mirror([0,bottom ? 1 : 0,0])
|
||||
hotswap_mx();
|
||||
|
||||
|
||||
// main pin of switch
|
||||
// 4mm d, 2.8mm high, 1.6mm pcb
|
||||
// means 1.2 of it sticks below, 1.3 for margin
|
||||
// 4mm d, 2.8mm high, 1.6mm pcb
|
||||
// means 1.2 of it sticks below, 1.3 for margin
|
||||
color("#2ca02c")
|
||||
translate([-0.57, -4.7, 0])
|
||||
linear_extrude(height=1)
|
||||
circle(d=4.2);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// The two switch alignment pins
|
||||
// They will need to be snipped if too long
|
||||
color("#d62728")
|
||||
translate([-5.74, -4.7, 0])
|
||||
linear_extrude(height=1)
|
||||
circle(d=1.8);
|
||||
|
||||
|
||||
color("#d62728")
|
||||
translate([4.45, -4.7, 0])
|
||||
linear_extrude(height=1)
|
||||
circle(d=1.8);
|
||||
|
||||
|
||||
}
|
||||
|
||||
module diode() {
|
||||
@@ -183,10 +183,10 @@ module mounting_hole() {
|
||||
|
||||
module bumper() {
|
||||
color("#17becf")
|
||||
translate([41, 29, 2.5])
|
||||
translate([41, 29, 2.5])
|
||||
cylinder(h=2, r=5);
|
||||
color("#17becf")
|
||||
translate([41, 29, 1.3])
|
||||
translate([41, 29, 1.3])
|
||||
cylinder(h=1.2, r1=4.5, r2=5);
|
||||
}
|
||||
|
||||
@@ -197,32 +197,32 @@ module magnet() {
|
||||
|
||||
module switches(bottom) {
|
||||
// Columns starting from MCU
|
||||
translate([19.3,-2.84,0])
|
||||
translate([19.3,-2.84,0])
|
||||
column(bottom);
|
||||
|
||||
//rotate([0,0,180])
|
||||
translate([0.3,-0.3,0])
|
||||
translate([0.3,-0.3,0])
|
||||
column(bottom);
|
||||
|
||||
translate([-18.7,6.05,0])
|
||||
translate([-18.7,6.05,0])
|
||||
column(bottom);
|
||||
|
||||
translate([-37.7,-0.3,0])
|
||||
translate([-37.7,-0.3,0])
|
||||
column(bottom);
|
||||
|
||||
translate([-56.7,-10.308,0])
|
||||
translate([-56.7,-10.308,0])
|
||||
column(bottom);
|
||||
|
||||
// Thumb cluster
|
||||
translate([14.6264,-24.52])
|
||||
translate([14.6264,-24.52])
|
||||
switch(bottom);
|
||||
|
||||
rotate([0,0,-10])
|
||||
translate([40.3,-19.3])
|
||||
translate([40.3,-19.3])
|
||||
switch(bottom);
|
||||
|
||||
rotate([0,0,-23])
|
||||
translate([65.65,-7.09])
|
||||
translate([65.65,-7.09])
|
||||
switch(bottom);
|
||||
}
|
||||
|
||||
@@ -291,9 +291,9 @@ module mounting_holes() {
|
||||
}
|
||||
|
||||
//color("green")
|
||||
//translate([0,0,0])
|
||||
//translate([0,0,0])
|
||||
// import("hotswap.stl");
|
||||
|
||||
|
||||
// Height of case is:
|
||||
// 5.0mm from pcb to switch inset
|
||||
// 1.6mm pcb height
|
||||
@@ -321,25 +321,25 @@ module case() {
|
||||
|
||||
module switch_holes() {
|
||||
// Columns starting from mcu
|
||||
hole_column();
|
||||
translate([-19, 2.54, 0]) hole_column();
|
||||
translate([-38, 8.89, 0]) hole_column();
|
||||
translate([-57, 2.54, 0]) hole_column();
|
||||
translate([-76, -7.468, 0]) hole_column();
|
||||
hole_column();
|
||||
translate([-19, 2.54, 0]) hole_column();
|
||||
translate([-38, 8.89, 0]) hole_column();
|
||||
translate([-57, 2.54, 0]) hole_column();
|
||||
translate([-76, -7.468, 0]) hole_column();
|
||||
|
||||
// Thumb cluster
|
||||
translate([-4.674, -59.69, 0]) switch_hole();
|
||||
rotate(-10) translate([21, -54.45, 0]) switch_hole();
|
||||
rotate(-23) translate([46.25, -42.25, 0]) switch_hole();
|
||||
translate([-4.674, -59.69, 0]) switch_hole();
|
||||
rotate(-10) translate([21, -54.45, 0]) switch_hole();
|
||||
rotate(-23) translate([46.25, -42.25, 0]) switch_hole();
|
||||
}
|
||||
|
||||
|
||||
module hole_column() {
|
||||
switch_hole();
|
||||
translate([0, -19, 0]) switch_hole();
|
||||
translate([0, -19, 0]) switch_hole();
|
||||
translate([0, -38, 0]) switch_hole();
|
||||
}
|
||||
|
||||
module switch_hole() {
|
||||
module switch_hole() {
|
||||
translate([11.64, 23.45, 0]){
|
||||
color("green") {
|
||||
linear_extrude(10) {
|
||||
|
||||
@@ -8,6 +8,6 @@ module plate()
|
||||
{
|
||||
import ("plate.svg", center=false);
|
||||
}
|
||||
|
||||
|
||||
linear_extrude(1.6)
|
||||
plate();
|
||||
@@ -1,7 +1,7 @@
|
||||
3D-printed compact case
|
||||
=======================
|
||||
|
||||
If you just want to make small adjustments and generate
|
||||
If you just want to make small adjustments and generate
|
||||
your own version, install openscad, and open a scad file
|
||||
and press F6 to generate. Export->stl to get printable model.
|
||||
|
||||
@@ -18,7 +18,7 @@ increase "turn off rendering at" to 3 million.
|
||||
(this will enable multi-thread rendering and speed things
|
||||
up dramatically!)
|
||||
|
||||
For the slicer, I did not do much experimenting...
|
||||
For the slicer, I did not do much experimenting...
|
||||
Maybe somebody into 3D printing could help me out with
|
||||
the silicone bumper recesses: removing the supports in
|
||||
these holes is a pain...
|
||||
|
||||
Reference in New Issue
Block a user