Initial commit with models to date.

This commit is contained in:
Jonathan Bernard 2024-01-03 13:36:59 -06:00
commit 64c283cafd
133 changed files with 2920038 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.*.sw?

BIN
CE3_3DBenchy.3mf Normal file

Binary file not shown.

156522
CE3_Rook.gcode Normal file

File diff suppressed because it is too large Load Diff

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
desktop.ini Normal file

Binary file not shown.

23349
filament_label_and_clip.gcode Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1 @@
cube([8, 8, 8]);

Binary file not shown.

View File

@ -0,0 +1,28 @@
include <../lib/cable_sleeve.scad>;
include <table_edge_clip.scad>;
epsilon = 0.01;
sleeveLen = 20;
wall = 4;
clipLen = 8;
translate([0, 0, clipLen/2]) rotate([90, 0, 0])
union() {
translate([6, 2, sleeveLen/-2])
rotate([0, 0, 127])
cableSleeve(cableDiameter = 3, length = sleeveLen);
translate([wall - epsilon, -clipLen/2, sleeveLen/-2])
cube([0.75*wall + epsilon, wall, sleeveLen]);
translate([1.32*wall, -clipLen/2 + 1.02, sleeveLen/-2])
rotate([0, 0, -31.1])
cube([wall/2, wall + 0.1, sleeveLen]);
tableEdgeClip(
length = clipLen,
depth = 24,
thickness = wall,
tableDepth = 21.58,
clampAngle = 4);
}

View File

@ -0,0 +1,16 @@
module tableEdgeClip(length = 4, depth = 20, thickness = 4, tableDepth = 21.58, clampAngle = 3) {
translate([0, length/-2, tableDepth/-2 - thickness])
cube([thickness, length, tableDepth + 2*thickness]);
translate([0.01, length/-2, tableDepth/-2 - thickness])
mirror([1, 0, 0])
rotate([0, -clampAngle, 0])
cube([depth + 0.01, length, thickness]);
mirror([0, 0, 1])
translate([0.01, length/-2, tableDepth/-2 - thickness])
mirror([1, 0, 0])
rotate([0, -clampAngle, 0])
cube([depth + 0.01, length, thickness]);
}

View File

@ -0,0 +1,3 @@
include <table_edge_clip.scad>;
tableEdgeClip(length = 8, depth = 40);

View File

