Commit 93b8f8f2 authored by Jan Koniarik's avatar Jan Koniarik
Browse files

reformatted scad

parent 51618d8a
......@@ -108,7 +108,7 @@ leg leg_pos conf_type = Leg
, min_angle = 0 *~ radian
, default_angle = case conf_type of
Folded -> 0 *~ degree
_ -> 0 *~ degree
_ -> 45 *~ degree
, max_angle = 90 *~ degree
, vel_lim = 0.5 *~ (radian D./ second)
, effor_lim = 100
......
include<metric.scad>;
include<tile.scad>;
include<util.scad>;
include<part.scad>;
include <metric.scad>
include <part.scad>
include <tile.scad>
include <util.scad>
LX15D_dim = [ 44.17, 22.95, 25.5 ];
LX15D_middle_t = 1.5; // height of the middle space
LX15D_middle_a = 3.0; // side space
LX15D_middle_t = 1.5; // height of the middle space
LX15D_middle_a = 3.0; // side space
LX15D_axis_offset = 10.66;
LX15D_horn_d = 20;
LX15D_horn_w = 38.6;
......@@ -17,21 +17,28 @@ LX15D_body_screw_d = 2;
LX15D_horn_clearance_d = 8;
LX15D_clearance_r = sqrt(pow(LX15D_dim[1] / 2, 2) + pow(LX15D_axis_offset, 2));
module LX15D() part("gray", part_name="LX15D servomotor") difference() {
module
LX15D() part("gray", part_name = "LX15D servomotor") difference()
{
dim = LX15D_dim;
union() {
translate([ dim[0] / 2 - LX15D_axis_offset, 0, 0 ]) {
union()
{
translate([ dim[0] / 2 - LX15D_axis_offset, 0, 0 ])
{
cube(dim, center = true);
difference() {
cube(
dim +
[
-LX15D_middle_a, -LX15D_middle_a, LX15D_middle_t * 2
],
center = true);
for (i = [ -0.5, 0.5 ]) for(j = [ -0.5, 0.5 ])
translate([ dim[0] * i, dim[1] * j, 0 ])
cylinder(d = 13, h = 100, center = true);
difference()
{
cube(dim +
[
-LX15D_middle_a,
-LX15D_middle_a,
LX15D_middle_t * 2
],
center = true);
for (i = [ -0.5, 0.5 ])
for (j = [ -0.5, 0.5 ])
translate([ dim[0] * i, dim[1] * j, 0 ])
cylinder(d = 13, h = 100, center = true);
}
}
......@@ -41,50 +48,69 @@ module LX15D() part("gray", part_name="LX15D servomotor") difference() {
LX15D_horn_screw_pos() translate([ 0, 0, i * LX15D_horn_w / 2 ])
cylinder(d = LX15D_horn_screw_d, h = 10, center = true);
}
for (m = [ 0, 1 ]) mirror([ 0, 0, m ]) for (i = [ -1, 1 ]) for(j = [ -1, 1 ]) {
for (m = [ 0, 1 ])
mirror([ 0, 0, m ]) for (i = [ -1, 1 ]) for (j = [ -1, 1 ])
{
LX15D_body_screw_pos(i, j)
cylinder(d = LX15D_body_screw_d, h = 4, center = true);
}
}
module LX15D_collision() {
module
LX15D_collision()
{
dim = LX15D_dim;
translate([ dim[0] / 2 - LX15D_axis_offset, 0, 0 ]) {
translate([ dim[0] / 2 - LX15D_axis_offset, 0, 0 ])
{
cube(dim + [ 0, 0, LX15D_middle_t * 2 ], center = true);
}
cube([ LX15D_horn_d, LX15D_horn_d, LX15D_horn_w ], center = true);
}
module LX15D_clearance() {
module
LX15D_clearance()
{
cylinder(r = LX15D_clearance_r, h = LX15D_horn_w, center = true);
}
module LX15D_screw_plane() { translate([ 0, 0, LX15D_dim[2] / 2 ]) children(); }
module
LX15D_screw_plane()
{
translate([ 0, 0, LX15D_dim[2] / 2 ]) children();
}
module LX15D_body_screw_pos(i, j)
translate([ LX15D_dim[0] / 2 - LX15D_axis_offset, 0, 0 ]) {
translate([ LX15D_dim[0] / 2 - LX15D_axis_offset, 0, 0 ])
{
translate(
[ i * LX15D_screw_x / 2, j * LX15D_screw_y / 2, LX15D_dim[2] / 2 ])
children();
}
module LX15D_bottom_screw_pos() for (j = [ -1, 1 ]) LX15D_body_screw_pos(1, j)
module
LX15D_bottom_screw_pos() for (j = [ -1, 1 ]) LX15D_body_screw_pos(1, j)
children();
module LX15D_horn_screw_pos() {
module
LX15D_horn_screw_pos()
{
for (a = [0:90:360])
rotate([ 0, 0, a ]) translate([ 14 / 2, 0, 0 ]) children();
}
module LX15D_side_plate(screw_d, holes, t) difference() {
union() {
LX15D_bottom_screw_pos() hull() {
module LX15D_side_plate(screw_d, holes, t) difference()
{
union()
{
LX15D_bottom_screw_pos() hull()
{
cylinder(d = LX15D_screw_clearance_d, h = t);
translate([ t * 2, 0, 0 ])
cylinder(d = LX15D_screw_clearance_d, h = t);
}
hull() for (coord = holes) {
hull() for (coord = holes)
{
translate(coord + [ 0, 0, LX15D_dim[2] / 2 ])
cylinder(d = screw_d + t * 2, h = t);
}
......
include<../LX15D.scad>;
include<../part.scad>;
include <../LX15D.scad>
include <../part.scad>
LX15D_U_h = 6;
LX15D_U_c = 0.2;
......@@ -7,167 +7,208 @@ LX15D_U_offset = [ 40, 0, 0 ];
LX15D_U_screw_y = 16;
module LX15D_U_body(class)
part("blue", part_name = str("SCAD: LX15D_U_body(", Tname(class), ")"), printed=true)
difference() {
t = 2;
translate([ -LX15D_U_h / 2, 0, 0 ])
cube([ LX15D_U_h, Ta(T24), LX15D_dim[2] ], center = true);
part("blue",
part_name = str("SCAD: LX15D_U_body(", Tname(class), ")"),
printed = true) difference()
{
t = 2;
translate([ -LX15D_U_h / 2, 0, 0 ])
cube([ LX15D_U_h, Ta(T24), LX15D_dim[2] ], center = true);
for (m = [ 0, 1 ])
mirror([ 0, m, 0 ]) rotate([ 0, -90, 0 ]) tile_screw_pos(class = class)
translate([ 0, 0, Mhead_h(M2L8C) ]) Mscrew_hole(M2L8C);
rotate([ 0, 90, 0 ])
cylinder(d = Ta(T24) / 2, h = 100, center = true, $fn = 8);
for (i = [ -0.5, 0.5 ])
for (m = [ 0, 1 ])
mirror([ 0, 0, m ]) translate(
[ -LX15D_U_h / 2, i * LX15D_U_screw_y, -LX15D_dim[2] / 2 - t ]) {
Mscrew_hole(M2L8C);
translate([ 0, 0, 2 * t ]) Mnut_sidehole(M2N, l = 10);
}
mirror([ 0, m, 0 ]) rotate([ 0, 90, 0 ]) tile_screw_pos(class = class)
translate([ 0, 0, Mhead_h(M2L8C) - LX15D_U_h ]) Mscrew_hole(M2L8C);
rotate([ 0, 90, 0 ])
cylinder(d = Ta(T24) / 2, h = 100, center = true, $fn = 8);
for (i = [ -0.5, 0.5 ])
for (m = [ 0, 1 ])
mirror([ 0, 0, m ]) translate(
[ -LX15D_U_h / 2, i * LX15D_U_screw_y, -LX15D_dim[2] / 2 - t ])
{
Mscrew_hole(M2L8C);
translate([ 0, 0, 2 * t ]) Mnut_sidehole(M2N, l = 10);
}
}
module LX15D_U_plate(class, t = 2)
part("yellow", part_name = str("SCAD: LX15D_U_plate(", Tname(class), ")"), printed=true)
mirror([ 0, 0, 1 ]) difference() {
union() {
translate(LX15D_U_offset - [ LX15D_U_h / 2, 0, LX15D_dim[2] / 2 + t / 2 ])
cube([ LX15D_U_h, Ta(T24), t ], center = true);
mirror([ 0, 0, 1 ]) LX15D_bottom_screw_pos()
hull() for (x = [ 0, LX15D_U_h / 2 ]) translate([ x, 0, 0 ])
cylinder(d = LX15D_screw_clearance_d, h = t);
}
translate(LX15D_U_offset - [ LX15D_U_h / 2, 0, LX15D_dim[2] / 2 + t ]) {
for (i = [ -0.5, 0.5 ])
translate([ 0, i * LX15D_U_screw_y, 0 ]) Mscrew_hole(M2L8C);
}
LX15D_bottom_screw_pos()
cylinder(d = LX15D_body_screw_d, h = 100, center = true);
part("yellow",
part_name = str("SCAD: LX15D_U_plate(", Tname(class), ")"),
printed = true) mirror([ 0, 0, 1 ]) difference()
{
union()
{
translate(LX15D_U_offset -
[ LX15D_U_h / 2, 0, LX15D_dim[2] / 2 + t / 2 ])
cube([ LX15D_U_h, Ta(T24), t ], center = true);
mirror([ 0, 0, 1 ]) LX15D_bottom_screw_pos()
hull() for (x = [ 0, LX15D_U_h / 2 ]) translate([ x, 0, 0 ])
cylinder(d = LX15D_screw_clearance_d, h = t);
}
translate(LX15D_U_offset - [ LX15D_U_h / 2, 0, LX15D_dim[2] / 2 + t ])
{
for (i = [ -0.5, 0.5 ])
translate([ 0, i * LX15D_U_screw_y, 0 ]) Mscrew_hole(M2L8C);
}
LX15D_bottom_screw_pos()
cylinder(d = LX15D_body_screw_d, h = 100, center = true);
}
module LX15D_U_plate_cable(class, t, s)
part("yellow", part_name = str("SCAD: LX15D_U_plate_cable(", Tname(class),
")"), printed=true) difference() {
LX15D_U_plate(class, t = t + s / 2);
translate(LX15D_U_offset - [ LX15D_U_h / 2, 0, LX15D_dim[2] / 2 + t + s / 2 ])
cable_harness(w = LX15D_U_screw_y, s = s, r = t, l = LX15D_U_h);
part("yellow",
part_name = str("SCAD: LX15D_U_plate_cable(", Tname(class), ")"),
printed = true) difference()
{
LX15D_U_plate(class, t = t + s / 2);
translate(LX15D_U_offset -
[ LX15D_U_h / 2, 0, LX15D_dim[2] / 2 + t + s / 2 ])
cable_harness(w = LX15D_U_screw_y, s = s, r = t, l = LX15D_U_h);
}
module LX15D_U_plate_cable_lock(class, t, s)
part("blue", part_name = str("SCAD: LX15D_U_plate_cable_lock(",
Tname(class), ",", t, ",", s, ")"), printed=true) difference() {
hull() translate(LX15D_U_offset -
[ LX15D_U_h / 2, 0, LX15D_dim[2] / 2 + t + s / 2 ]) {
for (i = [ -0.5, 0.5 ])
translate([ 0, i * LX15D_U_screw_y, 0 ]) rotate([ 180, 0, 0 ])
cylinder(d = LX15D_U_h, h = t + s);
}
translate(LX15D_U_offset -
[ LX15D_U_h / 2, 0, LX15D_dim[2] / 2 + 2 * t + s ]) {
for (i = [ -0.5, 0.5 ])
translate([ 0, i * LX15D_U_screw_y, 0 ]) Mscrew_hole(M2L8C);
}
for (z = [ 0, s + 2 * t ])
part("blue",
part_name = str("SCAD: LX15D_U_plate_cable_lock(",
Tname(class),
",",
t,
",",
s,
")"),
printed = true) difference()
{
hull() translate(LX15D_U_offset -
[ LX15D_U_h / 2, 0, LX15D_dim[2] / 2 + t + s / 2 ])
{
for (i = [ -0.5, 0.5 ])
translate([ 0, i * LX15D_U_screw_y, 0 ]) rotate([ 180, 0, 0 ])
cylinder(d = LX15D_U_h, h = t + s);
}
translate(LX15D_U_offset -
[ LX15D_U_h / 2, 0, LX15D_dim[2] / 2 + t + s / 2 + z ])
cable_harness(w = LX15D_U_screw_y, s = s, r = t, l = LX15D_U_h);
[ LX15D_U_h / 2, 0, LX15D_dim[2] / 2 + 2 * t + s ])
{
for (i = [ -0.5, 0.5 ])
translate([ 0, i * LX15D_U_screw_y, 0 ]) Mscrew_hole(M2L8C);
}
for (z = [ 0, s + 2 * t ])
translate(LX15D_U_offset -
[ LX15D_U_h / 2, 0, LX15D_dim[2] / 2 + t + s / 2 + z ])
cable_harness(w = LX15D_U_screw_y, s = s, r = t, l = LX15D_U_h);
}
// this is meh, refactor
module LX15D_U(class, expand = 0) union() {
t = 2;
cable_s = 2;
translate(LX15D_U_offset) LX15D_U_body(class);
translate([ 0, 0, expand ]) LX15D_U_plate(class, t = t);
translate([ 0, 0, -expand ]) rotate([ 180, 0, 0 ])
LX15D_U_plate_cable(class, t = t, s = cable_s);
translate([ 0, 0, -2 * expand ])
LX15D_U_plate_cable_lock(class, t = t, s = cable_s);
translate(LX15D_U_offset) for (i = [ -0.5, 0.5 ]) translate([
-LX15D_U_h / 2, i * LX15D_U_screw_y,
-LX15D_dim[2] / 2 - 2 * t - cable_s - 2 * 2 *
expand
]) Mscrew(M2L12C);
translate(LX15D_U_offset) for (i = [ -0.5, 0.5 ]) translate([
-LX15D_U_h / 2, i * LX15D_U_screw_y, LX15D_dim[2] / 2 + t + 2 * expand
]) rotate([ 180, 0, 0 ]) Mscrew(M2L8C);
LX15D_bottom_screw_pos() {
translate([ 0, 0, -LX15D_dim[2] - 3 * expand - t ]) Mscrew(M2L8C);
translate([ 0, 0, 3 * expand + t ]) rotate([ 180, 0, 0 ]) Mscrew(M2L8C);
}
module LX15D_U(class, expand = 0) union()
{
t = 2;
cable_s = 2;
translate(LX15D_U_offset) LX15D_U_body(class);
translate([ 0, 0, expand ]) LX15D_U_plate(class, t = t);
translate([ 0, 0, -expand ]) rotate([ 180, 0, 0 ])
LX15D_U_plate_cable(class, t = t, s = cable_s);
translate([ 0, 0, -2 * expand ])
LX15D_U_plate_cable_lock(class, t = t, s = cable_s);
translate(LX15D_U_offset) for (i = [ -0.5, 0.5 ]) translate([
-LX15D_U_h / 2,
i * LX15D_U_screw_y,
-LX15D_dim[2] / 2 - 2 * t - cable_s - 2 * 2 *
expand
]) Mscrew(M2L12C);
translate(LX15D_U_offset) for (i = [ -0.5, 0.5 ]) translate([
-LX15D_U_h / 2,
i * LX15D_U_screw_y,
LX15D_dim[2] / 2 + t + 2 *
expand
, ]) rotate([ 180, 0, 0 ]) Mscrew(M2L8C);
LX15D_bottom_screw_pos()
{
translate([ 0, 0, -LX15D_dim[2] - 3 * expand - t ]) Mscrew(M2L8C);
translate([ 0, 0, 3 * expand + t ]) rotate([ 180, 0, 0 ]) Mscrew(M2L8C);
}
for (i = [ -0.5, 0.5 ])
for (j = [ -0.5, 0.5 ])
translate(LX15D_U_offset + [
expand - LX15D_U_h / 2, i * LX15D_U_screw_y, j * (LX15D_dim[2] - 2 * t)
]) rotate([ j * 180 + 90, 0, 0 ]) Mnut(M2N);
for (i = [ -0.5, 0.5 ])
for (j = [ -0.5, 0.5 ])
translate(LX15D_U_offset + [
expand - LX15D_U_h / 2,
i * LX15D_U_screw_y,
j * (LX15D_dim[2] - 2 * t)
]) rotate([ j * 180 + 90, 0, 0 ]) Mnut(M2N);
}
LX15D_BU_h = 6;
LX15D_BU_t = 3;
LX15D_BU_screw_a = 10;
LX15D_BU_offset = [ -25, 0, 0 ];
module LX15D_BU_plate() part("blue", printed=true) difference() {
t = LX15D_BU_t;
h = 5;
horn_a = LX15D_horn_screw_d + t;
bu_screw_a = Md(M2L8C) + t;
translate([ 0, 0, h / 2 ]) hull() {
LX15D_horn_screw_pos() cube([ horn_a, horn_a, h ], center = true);
for (i = [ -0.5, 0.5 ])
translate(LX15D_BU_offset + [ LX15D_BU_h / 2, i * LX15D_BU_screw_a, 0 ])
cube([ bu_screw_a, bu_screw_a, h ], center = true);
}
cylinder(d = LX15D_horn_clearance_d, h = 100, center = true, $fn = 8);
LX15D_horn_screw_pos() translate([ 0, 0, t ]) rotate([ 180, 0, 0 ])
Mscrew_hole(M3L5C);
for (i = [ -0.5, 0.5 ])
translate(LX15D_BU_offset + [ LX15D_BU_h / 2, i * LX15D_BU_screw_a, t ])
rotate([ 180, 0, 0 ]) Mscrew_hole(M2L8C);
}
module LX15D_BU_body() part("yellow", printed=true)
translate(LX15D_BU_offset + [ LX15D_BU_h / 2, 0, 0 ]) difference() {
t = LX15D_BU_t;
dim = [ LX15D_BU_h, LX15D_BU_screw_a + t * 2, LX15D_horn_w ];
union() {
rotate([ 0, 90, 0 ]) tile_pos(T24, LX15D_BU_h, center = true);
cube(dim, center = true);
}
rotate([ 0, 90, 0 ]) tile_neg(T24, LX15D_BU_h, center = true);
for (j = [ -1, 1 ])
module
LX15D_BU_plate() part("blue", printed = true) difference()
{
t = LX15D_BU_t;
h = 5;
horn_a = LX15D_horn_screw_d + t;
bu_screw_a = Md(M2L8C) + t;
translate([ 0, 0, h / 2 ]) hull()
{
LX15D_horn_screw_pos() cube([ horn_a, horn_a, h ], center = true);
for (i = [ -0.5, 0.5 ])
translate(LX15D_BU_offset +
[ LX15D_BU_h / 2, i * LX15D_BU_screw_a, 0 ])
cube([ bu_screw_a, bu_screw_a, h ], center = true);
}
cylinder(d = LX15D_horn_clearance_d, h = 100, center = true, $fn = 8);
LX15D_horn_screw_pos() translate([ 0, 0, t ]) rotate([ 180, 0, 0 ])
Mscrew_hole(M3L5C);
for (i = [ -0.5, 0.5 ])
translate([ 0, i * LX15D_BU_screw_a, j * dim[2] / 2 ])
rotate([ j * 90 + 90, 0, 0 ]) {
Mscrew_hole(M2L8C);
translate([ 0, 0, t ]) Mnut_sidehole(M2N, l = 10);
}
translate(LX15D_BU_offset + [ LX15D_BU_h / 2, i * LX15D_BU_screw_a, t ])
rotate([ 180, 0, 0 ]) Mscrew_hole(M2L8C);
}
module LX15D_BU(expand = 0) {
t = LX15D_BU_t;
plate_h = 5;
LX15D_BU_body();
for (an = [ 0, 180 ])
rotate([ an, 0, 0 ]) translate([ 0, 0, LX15D_horn_w / 2 + expand ]) {
LX15D_BU_plate();
for (i = [ -0.5, 0.5 ])
translate(LX15D_BU_offset +
[ LX15D_BU_h / 2, i * LX15D_BU_screw_a, t + expand ])
rotate([ 180, 0, 0 ]) Mscrew(M2L8C);
LX15D_horn_screw_pos() translate([ 0, 0, plate_h + expand - t ])
rotate([ 180, 0, 0 ]) Mscrew(M3L5C);
module
LX15D_BU_body() part("yellow", printed = true)
translate(LX15D_BU_offset + [ LX15D_BU_h / 2, 0, 0 ]) difference()
{
t = LX15D_BU_t;
dim = [ LX15D_BU_h, LX15D_BU_screw_a + t * 2, LX15D_horn_w ];
union()
{
rotate([ 0, 90, 0 ]) tile_pos(T24, LX15D_BU_h, center = true);
cube(dim, center = true);
}
for (j = [ -1, 1 ])
for (i = [ -0.5, 0.5 ])
translate(LX15D_BU_offset + [
LX15D_BU_h / 2 + expand, i * LX15D_BU_screw_a, j * LX15D_horn_w / 2
]) rotate([ j * 90 + 90, 0, 0 ]) {
translate([ 0, 0, t ]) Mnut(M2N);
}
rotate([ 0, 90, 0 ]) tile_neg(T24, LX15D_BU_h, center = true);
for (j = [ -1, 1 ])
for (i = [ -0.5, 0.5 ])
translate([ 0, i * LX15D_BU_screw_a, j * dim[2] / 2 ])
rotate([ j * 90 + 90, 0, 0 ])
{
Mscrew_hole(M2L8C);
translate([ 0, 0, t ]) Mnut_sidehole(M2N, l = 10);
}
}
module LX15D_BU(expand = 0)
{
t = LX15D_BU_t;
plate_h = 5;
LX15D_BU_body();
for (an = [ 0, 180 ])
rotate([ an, 0, 0 ]) translate([ 0, 0, LX15D_horn_w / 2 + expand ])
{
LX15D_BU_plate();
for (i = [ -0.5, 0.5 ])
translate(LX15D_BU_offset +
[ LX15D_BU_h / 2, i * LX15D_BU_screw_a, t + expand ])
rotate([ 180, 0, 0 ]) Mscrew(M2L8C);
LX15D_horn_screw_pos() translate([ 0, 0, plate_h + expand - t ])
rotate([ 180, 0, 0 ]) Mscrew(M3L5C);
}
for (j = [ -1, 1 ])
for (i = [ -0.5, 0.5 ])
translate(LX15D_BU_offset + [
LX15D_BU_h / 2 + expand,
i * LX15D_BU_screw_a,
j * LX15D_horn_w / 2
]) rotate([ j * 90 + 90, 0, 0 ])
{
translate([ 0, 0, t ]) Mnut(M2N);
}
}
include<metric.scad>;
include<util.scad>;
include<tile.scad>;
include <metric.scad>
include <tile.scad>
include <util.scad>
module pack_shape() {
k = 0.1;
module
pack_shape()
{
k = 0.1;
square([ 38 + 2 * k, 81 + 2 * k ], center = true);
square([ 38 + 2 * k, 81 + 2 * k ], center = true);
for (i = [ -1, 1 ])
translate([ 0, i * (21 + 20) / 2, 0 ])
square([ 43 + 2 * k, 20 + 2 * k ], center = true);
for (i = [ -1, 1 ])
translate([ 0, i * (21 + 20) / 2, 0 ])
square([ 43 + 2 * k, 20 + 2 * k ], center = true);
for (i = [ -1, 1 ])
translate([ i * (6 + 10) / 2, 0, 0 ])
square([ 10 + 2 * k, 81 + 12 + 2 * k ], center = true);
for (i = [ -1, 1 ])
translate([ i * (6 + 10) / 2, 0, 0 ])
square([ 10 + 2 * k, 81 + 12 + 2 * k ], center = true);
}
power_dist_y = 78;
......@@ -21,41 +23,48 @@ power_dist_x = [ -11, -6, 6, 11 ];
batt = [ 18, 65.0 ];
module battery() part("red", part_name="18650 battery") {
rotate([ 0, 90, 0 ]) cylinder(d = batt[0], h = batt[1], center = true);
module
battery() part("red", part_name = "18650 battery")
{
rotate([ 0, 90, 0 ]) cylinder(d = batt[0], h = batt[1], center = true);
}
module bat_pcb() part("blue", part_name="Bat PCB") { linear_extrude(height = 2) pack_shape(); }
module
bat_pcb() part("blue", part_name = "Bat PCB")
{
linear_extrude(height = 2) pack_shape();
}
bat_holder_h = 5;
module bat_set() union() {
bat_holder();
translate([ 0, 0, -bat_holder_h ]) bat_pcb();
for (i = [ -0.5, 0.5 ])
translate([ i * batt[0], 0, -bat_holder_h - batt[0] / 2 ])
rotate([ 0, 0, 90 ]) battery();
module
bat_set() union()
{
bat_holder();
translate([ 0, 0, -bat_holder_h ]) bat_pcb();
for (i = [ -0.5, 0.5 ])
translate([ i * batt[0], 0, -bat_holder_h - batt[0] / 2 ])
rotate([ 0, 0, 90 ]) battery();
}
module bat_holder() part("red", printed=true) translate([ 0, 0, -bat_holder_h ])
difference() {
h = bat_holder_h;
module
bat_holder() part("red", printed = true) translate([ 0, 0, -bat_holder_h ])
difference()
{
h = bat_holder_h;
for (i = [-0.5:0.5])
for (j = [-1.5:1.5])
translate([ i * Ta(T24), j * Ta(T24), 0 ])
tile_pos(T24, h);
for (i = [-0.5:0.5])
for (j = [-1.5:1.5])
translate([ i * Ta(T24), j * Ta(T24), 0 ]) tile_pos(T24, h);
linear_extrude(height = 3.5 * 2, center = true) pack_shape();
linear_extrude(height = 3.5 * 2, center = true) pack_shape();
for (i = [-0.5:0.5])
for (j = [-1.5:1.5])
translate([ i * Ta(T24), j * Ta(T24), 0 ])
tile_neg(T24, h);
for (i = [-0.5:0.5])
for (j = [-1.5:1.5])
translate([ i * Ta(T24), j * Ta(T24), 0 ]) tile_neg(T24, h);
for (i = [ -0.5, 0.5 ])
for (x = power_dist_x)
translate([ x, i * power_dist_y, 0 ])
cylinder(d = 3, h = 100, center = true);
for (i = [ -0.5, 0.5 ])
for (x = power_dist_x)
translate([ x, i * power_dist_y, 0 ])
cylinder(d = 3, h = 100, center = true);
}
include<LX15D/tiles.scad>;
include<LX15D/cables.scad>;
include<camera.scad>;
include<metric.scad>;
include<util.scad>;
include<tile.scad>;
include<LX15D.scad>;
include<bat.scad>;
include<rpi_box.scad>;
include <LX15D.scad>
include <LX15D/cables.scad>
include <LX15D/tiles.scad>
include <bat.scad>
include <camera.scad>
include <metric.scad>
include <rpi_box.scad>
include <tile.scad>
include <util.scad>
screw_d = 3;
t = 3;
......@@ -17,52 +17,74 @@ xplate_tile_h = 6;
xplate_w = Ta(T24) * 2;