Commit d04b539c authored by Jan Koniarik's avatar Jan Koniarik
Browse files

added scad

parent 8d0b7730
include<../tile.scad>;
t = 2;
$fn = 64;
// for (i = [ -1, 0, 1 ]) translate([ i * Ta(T24), 0, 0 ]) tile(T24, 4);
module bracket_base() difference() {
union() {
for (rot = [ [ 0, 90, 0 ], [ 180, 0, 0 ] ])
rotate(rot) translate([ Ta(T24) / 2, 0, 0 ]) tile_raw_plate(T24, 1, 1, 4);
}
for (rot = [ [ 0, 90, 0 ], [ 180, 0, 0 ] ])
rotate(rot) translate([ Ta(T24) / 2, 0, 0 ]) {
tile_center_hole(T24, h = 100, center = true);
tile_screw_pos(T24){
cylinder(d = Tscrew_d(T24), h = 100, center = true);
translate([0,0,t])
cylinder(d= Tnut_d(T24), h=Ta(T24)/2 - t, $fn=6);
}
}
}
module bracket_support(i) {
hull() intersection() {
bracket_base();
translate([ 0, i * Ta(T24), 0 ]) cube([ 100, t, 100 ], center = true);
}
}
module bracket() {
bracket_base();
for (i = [ -0.5, 0.5 ]) difference() {
bracket_support(i);
scale([ 0.7, 1, 0.7 ]) bracket_support(i);
}
}
bracket();
include <../tile.scad>;
screw_d = 3;
screw_a = 45;
t = 5;
$fn = 64;
module screw_holes(){
for(i=[-1,1]) translate([i*screw_a/2, 0, 0]) cylinder(d=screw_d,h=10,center=true);
}
difference(){hull(){
for(i=[1,-1])
{
translate([i*screw_a/2,0,0])
cylinder(d=screw_d+t*2,h=t);
}
translate([0,0,t/2])
cube([Ta(T24), Ta(T24), t], center=true);
}
screw_holes();
translate([0,0,t/2])
tile_neg(T24, t, center=true);
}
include<../tile.scad>;
screw_d = 2;
screw_coord_a = 58;
screw_coord_b = 49;
screw_coord_offset = -85 / 2 + 3.5 + 58 / 2;
dim = [ 85, 56, 22 ];
z_off = 4;
bot_col_h = 2;
col_d = 5;
pcb_t = 2;
col_h = 15;
h = 36;
top_col_h = h - col_h - pcb_t - bot_col_h - z_off;
t = 2;
module cutout_plate(dim, corner, center = false) hull() {
cube(dim - [ 2 * corner, 0, 0 ], center);
cube(dim - [ 0, 2 * corner, 0 ], center);
}
module rpi_screw_pos() {
for (i = [ 0.5, -0.5 ], j = [ 0.5, -0.5 ])
translate([ i * screw_coord_a + screw_coord_offset, j * screw_coord_b, 0 ])
children();
}
module baseplate() {
translate([ 0, 0, z_off / 2 ]) cutout_plate(
[ Ta(T24) * 4, Ta(T24) * 3, z_off ], corner = 4, center = true);
}
module M3_hole(l) {
cylinder(d = 3, h = l);
cylinder(d = 6, h = 2);
}
module bot_rpi_holder() difference() {
union() {
baseplate();
rpi_screw_pos() cylinder(d = col_d, h = z_off + bot_col_h);
}
rpi_screw_pos() M3_hole(20);
for (i = [ -1.5, -0.5, 0.5, 1.5 ], j = [ -1, 0, 1 ])
translate([ i * Ta(T24), j * Ta(T24), 0 ]) tile_screw_pos(T24){
cylinder(d = screw_d, h = 100, center = true);
translate([ 0, 0, z_off - 2 ]) cylinder(d = 6, h = 3);
}
}
module top_rpi_holder() difference() {
union() {
translate([ 0, 0, h ]) rotate([ 180, 0, 0 ]) difference() {
baseplate();
cutout_plate([ Ta(T24) * 3, Ta(T24) * 2, 100 ], corner = 4,
center = true);
}
rpi_screw_pos() translate([ 0, 0, h ]) rotate([ 180, 0, 0 ])
cylinder(d = col_d, h = top_col_h);
}
rpi_screw_pos() translate([ 0, 0, h ]) rotate([ 180, 0, 0 ]) M3_hole(20);
for (i = [ -1.5, -0.5, 0.5, 1.5 ], j = [ -1, 0, 1 ])
translate([ i * Ta(T24), j * Ta(T24), h - z_off/2 ]) tile_screw_pos(T24) {
tile_screw_hole(T24, h=z_off, centered_hole=true);
}
}
$fn = 128;
bot_rpi_holder();
top_rpi_holder();
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment