Initial commit.

This commit is contained in:
2025-05-31 15:33:06 +01:00
commit 97c902a468
18 changed files with 1080 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
module beam_hollow_rectangular(L, w, d, t, suppress_shopping_outputs = false) {
difference() {
cube([w, d, L], center = true);
cube([w - t * 2, d - t * 2, L], center = true);
}
// Shopping
if (!suppress_shopping_outputs) {
echo(str("Rectangular Aluminium hollow beam: Rectangular Aluminium hollow beam ", L, "mm x ", w, "mm x ", d, "mm x ", t, "mm - x1"));
}
}
beam_hollow_rectangular(500, 50, 30, 5);

View File

@@ -0,0 +1,17 @@
include <../../config.scad>;
module square_tube_joint_cross(tube_diameter, tube_thickness) {
length_peg = 2 * tube_diameter;
union() {
color("black") cube(tube_diameter, center = true);
for (index_peg = [0 : 1 : 3]) {
color("gray") rotate([0, 0, 90 * index_peg]) translate([tube_diameter / 2 + length_peg / 2, 0, 0]) cube([length_peg, tube_diameter - tube_thickness * 2, tube_diameter - tube_thickness * 2], center = true);
}
}
// Shopping
echo(str("Square tube joint: Tube joint Φ", tube_diameter, "mm cross - x1"));
}
// test output
square_tube_joint_cross(D_BEAM_SKELETON, T_BEAM_SKELETON);

View File

@@ -0,0 +1,40 @@
/*
include <../../config.scad>;
use <./tube_clamp_round_3_way_through_116_functions.scad>;
*/
module square_tube_joint_n_way(tube_diameter, tube_thickness, n_pegs) {
length_peg = 2 * tube_diameter;
union() {
color("black") cube(tube_diameter, center = true);
/*
// Method 1: no good
for (index_peg = [0 : 1 : n_pegs - 1]) {
color("gray") rotate([0, 0, 90 * index_peg]) translate([tube_diameter / 2 + length_peg / 2, 0, 0]) cube([length_peg, tube_diameter - tube_thickness * 2, tube_diameter - tube_thickness * 2], center = true);
}
*/
if (n_pegs >= 2) {
for (index_peg = [0 : 1 : 1]) {
color("gray") rotate([0, 0, 90 * index_peg]) translate([tube_diameter / 2 + length_peg / 2, 0, 0]) cube([length_peg, tube_diameter - tube_thickness * 2, tube_diameter - tube_thickness * 2], center = true);
}
}
if (n_pegs >= 3) {
for (index_peg = [0 : 1 : (n_pegs == 3 ? 0 : 1)]) {
color("gray") mirror([0, 0, index_peg]) translate([0, 0, tube_diameter / 2 + length_peg / 2]) cube([tube_diameter - tube_thickness * 2, tube_diameter - tube_thickness * 2, length_peg], center = true);
}
}
if (n_pegs >= 5) {
color("gray") translate([0, -(tube_diameter / 2 + length_peg / 2), 0]) cube([tube_diameter - tube_thickness * 2, length_peg, tube_diameter - tube_thickness * 2], center = true);
}
}
// Shopping
echo(str("Square tube joint: Tube joint Φ", tube_diameter, "mm ", n_pegs, "-Way - x1"));
}
// test output
// square_tube_joint_n_way(D_BEAM_SKELETON, T_BEAM_SKELETON, 5);
// translate([200, 0, 0]) square_tube_joint_n_way(D_BEAM_SKELETON, T_BEAM_SKELETON, 3);
for (count_pegs = [2 : 1 : 5]) {
translate([100 * count_pegs, 0, 0]) square_tube_joint_n_way(D_BEAM_SKELETON, T_BEAM_SKELETON, count_pegs);
}

View File

@@ -0,0 +1,17 @@
include <../../config.scad>;
module square_tube_joint_tee(tube_diameter, tube_thickness) {
length_peg = 2 * tube_diameter;
union() {
color("black") cube(tube_diameter, center = true);
for (index_peg = [0 : 1 : 2]) {
color("gray") rotate([0, 0, 90 * index_peg]) translate([tube_diameter / 2 + length_peg / 2, 0, 0]) cube([length_peg, tube_diameter - tube_thickness * 2, tube_diameter - tube_thickness * 2], center = true);
}
}
// Shopping
echo(str("Square tube joint: Tube joint Φ", tube_diameter, "mm tee - x1"));
}
// test output
translate([100, 0, 50 ]) square_tube_joint_tee(D_BEAM_SKELETON, T_BEAM_SKELETON);

View File

