Skip to content

Commit

Permalink
Merge pull request #107 from azzamsa/patch-whitespace
Browse files Browse the repository at this point in the history
refactor: remove trailing whitespace
  • Loading branch information
tompi authored Nov 26, 2024
2 parents ae509a0 + 2bca3a1 commit b2b0b47
Show file tree
Hide file tree
Showing 16 changed files with 102 additions and 102 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
*.tmp
*-save.pro
*-save.kicad_pcb
fp-info-cache
fp-info-cache
_autosave*
*.drl
*.gbrjob
Expand Down
6 changes: 3 additions & 3 deletions case/cheapino-bottom-left.scad
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -57,4 +57,4 @@ mirror()
translate([-43,36.8,0]) magnet();
translate([-43,-0.2,0]) magnet();
}
}
}
4 changes: 2 additions & 2 deletions case/cheapino-bottom-right.scad
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
4 changes: 2 additions & 2 deletions case/cheapino.scad
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
34 changes: 17 additions & 17 deletions case/hotswap.scad
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand All @@ -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() {
Expand Down Expand Up @@ -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);
}

Expand All @@ -168,6 +168,6 @@ module magnet() {
hotswap_mx();
color("green")
translate([0,0,0])
translate([0,0,0])
import("hotswap.stl");
*/
78 changes: 39 additions & 39 deletions case/modules.scad
Original file line number Diff line number Diff line change
Expand Up @@ -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()
{
Expand All @@ -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]);
}


Expand All @@ -66,37 +66,37 @@ translate([0, 19, 0]) switch(bottom);

translate([0, 38, 0]) switch(bottom);
}

module switch(bottom) {
// hotswap socket
color("#ff7f0e")
translate([0,bottom ? -9.42 : 0,1.85])
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() {
Expand Down Expand Up @@ -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);
}

Expand All @@ -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);
}

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion case/plate.scad
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ module plate()
{
import ("plate.svg", center=false);
}

linear_extrude(1.6)
plate();
4 changes: 2 additions & 2 deletions case/readme.md
Original file line number Diff line number Diff line change
@@ -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.

Expand All @@ -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...
Expand Down
Loading

0 comments on commit b2b0b47

Please sign in to comment.