Add a matching cover/tray for the dice tower.

This commit is contained in:
Jesse D. McDonald 2018-01-18 00:10:11 -06:00
parent 5395c44549
commit 5defa38e5b
3 changed files with 72 additions and 2 deletions

1
.gitignore vendored
View File

@ -1,2 +1,3 @@
*.svg *.svg
*.dxf *.dxf
*.stl

View File

@ -180,7 +180,7 @@ module part_layout_wdh() {
} }
module extra_layout() {} module extra_layout() {}
module part_layout() { module std_part_layout() {
if (outer_width > outer_height) if (outer_width > outer_height)
part_layout_wdh(); part_layout_wdh();
else else
@ -188,13 +188,14 @@ module part_layout() {
extra_layout(); extra_layout();
} }
module part_layout() { std_part_layout(); }
module thicken() { module thicken() {
linear_extrude(height=thickness, center=true, convexity=10) children(); linear_extrude(height=thickness, center=true, convexity=10) children();
} }
module extra_assembly() {} module extra_assembly() {}
module part_assembly() { module std_part_assembly() {
if (inc_left) color("red") translate([ -(outer_width/2 - thickness/2 + explode),0,0]) rotate([90,0,270]) thicken() left_side(); if (inc_left) color("red") translate([ -(outer_width/2 - thickness/2 + explode),0,0]) rotate([90,0,270]) thicken() left_side();
if (inc_front) color("green") translate([0, -(outer_depth/2 - thickness/2 + explode),0]) rotate([90,0,0]) thicken() front_side(); if (inc_front) color("green") translate([0, -(outer_depth/2 - thickness/2 + explode),0]) rotate([90,0,0]) thicken() front_side();
if (inc_right) color("blue") translate([ (outer_width/2 - thickness/2 + explode),0,0]) rotate([90,0,90]) thicken() right_side(); if (inc_right) color("blue") translate([ (outer_width/2 - thickness/2 + explode),0,0]) rotate([90,0,90]) thicken() right_side();
@ -203,6 +204,7 @@ module part_assembly() {
if (inc_bottom) color("magenta") translate([0,0,-(outer_height/2 - thickness/2 + explode)]) rotate([180,0,0]) thicken() bottom_side(); if (inc_bottom) color("magenta") translate([0,0,-(outer_height/2 - thickness/2 + explode)]) rotate([180,0,0]) thicken() bottom_side();
extra_assembly(); extra_assembly();
} }
module part_assembly() { std_part_assembly(); }
if (mode == "assembly") if (mode == "assembly")
part_assembly(); part_assembly();

View File

@ -0,0 +1,67 @@
// defined later in <box.scad>
inch = undef;
golden_ratio = undef;
inner_width = 2*inch;
inner_depth = inner_width * golden_ratio;
inner_height = inner_depth * golden_ratio;
clearance = 0.125*inch;
hole_diameter = 4.1;
include <../box/box.scad>;
//mode = "layout";
//mode = "assembly";
outer_width = inner_width + 1.05*2*thickness;
outer_depth = 1.5*inch;
outer_height = inner_height + thickness - 40 + clearance;
echo(str(outer_width/inch, " by ", outer_depth/inch, " by ", outer_height/inch, " inches"));
inc_front = false;
inc_bottom = false;
rx = (outer_depth - 2*thickness)/2 - (20+thickness/2)/sqrt(2) - thickness;
ry = -outer_height/2 - (20 + thickness/2) + thickness;
module left_side() {
difference() {
union() {
left_side_base();
hull() {
translate([-(outer_depth/2 - 15), -outer_height/2, 0]) circle(15);
translate([ (outer_depth/2 - 15), -outer_height/2, 0]) circle(15);
translate([-rx, ry, 0]) circle(10);
}
}
translate([-rx, ry, 0]) circle(hole_diameter/2);
}
}
module right_side() {
difference() {
union() {
right_side_base();
hull() {
translate([-(outer_depth/2 - 15), -outer_height/2, 0]) circle(15);
translate([ (outer_depth/2 - 15), -outer_height/2, 0]) circle(15);
translate([rx, ry, 0]) circle(10);
}
}
translate([rx, ry, 0]) circle(hole_diameter/2);
}
}
module part_assembly() {
translate([0, rx + (inner_depth - outer_depth)/2 + thickness, clearance + ry + (inner_height - outer_height)/2 + thickness]) {
rotate([-90*$t,0,0]) {
//%translate([50,0,0]) sphere(5);
translate([0,-rx,-ry]) {
std_part_assembly();
}
}
}
%rotate([0,0,180]) import("dice-tower-assembly.stl");
}
explode = 0;