@ -0,0 +1,608 @@
// Enable/Disable parts of the composite model
showBoundBox = false;
showBluRay = false;
showBluRayLid = false;
showHddDrawer = false;
showCubby = false;
showRightDrawer = true;
showLetterShelf = false;
showShell1 = false;
showShell2Top = false;
showShell2Bot = false;
epsilon = 0.01;
maxAvailWidth = 303.43; // width will be on X
maxAvailDepth = 225.63; // depth will be on Y
maxAvailHeigth = 104; // height will be on Z
wall = 2;
outerWall = 3;
slideGap = 1;
lapDepth = 20;
fullWidth = 300;
fullDepth = 225;
fullHeight = 96;
// full-size base and walls
if (showBoundBox) {
translate([0, 0, -(wall + outerWall)])
color("DimGray")
cube([fullWidth, fullDepth, outerWall]);
translate([0, fullDepth + (wall + outerWall), 0])
color("DimGray")
cube([fullWidth, outerWall, fullHeight]);
translate([-(wall + outerWall), 0, 0])
color("DimGray")
cube([outerWall, fullDepth, fullHeight]);
}
// ===========================================================================
// Blu-Ray Drive holder
// ===========================================================================
bluRayWidth = 140;
bluRayDepth = 151;
bluRayHeight = 20;
bluRaySidedoor = 5;
bluRayBackWindow = bluRayWidth - 100;
// test fit pieces
/*
// Lap joint
translate([0, 30, 0])
difference() {
color("SeaGreen") union() {
cube([20, 20, wall]);
cube([wall, 20, 20]);
}
translate([wall-epsilon, -epsilon, -epsilon])
cube([20 + 2*epsilon - wall, lapDepth/2 + 2*epsilon, wall/2 + 2*epsilon]);
translate([wall/2 + epsilon, -epsilon, -epsilon])
cube([wall/2 + 2*epsilon, lapDepth/2 + 2*epsilon, 20 + 2*epsilon]);
}
difference() {
color("SandyBrown") union() {
cube([20, 20, wall]);
cube([wall, 20, 20]);
}
translate([0, 10, 0]) union() {
translate([-epsilon, -epsilon, wall/2])
cube([20 + 2*epsilon, lapDepth/2 + 2*epsilon, wall/2 + 2*epsilon]);
translate([-epsilon, -epsilon, -epsilon])
cube([wall/2 + 2*epsilon, lapDepth/2 + 2*epsilon, 20 + 2*epsilon]);
}
}
// Bluray width
color("Pink") union() {
cube([ bluRayWidth + 2*wall, 4*wall, wall]);
cube([wall, 4*wall, 4*wall]);
translate([bluRayWidth + wall, 0, 0, ]) cube([wall, 4*wall, 4*wall]);
}
// Bluray depth
color("Salmon") translate([0, 5*wall, 0]) union() {
cube([ bluRayDepth + 2*wall, 4*wall, wall]);
cube([wall, 4*wall, 4*wall]);
translate([bluRayDepth + wall, 0, 0, ]) cube([wall, 4*wall, 4*wall]);
}
// Bluray height
color("MistyRose") translate([0, 10*wall, 0]) union() {
cube([ bluRayHeight + 2*wall, 4*wall, wall]);
cube([wall, 4*wall, 4*wall]);
translate([bluRayHeight + wall, 0, 0, ]) cube([wall, 4*wall, 4*wall]);
}
*/
translate([fullWidth - (outerWall + 4*wall + bluRayWidth + slideGap), wall, 0])
union() {
// Blu-Ray box
if (showBluRay) {
color("DodgerBlue")
difference() {
union() {
cube([ // floor
bluRayWidth + 2*wall,
bluRayDepth + 2*wall,
outerWall]);
translate([0, bluRayDepth + wall, 0])
cube([ // +y wall
bluRayWidth + 2*wall,
wall,
bluRayHeight + outerWall]);
cube([ // -x wall
wall,
bluRayDepth + 2*wall,
bluRayHeight + outerWall]);
translate([bluRayWidth + wall, 0, 0])
cube([ // +x wall
wall,
bluRayDepth + 2*wall,
bluRayHeight + outerWall]);
cube([ // -y front sidedoor 1
bluRaySidedoor + wall,
wall,
bluRayHeight + outerWall]);
translate([bluRayWidth + wall - bluRaySidedoor, 0, 0])
cube([ // -y sidedoor 2
bluRaySidedoor + wall,
wall,
bluRayHeight + outerWall]);
translate([bluRayWidth - 3, wall - 0.5, 0])
rotate([0, 0, -15])
cube([0.4, 20, bluRayHeight + outerWall]);
translate([6.6, wall - 0.5, 0])
rotate([0, 0, 15])
cube([0.4, 20, bluRayHeight + outerWall]);
}
translate([80, bluRayDepth + wall - epsilon, outerWall])
cube([ // +y window cutout
bluRayBackWindow,
wall + 2*epsilon,
bluRayHeight + epsilon]);
}
}
// Blu-Ray lid
if (showBluRayLid) {
color("CornflowerBlue")
translate([-wall, -wall, bluRayHeight + outerWall])
// translate([0, -20, 0]) // for printing
// rotate([180, 0, 0])
union() {
cube([ // ceiling
bluRayWidth + 4*wall,
bluRayDepth + 4*wall,
wall]);
translate([0, 0, -wall])
cube([ // -x lip
wall - 0.2,
bluRayDepth + 4*wall,
2*wall]);
translate([bluRayWidth + 3*wall + 0.2, 0, -wall])
cube([ // +x lip
wall - 0.2,
bluRayDepth + 4*wall,
2*wall]);
translate([0, 0, -wall])
cube([ // -y lip
bluRayWidth + 4*wall,
wall - 0.2,
2*wall]);
translate([0, bluRayDepth + 3*wall + 0.2, -wall])
cube([ // +y lip
bluRayWidth + 4*wall,
wall - 0.2,
2*wall]);
}
}
}
// ===========================================================================
// HDD Drawer + Cubby
// ===========================================================================
hddMinDepth = 110;
hddMinHeight = 80;
hddDepth = 134;
hddHeight = 84;
hddLargeWidth = 22;
hddSmallWidth = 12;
ccDepth = 88;
ccWidth = 56;
fingerWidth = 24;
module hddSlot(width) {
cube([ // floor
width + 2*wall,
hddDepth + wall,
wall]);
translate([width + wall, hddDepth*0.25, 0])
cube([ // +x wall
wall,
hddDepth*0.75 + wall,
hddHeight/2 + wall]);
translate([0, hddDepth*0.25, 0])
cube([ // -x wall
wall,
hddDepth*0.75 + wall,
hddHeight/2 + wall]);
translate([0, hddDepth, 0])
cube([ // +y wall
width + 2*wall,
wall,
hddHeight/2 + wall]);
}
cubbyFullWidth = 2*(hddLargeWidth + wall) + 6*(hddSmallWidth + wall) + wall;
translate([outerWall + slideGap, 0, outerWall + slideGap])
union() {
// HDD Slots
if (showHddDrawer) {
translate([0, fullDepth - (hddDepth + wall + outerWall + slideGap),0])
difference() {
color("IndianRed")
union() {
for (i = [0:5]) {
translate([(hddSmallWidth + wall)*i, 0, 0])
hddSlot(hddSmallWidth);
}
for (i = [0:1]) {
translate([(hddLargeWidth + wall)*i + 6*(hddSmallWidth + wall), 0, 0])
hddSlot(hddLargeWidth);
}
// +y wall
translate([0, hddDepth, 0])
cube([cubbyFullWidth, wall, hddHeight]);
// -x wall
cube([wall, hddDepth, hddHeight]);
// +x wall
translate([cubbyFullWidth - wall, 0, ])
cube([wall, hddDepth, hddHeight]);
// floor toungue for assembly
translate([0, (wall-lapDepth)/2, 0])
cube([ cubbyFullWidth, lapDepth, wall/2 ]);
// -x wall toungue
translate([wall/2, -lapDepth/2 + wall/2, 0])
cube([wall/2, lapDepth, hddHeight]);
// +x wall toungue
translate([cubbyFullWidth - wall, -lapDepth/2 + wall/2, 0])
cube([wall/2, lapDepth, hddHeight]);
}
// floor toungue cut-out
translate([-epsilon, (wall-lapDepth)/2 - epsilon, wall/2 - epsilon])
cube([cubbyFullWidth + 2*epsilon, lapDepth + 2*epsilon, wall/2 + 2*epsilon]);
// -x wall toungue cutout
translate([-epsilon, -lapDepth/2 - epsilon + wall/2, -epsilon])
cube([wall/2 + 2*epsilon, lapDepth + 2*epsilon, hddHeight + 2*epsilon]);
// +x wall toungue cutout
translate([cubbyFullWidth - (wall/2 + epsilon), -lapDepth/2 - epsilon + wall/2, -epsilon])
cube([wall/2 + 2*epsilon, lapDepth + 2*epsilon, hddHeight + 2*epsilon]);
}
}
// Cubby drawer
if (showCubby) {
color("FireBrick")
difference() {
union() {
cube([ // base
cubbyFullWidth,
fullDepth - (hddDepth + outerWall + wall + slideGap),
wall]);
cube([ // -x wall
wall,
fullDepth - (hddDepth + outerWall + wall + slideGap),
hddHeight]);
translate([cubbyFullWidth - wall, 0, 0])
cube([ // +x wall
wall,
fullDepth - (hddDepth + outerWall + wall + slideGap),
hddHeight]);
cube([ // -y wall
cubbyFullWidth,
wall,
hddHeight]);
translate([
(cubbyFullWidth - ccDepth - 2*wall)/2,
(fullDepth - (hddDepth + outerWall + 3*wall + slideGap + ccWidth)),
0])
difference() {
// cc well walls
union() {
cube([ // -y wall
ccDepth + 2*wall,
wall,
hddHeight/2]);
translate([0, ccWidth + wall, 0])
cube([ // +y wall
ccDepth + 2*wall,
wall,
hddHeight/2]);
cube([ // -x wall
wall,
ccWidth + 2*wall,
hddHeight/2]);
translate([ccDepth + wall, 0, 0])
cube([ // +x wall
wall,
ccWidth + 2*wall,
hddHeight/2]);
}
// finger cut-out for picking up credit cards
union() {
translate([ccDepth/2 + wall, ccWidth + 2*wall + epsilon, fingerWidth/2 + wall])
rotate([90, 0, 0])
cylinder(h=ccWidth + 2*wall + 2*epsilon, r=fingerWidth/2);
translate([ccDepth/2 - fingerWidth/2 + wall, -epsilon, fingerWidth/2 + epsilon])
cube([
fingerWidth,
ccWidth + 2*wall + 2*epsilon,
hddHeight/2 - fingerWidth/2]);
}
}
// floor toungue for assembly
translate([0, fullDepth - (hddDepth + outerWall + wall + lapDepth/2), wall/2])
cube([cubbyFullWidth, lapDepth, wall/2 ]);
// -w wall toungue
translate([0, fullDepth - (hddDepth + outerWall + wall + lapDepth/2), 0])
cube([wall/2, lapDepth, hddHeight]);
// +w wall toungue
translate([cubbyFullWidth - wall/2, fullDepth - (hddDepth + outerWall + wall + lapDepth/2), 0])
cube([wall/2, lapDepth, hddHeight]);
}
// floor toungue cutaway for assembly
translate([wall-epsilon, fullDepth - (hddDepth + outerWall + wall + lapDepth/2 - epsilon), -epsilon])
cube([cubbyFullWidth + 2*epsilon - 2*wall, lapDepth + 2*epsilon, wall/2 + 2*epsilon ]);
translate([wall/2 - epsilon, fullDepth - (hddDepth + outerWall + wall + lapDepth/2), -epsilon])
cube([wall/2 + 2*epsilon, lapDepth + 2*epsilon, hddHeight + 2*epsilon]);
translate([cubbyFullWidth - wall - epsilon, fullDepth - (hddDepth + outerWall + wall + lapDepth/2), -epsilon])
cube([wall/2 + 2*epsilon, lapDepth + 2*epsilon, hddHeight + 2*epsilon]);
}
}
}
// ===========================================================================
// Right Drawer
// ===========================================================================
rightDrawerHeight = 35;
rightDrawerDepth = fullDepth - outerWall - slideGap;
rightDrawerWidth = fullWidth - cubbyFullWidth - 3*outerWall - 4*slideGap;
if (showRightDrawer) {
color("MediumSeaGreen")
translate([cubbyFullWidth + 2*outerWall + 3*slideGap, 0, bluRayHeight + 2*outerWall])
union() {
cube([ // floor
rightDrawerWidth,
rightDrawerDepth,
wall]);
cube([ // -x wall
wall,
rightDrawerDepth,
rightDrawerHeight]);
translate([rightDrawerWidth - wall, 0, 0])
cube([ // +x wall
wall,
rightDrawerDepth,
rightDrawerHeight]);
cube([ // -y wall
rightDrawerWidth,
wall,
rightDrawerHeight]);
translate([0, rightDrawerDepth - wall, 0])
cube([ // -y wall
rightDrawerWidth,
wall,
rightDrawerHeight]);
}
}
// ===========================================================================
// Letter Shelf
// ===========================================================================
letterBoxDepth = 20;
letterBoxRecline = 2;
if (showLetterShelf) {
color("PeachPuff")
translate([cubbyFullWidth + outerWall + 2*slideGap, 0, fullHeight - letterBoxDepth])
rotate([-letterBoxRecline, 0, 0])
union() {
cube([
fullWidth - cubbyFullWidth - outerWall - 2*slideGap,
fullDepth,
wall ]);
}
}
// ===========================================================================
// Outer Shell
// ===========================================================================
shell1Width = cubbyFullWidth + outerWall + 2*slideGap;
if (showShell1) {
color("MidnightBlue")
difference() {
union() {
cube([ // floor
shell1Width,
fullDepth,
outerWall]);
cube([ // -x wall
outerWall,
fullDepth,
fullHeight/3]);
translate([0, fullDepth - outerWall, 0])
cube([ // +y wall (short)
shell1Width,
outerWall,
fullHeight/3]);
translate([shell1Width/2, 0, -20])
cube([ // printing support
wall,
fullDepth,
20 + epsilon]);
}
union() {
translate([shell1Width - lapDepth, fullDepth - outerWall/2 + epsilon, -epsilon])
cube([ // +y wall lip cutout
lapDepth + epsilon,
outerWall/2 + epsilon,
fullHeight/3 + 2*epsilon]);
translate([shell1Width - lapDepth, -epsilon, outerWall/2 + epsilon])
cube([ // floor lip cutout
lapDepth + 2*epsilon,
fullDepth + 2*epsilon,
outerWall/2 + epsilon]);
}
}
}
shell2Width = fullWidth - cubbyFullWidth - outerWall - 2*slideGap;
if (showShell2Top) {
color("SlateBlue")
translate([cubbyFullWidth + outerWall + 2*slideGap, 0, fullHeight/2])
difference() {
union() {
cube([ // middle x wall
outerWall,
fullDepth,
fullHeight/2]);
translate([shell2Width - outerWall, 0, 0])
cube([ // +x wall
outerWall,
fullDepth,
fullHeight/2]);
translate([0, fullDepth - outerWall, 0])
cube([ // +y wall (tall)
shell2Width,
outerWall,
fullHeight/2]);
translate([0, 0, fullHeight/2 - outerWall])
cube([ // ceiling
shell2Width,
fullDepth,
outerWall ]);
}
union() {
translate([-epsilon, fullDepth - outerWall/2 + epsilon, -epsilon])
cube([ // +y wall lip cutout
shell2Width + 2*epsilon,
outerWall/2 + epsilon,
lapDepth + 2*epsilon]);
translate([outerWall/2, -epsilon, -epsilon])
cube([ // -x wall lip cutout
outerWall/2 + 2*epsilon,
fullDepth,
lapDepth + 2*epsilon ]);
translate([shell2Width - outerWall -epsilon, -epsilon, -epsilon])
cube([ // +x wall lip cutout
outerWall/2 + 2*epsilon,
fullDepth,
lapDepth + 2*epsilon ]);
}
}
}
if (showShell2Bot) {
color("DarkSlateBlue")
translate([cubbyFullWidth + outerWall + 2*slideGap, 0, 0])
union() {
cube([ // floor
shell2Width,
fullDepth,
outerWall]);
cube([ // middle x wall
outerWall,
fullDepth,
fullHeight/2]);
translate([shell2Width - outerWall, 0, 0])
cube([ // +x wall
outerWall,
fullDepth,
fullHeight/2]);
translate([0, fullDepth - outerWall, 0])
cube([ // +y wall (tall)
shell2Width,
outerWall,
fullHeight/2]);
translate([-lapDepth, fullDepth - outerWall/2, 0])
cube([ // +y wall lip 1 (to shell 1)
lapDepth + epsilon,
outerWall/2,
fullHeight/3]);
translate([0, fullDepth - outerWall/2, fullHeight/2 - epsilon])
cube([ // +y wall lip 2 (to shell 2 top)
shell2Width,
outerWall/2,
lapDepth + epsilon]);
translate([outerWall/2, 0, fullHeight/2 - epsilon])
cube([ // -x wall lip
outerWall/2,
fullDepth,
lapDepth + epsilon ]);
translate([shell2Width - outerWall, 0, fullHeight/2 - epsilon])
cube([ // +x wall lip
outerWall/2,
fullDepth,
lapDepth + epsilon ]);
translate([-lapDepth, 0, outerWall/2])
cube([ // floor lip
lapDepth + epsilon,
fullDepth,
outerWall/2 ]);
}
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,42 @@
module triPrism(s = 2, h = 4) {
difference() {
cube([s, s, h]);
translate([0, 0, -0.5]) rotate([0, 0, 45]) cube([1.5 * s, 1.5 * s, h + 1]);
}
}
$fn=50;
ep = 0.01;
module antiAir() {
// base
cylinder(d = 12, h = 1);
for (i = [0:3]) {
color("LightCoral") rotate([0, 15, 90 * i]) translate([-0.5, -1.5, 1.5]) cube([5.5, 3, 1]);
}
// central column
translate([-1.5, -1, 2]) cube([3, 2, 4]);
// body
color("LightSeaGreen") translate([-3.25, 1.5, 3]) rotate([90, 0, 0]) triPrism(s=5, h=3);
color("Coral") translate([0, 1.75, 4.25]) rotate([90, 0, 0]) cylinder(d=2, h=3.5);
intersection() {
color("LightSteelBlue") translate([-8, -1.5, 0]) rotate([0, 45, 0]) cube([2.5, 3, 20]);
rotate([0, -45, 0]) scale([1.3, 0.75, 1]) translate([2.5, 0, 0]) cylinder(d=7, h=8);
}
// main barrel
translate([-4.5, 0, 3.25]) rotate([0, 45, 0]) cylinder(d=1.6, h=16);
// decorations
color("Cornsilk") translate([0, 0, 7.5]) rotate([0, 45, 0]) cylinder(d=3, h=0.6);
color("Cornsilk") translate([-3.5, 0, 4]) rotate([0, 45, 0]) cylinder(d=3, h=0.6);
color("MistyRose") for (i = [0:1]) {
translate([-3.25, 1.5 - 3*i, 3.25]) rotate([0, 45, 0]) cylinder(d=1, h=6);
}
}
antiAir();

View File

@ -0,0 +1,90 @@
//$fn=50;
ep=0.1;
module engine() {
intersection() {
union() {
rotate([90, 0, 0]) cylinder(r=1, h=3);
translate([0, -3, 0]) scale([1, 3, 1]) sphere(r=1);
}
translate([0, -11.75, 0]) scale([1, 3, 1]) sphere(r=4);
}
}
module b17Bomber() {
color("DarkOliveGreen")
difference() {
union() {
// right wing
rotate([0, 0, -5]) translate([-ep, 0, 0]) cube([18 + ep, 4, 1]);
rotate([0, 0, 5]) translate([-ep + 0.5, -3.90, 0]) cube([18 + ep, 4, 1]);
translate([18.2, 0.05, 0]) cylinder(r=2.35, h=1);
// right tail wing
translate([-ep + 0.25, -18.35, 0]) rotate([0, 0, 4]) cube([9 + ep, 2.5, 1]);
translate([-ep , -15.40, 0]) rotate([0, 0, -15]) cube([9 + ep, 2.5, 1]);
translate([8.80, -16.5, 0]) cylinder(r=1.25, h=1);
// right wing engines
translate([6, 5.5, 0.75]) engine();
translate([11, 4.5, 0.75]) engine();
mirror([1, 0, 0])
union() {
// left wing
rotate([0, 0, -5]) translate([-ep, 0, 0]) cube([18 + ep, 4, 1]);
rotate([0, 0, 5]) translate([-ep + 0.5, -3.90, 0]) cube([18 + ep, 4, 1]);
translate([18.2, 0.05, 0]) cylinder(r=2.35, h=1);
// left tail wing
translate([-ep + 0.25, -18.35, 0]) rotate([0, 0, 4]) cube([9 + ep, 2.5, 1]);
translate([-ep , -15.40, 0]) rotate([0, 0, -15]) cube([9 + ep, 2.5, 1]);
translate([8.80, -16.5, 0]) cylinder(r=1.25, h=1);
// right wing engines
translate([6, 5.5, 0.75]) engine();
translate([11, 4.5, 0.75]) engine();
}
// fuselage
//intersection() {
union() {
translate([0, 4, 1.5]) rotate([90, 0, 0]) cylinder(r=2.25, h=10);
translate([0, 4, 1.5]) scale([1, 1.75, 1]) sphere(2.25);
translate([0, -6, 1.5]) scale([1, 6.00, 1]) sphere(2.25);
}
/*
translate([0, -17.0, 1.5]) scale([1, 1.5, 1]) sphere(16);
translate([0, -16.25, 1.5]) scale([1, 4.0, 1]) sphere(6);
*/
//}
//cockpit
intersection() {
union() {
translate([0, 1, 3.25]) cube([2.5, 6, 2], center=true);
translate([0, -2, 2.85]) rotate([45, 0, 0]) cube([2.5, 2.5, 2], center=true);
translate([0, 3.6, 3.25]) rotate([0, 0, 45]) cube([2.5, 2.5, 2], center=true);
}
translate([0, 1, 3.25]) cube([2.5, 10, 2], center=true);
}
// top gun
translate([0, 0, 4.25]) sphere(d=1.5);
translate([0.5, -1, 4.4]) rotate([90, 0, 0]) cylinder(d=0.4, h=1.5, center=true);
translate([-0.5, -1, 4.4]) rotate([90, 0, 0]) cylinder(d=0.4, h=1.5, center=true);
// tail
translate([0, -16.50, 2]) rotate([-15, 0, 0]) rotate([0, 90, 0]) cube([7, 4, 1], center=true);
translate([0, -10.0, 2.15]) rotate([85, 0, 0]) rotate([0, 90, 0]) cube([10, 4, 1], center=true);
translate([0, -14.0, 3.00]) rotate([55, 0, 0]) rotate([0, 90, 0]) cube([4, 4, 1], center=true);
translate([0, -14.5, 2.5]) rotate([25, 0, 0]) rotate([0, 90, 0]) cube([7, 4, 1], center=true);
translate([0, -15.75, 5.80]) rotate([0, 90, 0]) cylinder(r=1.75, h=1, center=true);
}
translate([0, -5, -2.5]) cube([30, 30, 5], center=true);
}
}
b17Bomber();

View File

@ -0,0 +1,77 @@
$fn=50;
ep=0.1;
module messerschmitt() {
color("SlateGrey")
difference() {
union() {
// right wing
translate([0, -1, 0])
intersection() {
union() {
rotate([0, 0, -5]) translate([-ep, -0.25, 0]) cube([14.5 + ep, 4.25, 1]);
rotate([0, 0, 8]) translate([-ep + 0.5, -3.50, 0]) cube([14 + ep, 4, 1]);
translate([8, 0.5, 0.9]) cube([1, 4, 1], center=true);
translate([8, 0.5, 0.9]) cube([4, 1, 1], center=true);
}
translate([-6, 0, 0]) sphere(20);
translate([-17.5, 0.5, 1]) scale([4, 1, 1]) cylinder(r=8, h=2, center=true);
}
// right tail wing
translate([-ep + 0.25, -15.35, 2.5]) rotate([0, 0, 4]) cube([4 + ep, 1.5, 1]);
translate([-ep , -13.65, 2.5]) rotate([0, 0, -15]) cube([4 + ep, 1.5, 1]);
translate([4, -14.15, 2.5]) cylinder(r=0.90, h=1);
mirror([1, 0, 0])
union() {
// left wing
translate([0, -1, 0])
intersection() {
union() {
rotate([0, 0, -5]) translate([-ep, -0.25, 0]) cube([14.5 + ep, 4.25, 1]);
rotate([0, 0, 8]) translate([-ep + 0.5, -3.50, 0]) cube([14 + ep, 4, 1]);
translate([8, 0.5, 0.9]) cube([1, 4, 1], center=true);
translate([8, 0.5, 0.9]) cube([4, 1, 1], center=true);
}
translate([-6, 0, 0]) sphere(20);
translate([-17.5, 0.5, 1]) scale([4, 1, 1]) cylinder(r=8, h=2, center=true);
}
// left tail wing
translate([-ep + 0.25, -15.35, 2.5]) rotate([0, 0, 4]) cube([4 + ep, 1.5, 1]);
translate([-ep , -13.65, 2.5]) rotate([0, 0, -15]) cube([4 + ep, 1.5, 1]);
translate([4, -14.15, 2.5]) cylinder(r=0.90, h=1);
}
// fuselage
intersection() {
union() {
translate([0, 9, 1.25]) rotate([90, 0, 0]) cylinder(r=1.5, h=13);
translate([0, -2, 1.25]) rotate([-5.0, 0, 0]) translate([0, -2, 0]) scale([0.75, 9.0, 1]) sphere(1.5);
translate([0, -3, 1.25]) rotate([-5.0, 0, 0]) scale([1, 3.0, 1]) sphere(1.5);
}
translate([0, -17.0, 1.5]) scale([1, 1.5, 1]) sphere(16);
translate([0, -10, 1.25]) scale([1, 6.0, 1]) sphere(3);
}
//cockpit
//#translate([0, -3, 1.25]) rotate([-2.5, 0, 0]) scale([1, 3.0, 1]) sphere(1.5);
difference() {
translate([0, -5, 2.25]) rotate([92, 0, 0]) cylinder(d=2,h=10, center=true);
translate([0, 0.5, 3]) rotate([30, 0, 0]) cube([2, 2, 3], center=true);
}
// tail
translate([0, -14.40, 3.0]) rotate([-15, 0, 0]) rotate([0, 90, 0]) cube([2.5, 3, 1], center=true);
translate([0, -13.5, 3.5]) rotate([25, 0, 0]) rotate([0, 90, 0]) cube([2.5, 3, 1], center=true);
translate([0, -14.00, 4.5]) rotate([0, 90, 0]) cylinder(r=1.50, h=1, center=true);
translate([0, -14, 0]) scale([0.5, 1, 1]) cylinder(r=1, h=3);
}
translate([0, -5, -2.5]) cube([30, 30, 5], center=true);
}
}
messerschmidt();

View File

@ -0,0 +1,57 @@
//$fn=50;
ep=0.1;
// Create a module so you can call it like a normal OpenSCAD function, like
// cube
module fighterZero() {
color("OrangeRed")
difference() {
union() {
// right wing
translate([-ep, -1, 0]) cube([11 + ep, 5, 1]);
rotate([0, 0, 15]) translate([-ep + 0.5, -3.90, 0]) cube([11 + ep, 4, 1]);
translate([11, 1.5, 0]) cylinder(r=2.5, h=1);
// right tail wing
translate([-ep + 0.25, -15.35, 0]) rotate([0, 0, 4]) cube([5 + ep, 2, 1]);
translate([-ep , -13.65, 0]) rotate([0, 0, -15]) cube([5 + ep, 2, 1]);
translate([5, -14, 0]) cylinder(r=1, h=1);
mirror([1, 0, 0])
union() {
// left wing
translate([-ep, -1, 0]) cube([11 + ep, 5, 1]);
rotate([0, 0, 15]) translate([-ep + 0.5, -3.90, 0]) cube([11 + ep, 4, 1]);
translate([11, 1.5, 0]) cylinder(r=2.5, h=1);
// left tail wing
translate([-ep + 0.25, -15.35, 0]) rotate([0, 0, 4]) cube([5 + ep, 2, 1]);
translate([-ep , -13.65, 0]) rotate([0, 0, -15]) cube([5 + ep, 2, 1]);
translate([5, -14, 0]) cylinder(r=1, h=1);
}
// fuselage
intersection() {
union() {
translate([0, 7, 1.5]) rotate([90, 0, 0]) cylinder(r=2, h=10);
translate([0, -2, 1.5]) scale([1, 7.5, 1]) sphere(2);
}
translate([0, -17.0, 1.5]) scale([1, 1.5, 1]) sphere(16);
translate([0, -16.25, 1.5]) scale([1, 4.0, 1]) sphere(6);
}
//cockpit
translate([0, 0.5, 0.5]) scale([1, 2, 2]) sphere(2);
// tail
translate([0, -14.40, 2]) rotate([-15, 0, 0]) rotate([0, 90, 0]) cube([5, 3, 1], center=true);
translate([0, -13.0, 2.5]) rotate([25, 0, 0]) rotate([0, 90, 0]) cube([5, 3, 1], center=true);
translate([0, -13.85, 4.55]) rotate([0, 90, 0]) cylinder(r=1.40, h=1, center=true);
}
translate([0, -5, -2.5]) cube([30, 30, 5], center=true);
}
}
//fighterZero();

View File

@ -0,0 +1,121 @@
$fn=120;
ep=0.1;
module reference() {
translate([-0.1, 0, 5]) rotate([0, 0, 0.5])
translate([0, -5, 0]) rotate([0, 0, -90]) difference() {
scale([0.08, 0.08, 0.01]) surface(file="yak9-overhead.png", center=true, convexity = 5, invert = true);
translate([-20, -20, -1.75]) cube([40, 40, 1]);
}
translate([2, -5, 2.60]) rotate([90, 0, -90]) difference() {
scale([0.066, 0.066, 0.01]) surface(file="yak9-profile.png", center=true, convexity = 5, invert = true);
translate([-20, -20, -1.75]) cube([40, 40, 1]);
}
translate([0, 5, 1.70]) rotate([90, 0, 0]) difference() {
scale([0.043, 0.043, 0.01]) surface(file="yak9-front.png", center=true, convexity = 5, invert = true);
translate([-20, -20, -1.75]) cube([40, 40, 1]);
}
}
module yak9() {
color("SaddleBrown")
// fuselage
/*difference() {
translate([0, -5, -0.5]) union() {
intersection() {
// tail shaping (x & y)
translate([98.75, 4, -1]) cylinder(r=100, h = 6);
translate([-98.75, 4, -1]) cylinder(r=100, h = 6);
}
// nose shaping
translate([0, 6.25, 2.4]) scale([1, 4, 1]) sphere(r=1.25);
translate([-3, 6.0, 1.9]) scale([1, 2.5, 1]) rotate([0, 90, 0]) cylinder(d = 3, h=6);
}
translate([-2, -19, -2]) cube([4, 4, 8]);
}*/
union() {
translate([0, 2, 1.80]) rotate([90, 0, 0]) cylinder(d=2.5, h=24);
}
}
module messerschmitt() {
color("SlateGrey")
difference() {
union() {
// right wing
translate([0, -1, 0])
intersection() {
union() {
rotate([0, 0, -5]) translate([-ep, -0.25, 0]) cube([14.5 + ep, 4.25, 1]);
rotate([0, 0, 8]) translate([-ep + 0.5, -3.50, 0]) cube([14 + ep, 4, 1]);
translate([8, 0.5, 0.9]) cube([1, 4, 1], center=true);
translate([8, 0.5, 0.9]) cube([4, 1, 1], center=true);
}
translate([-6, 0, 0]) sphere(20);
translate([-17.5, 0.5, 1]) scale([4, 1, 1]) cylinder(r=8, h=2, center=true);
}
// right tail wing
translate([-ep + 0.25, -15.35, 2.5]) rotate([0, 0, 4]) cube([4 + ep, 1.5, 1]);
translate([-ep , -13.65, 2.5]) rotate([0, 0, -15]) cube([4 + ep, 1.5, 1]);
translate([4, -14.15, 2.5]) cylinder(r=0.90, h=1);
mirror([1, 0, 0])
union() {
// left wing
translate([0, -1, 0])
intersection() {
union() {
rotate([0, 0, -5]) translate([-ep, -0.25, 0]) cube([14.5 + ep, 4.25, 1]);
rotate([0, 0, 8]) translate([-ep + 0.5, -3.50, 0]) cube([14 + ep, 4, 1]);
translate([8, 0.5, 0.9]) cube([1, 4, 1], center=true);
translate([8, 0.5, 0.9]) cube([4, 1, 1], center=true);
}
translate([-6, 0, 0]) sphere(20);
translate([-17.5, 0.5, 1]) scale([4, 1, 1]) cylinder(r=8, h=2, center=true);
}
// left tail wing
translate([-ep + 0.25, -15.35, 2.5]) rotate([0, 0, 4]) cube([4 + ep, 1.5, 1]);
translate([-ep , -13.65, 2.5]) rotate([0, 0, -15]) cube([4 + ep, 1.5, 1]);
translate([4, -14.15, 2.5]) cylinder(r=0.90, h=1);
}
// fuselage
intersection() {
union() {
translate([0, 9, 1.25]) rotate([90, 0, 0]) cylinder(r=1.5, h=13);
translate([0, -2, 1.25]) rotate([-5.0, 0, 0]) translate([0, -2, 0]) scale([0.75, 9.0, 1]) sphere(1.5);
translate([0, -3, 1.25]) rotate([-5.0, 0, 0]) scale([1, 3.0, 1]) sphere(1.5);
}
translate([0, -17.0, 1.5]) scale([1, 1.5, 1]) sphere(16);
translate([0, -10, 1.25]) scale([1, 6.0, 1]) sphere(3);
}
//cockpit
//#translate([0, -3, 1.25]) rotate([-2.5, 0, 0]) scale([1, 3.0, 1]) sphere(1.5);
difference() {
translate([0, -5, 2.25]) rotate([92, 0, 0]) cylinder(d=2,h=10, center=true);
translate([0, 0.5, 3]) rotate([30, 0, 0]) cube([2, 2, 3], center=true);
}
// tail
translate([0, -14.40, 3.0]) rotate([-15, 0, 0]) rotate([0, 90, 0]) cube([2.5, 3, 1], center=true);
translate([0, -13.5, 3.5]) rotate([25, 0, 0]) rotate([0, 90, 0]) cube([2.5, 3, 1], center=true);
translate([0, -14.00, 4.5]) rotate([0, 90, 0]) cylinder(r=1.50, h=1, center=true);
translate([0, -14, 0]) scale([0.5, 1, 1]) cylinder(r=1, h=3);
}
translate([0, -5, -2.5]) cube([30, 30, 5], center=true);
}
}
reference();
//#messerschmitt();
yak9();

View File

@ -0,0 +1,319 @@
use <fighter-japan-mitsubishi-zero.scad>;
use <soldier.scad>;
use <sub.scad>;
use <b17-bomber.scad>;
module tank() {
translate([31.25, -48.5, 0]) import("AA_Stuart.stl");
}
module transport() {
translate([-35.5, -17.5, -0.4]) import("AA_Hunt.stl");
}
module carrier() {
scale([0.7971014492753623, 0.7971014492753623, 0.7971014492753623])
translate([-8, -7, 0])
import("AA_Midway.stl");
}
module battleship() {
scale([1.153846153846154, 1, 1])
translate([-43.5, -116, 0])
import("AA_Des_Moines.stl");
}
$fn=50;
// general global values
ep = 0.01;
wall = 2;
side = 145;
innerSide = side - 2*wall;
//font = "Source Code Pro";
font = "Impact";
// Toggles
inclTray = true;
inclBase = true;
inclSoldier = true;
inclTank = true;
inclFighter = true;
inclSub = true;
inclBomber = true;
inclCarrier = true;
inclBttlship = true;
inclToken = true;
inclLid = false;
inclLidBase = false;
inclPieces = false;
// tray section dimensions [x, y, z]
soldierDims = [88, 43, 10];
tankDims = [innerSide - soldierDims[0], 60, 10];
fighterDims = [innerSide - soldierDims[0], 66, 10];
subTprtDims = [innerSide, 19, 10];
bomberDims = [44 + 2 * wall, 36, 10];
carrierDims = [innerSide - fighterDims[0], 14 + 2*wall, 10];
bttlshipDims = [
innerSide - fighterDims[0], // x
innerSide - soldierDims[1] - bomberDims[1] - carrierDims[1] - subTprtDims[1] + (wall / 2), // y
10]; // z
tokenDims = [innerSide - fighterDims[0] - bomberDims[0], bomberDims[1], 10];
module base() {
cube([side, side, wall + ep]);
}
module soldiers() {
difference() {
color("SlateGrey") cube([soldierDims[0] + ep, soldierDims[1] + ep, soldierDims[2]]);
for (i = [0:4]) {
translate([9 + 15.5*i, 9, -ep]) color("Teal") cylinder(d=14.5, h=12 + ep);
translate([16.5 + 15.5*i, 9 + 13, -ep]) color("Teal") cylinder(d=14.5, h=12 + ep);
translate([9 + 15.5*i, 9 + 2 * 13, -ep]) color("Teal") cylinder(d=14.5, h=12 + ep);
}
}
if (inclPieces) {
for (i = [0:4]) {
color("DarkGreen") translate([9 + 15.5 * i, 9, 0]) soldier();
color("DarkGreen") translate([16.5 + 15.5*i, 9 + 14, 0]) soldier();
color("DarkGreen") translate([9 + 15.5*i, 9 + 2 * 14, 0]) soldier();
}
}
}
module tanks() {
rotate([0, 0, 180])
union() {
translate([wall + 32, 57.5, 10 - ep])
rotate([0, 0, 180])
linear_extrude(2 + ep)
text(text = "ARMOR", font = font, size = 8);
difference() {
color("MediumSeaGreen") cube([tankDims[0] + ep, tankDims[1] + ep, tankDims[2]]);
for (i = [0:8]) {
translate([7 + 17 * floor(i/3), wall + 14.5 * (i % 3), -0.25])
rotate([0, -45, 0])
cube([22, 12, 10]);
}
translate([41, wall + 14.5 * 3, -0.25]) rotate([0, -45, 0]) cube([22, 12, 10]);
}
if (inclPieces) {
for (i = [0:8]) {
translate(
[7 + wall + 17 * floor(i / 3),
10.5 + wall + 14.5 * (i % 3),
1])
rotate([45, 0, -90])
translate([0, -2, 0])
tank();
}
translate([41 + wall, 10.5 + wall + 14.5 * 3, 1])
rotate([45, 0, -90])
translate([0, -2, 0]) tank();
}
}
}
module fighters() {
union() {
translate([wall + 49, wall + 12, 10 - ep])
rotate([0, 0, 90])
linear_extrude(2 + ep)
text(text = "FIGHTERS", font = font, size = 8);
difference() {
color("Khaki") cube([fighterDims[0] + ep, fighterDims[1] + ep, fighterDims[2]]);
for (i = [0:9]) {
translate([wall + (i%5) * 8, 32 * floor(i/5) + wall, -ep])
cube([6, 30, 10 + 2*ep]);
}
}
if (inclPieces) {
for (i = [0:9]) {
translate([wall + 5 + (i%5) * 8, 32 * floor(i/5) + 17, 7])
rotate([-90, 0, 90])
fighterZero();
}
}
}
}
module subsAndTransports() {
union() {
if (inclFighter) {
translate([139, -wall - 4, 10 - ep])
rotate([0, 0, 90])
linear_extrude(2 + ep)
text(text = "SUBS", font = font, size = 8);
}
if (inclCarrier) {
translate([wall, 18, 10 - ep])
rotate([0, 0, -90])
linear_extrude(2 + ep)
text(text = "TPRT", font = font, size = 8);
}
difference() {
color("RoyalBlue") cube([subTprtDims[0], subTprtDims[1], subTprtDims[2]]);
for (i = [0:5]) {
translate([wall + 44 + 18 * i, wall + 4, 0]) rotate([0, -60, 0]) cylinder(r=4, h=30);
translate([wall + 36 + 18 * i, wall + 12, 0]) rotate([0, -60, 0]) cylinder(r=4, h=30);
}
}
if (inclPieces) {
for (i = [0:2]) {
translate([wall + 18 + 18 * i, wall + 3.5, 12.5]) rotate([0, 30, 0]) translate([-14, 0, 0]) transport();
translate([wall + 10 + 18 * i, wall + 10.5, 12.5]) rotate([0, 30, 0]) translate([-14, 0, 0]) transport();
}
for (i = [3:5]) {
translate([wall + 20 + 18 * i, wall + 2.5, 12.5]) rotate([90, 60, 180]) sub();
translate([wall + 16 + 18 * i, wall + 10.5, 12.5]) rotate([90, 60, 180]) sub();
}
}
}
}
module bombers() {
union() {
translate([wall, wall, 10 - ep])
linear_extrude(2 + ep)
text(text = "BOMBERS", font = font, size = 8);
difference() {
color("DarkSlateBlue") cube([bomberDims[0] + ep, bomberDims[1] + ep, bomberDims[2]]);
for (i = [0:2]) {
translate([wall, 10 + wall + i * 8, -ep]) cube([44, 6, 10 + 2*ep]);
}
}
if (inclPieces) {
for (i = [0:2]) {
translate([24, 13 + i * 8, 8.5]) rotate([-90, 0, 0]) b17Bomber();
}
}
}
}
module carriers() {
union() {
translate([wall, 17, 10 - ep])
rotate([0,0,-90])
linear_extrude(2 + ep)
text(text = "A.C." ,font = font, size = 8);
difference() {
color("LightCoral") union() {
cube([carrierDims[0] + ep, carrierDims[1] + ep, carrierDims[2]]);
translate([40, 0, -18]) rotate([0, -30, 0]) cube([55, 15 + 2*wall + ep, 20]);
translate([10, 0, -18]) rotate([0, -30, 0]) cube([55, 15 + 2*wall + ep, 20]);
}
translate([40, wall, -1]) rotate([0, -30, 0]) cube([55, 14, 6]);
translate([10, wall, -1]) rotate([0, -30, 0]) cube([55, 14, 6]);
translate([0, -ep, 20]) cube([carrierDims[0], carrierDims[1] + wall, carrierDims[2]]);
}
if (inclPieces) {
translate([51, 3, 25]) rotate([-30, 0, 90]) translate([0, 0, 0]) carrier();
translate([82, 3, 25]) rotate([-30, 0, 90]) translate([0, 0, 0]) carrier();
}
}
}
module battleships() {
union() {
translate([bttlshipDims[0] - 8 - wall, 26, 10 - ep])
rotate([0,0,-90])
linear_extrude(2 + ep)
text(text = "BSHP" ,font = font, size = 8);
difference() {
color("BurlyWood") union() {
cube([bttlshipDims[0] + ep, bttlshipDims[1] + ep, bttlshipDims[2]]);
for (i = [0:2]) {
translate([37 - 29 * (i%2), 6 * i + 1, -18])
rotate([0, -30, 0])
cube([55, 8 + 2*wall, 20]);
}
translate([8, wall/2, -18])
rotate([0, -30, 0])
cube([55, 16 + 4*wall, 20]);
}
for (i = [0:2]) {
translate([37 - 29 * (i%2), 6 * i + wall + 1, -1])
rotate([0, -30, 0])
cube([55, 8, 12]);
}
translate([0, 0, 20]) cube([bttlshipDims[0], bttlshipDims[1], 10]);
translate([-10 + ep, 0, -5]) cube([10, bttlshipDims[1], 10]);
translate([bttlshipDims[0] - 12, 0, 10]) cube([16, bttlshipDims[1], 20]);
}
if (inclPieces) {
for (i = [0:2]) {
translate([9 + (1 - (i%2))*30, 10.5 + i * 6.15, 0]) rotate([30, 0, -90]) battleship();
}
}
}
}
module tokens() {
difference() {
color("DarkSeaGreen") cube([tokenDims[0] + ep, tokenDims[1] + ep, tokenDims[2]]);
translate([wall, wall, 10])
rotate([0, 30, 0])
cube([tokenDims[0] / 1.5, tokenDims[1] - 2 * wall, 20]);
translate([tokenDims[0] - 16 - wall, wall, -ep]) cube([16, tokenDims[1] - 2 * wall, 20]);
}
}
module allPieceTrays() {
difference() {
union() {
if (inclSoldier) soldiers();
if (inclTank) translate([soldierDims[0] + tankDims[0], tankDims[1] + ep, 0]) tanks();
if (inclFighter) translate([soldierDims[0] - ep, tankDims[1] - wall, 0]) fighters();
if (inclSub) translate([0, innerSide - subTprtDims[1], 0]) subsAndTransports();
if (inclBomber) translate([soldierDims[0] - bomberDims[0], soldierDims[1], 0]) bombers();
if (inclCarrier) translate([0, soldierDims[1] + bomberDims[1], 0]) carriers();
if (inclBttlship) translate([0, soldierDims[1] + bomberDims[1] + carrierDims[1], 0]) battleships();
if (inclToken) translate([0, soldierDims[1], 0]) tokens();
}
// cut away anything below the tray bottoms
translate([0, 0, -30]) cube([side, side, 30]);
}
}
module tray() {
difference() {
union() {
if (inclBase) base();
translate([wall, wall, wall]) allPieceTrays();
}
// index cut for the lid
translate([0, side - 7.07, -10]) rotate([0, 0, 45]) cube([10, 10, 50]);
}
}
module lidBase() {
cube([side + 2, side + 2, wall + ep]);
//cube([side + 2*wall + 2, wall
}
module lid() {
color("LightSteelBlue")
translate([-1, -1, 36])
union() {
lidBase();
}
}
if (inclTray) tray();
if (inclLid) lid();

View File

@ -0,0 +1,30 @@
module triPrism(s = 2, h = 4) {
difference() {
cube([s, s, h]);
translate([0, 0, -0.5]) rotate([0, 0, 30]) cube([1.5 * s, 1.5 * s, h + 1]);
}
}
$fn=50;
ep = 0.01;
module industrialCenter() {
// smokestacks
sw = 2.5;
sh = 17;
translate([-1, sw / 2 - 0.1, 0]) cylinder(d=sw, 17);
translate([-1, -sw / 2 + 0.1, 0]) cylinder(d=sw, 17);
// base
bw = 8;
translate([0, -bw / 2, 0]) cube([15, bw, 8]);
// roof
for (i = [0:2]) {
translate([5 * i, bw / 2, 8 - ep]) rotate([90, 0, 0]) triPrism(s = 5, h = 8);
}
}
industrialCenter();

View File

@ -0,0 +1,175 @@
//$fn = 50;
module lowerLeg() {
translate([0, 0, -6]) union() {
translate([0, 0, 0]) cylinder(d1=1.5, d2=2.0, h=6);
translate([0, -0.25, 3.75]) scale([1, 1, 2]) sphere(1);
translate([0, 0, 6]) sphere(1);
}
}
module upperLeg() {
translate([0, 0, -6])
intersection() {
union() {
cylinder(d1=2.0, d2=2.75, h=6);
translate([0, 0.05, 3.5]) scale([1.30, 1.50, 4]) sphere(1);
}
cylinder(d1=3, d2=3.75, h=6);
}
}
module leg(footTilt = 0, calfTilt = 0, thighTilt =0) {
rotate([thighTilt, 0, 0])
union() {
upperLeg();
translate([0, 0, -5.75])
rotate([calfTilt, 0, 0])
union() {
lowerLeg();
translate([0, 0, -5.75])
rotate([footTilt, 0, 0])
translate([0, 1, 0])
scale([1, 2, 1]) sphere(1);
}
}
// foot
//translate([0, 1, 0]) rotate([0, 0, 0]) scale([1, 2, 1]) sphere(1);
//translate([0, 0, 0]) lowerLeg();
//translate([0, 0, 8.4]) upperLeg();
}
module upperArm() {
translate([0, 0, -5])
union() {
cylinder(d1=1.4, d2=1.8, h=5);
translate([0, -0.1, 3]) scale([0.85, 1, 2.75]) sphere(1);
translate([0, 0.25, 3]) scale([1.00, 1, 2.25]) sphere(1);
}
}
module lowerArm() {
translate([0, 0, -4.5]) cylinder(d1=1.25, d2=1.4, h=4.5);
translate([0, 0, -1.25]) scale([1, 1, 2.5]) sphere(0.80);
}
module arm(rotation = 0, flexion = 0, abduction = 0, elbowFlexion = 0) {
// shoulder
sphere(0.90);
rotate([flexion, abduction, rotation])
union() {
upperArm();
// elbow
translate([0, 0, -5]) sphere(0.7);
translate([0, 0, -5])
rotate([elbowFlexion, 0, 0])
union() {
lowerArm();
translate([0, 0, -4.5]) scale([1, 0.75, 1.5]) sphere(1);
}
}
}
module person(
// forward/backword, sideways, rotation
torso = [0, 0, 0],
// flexion, knee flexion, ankle flexion, abduction, rotation
leftLeg = [0, 0, 0, 0, 0],
rightLeg = [0, 0, 0, 0, 0],
// flexion, elbow flexion, abduction, rotation
leftArm = [0, 0, -90, 0],
rightArm = [0, 0, 90, 0]
) {
rotate([torso[0], torso[1], torso[2]])
union() {
// helmet
translate([0, 0, 9]) scale([2, 1.75, 2])
intersection() {
sphere(1);
translate([0, 0, 0.6]) cube([2, 2, 1], center=true);
}
// head & neck
translate([0, 0, 9]) scale([1.75, 1.5, 2]) sphere(1);
translate([0, 0, 7]) cylinder(d=1.5, h=2);
// torso
intersection() {
scale([3, 1.75, 1]) cylinder(r1=0.9, r2=1.1, h=7);
translate([0, 0, -0.5]) scale([8, 4, 8]) sphere(1);
}
// backpack
translate([0, -2, 4]) intersection() {
cube([4.5, 2, 6], center=true);
scale([3.5, 2, 3.5]) sphere(1);
}
// arms
translate([-3, 0, 6]) arm(
rotation = leftArm[3],
flexion = leftArm[0],
abduction = leftArm[2],
elbowFlexion = leftArm[1]);
translate([3, 0, 6]) arm(
rotation = rightArm[3],
flexion = rightArm[0],
abduction = rightArm[2],
elbowFlexion = rightArm[1]);
}
// pelvis
translate([0, 0, -0.5]) scale([3, 1.75, 2]) sphere(1);
// legs
translate([-1.5, 0, 0])
rotate([0, leftLeg[3], leftLeg[4]])
leg(
thighTilt = leftLeg[0],
calfTilt = leftLeg[1],
footTilt = leftLeg[2]);
translate([1.5, 0, 0])
rotate([0, rightLeg[3], rightLeg[4]])
leg(
thighTilt = rightLeg[0],
calfTilt = rightLeg[1],
footTilt = rightLeg[2]);
}
module soldier() {
difference() {
union() {
// base
translate([0, 0, 0.5]) cylinder(d=14, h=1, center=true);
// soldier
translate([0, 0, 12.25])
person(
torso = [-10, -3, -5],
leftLeg = [5, -15, -20, 20, 60],
rightLeg = [20, -24, 4, 0, -15],
leftArm = [-20, 100, 0, -30],
rightArm = [20, 130, -10, 45]);
// gun
translate([0, 4, 18])
rotate([-20, -10, -90])
union() {
translate([0, 0, 1]) cylinder(d=0.8, h=12, center=true);
translate([0, 0.4, -2]) cube([0.8, 1, 6], center=true);
translate([0, 0.6, -6]) rotate([10, 0, 0]) cube([0.8, 1.25, 4], center=true);
}
}
translate([0, 0, -0.499]) cylinder(d=14, h=1, center=true);
}
}
soldier();

View File

@ -0,0 +1,88 @@
/*skew takes an array of six angles:
*x along y
*x along z
*y along x
*y along z
*z along x
*z along y
*/
module skew(dims) {
matrix = [
[ 1, tan(dims[0]), tan(dims[1]), 0 ],
[ tan(dims[2]), 1, tan(dims[3]), 0 ],
[ tan(dims[4]), tan(dims[5]), 1, 0 ],
[ 0, 0, 0, 1 ]
];
multmatrix(matrix)
children();
}
//$fn=50;
module sub() {
difference() {
union() {
intersection() {
union() {
color("Grey")
translate([0, 0, 1.5])
skew([0, 0, 0, 65, 0, 0])
scale([2, 26, 0.75])
cylinder(d1 = 1.5, d2 = 1.25, h = 4, center = true);
color("Grey")
translate([0, -2.5, 0])
scale([1.25, 9.25, 1])
sphere(r=2);
}
color("LightGrey")
translate([0, 4.75, -82.75])
sphere(r=87);
color("LightGrey")
scale([1, 5.5, 1.5])
translate([0, 0.40, 0])
sphere(r=4);
}
intersection() {
color("Thistle")
translate([0, -17, 0.5])
cube([6, 3, 1], center=true);
color("FireBrick")
translate([0, -20, 0])
rotate([0, 0, 45])
cube(8, center=true);
}
color("LightGrey")
translate([0, 5, 2])
union() {
translate([0, 0, 0.5]) cube([1, 2, 5], center=true);
translate([0, 0, 0]) cube([2, 3, 4], center=true);
translate([0, 1.45, 0]) cylinder(r=1, h=4, center=true);
translate([0, -1.55, 0]) cylinder(r=1, h=4, center=true);
}
color("LightGrey")
translate([0, 0, 1.5])
union() {
cube([1, 2, 3.25], center=true);
cube([2, 1, 3.25], center=true);
}
color("LightGrey")
translate([0, 9, 1.5])
cylinder(r=1, h=3.25, center=true);
translate([0, 12, 1.5])
cylinder(r=1, h=3.25, center=true);
}
translate([0, 0, -3]) cube([6, 50, 6], center=true);
}
}
sub();

View File

@ -0,0 +1,2 @@
cube([60,20,10],center=true);
cube([30,20,10],center=true);

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 110 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 99 KiB

File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 146 KiB

View File

@ -0,0 +1 @@
cube([3, 6, 1]);

View File

@ -0,0 +1,65 @@
$fn = 50;
ep = 0.1;
fontSize = 10;
use <lib/skew.scad>;
use <pokemon_damage_counter_10_damage.scad>;
/* translate([40, 140, 6.1]) 10dmg(); */
translate([8, 14, 12 - ep])
color("White")
linear_extrude(1 + ep)
text(text = "10", font = "unicode.impact", size = fontSize);
translate([8, 44, 12 - ep])
color("white")
linear_extrude(1 + ep)
text(text = "20", font = "unicode.impact", size = fontSize);
translate([91, 14, 12 - ep])
color("white")
linear_extrude(1 + ep)
text(text = "50", font = "unicode.impact", size = fontSize);
translate([84, 44, 12 - ep])
color("white")
linear_extrude(1 + ep)
text(text = "100", font = "unicode.impact", size = fontSize);
translate([8, 140, 12 - ep])
color("white")
linear_extrude(1 + ep)
text(text = "P/BN", font = "unicode.impact", size = fontSize);
// Base
color("SlateGrey") translate([0, 0, 0]) cube([224, 168, 2]);
difference(){
translate([4, 4, 2 - ep])
cube([216, 160, 10 + ep]);
// 10-damage tray
translate([24, 20, 13 - ep]) color("Blue") rotate([0, 90, 0]) cylinder(r=11.5, h=44);
translate([35, 20, 13 - ep]) color("Blue") skew([0, 45, 0, 0, 0, 0])
rotate([0, 90, 0]) cylinder(r=11.5, h=44);
// 20-damage tray
translate([24, 50, 13 - ep]) color("Red") rotate([0, 90, 0]) cylinder(r=11.5, h=44);
translate([35, 50, 13 - ep]) color("Red") skew([0, 45, 0, 0, 0, 0])
rotate([0, 90, 0]) cylinder(r=11.5, h=44);
// 20-damage tray
translate([114, 20, 13 - ep]) color("LightBlue") rotate([0, 90, 0]) cylinder(r=11.5, h=24);
translate([125, 20, 13 - ep]) color("LightBlue") skew([0, 45, 0, 0, 0, 0])
rotate([0, 90, 0]) cylinder(r=11.5, h=24);
// 100-damage tray
translate([114, 50, 13 - ep]) color("LightCoral") rotate([0, 90, 0]) cylinder(r=11.5, h=24);
translate([125, 50, 13 - ep]) color("LightCoral") skew([0, 45, 0, 0, 0, 0])
rotate([0, 90, 0]) cylinder(r=11.5, h=24);
}

View File

@ -0,0 +1 @@
cube([10, 30, 1.5]);

View File

@ -0,0 +1,52 @@
module triangularPrism(angle, side1, side2, height) {
linear_extrude(height)
polygon(points = [[0, 0], [0, side1], [side2 * sin(angle), side2 * cos(angle)]]);
}
module arcCylinder(outerRadius, height, degrees, innerRadius = 0, center = false) {
epsilon = 0.01;
degToCut = 360 - (degrees % 360);
triDeg = degToCut % 60;
triSideLen = (outerRadius + epsilon) / cos(triDeg / 2);
fullTriSide = (outerRadius + epsilon) / cos(30);
numFullTriangles = floor(degToCut / 60);
difference() {
// Main cylinder body
cylinder(h=height, r=outerRadius);
// Exclusion
translate([0, 0, -1*epsilon]) union() {
// Inner cylinder (to form hole creating the wall)
if (innerRadius > 0) {
cylinder(h=height + 2*epsilon, r=max(0, innerRadius));
}
// Partial circle cut-out
if (degToCut < 360) {
rotate([0, 0, -90 - 60 * numFullTriangles]) union() {
// All 60-degree cuts get an eqilateral triangle.
if (degToCut >= 60) {
for (i = [1:numFullTriangles]) {
// rotate([-60 * i, 0, 0]) mirror([0, 1, 0]) cube([cubeSideLen, cubeSideLen, height + 2*epsilon]);
rotate([0, 0, 60 * i]) triangularPrism(
angle = 60.1,
side1 = fullTriSide,
side2 = fullTriSide,
height = height + 2*epsilon);
}
}
// Cut out the remaining angle with a triangular prism
rotate([0, 0, 0.1]) triangularPrism(
angle = triDeg + 0.1,
side1 = triSideLen,
side2 = triSideLen,
height = height + 2*epsilon);
}
}
}
}
}

View File

@ -0,0 +1,11 @@
include <arc_cylinder.scad>;
module cableSleeve(cableDiameter, length) {
innerRadius = (cableDiameter + 1) / 2; // give 1mm clearence for the cable
arcCylinder(
height = length,
outerRadius = innerRadius + 2,
innerRadius = innerRadius,
degrees = 360 - (2 * asin(cableDiameter / (cableDiameter + 2))));
}

View File

@ -0,0 +1,24 @@
module chamferedCube(size = [1, 1, 1], chamfer = 1) {
ep = 0.01;
difference() {
cube(size);
// X-axis
for (i = [0:3]) {
translate([-ep, size[1] * floor(i/2), size[2] * (i%2) - chamfer])
rotate([45, 0, 0]) cube([size[0] + 2*ep, 1.414*chamfer, 1.414*chamfer]);
}
// Y-axis
for (i = [0:3]) {
translate([size[0] * floor(i/2) - chamfer, -ep, size[2] * (i%2)])
rotate([0, 45, 0]) cube([1.414*chamfer, size[1] + 2*ep, 1.414*chamfer]);
}
// Z-axis
for (i = [0:3]) {
translate([size[0] * floor(i/2), size[1] * (i%2) - chamfer, -ep])
rotate([0, 0, 45]) cube([1.414*chamfer, 1.414*chamfer, size[2] + 2*ep]);
}
}
}

18
scad/lib/skew.scad Normal file
View File

@ -0,0 +1,18 @@
/*skew takes an array of six angles:
*x along y
*x along z
*y along x
*y along z
*z along x
*z along y
*/
module skew(dims) {
matrix = [
[ 1, tan(dims[0]), tan(dims[1]), 0 ],
[ tan(dims[2]), 1, tan(dims[3]), 0 ],
[ tan(dims[4]), tan(dims[5]), 1, 0 ],
[ 0, 0, 0, 1 ]
];
multmatrix(matrix)
children();
}

View File

@ -0,0 +1,32 @@
include <lib/cable_sleeve.scad>;
epsilon = 0.01;
laptopThickness = 16.35;
clipLength = 6;
cableDiameter = 3.75;
wallThickness = 3;
rotate([0, 0, 30])
cableSleeve(cableDiameter = cableDiameter, length = clipLength);
translate([-2, 3, 0])
color("SlateGrey")
cube([wallThickness, wallThickness, clipLength]);
translate([laptopThickness/-2 - wallThickness, 5, 0])
color("DarkOliveGreen")
cube([laptopThickness + 2*wallThickness, wallThickness, clipLength]);
translate([laptopThickness/-2, 5, 8])
color("LightSalmon")
cube([laptopThickness, wallThickness, clipLength]);
translate([laptopThickness/-2 - wallThickness - 0.2, 5, 0])
color("RoyalBlue")
//rotate([0, 0, -2])
cube([wallThickness, 4*wallThickness, clipLength]);
translate([laptopThickness/2 + 0.2, 5, 0])
color("RoyalBlue")
//rotate([0, 0, 2])
cube([wallThickness, 4*wallThickness, clipLength]);

View File

@ -0,0 +1,50 @@
include <lib/arc_cylinder.scad>
epsilon = 0.01;
laptopThickness = 16.35;
laptopWidth = 358;
standWidth = 152;
cableDiameter = 3.75;
supportLength = 10;
module cableSleeve(cableDiameter, length) {
innerRadius = (cableDiameter + 1) / 2; // give 1mm clearence for the cable
arcCylinder(
height = length,
outerRadius = innerRadius + 2,
innerRadius = innerRadius,
degrees = 360 - (2 * asin(cableDiameter / (cableDiameter + 2))));
}
difference() {
union() {
translate([0, standWidth / 2, cableDiameter + 0.51])
rotate([90, 0, 0])
cableSleeve(cableDiameter = cableDiameter, length = standWidth);
translate([-4, standWidth/2 - epsilon, -3])
cube([4, supportLength + epsilon, 7]);
translate([ -4, standWidth/-2 - supportLength + epsilon, -3])
cube([4, supportLength + epsilon, 7]);
}
translate([0, 97, cableDiameter + 0.51])
rotate([90, 0, 0])
//color("SteelBlue")
cylinder(r = (cableDiameter + 1) / 2, h = 194);
}
translate([-8 - laptopThickness - 7, standWidth/2, -4])
cube([4 + 4 + laptopThickness + 7, supportLength, 3]);
translate([-8 - laptopThickness - 7, standWidth/-2 - supportLength, -4])
cube([4 + 4 + laptopThickness + 7, supportLength, 3]);
translate([-8 - laptopThickness - 7, standWidth/2, -4])
cube([4, supportLength, 16]);
translate([-8 - laptopThickness - 7, standWidth/-2 - supportLength, -4])
cube([4, supportLength, 16]);

Binary file not shown.

After

Width:  |  Height:  |  Size: 373 KiB

View File

@ -0,0 +1,65 @@
use <../lib/chamfered-cube.scad>;
$fn = 16;
ep = 0.1;
width = 49;
difference() {
union() {
// Body
chamferedCube([width, 32, 10]);
translate([0, 16, 0]) chamferedCube([width, 24, 20]);
translate([0, 27, 0]) chamferedCube([width, 13, 40]);
translate([width/2, 40.5, 0])
difference() {
cylinder(d = 40, h = 37, $fn=64);
translate([-20, -2, -ep]) cube([40 + 2*ep, 40 + 2*ep, 40 + 2*ep]);
}
// Cylindrical Tabs
for (i = [0:1]) {
translate([(width + 5)*i - 2.5, 30.5, 36])
mirror([i, 0, 0])
difference() {
rotate([0, 90, 0]) cylinder(d = 8, h = 5, $fn=64);
translate([-4, -4.5, 0]) rotate([0, 20, 0]) cube([4, 9, 8]);
}
}
// Spring Retainer
translate([(width/2)-3.5, 16, 23.5])
union() {
translate([2.75, 0, 0]) cube([1.5, 6, 7]);
translate([0, 0, 2.75]) cube([7, 6, 1.5]);
}
}
translate([46, 4, -ep]) mirror([1, 0, 0]) linear_extrude(0.5 + ep)
text(text="WAND RELEASE", font = "Noto Sans:style=Condensed Bold", size = 5);
// subtract wand clearance diameter
translate([width/2, 40.5, -ep]) cylinder(d = 37.5, h = 40 + 2*ep, $fn=64);
// subtract to make the anchor pivot
translate([-ep, 40, 25]) rotate([30, 0, 0]) cube([width + 2*ep, 20, 20]);
// subtract to make track clearance
translate([(width - 44.3)/2, 32, -ep]) cube([44.3, 8 + ep, 40 + 2*ep]);
// subtract to make wand tab catcher
translate([(width - 24)/2, 26, 2.5])
//#translate([-4, 26, 2.5])
mirror([0, 1, 0])
difference() {
cube([24, 14, 12]);
translate([0, 12, 0]) rotate([30, 0, 0]) translate([-ep, 0, -4-ep]) cube([24 + 2*ep, 8, 20]);
}
// subtract to make it bendable
translate([width - 4.3, 26, 26]) cube([2, 8, 14 + ep]);
translate([2.3, 26, 26]) cube([2, 8, 14 + ep]);
}

Binary file not shown.

View File

@ -0,0 +1,2 @@
//cylinder(d=19, center=true, h=
translate([0, 0, 50]) cylinder(d=19, center=true, h=100);

BIN
stl/3DBenchy.stl Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
stl/FilamentClipC_175.stl Normal file

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More