Pretty good piggy
This commit is contained in:
parent
afe8b66261
commit
a5e691eab3
|
@ -1,4 +1,4 @@
|
|||
default: adapter-case.stl
|
||||
default: adapter-case.stl adapter-lid.stl
|
||||
|
||||
%.stl: %.scad
|
||||
openscad -o $@ $<
|
||||
|
|
|
@ -14,6 +14,13 @@ module stacker() {
|
|||
}
|
||||
}
|
||||
|
||||
module lid() {
|
||||
intersection() {
|
||||
import("seeed_xaio_case.stl", convexity=3);
|
||||
cube([30, 30, 4], center=true);
|
||||
}
|
||||
}
|
||||
|
||||
module trs_support() {
|
||||
intersection() {
|
||||
cube([12, 25, 12], center=true);
|
||||
|
@ -21,6 +28,13 @@ module trs_support() {
|
|||
}
|
||||
}
|
||||
|
||||
module pig_ear() {
|
||||
intersection() {
|
||||
cylinder(h=4, r1=2, r2=1, center=true);
|
||||
translate([0, -10, 0]) cube([20, 20, 20]);
|
||||
}
|
||||
}
|
||||
|
||||
difference() {
|
||||
union() {
|
||||
import("seeed_xaio_case.stl", convexity=3);
|
||||
|
@ -34,6 +48,7 @@ difference() {
|
|||
translate([0, 0, 15.0]) stacker();
|
||||
translate([0, 0, 17.5]) stacker();
|
||||
translate([0, 0, 20.0]) stacker();
|
||||
translate([0, 0, 23]) lid();
|
||||
|
||||
// Add some support for inserting the TRS plug
|
||||
intersection() {
|
||||
|
@ -41,29 +56,65 @@ difference() {
|
|||
translate([13, 10, 16]) rotate(60, [0, 0, 1]) trs_support();
|
||||
translate([13, -10, 16]) rotate(-60, [0, 0, 1]) trs_support();
|
||||
}
|
||||
cube([22.5, 18, 60], center=true);
|
||||
cube([21.8, 19, 60], center=true);
|
||||
}
|
||||
|
||||
// Shelf for board to rest against
|
||||
difference() {
|
||||
translate([-8, 0, 9.2]) cube([6, 19, 1], center=true);
|
||||
translate([-6, 0, 9.2]) rotate(45, [0, 0, 1]) cube(15, center=true);
|
||||
}
|
||||
|
||||
// Pig Parts
|
||||
translate([-12, 4, 22]) sphere(r=1.3);
|
||||
translate([-12, -4, 22]) sphere(r=1.3);
|
||||
if (false) {
|
||||
translate([-8, 5, 25]) pig_ear();
|
||||
translate([-8, -5, 25]) pig_ear();
|
||||
}
|
||||
}
|
||||
|
||||
// Carve out above USB C port
|
||||
translate([10, -4.79, 4.79]) cube([5, 9.58, 3]);
|
||||
|
||||
// Carve out space to slide the XIAO in
|
||||
// Pig grin
|
||||
intersection() {
|
||||
translate([10, 0, 10]) cube([10, 18.36, 8], center=true);
|
||||
translate([10, 0, 6]) rotate(45, [1, 0, 0]) cube(15, center=true);
|
||||
translate([0, 0, 15]) rotate(90, [0, 1, 0]) {
|
||||
difference() {
|
||||
cylinder(h=50, d=20, center=true);
|
||||
cylinder(h=50, d=19, center=true);
|
||||
}
|
||||
}
|
||||
translate([-18.7, 0, 0]) cube(7);
|
||||
}
|
||||
|
||||
// Hookup wire
|
||||
translate([0, 0, 9.5]) cube([1, 30, 0.8], center=true);
|
||||
// Cut off the bottom
|
||||
cube([30, 30, 4.01], center=true);
|
||||
|
||||
// 8-32x 1/4 screws
|
||||
translate([0, 0, 12]) rotate(90, [1, 0, 0]) cylinder(h=30, d=4.0, center=true);
|
||||
// Channel in the back to make it easier to squeeze in the XIAO
|
||||
translate([-4.5, 0, 7.6]) intersection() {
|
||||
cube([13, 18.3, 1.8], center=true);
|
||||
cylinder(d=21, h=300, center=true);
|
||||
}
|
||||
|
||||
// Channels for bottom insertion part thingy
|
||||
translate([0, 0, 3.6]) cube([17, 18.8, 1.2], center=true);
|
||||
|
||||
// Carve out above USB C port
|
||||
translate([10, -4.79, 0]) cube([5, 9.58, 5]);
|
||||
|
||||
// Paddle contacts
|
||||
translate([0, 0, 12]) {
|
||||
// 8-32x 1/4 screws
|
||||
rotate(90, [1, 0, 0]) cylinder(h=30, d=4.0, center=true);
|
||||
|
||||
// Hookup wire
|
||||
translate([0, 0, -2.5]) cube([1, 30, 0.8], center=true);
|
||||
}
|
||||
|
||||
// 3.5mm TRS jack
|
||||
translate([10, 0, 18]) rotate(90, [0, 1, 0]) cylinder(h=3, d=6.0);
|
||||
|
||||
// Piezo buzzer
|
||||
translate([-12, 3.5, 15]) cube([5, 1, 1], center=true);
|
||||
translate([-12, -3.5, 15]) cube([5, 1, 1], center=true);
|
||||
translate([0, 0, 13]) {
|
||||
translate([-12, 3.5, 0]) cube([5, 1, 1], center=true);
|
||||
translate([-12, -3.5, 0]) cube([5, 1, 1], center=true);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
// Make circles lovely and round
|
||||
$fa = 1; $fs = 0.5;
|
||||
|
||||
module fancycube(vec, h) {
|
||||
translate([r / 2, r / 2, 0]) {
|
||||
difference() {
|
||||
cube([r + 0.01, r + 0.01, h], center = true);
|
||||
|
||||
translate([r/2, r/2, 0])
|
||||
cylinder(r = r, h = h + 1, center = true);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
union() {
|
||||
translate([0, 0, 11]) rotate(180, [1, 0, 0]) import("seeed_xaio_lid.stl", convexity=3);
|
||||
translate([2, -4.5, 0]) cube([8, 9, 4]);
|
||||
fillet(200, 1);
|
||||
}
|
|
@ -0,0 +1,86 @@
|
|||
solid OpenSCAD_Model
|
||||
facet normal -1 0 0
|
||||
outer loop
|
||||
vertex 2 -4.5 0
|
||||
vertex 2 4.5 4
|
||||
vertex 2 4.5 0
|
||||
endloop
|
||||
endfacet
|
||||
facet normal -1 -0 0
|
||||
outer loop
|
||||
vertex 2 4.5 4
|
||||
vertex 2 -4.5 0
|
||||
vertex 2 -4.5 4
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 1 -0 0
|
||||
outer loop
|
||||
vertex 10 -4.5 4
|
||||
vertex 10 4.5 0
|
||||
vertex 10 4.5 4
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 1 0 0
|
||||
outer loop
|
||||
vertex 10 4.5 0
|
||||
vertex 10 -4.5 4
|
||||
vertex 10 -4.5 0
|
||||
endloop
|
||||
endfacet
|
||||
facet normal -0 0 1
|
||||
outer loop
|
||||
vertex 2 4.5 4
|
||||
vertex 10 -4.5 4
|
||||
vertex 10 4.5 4
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 0 0 1
|
||||
outer loop
|
||||
vertex 10 -4.5 4
|
||||
vertex 2 4.5 4
|
||||
vertex 2 -4.5 4
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 0 1 -0
|
||||
outer loop
|
||||
vertex 10 4.5 0
|
||||
vertex 2 4.5 4
|
||||
vertex 10 4.5 4
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 0 1 0
|
||||
outer loop
|
||||
vertex 2 4.5 4
|
||||
vertex 10 4.5 0
|
||||
vertex 2 4.5 0
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 0 0 -1
|
||||
outer loop
|
||||
vertex 2 -4.5 0
|
||||
vertex 10 4.5 0
|
||||
vertex 10 -4.5 0
|
||||
endloop
|
||||
endfacet
|
||||
facet normal -0 0 -1
|
||||
outer loop
|
||||
vertex 10 4.5 0
|
||||
vertex 2 -4.5 0
|
||||
vertex 2 4.5 0
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 0 -1 0
|
||||
outer loop
|
||||
vertex 2 -4.5 0
|
||||
vertex 10 -4.5 4
|
||||
vertex 2 -4.5 4
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 0 -1 -0
|
||||
outer loop
|
||||
vertex 10 -4.5 4
|
||||
vertex 2 -4.5 0
|
||||
vertex 10 -4.5 0
|
||||
endloop
|
||||
endfacet
|
||||
endsolid OpenSCAD_Model
|
Binary file not shown.
Loading…
Reference in New Issue