@@ -0,0 +1,24 @@
// Molly Dog Towing Cart
include <../../config.scad>;
use <../skeleton/skeleton.scad>;
use <../skin/skin.scad>;
use <../ventilation_system/ventilation_system.scad>;
module glovebox() {
echo("Glovebox assembly:");
// Skin
skin();
// Skeleton
skeleton();
// Ventilation system
ventilation_system();
// Shopping
// Skin
// Skeleton
// Ventilation system
}
// output
glovebox();

View File

@@ -0,0 +1,172 @@
include <../../config.scad>;
use <./skeleton_beam.scad>;
use <../fixings/square_tube_joint_cross.scad>;
use <../fixings/square_tube_joint_n_way.scad>;
use <../fixings/square_tube_joint_tee.scad>;
function get_length_beam_from_total_length_and_count_segments(length_total, count_segments) = (length_total - (count_segments + 1) * D_BEAM_SKELETON) / (count_segments);
module skeleton() {
// Shopping
echo("Skeleton");
// Model
translate([0, 0, -D_BEAM_SKELETON / 2]) union() {
count_beams_on_side_face_along_y = COUNT_BEAMS_ON_BOTTOM_FACE_ALONG_Y;
count_beams_on_rear_face_along_x = COUNT_BEAMS_ON_BOTTOM_FACE_ALONG_X;
count_beams_on_rear_face_along_z = COUNT_BEAMS_ON_SIDE_FACE_ALONG_Z;
count_beams_on_top_face_along_x = COUNT_BEAMS_ON_BOTTOM_FACE_ALONG_X;
count_beams_on_top_face_along_y = COUNT_BEAMS_ON_BOTTOM_FACE_ALONG_Y;
length_beam_on_bottom_face_along_x = get_length_beam_from_total_length_and_count_segments(R_EXTERNAL[0], COUNT_BEAMS_ON_BOTTOM_FACE_ALONG_X);
length_beam_on_bottom_face_along_y = get_length_beam_from_total_length_and_count_segments(R_EXTERNAL[1], COUNT_BEAMS_ON_BOTTOM_FACE_ALONG_Y);
length_beam_on_side_face_along_y = get_length_beam_from_total_length_and_count_segments(R_EXTERNAL[1], count_beams_on_side_face_along_y);
length_beam_on_side_face_along_z = get_length_beam_from_total_length_and_count_segments(R_EXTERNAL[2], COUNT_BEAMS_ON_SIDE_FACE_ALONG_Z);
length_beam_on_rear_face_along_x = get_length_beam_from_total_length_and_count_segments(R_EXTERNAL[0], count_beams_on_rear_face_along_x);
length_beam_on_rear_face_along_z = get_length_beam_from_total_length_and_count_segments(R_EXTERNAL[2], count_beams_on_rear_face_along_z);
length_beam_on_top_face_along_x = get_length_beam_from_total_length_and_count_segments(R_EXTERNAL[0], count_beams_on_top_face_along_x);
length_beam_on_top_face_along_y = get_length_beam_from_total_length_and_count_segments(R_EXTERNAL[1], count_beams_on_top_face_along_y);
// Bottom
translate([0, 0, -R_INTERNAL[2] / 2]) for (index_beam_on_bottom_face_along_x = [0 : 1 : COUNT_BEAMS_ON_BOTTOM_FACE_ALONG_X]) { // -R_INTERNAL[0] / 2 - D_BEAM_SKELETON / 2
for (index_beam_on_bottom_face_along_y = [0 : 1 : COUNT_BEAMS_ON_BOTTOM_FACE_ALONG_Y]) {
// Beams
if (index_beam_on_bottom_face_along_x < COUNT_BEAMS_ON_BOTTOM_FACE_ALONG_X) {
translate([-R_INTERNAL[0] / 2 + length_beam_on_bottom_face_along_x / 2 + (D_BEAM_SKELETON + length_beam_on_bottom_face_along_x) * (index_beam_on_bottom_face_along_x), -R_INTERNAL[1] / 2 - D_BEAM_SKELETON / 2 + (D_BEAM_SKELETON + length_beam_on_bottom_face_along_y) * (index_beam_on_bottom_face_along_y), 0]) rotate([0, 90, 0]) skeleton_beam(length_beam_on_bottom_face_along_x);
}
if (index_beam_on_bottom_face_along_y < COUNT_BEAMS_ON_BOTTOM_FACE_ALONG_Y) {
translate([-R_INTERNAL[0] / 2 - D_BEAM_SKELETON / 2 + (D_BEAM_SKELETON + length_beam_on_bottom_face_along_x) * (index_beam_on_bottom_face_along_x), -R_INTERNAL[1] / 2 + length_beam_on_bottom_face_along_y / 2 + (D_BEAM_SKELETON + length_beam_on_bottom_face_along_y) * (index_beam_on_bottom_face_along_y), 0]) rotate([90, 0, 0]) skeleton_beam(length_beam_on_bottom_face_along_y);
}
// Joints
translate([-R_INTERNAL[0] / 2 - D_BEAM_SKELETON / 2 + (D_BEAM_SKELETON + length_beam_on_bottom_face_along_x) * (index_beam_on_bottom_face_along_x), -R_INTERNAL[1] / 2 - D_BEAM_SKELETON / 2 + (D_BEAM_SKELETON + length_beam_on_bottom_face_along_y) * (index_beam_on_bottom_face_along_y), 0]) {
if (index_beam_on_bottom_face_along_x == 0 || index_beam_on_bottom_face_along_x == COUNT_BEAMS_ON_BOTTOM_FACE_ALONG_X) {
mirror([(index_beam_on_bottom_face_along_x == COUNT_BEAMS_ON_BOTTOM_FACE_ALONG_X ? 1 : 0), 0, 0]) {
if (index_beam_on_bottom_face_along_y == 0 || index_beam_on_bottom_face_along_y == COUNT_BEAMS_ON_BOTTOM_FACE_ALONG_Y) {
mirror([0, (index_beam_on_bottom_face_along_y == COUNT_BEAMS_ON_BOTTOM_FACE_ALONG_Y ? 1 : 0), 0]) square_tube_joint_n_way(D_BEAM_SKELETON, T_BEAM_SKELETON, 3);
}
else {
rotate([90, 0, 0]) square_tube_joint_n_way(D_BEAM_SKELETON, T_BEAM_SKELETON, 4);
}
}
}
else {
if (index_beam_on_bottom_face_along_y == 0) {
square_tube_joint_tee(D_BEAM_SKELETON, T_BEAM_SKELETON);
}
else if (index_beam_on_bottom_face_along_y == COUNT_BEAMS_ON_BOTTOM_FACE_ALONG_Y) {
rotate([90, 0, -90]) square_tube_joint_n_way(D_BEAM_SKELETON, T_BEAM_SKELETON, 4);
}
else {
square_tube_joint_cross(D_BEAM_SKELETON, T_BEAM_SKELETON);
}
}
}
}
}
// Sides
for (index_side = [0 : 1 : 1]) mirror([index_side, 0, 0]) {
translate([R_INTERNAL[0] / 2 + D_BEAM_SKELETON / 2, 0, 0]) for (index_beam_on_side_face_along_z = [0 : 1 : COUNT_BEAMS_ON_SIDE_FACE_ALONG_Z]) {
for (index_beam_on_side_face_along_y = [0 : 1 : count_beams_on_side_face_along_y]) {
// Beams
if (
index_beam_on_side_face_along_y < count_beams_on_side_face_along_y
&& index_beam_on_side_face_along_z > 0
&& index_beam_on_side_face_along_z < COUNT_BEAMS_ON_SIDE_FACE_ALONG_Z
) {
translate([0, -R_INTERNAL[1] / 2 + length_beam_on_side_face_along_y / 2 + (D_BEAM_SKELETON + length_beam_on_side_face_along_y) * (index_beam_on_side_face_along_y), -R_INTERNAL[2] / 2 + (D_BEAM_SKELETON + length_beam_on_side_face_along_z) * (index_beam_on_side_face_along_z)]) rotate([90, 0, 0]) skeleton_beam(length_beam_on_side_face_along_y);
}
if (index_beam_on_side_face_along_z < COUNT_BEAMS_ON_SIDE_FACE_ALONG_Z) {
translate([0, -R_INTERNAL[1] / 2 - D_BEAM_SKELETON / 2 + (D_BEAM_SKELETON + length_beam_on_side_face_along_y) * (index_beam_on_side_face_along_y), -R_INTERNAL[2] / 2 + D_BEAM_SKELETON / 2 + length_beam_on_side_face_along_z / 2 + (D_BEAM_SKELETON + length_beam_on_side_face_along_z) * (index_beam_on_side_face_along_z)]) skeleton_beam(length_beam_on_side_face_along_z);
}
// Joints
translate([0, -R_INTERNAL[1] / 2 - D_BEAM_SKELETON / 2 + (D_BEAM_SKELETON + length_beam_on_side_face_along_y) * (index_beam_on_side_face_along_y), -R_INTERNAL[2] / 2 + (D_BEAM_SKELETON + length_beam_on_side_face_along_z) * (index_beam_on_side_face_along_z)]) {
if (
index_beam_on_side_face_along_z > 0
&& index_beam_on_side_face_along_z < COUNT_BEAMS_ON_SIDE_FACE_ALONG_Z
) {
if (index_beam_on_side_face_along_y == 0) {
rotate([0, 90, 0]) square_tube_joint_tee(D_BEAM_SKELETON, T_BEAM_SKELETON);
}
else if (index_beam_on_side_face_along_y == count_beams_on_side_face_along_y) {
rotate([0, 0, 180]) square_tube_joint_n_way(D_BEAM_SKELETON, T_BEAM_SKELETON, 4);
}
else {
rotate([0, 90, 0]) square_tube_joint_cross(D_BEAM_SKELETON, T_BEAM_SKELETON);
}
}
}
}
}
}
// Rear
translate([0, R_INTERNAL[1] / 2 + D_BEAM_SKELETON / 2, 0]) for (index_beam_on_rear_face_along_x = [0 : 1 : count_beams_on_rear_face_along_x]) {
for (index_beam_on_rear_face_along_z = [0 : 1 : count_beams_on_rear_face_along_z]) {
// Beams
if (
index_beam_on_rear_face_along_x < count_beams_on_rear_face_along_x
&& index_beam_on_rear_face_along_z > 0
&& index_beam_on_rear_face_along_z < count_beams_on_rear_face_along_z
) {
translate([-R_INTERNAL[0] / 2 + length_beam_on_rear_face_along_x / 2 + (D_BEAM_SKELETON + length_beam_on_rear_face_along_x) * (index_beam_on_rear_face_along_x), 0, -R_INTERNAL[2] / 2 + (D_BEAM_SKELETON + length_beam_on_rear_face_along_z) * (index_beam_on_rear_face_along_z)]) rotate([0, 90, 0]) skeleton_beam(length_beam_on_rear_face_along_x);
}
if (
index_beam_on_rear_face_along_z < count_beams_on_rear_face_along_z
&& index_beam_on_rear_face_along_x > 0
&& index_beam_on_rear_face_along_x < count_beams_on_rear_face_along_x
) {
translate([-R_INTERNAL[0] / 2 - D_BEAM_SKELETON / 2 + (D_BEAM_SKELETON + length_beam_on_rear_face_along_x) * (index_beam_on_rear_face_along_x), 0, -R_INTERNAL[2] / 2 + D_BEAM_SKELETON / 2 + length_beam_on_rear_face_along_z / 2 + (D_BEAM_SKELETON + length_beam_on_rear_face_along_z) * (index_beam_on_rear_face_along_z)]) skeleton_beam(length_beam_on_rear_face_along_z);
}
// Joints
translate([-R_INTERNAL[0] / 2 - D_BEAM_SKELETON / 2 + (D_BEAM_SKELETON + length_beam_on_rear_face_along_x) * (index_beam_on_rear_face_along_x), 0, -R_INTERNAL[2] / 2 + (D_BEAM_SKELETON + length_beam_on_rear_face_along_z) * (index_beam_on_rear_face_along_z)]) {
if (
index_beam_on_rear_face_along_z > 0
&& index_beam_on_rear_face_along_z < count_beams_on_rear_face_along_z
) {
if (index_beam_on_rear_face_along_x > 0 && index_beam_on_rear_face_along_x < count_beams_on_rear_face_along_x) {
rotate([90, 0, 0]) square_tube_joint_cross(D_BEAM_SKELETON, T_BEAM_SKELETON);
}
}
}
}
}
// Top
translate([0, 0, R_INTERNAL[2] / 2 + D_BEAM_SKELETON]) for (index_beam_on_top_face_along_x = [0 : 1 : count_beams_on_top_face_along_x]) { // -R_INTERNAL[0] / 2 - D_BEAM_SKELETON / 2
for (index_beam_on_top_face_along_y = [0 : 1 : count_beams_on_top_face_along_y]) {
// Beams
if (index_beam_on_top_face_along_x < count_beams_on_top_face_along_x) {
translate([-R_INTERNAL[0] / 2 + length_beam_on_top_face_along_x / 2 + (D_BEAM_SKELETON + length_beam_on_top_face_along_x) * (index_beam_on_top_face_along_x), -R_INTERNAL[1] / 2 - D_BEAM_SKELETON / 2 + (D_BEAM_SKELETON + length_beam_on_top_face_along_y) * (index_beam_on_top_face_along_y), 0]) rotate([0, 90, 0]) skeleton_beam(length_beam_on_top_face_along_x);
}
if (index_beam_on_top_face_along_y < count_beams_on_top_face_along_y) {
translate([-R_INTERNAL[0] / 2 - D_BEAM_SKELETON / 2 + (D_BEAM_SKELETON + length_beam_on_top_face_along_x) * (index_beam_on_top_face_along_x), -R_INTERNAL[1] / 2 + length_beam_on_top_face_along_y / 2 + (D_BEAM_SKELETON + length_beam_on_top_face_along_y) * (index_beam_on_top_face_along_y), 0]) rotate([90, 0, 0]) skeleton_beam(length_beam_on_top_face_along_y);
}
// Joints
translate([-R_INTERNAL[0] / 2 - D_BEAM_SKELETON / 2 + (D_BEAM_SKELETON + length_beam_on_top_face_along_x) * (index_beam_on_top_face_along_x), -R_INTERNAL[1] / 2 - D_BEAM_SKELETON / 2 + (D_BEAM_SKELETON + length_beam_on_top_face_along_y) * (index_beam_on_top_face_along_y), 0]) {
if (index_beam_on_top_face_along_x == 0 || index_beam_on_top_face_along_x == count_beams_on_top_face_along_x) {
mirror([(index_beam_on_top_face_along_x == count_beams_on_top_face_along_x ? 1 : 0), 0, 0]) {
if (index_beam_on_top_face_along_y == 0 || index_beam_on_top_face_along_y == count_beams_on_top_face_along_y) {
mirror([0, (index_beam_on_top_face_along_y == count_beams_on_top_face_along_y ? 1 : 0), 1]) square_tube_joint_n_way(D_BEAM_SKELETON, T_BEAM_SKELETON, 3);
}
else {
rotate([-90, 0, 0]) square_tube_joint_n_way(D_BEAM_SKELETON, T_BEAM_SKELETON, 4);
}
}
}
else {
if (index_beam_on_top_face_along_y == 0) {
square_tube_joint_tee(D_BEAM_SKELETON, T_BEAM_SKELETON);
}
else if (index_beam_on_top_face_along_y == count_beams_on_top_face_along_y) {
rotate([-90, 0, -90]) square_tube_joint_n_way(D_BEAM_SKELETON, T_BEAM_SKELETON, 4);
}
else {
square_tube_joint_cross(D_BEAM_SKELETON, T_BEAM_SKELETON);
}
}
}
}
}
}
}
skeleton();

View File

@@ -0,0 +1,8 @@
include <../../config.scad>;
use <../common/beam_hollow_rectangular.scad>;
module skeleton_beam(length) {
color("red", 0.4) beam_hollow_rectangular(length, D_BEAM_SKELETON, D_BEAM_SKELETON, T_BEAM_SKELETON, true);
// Shopping
echo(str("Skeleton beam: Aluminium box section 20mm x 20mm x ", length, "mm - x1"));
}

21
models/skin/skin.scad Normal file
View File

@@ -0,0 +1,21 @@
include <../../config.scad>;
module skin() {
color("purple", 0.2) difference() {
// Skin
cube(R_SKIN, center = true);
cube(R_SKIN - T_SKIN * [1, 1, 1], center = true);
// Viewport
translate([0, -R_SKIN[1] / 2 + T_SKIN / 2, W_SKIN_BORDER_FRONT / 2]) cube([R_SKIN[0] - 2 * W_SKIN_BORDER_FRONT, T_SKIN, R_SKIN[2] - W_SKIN_BORDER_FRONT], center = true);
// Ventilation system access
translate([R_SKIN[0] / 4, R_SKIN[1] / 2, -R_SKIN[2] / 4]) rotate([90, 0, 0]) cylinder(T_SKIN, D_VENT_DUCT / 2, D_VENT_DUCT / 2, center = true);
translate([-R_SKIN[0] / 4, R_SKIN[1] / 2, -R_SKIN[2] / 4]) rotate([90, 0, 0]) cylinder(T_SKIN, D_VENT_DUCT / 2, D_VENT_DUCT / 2, center = true);
}
// Shopping
echo(str("Mylar and canvas: Skin base and top ", R_SKIN[0], "mm x ", R_SKIN[1], "mm - x2"));
echo(str("Mylar and canvas: Skin side ", R_SKIN[1], "mm x ", R_SKIN[2], "mm - x2"));
echo(str("Mylar and canvas: Skin rear and front ", R_SKIN[0], "mm x ", R_SKIN[2], "mm - x2"));
}
skin();

View File

@@ -0,0 +1,4 @@
module ventilation_system() {
}