108 lines
3.1 KiB
OpenSCAD
108 lines
3.1 KiB
OpenSCAD
include <BOSL2/std.scad>
|
|
include <./rosetta.scad>
|
|
|
|
base = 160; // mm
|
|
top = 90; //mm
|
|
height = 40;
|
|
thickness = 9; // mm
|
|
thick_height=7; // mm
|
|
delta = 0.01;
|
|
|
|
// M4
|
|
screw_width = 5; //mm
|
|
piulitza = 7; // mm
|
|
piulitza_h = 4; // mm
|
|
|
|
// dent depth
|
|
dent_depth = 3.5;
|
|
|
|
base_2 = base/2;
|
|
top_2 = top/2 - 1;
|
|
top_3 = top_2 - 5;
|
|
top_4 = top_2/2;
|
|
screw_distance = 33;
|
|
inital_screw_angle = -30;
|
|
|
|
thin_base = (base-thickness);
|
|
thin_base_2 = thin_base/2;
|
|
|
|
//slit
|
|
slit_b1 = (thickness*2/3)/2;
|
|
slit_b2 = slit_b1/2;
|
|
slit_h = slit_b2;
|
|
|
|
top_3 = top_2 - 5;
|
|
|
|
module m3base(x,y,z) {
|
|
translate([x , y, z]) cylinder(h=thick_height+delta*3, d=screw_width);
|
|
translate([x , y, z]) cylinder(h=piulitza_h, d=piulitza);
|
|
}
|
|
|
|
/* TODO - the screw notch for the bottom
|
|
module m3notch(x,y,z) {
|
|
difference() {
|
|
translate(x,y,z)
|
|
*/
|
|
|
|
$fn = 180; //production
|
|
$fn = 32; //development
|
|
|
|
|
|
difference () {
|
|
|
|
union() {
|
|
//translate([0,0,-slit_h])
|
|
//color("green") translate([0,0,height-piulitza_h*2]) cap(true);
|
|
difference() {
|
|
translate([-base_2,-base_2,0]) cube([base,base,slit_h*2]);
|
|
translate([-thin_base_2 ,-thin_base_2, -delta]) cube([thin_base,thin_base,slit_h*2+1]);
|
|
}
|
|
|
|
difference() {
|
|
hull(){
|
|
translate([-base_2,-base_2,0]) cube([base,base,slit_h*2]);
|
|
translate([-base_2,-base_2, height]) cube([base,base,slit_h*2]);
|
|
//cylinder(h=delta, r=top_3, center=true);
|
|
}
|
|
|
|
hull() {
|
|
translate([-thin_base_2,-thin_base_2,-delta])
|
|
cube([thin_base,thin_base,slit_h*2]);
|
|
translate([-thin_base_2,-thin_base_2, height - thickness + delta])
|
|
cube([thin_base,thin_base,slit_h*2]);
|
|
// cylinder(delta, top_3-thickness, center=true);
|
|
}
|
|
translate([0,0, height - delta])
|
|
cylinder(h=15, r=top_3, center=true);
|
|
}
|
|
|
|
|
|
difference() {
|
|
translate([0 ,0, height-4]) cylinder(h=thick_height,r=top_3);
|
|
translate([0 ,0, height-4-delta]) cylinder(h=thick_height+delta*2,r=top_3-thickness*1.5);
|
|
}
|
|
}
|
|
|
|
union() {
|
|
|
|
// The two slits to slide the base into
|
|
//
|
|
translate([-base_2 + slit_b2*3/2,base_2-slit_h,+slit_h/2-delta*2])
|
|
rotate([90, 180, 0])
|
|
trapeze(slit_b1,slit_b2,slit_h,base);
|
|
|
|
translate([base_2 - slit_b2*3/2,base_2-slit_h,+slit_h/2-delta*2])
|
|
rotate([90, 180, 0])
|
|
trapeze(slit_b1,slit_b2,slit_h,base);
|
|
|
|
// The rosetta
|
|
translate([0,0, height + delta]) rosetta_flat(top_3, piulitza_h, dent_depth);
|
|
translate([0,0, height - piulitza_h+delta]) rosetta_flat(top_3, piulitza_h+delta, dent_depth);
|
|
translate([0,0, height - piulitza_h+delta]) rotate (53,0,0) rosetta_flat(top_3, piulitza_h+delta, dent_depth);
|
|
translate([0,0, height - piulitza_h*2+delta]) rosetta_flat(top_3, piulitza_h+delta, dent_depth);
|
|
translate([0,0, height - piulitza_h*2+delta]) rotate (53,0,0) rosetta_flat(top_3, piulitza_h+delta, dent_depth);
|
|
|
|
|
|
}
|
|
}
|