Commit 78607449 authored by Mio Iwakura's avatar Mio Iwakura

Nightly

parent 701efb59
//@SECTION: config
$fn = 99; //@NOTE: invalid 2-manifold work-around
//@SECTION: components
module guts()
{
//@SECTION: components
module expansion_board()
{
//@SECTION: constants
x = 272;
y = 120;
z = 2;
......@@ -24,6 +28,7 @@ module guts()
[x/2 - 21, y/2 - 4,],
[-x/2 + 148, y/2 - 4]
];
//@SECTION: construction
%difference()
{
translate([0, 0, standoff_z + z])
......@@ -62,7 +67,6 @@ module guts()
difference()
{
color("black")
translate([-x/2 + 80, y/2 - 52.5, standoff_z + z])
cube([8.75, 25, 7]);
translate([-x/2 + 84, y/2 - 50.5, standoff_z + z])
......@@ -79,6 +83,7 @@ module guts()
}
module hifive_unleashed()
{
//@SECTION: constants
x = 120;
y = 90;
z = 1.6;
......@@ -87,6 +92,7 @@ module guts()
[x/2 - 4, -y/2 + 4],
[-x/2 + 4, -y/2 + 4]
];
//@SECTION: construction
%difference()
{
translate([0, 0, standoff_z + z])
......@@ -114,8 +120,13 @@ module guts()
}
module bracket()
{
//@SECTION: constants
z = 1;
safe_zone = 3;
//@SECTION: components
module front()
{
//@SECTION: constants
x = 18;
y = 103.5;
top_xshft = 3;
......@@ -124,6 +135,7 @@ module guts()
tab_x = 10.5;
tab_y = 6.5;
tab_yoff = 4.5;
//@SECTION: construction
translate([-top_xshft, (y + top_y)/2 + top_yoff])
square([x, top_y], center = true);
translate([-x/2 - top_xshft, y/2 + top_yoff, 0])
......@@ -140,9 +152,11 @@ module guts()
}
module lip()
{
//@SECTION: constants
x = 12;
y = 18;
z = 1;
//@SECTION: construction
color("white")
linear_extrude(1)
difference()
......@@ -157,8 +171,7 @@ module guts()
%translate([(x + 3)/2, 0, 0.5])
square([3, y], center = true);
}
z = 1;
safe_zone = 3;
//@SECTION: assembly
%linear_extrude(safe_zone)
front();
color("white")
......@@ -171,9 +184,11 @@ module guts()
}
module usb_card()
{
//@SECTION: constants
x = 85;
y = 52;
z = 1.75;
//@SECTION: construction
color("green")
linear_extrude(z)
square([x, y], center = true);
......@@ -183,37 +198,42 @@ module guts()
translate([x/2 - 30, -y/2 - 6.5, 0])
linear_extrude(z)
square([20, 13], center = true);
//@SECTION: assembly
translate([-x/2 + 2.25, 6.75, 8])
rotate(a = [0, -90, 0])
bracket();
}
module gfx_card()
{
//@SECTION: constants
x = 144;
y = 56;
z = 1.75;
safe_zone = 14;
vga_x = 48;
vga_y = 33;
vga_z = 17;
pci_x = 85;
pci_y = 13;
//@SECTION: construction
%translate([0, y, 0])
linear_extrude(vga_z)
square([vga_x, vga_y]);
x = 144;
y = 56;
z = 1.75;
safe_zone = 14;
%translate([0, 0, z])
linear_extrude(safe_zone)
square([x, y]);
color("green")
linear_extrude(z)
square([x, y]);
pci_x = 85;
pci_y = 13;
translate([44, -pci_y, 0])
linear_extrude(z)
square([pci_x, pci_y]);
//@SECTION: assembly
translate([2, 35.25, 8])
rotate(a = [0, -90, 0])
bracket();
}
//@SECTION: assembly
expansion_board();
translate([164, -1, 14])
rotate(a = [0, 0, 90])
......@@ -227,12 +247,17 @@ module guts()
}
module case_bottom()
{
//@NOTE: wall_z currently must be 4, assumptions are baked in to model
//@SECTION: constants
//@NOTE: changing these will break things; assumptions are baked in to model
wall_z = 4;
foot_z = 12;
//@SECTION: components
module base()
{
//@SECTION: components
module ramp_corner(r = 18, z = wall_z)
{
//@SECTION: construction
intersection()
{
rotate_extrude()
......@@ -252,6 +277,7 @@ module case_bottom()
}
module ramp_edge(r = 18, length = 151, z = wall_z)
{
//@SECTION: construction
intersection()
{
difference()
......@@ -264,6 +290,7 @@ module case_bottom()
square([r, r]);
}
}
//@SECTION: construction
let(x = 272,
y = 120,
standoff_points = [
......@@ -295,6 +322,10 @@ module case_bottom()
linear_extrude(wall_z - 1)
circle(d = 8);
}
for(i = [12:4:134])
translate([42, i, -1])
linear_extrude(wall_z + 2)
square([22.25, 2]);
}
}
let(x = 120,
......@@ -323,6 +354,7 @@ module case_bottom()
}
}
}
//@SECTION: assembly
translate([329, 169, 18])
rotate([90, 0, -90])
ramp_edge(length = 70);
......@@ -350,6 +382,7 @@ module case_bottom()
}
module skirt()
{
//@SECTION: construction
linear_extrude(wall_z)
union()
{
......@@ -417,13 +450,9 @@ module case_bottom()
}
}
}
foot_z = 12;
translate([22, 22, foot_z])
base();
translate([0, 0, foot_z])
skirt();
module foot()
{
//@SECTION: construction
linear_extrude(foot_z)
intersection()
{
......@@ -435,6 +464,11 @@ module case_bottom()
square([42, 42]);
}
}
//@SECTION: assembly
translate([22, 22, foot_z])
base();
translate([0, 0, foot_z])
skirt();
translate([23, 23, 0])
rotate([0, 0, -180])
foot();
......@@ -448,7 +482,8 @@ module case_bottom()
rotate([0, 0, 0])
foot();
}
/* translate([160.5, 94.5, 16.5]) */
/* guts(); */
//@SECTION: assembly
translate([160.5, 94.5, 16.5])
guts();
color("dimgray")
case_bottom();
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment