Init with original UniBox from fjkraan on printables.com.
This commit is contained in:
Binary file not shown.
@@ -0,0 +1,96 @@
|
||||
//uniBox2
|
||||
|
||||
$fn = 32;
|
||||
include <./camferCube.scad>
|
||||
include <./screwShapes1.scad>
|
||||
|
||||
pcbW = 70;
|
||||
pcbL = 100;
|
||||
bottomHeight = 15;
|
||||
wall = 2;
|
||||
|
||||
bottomDimsOutside = [pcbW + 2 * wall, pcbL + 2 * wall, bottomHeight];
|
||||
bottomDimsInside = [pcbW, pcbL, bottomHeight];
|
||||
|
||||
module bottom(screwSide = false) {
|
||||
difference() {
|
||||
camferHalfCube(bottomDimsOutside, false);
|
||||
translate([wall, wall, wall]) camferHalfCube(bottomDimsInside, false);
|
||||
// front bezelled cutout
|
||||
dims = [bottomDimsInside[0] - 4 * wall, wall, bottomHeight];
|
||||
translate([3.0 * wall, -0.01, 3 * wall]) bezelCube(dims, false, 1.0);
|
||||
// back bezelled cutout
|
||||
translate([bottomDimsOutside[0] - 3 * wall, pcbL + 2 * wall +0.01, 3 * wall]) rotate([0, 0, 180]) bezelCube(dims, false, 1.0);
|
||||
// side ridge concave
|
||||
translate([pcbW + 2 * wall - wall/2, (pcbL + 2 * wall) / 2, bottomHeight]) sideRidge();
|
||||
if (screwSide) {
|
||||
translate([2 * wall, 3.75 * wall, -0.02]) flatHeadM3(bottomHeight);
|
||||
translate([bottomDimsInside[0], 3.75 * wall, -0.02]) flatHeadM3(bottomHeight);
|
||||
translate([2 * wall, bottomDimsInside[1] - 1.75 * wall, -0.02]) flatHeadM3(bottomHeight);
|
||||
translate([bottomDimsInside[0], bottomDimsInside[1] - 1.75 * wall, -0.02]) flatHeadM3(bottomHeight);
|
||||
}
|
||||
}
|
||||
// side ridge convex
|
||||
translate([wall/2, (pcbL + 2 * wall) / 2, bottomHeight]) sideRidge(wall);
|
||||
// translate([pcbW + 2 * wall - wall/2, (pcbL + 2 * wall) / 2, bottomHeight]) sideRidge(wall);
|
||||
// pillars
|
||||
translate([2 * wall, 3.75 * wall, wall]) screwPillar(screwSide, bottomDimsInside[2] - wall - 0.5);
|
||||
translate([bottomDimsInside[0], 3.75 * wall, wall]) screwPillar(screwSide, bottomDimsInside[2] - wall - 0.5);
|
||||
translate([2 * wall, bottomDimsInside[1] - 1.75 * wall, wall]) screwPillar(screwSide, bottomDimsInside[2] - wall - 0.5);
|
||||
translate([bottomDimsInside[0], bottomDimsInside[1] - 1.75 * wall, wall]) screwPillar(screwSide, bottomDimsInside[2] - wall - 0.5);
|
||||
// panel ridges bottom
|
||||
translate([wall, 2.1 * wall, wall]) cube([bottomDimsInside[0], wall, wall]);
|
||||
translate([wall, bottomDimsInside[1] - 1.1 * wall, wall]) cube([bottomDimsInside[0], wall, wall]);
|
||||
}
|
||||
|
||||
module sideRidge(redux = 0) {
|
||||
ridgeSize = wall * 0.5;
|
||||
rotate([0, 45, 0]) cube([ridgeSize, pcbL - 7 * wall - redux, ridgeSize], true);
|
||||
}
|
||||
|
||||
module bezelCube(dims, center = false, camfer = 1.0) {
|
||||
width = dims[0];
|
||||
height = dims[1];
|
||||
length = dims[2];
|
||||
radius = 0.01;
|
||||
translate([width, height, length]) {
|
||||
rotate([-90, 0, 180]) {
|
||||
hull() {
|
||||
// lower plane
|
||||
translate([0, 0, 0]) sphere(r = radius);
|
||||
translate([ width, 0, 0]) sphere(r = radius);
|
||||
translate([0, length, 0]) sphere(r = radius);
|
||||
translate([ width, length, 0]) sphere(r = radius);
|
||||
// upper plane
|
||||
translate([- camfer, - camfer, height]) sphere(r = radius);
|
||||
translate([ width + camfer, - camfer, height]) sphere(r = radius);
|
||||
translate([- camfer, length + camfer, height]) sphere(r = radius);
|
||||
translate([ width + camfer, length + camfer, height]) sphere(r = radius);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module screwPillar(screwSide = false, height) {
|
||||
insideDiam = 2.6;
|
||||
outsideDiam = insideDiam + 2 * wall;
|
||||
difference() {
|
||||
cylinder(d = outsideDiam, h = height);
|
||||
translate([0, 0, -0.01]) {
|
||||
if (screwSide) {
|
||||
cylinder(d = 3.3, h = height + 0.02);
|
||||
} else {
|
||||
cylinder(d = insideDiam, h = height + 0.02);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module panel() {
|
||||
dims = [pcbW - 0.2, bottomHeight * 2 - 2 * wall - 0.2, wall - 0.2];
|
||||
camferHalfCube(dims, false, wall/2);
|
||||
}
|
||||
|
||||
translate([10 - wall, 0, 0]) bottom();
|
||||
translate([-pcbW - 10, 0, 0]) bottom(true);
|
||||
translate([10, - bottomHeight * 2 - 10, 0]) panel();
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,98 @@
|
||||
// camferCube1
|
||||
|
||||
//dims = [10, 10, 10];
|
||||
//camferCube(dims, false);
|
||||
|
||||
|
||||
module camferCube(dims, center = false, camfer=1.0) {
|
||||
width = dims[0];
|
||||
length = dims[1];
|
||||
height = dims[2];
|
||||
if (center) {
|
||||
translate([0, 0, -height / 2]) {
|
||||
hull() {
|
||||
// base
|
||||
translate([0, 0, 0]) topBottomPlane(dims, camfer=1.0);
|
||||
// lowerMid
|
||||
translate([0, 0, camfer]) middlePlane(dims, camfer=1.0);
|
||||
// upperPlane
|
||||
translate([0, 0, height - camfer]) middlePlane(dims, camfer=1.0);
|
||||
// top
|
||||
translate([0, 0, height]) topBottomPlane(dims, camfer=1.0);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
translate([width / 2, length / 2, 0]) {
|
||||
hull() {
|
||||
// base
|
||||
translate([0, 0, 0]) topBottomPlane(dims, camfer=1.0);
|
||||
// lowerMid
|
||||
translate([0, 0, camfer]) middlePlane(dims, camfer=1.0);
|
||||
// upperPlane
|
||||
translate([0, 0, height - camfer]) middlePlane(dims, camfer=1.0);
|
||||
// top
|
||||
translate([0, 0, height]) topBottomPlane(dims, camfer=1.0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module camferHalfCube(dims, center = false, camfer=1.0) {
|
||||
width = dims[0];
|
||||
length = dims[1];
|
||||
height = dims[2];
|
||||
if (center) {
|
||||
translate([0, 0, -height / 2]) {
|
||||
hull() {
|
||||
// base
|
||||
translate([0, 0, 0]) topBottomPlane(dims, camfer=1.0);
|
||||
// lowerMid
|
||||
translate([0, 0, camfer]) middlePlane(dims, camfer=1.0);
|
||||
// top
|
||||
translate([0, 0, height]) middlePlane(dims, camfer=1.0);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
translate([width / 2, length / 2, 0]) {
|
||||
hull() {
|
||||
// base
|
||||
translate([0, 0, 0]) topBottomPlane(dims, camfer=1.0);
|
||||
// lowerMid
|
||||
translate([0, 0, camfer]) middlePlane(dims, camfer=1.0);
|
||||
// top
|
||||
translate([0, 0, height]) middlePlane(dims, camfer=1.0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module topBottomPlane(dims, camfer) {
|
||||
width = dims[0];
|
||||
length = dims[1];
|
||||
height = dims[2];
|
||||
radius = 0.01;
|
||||
translate([-width / 2 + camfer, -length / 2 + camfer, 0]) sphere(r = radius);
|
||||
translate([width / 2 - camfer, -length / 2 + camfer, 0]) sphere(r = radius);
|
||||
translate([-width / 2 + camfer, length / 2 - camfer, 0]) sphere(r = radius);
|
||||
translate([width / 2 - camfer, length / 2 - camfer, 0]) sphere(r = radius);
|
||||
}
|
||||
|
||||
module middlePlane(dims, camfer) {
|
||||
width = dims[0];
|
||||
length = dims[1];
|
||||
height = dims[2];
|
||||
radius = 0.01;
|
||||
//
|
||||
translate([-width / 2 + camfer, -length / 2]) sphere(r = radius);
|
||||
translate([-width / 2, -length / 2 + camfer]) sphere(r = radius);
|
||||
//
|
||||
translate([width / 2 - camfer, -length / 2]) sphere(r = radius);
|
||||
translate([width / 2, -length / 2 + camfer]) sphere(r = radius);
|
||||
//
|
||||
translate([-width / 2 + camfer, length / 2]) sphere(r = radius);
|
||||
translate([-width / 2, length / 2 - camfer]) sphere(r = radius);
|
||||
//
|
||||
translate([width / 2 - camfer, length / 2]) sphere(r = radius);
|
||||
translate([width / 2, length / 2 - camfer]) sphere(r = radius);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
// screwShapes1
|
||||
|
||||
|
||||
module flatHeadM3(length) {
|
||||
headMax = 6.0;
|
||||
headMin = 3.2;
|
||||
headHeight = 2.01;
|
||||
cylinder(d1 = 6.0, d2 = 3.2, h = headHeight + 0.01);
|
||||
translate([0, 0, headHeight]) cylinder(d = headMin, h = length - headHeight);
|
||||
}
|
||||
|
||||
module flatHeadM4(length) {
|
||||
headMax = 7.0;
|
||||
headMin = 4.2;
|
||||
headHeight = 3.0;
|
||||
cylinder(d1 = headMax, d2 = headMin, h = headHeight + 0.01);
|
||||
translate([0, 0, headHeight]) cylinder(d = headMin, h = length - headHeight);
|
||||
}
|
||||
|
||||
module hexHeadM4(length) {
|
||||
headDiam = 6.3;
|
||||
headHeight = 4.2;
|
||||
cylinder(d = headDiam, h = headHeight);
|
||||
translate([0, 0, headHeight]) cylinder(d = 4.4, h = length);
|
||||
}
|
||||
|
||||
module hexHeadM6(length) {
|
||||
headDiam = 10.0;
|
||||
headHeight = 6.0;
|
||||
cylinder(d = headDiam, h = headHeight);
|
||||
translate([0, 0, headHeight]) cylinder(d = 6.4, h = length);
|
||||
}
|
||||
|
||||
module nutM6() {
|
||||
cylinder(d = 11.5, h = 5.0, $fn = 6);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user