Initial commit
This commit is contained in:
13
models/common/angle_beam.scad
Normal file
13
models/common/angle_beam.scad
Normal file
@@ -0,0 +1,13 @@
|
||||
|
||||
module angle_beam(L, w, t, centre = true) {
|
||||
R_offset_centre = [-w / 2, -w / 2, -L / 2];
|
||||
translate(centre ? R_offset_centre : [0, 0, 0]) union() {
|
||||
cube([w, t, L], center = false);
|
||||
cube([t, w, L], center = false);
|
||||
}
|
||||
// Shopping
|
||||
echo(str("Rectangular Aluminium angle beam: Rectangular Aluminium angle beam ", L, "mm x ", w, "mm x ", t, "mm - x1"));
|
||||
// https://www.metals4u.co.uk/materials/aluminium/aluminium-angle/aa25-4x25-4x4-8-p
|
||||
}
|
||||
|
||||
angle_beam(500, 50, 5);
|
||||
51
models/common/ball_socket_joint.scad
Normal file
51
models/common/ball_socket_joint.scad
Normal file
@@ -0,0 +1,51 @@
|
||||
include <../../config.scad>;
|
||||
|
||||
/*
|
||||
function get_universal_joint_length() = 40;
|
||||
function get_universal_joint_d_bore_hole() = 6;
|
||||
function get_universal_joint_d_hole() = 4;
|
||||
function get_universal_joint_d() = 11;
|
||||
function get_universal_joint_thickness() = (get_universal_joint_d() - get_universal_joint_d_bore_hole()) / 2;
|
||||
function get_universal_joint_joint_axial_offset() = get_universal_joint_thickness() * 2;
|
||||
function get_universal_joint_pin_axial_offset() = get_universal_joint_thickness() + get_universal_joint_d_hole() / 2;
|
||||
|
||||
module ball_socket_joint() {
|
||||
L = get_universal_joint_length();
|
||||
t = get_universal_joint_thickness();
|
||||
joint_axial_offset = get_universal_joint_joint_axial_offset();
|
||||
translate([L / 2, 0, 0]) mirror([1, 0, 0]) universal_joint_half();
|
||||
translate([L / 2 - joint_axial_offset, 0, 0]) rotate([90, -ANGLE_INCLINE_TILLER, 0]) translate([-joint_axial_offset, 0, 0]) universal_joint_half();
|
||||
}
|
||||
|
||||
module universal_joint_half() {
|
||||
d_hole_bore = get_universal_joint_d_bore_hole();
|
||||
d_hole = get_universal_joint_d_hole();
|
||||
d = get_universal_joint_d();
|
||||
L = get_universal_joint_length();
|
||||
t = get_universal_joint_thickness();
|
||||
joint_axial_offset = get_universal_joint_joint_axial_offset();
|
||||
pin_axial_offset = get_universal_joint_pin_axial_offset();
|
||||
color("orange") union() {
|
||||
difference() {
|
||||
// body
|
||||
rotate([0, 90, 0]) cylinder(L / 2, d / 2, d / 2, center = false);
|
||||
// threaded hole
|
||||
translate([L - pin_axial_offset, 0, 0]) cylinder(d, d_hole / 2, d_hole / 2, center = true);
|
||||
// bore hole
|
||||
rotate([0, 90, 0]) cylinder(L / 2, d_hole / 2, d_hole / 2, center = false);
|
||||
// joint slot
|
||||
translate([L / 8, 0, 0]) cube([L / 4, d - t * 2, d], center = true);
|
||||
}
|
||||
// joint
|
||||
translate([joint_axial_offset, 0, 0]) rotate([90, 0, 0]) cylinder(d, t, t, center = true);
|
||||
}
|
||||
}
|
||||
|
||||
// output
|
||||
translate([100, 0, 0]) universal_joint_half();
|
||||
universal_joint();
|
||||
|
||||
*/
|
||||
|
||||
// shopping
|
||||
// https://www.amazon.co.uk/HiPicco-Universal-M5-Automotive-Cupboard/dp/B0BK28WXY8/ref=sr_1_21?crid=6A6OMRNKNXFR&dib=eyJ2IjoiMSJ9.e8gSWrg3UPxR5gMbATNC91I6qERE0rN5FCcOtnZJmGbFIHW9Rz6Rtq02WZj_C2CYgbwA8KHdd1W1xyOxZrH60UtwiGKd9MkmAbd09h9ACi4yGnbOLjhWb-Iboe0IZ_tvxh3XFdo4ygZ-iV98DODCXzl1WdVpTyUg3N4bok5qGtTP2CWfzPOmUFwyTe7_snV4fb7jlTGHK_ks3tR4FSDiUtCwEnuzxJUqdZSRNp4EhGo.2_e9Kal7A7FfEcIzWVEzQXH2zOWiECkGj9UqjIb_8XQ&dib_tag=se&keywords=metric%2Bball%2BJOINT&qid=1739814661&sprefix=metric%2Bball%2Bjoint%2Caps%2C99&sr=8-21&th=1
|
||||
13
models/common/beam_hexagonal.scad
Normal file
13
models/common/beam_hexagonal.scad
Normal file
@@ -0,0 +1,13 @@
|
||||
// include <../../config.scad>;
|
||||
|
||||
module beam_hexagonal(L, d, centre = true, suppress_shopping_outputs = false) {
|
||||
radius = d / 2;
|
||||
linear_extrude(L, center = centre) polygon([[radius, 0], [radius * cos(60), radius * sin(60)], [radius * cos(120), radius * sin(120)], [radius * cos(180), radius * sin(180)], [radius * cos(240), radius * sin(240)], [radius * cos(300), radius * sin(300)]]);
|
||||
// Shopping
|
||||
if (!suppress_shopping_outputs) {
|
||||
echo(str("Hexagonal beam: Hexagonal beam Φ", d, "mm x ", L, "mm - x1"));
|
||||
}
|
||||
}
|
||||
|
||||
// $fn = 200;
|
||||
beam_hexagonal(500, 50);
|
||||
13
models/common/beam_hollow_rectangular.scad
Normal file
13
models/common/beam_hollow_rectangular.scad
Normal 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);
|
||||
10
models/common/beam_hollow_square.scad
Normal file
10
models/common/beam_hollow_square.scad
Normal file
@@ -0,0 +1,10 @@
|
||||
include <../../config.scad>;
|
||||
use <./beam_hollow_rectangular.scad>;
|
||||
|
||||
module beam_hollow_square(L, D, T) {
|
||||
color(COLOUR_BEAM_ALUMINIUM) beam_hollow_rectangular(L, D, D, T, suppress_shopping_outputs = true);
|
||||
// Shopping
|
||||
echo(str("Square Aluminium hollow beam: Square Aluminium hollow beam ", L, "mm x ", D, "mm x ", D, "mm x ", T, "mm - x1"));
|
||||
}
|
||||
|
||||
beam_hollow_square(L, D, T);
|
||||
7
models/common/compression_spring.json
Normal file
7
models/common/compression_spring.json
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"parameterSets": {
|
||||
"ANGLE": ""
|
||||
},
|
||||
"parameterSets": "",
|
||||
"fileFormatVersion": "1"
|
||||
}
|
||||
23
models/common/compression_spring.scad
Normal file
23
models/common/compression_spring.scad
Normal file
@@ -0,0 +1,23 @@
|
||||
// include <../../config.scad>;
|
||||
|
||||
module compression_spring(L_free, d_outer, d_inner, pitch) {
|
||||
r_wire = (d_outer - d_inner) / 2;
|
||||
r_mean = (d_outer + d_inner) / 4;
|
||||
angle_rotation = 360 * L_free / pitch;
|
||||
color("DimGray") union() {
|
||||
difference() {
|
||||
// spiral
|
||||
linear_extrude(height = L_free - r_wire * 2, center = true, convexity = 10, twist = angle_rotation) translate([r_mean, 0, 0]) scale([1, 3, 1]) circle(r_wire);
|
||||
// end blocks
|
||||
}
|
||||
// ring top
|
||||
translate([0, 0, L_free / 2 - r_wire]) rotate_extrude(angle = 360) translate([r_mean, 0, 0]) circle(r_wire);
|
||||
// ring bottom
|
||||
translate([0, 0, -L_free / 2 + r_wire]) rotate_extrude(angle = 360) translate([r_mean, 0, 0]) circle(r_wire);
|
||||
}
|
||||
// Shopping
|
||||
echo(str("Compression spring: Compression spring Φ", d_outer, "mm x ", d_inner, "mm x ", L_free, "mm - x1"));
|
||||
}
|
||||
|
||||
// $fn = 20;
|
||||
compression_spring(100, 25, 20, 10);
|
||||
12
models/common/hollow_cuboid.scad
Normal file
12
models/common/hollow_cuboid.scad
Normal file
@@ -0,0 +1,12 @@
|
||||
// include <../../config.scad>;
|
||||
|
||||
module hollow_cuboid(R, t) {
|
||||
difference() {
|
||||
cube(R, center = true);
|
||||
cube([R[0] - t * 2, R[1] - t * 2, R[2] - t * 2], center = true);
|
||||
}
|
||||
// Shopping
|
||||
echo(str("Hollow cuboid: Hollow cuboid ", R[0], "mm x ", R[1], "mm x ", R[2], "mm x ", R[3], "mm - x1"));
|
||||
}
|
||||
|
||||
hollow_cuboid([100, 200, 300], 5);
|
||||
28
models/common/metric_bolt.scad
Normal file
28
models/common/metric_bolt.scad
Normal file
@@ -0,0 +1,28 @@
|
||||
// include <../../config.scad>;
|
||||
use <./beam_hexagonal.scad>;
|
||||
use <./metric_bolt_functions.scad>;
|
||||
use <./metric_nut.scad>;
|
||||
|
||||
module metric_bolt(size, length, has_nut = true, offset_nut_from_end = 0) {
|
||||
echo("Metric bolt assembly:");
|
||||
head_height = get_metric_bolt_head_height(size);
|
||||
head_diameter = get_metric_bolt_head_diameter(size);
|
||||
head_radius = head_diameter / 2;
|
||||
color("gray") union() {
|
||||
// Stem
|
||||
cylinder(length, size / 2, size / 2, center = true);
|
||||
// Head
|
||||
translate([0, 0, length / 2 - size / 2]) beam_hexagonal(head_height, head_diameter, centre = true, suppress_shopping_outputs = true);
|
||||
if (has_nut) {
|
||||
// Nut
|
||||
translate([0, 0, -(length / 2 - size / 2) + offset_nut_from_end]) metric_nut(size);
|
||||
}
|
||||
}
|
||||
// Shopping
|
||||
echo(str("Bolt: Bolt M", size, " x ", length, "mm - x1"));
|
||||
}
|
||||
|
||||
// $fn = 200;
|
||||
metric_bolt(12, 100);
|
||||
translate([30, 0, 0]) metric_bolt(12, 100, false);
|
||||
translate([60, 0, 0]) metric_bolt(12, 100, true, 5);
|
||||
9
models/common/metric_bolt_functions.scad
Normal file
9
models/common/metric_bolt_functions.scad
Normal file
@@ -0,0 +1,9 @@
|
||||
|
||||
function get_metric_bolt_head_height(size) = size;
|
||||
function get_metric_bolt_head_diameter(size) = size * 2;
|
||||
function get_metric_bolt_washer_diameter_safe_working_clearance(size) =
|
||||
(size < 20) ?
|
||||
4 * size
|
||||
:
|
||||
3 * size
|
||||
;
|
||||
7
models/common/metric_nut.json
Normal file
7
models/common/metric_nut.json
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"parameterSets": {
|
||||
"ANGLE": ""
|
||||
},
|
||||
"parameterSets": "",
|
||||
"fileFormatVersion": "1"
|
||||
}
|
||||
20
models/common/metric_nut.scad
Normal file
20
models/common/metric_nut.scad
Normal file
@@ -0,0 +1,20 @@
|
||||
// include <../../config.scad>;
|
||||
use <./beam_hexagonal.scad>;
|
||||
use <./metric_bolt_functions.scad>;
|
||||
|
||||
module metric_nut(size, centre = true) {
|
||||
height = get_metric_bolt_head_height(size);
|
||||
diameter = get_metric_bolt_head_diameter(size);
|
||||
radius = diameter / 2;
|
||||
color("gray") difference() {
|
||||
// body
|
||||
beam_hexagonal(height, diameter, centre = centre, suppress_shopping_outputs = true);
|
||||
// hole
|
||||
cylinder(height, size / 2, size / 2, center = centre);
|
||||
}
|
||||
// Shopping
|
||||
echo(str("Nut: Nut M", size, " - x1"));
|
||||
}
|
||||
|
||||
// $fn = 200;
|
||||
metric_nut(12);
|
||||
49
models/common/universal_joint.scad
Normal file
49
models/common/universal_joint.scad
Normal file
@@ -0,0 +1,49 @@
|
||||
include <../../config.scad>;
|
||||
|
||||
function get_universal_joint_length() = 40;
|
||||
function get_universal_joint_d_bore_hole() = 6;
|
||||
function get_universal_joint_d_hole() = 4;
|
||||
function get_universal_joint_d() = 11;
|
||||
function get_universal_joint_thickness() = (get_universal_joint_d() - get_universal_joint_d_bore_hole()) / 2;
|
||||
function get_universal_joint_joint_axial_offset() = get_universal_joint_thickness() * 2;
|
||||
function get_universal_joint_pin_axial_offset() = get_universal_joint_thickness() + get_universal_joint_d_hole() / 2;
|
||||
|
||||
module universal_joint() {
|
||||
echo("Universal joint assembly: ERROR MISSING");
|
||||
L = get_universal_joint_length();
|
||||
t = get_universal_joint_thickness();
|
||||
joint_axial_offset = get_universal_joint_joint_axial_offset();
|
||||
translate([L / 2, 0, 0]) mirror([1, 0, 0]) universal_joint_half();
|
||||
translate([L / 2 - joint_axial_offset, 0, 0]) rotate([90, -ANGLE_INCLINE_TILLER, 0]) translate([-joint_axial_offset, 0, 0]) universal_joint_half();
|
||||
}
|
||||
|
||||
module universal_joint_half() {
|
||||
d_hole_bore = get_universal_joint_d_bore_hole();
|
||||
d_hole = get_universal_joint_d_hole();
|
||||
d = get_universal_joint_d();
|
||||
L = get_universal_joint_length();
|
||||
t = get_universal_joint_thickness();
|
||||
joint_axial_offset = get_universal_joint_joint_axial_offset();
|
||||
pin_axial_offset = get_universal_joint_pin_axial_offset();
|
||||
color("orange") union() {
|
||||
difference() {
|
||||
// body
|
||||
rotate([0, 90, 0]) cylinder(L / 2, d / 2, d / 2, center = false);
|
||||
// threaded hole
|
||||
translate([L - pin_axial_offset, 0, 0]) cylinder(d, d_hole / 2, d_hole / 2, center = true);
|
||||
// bore hole
|
||||
rotate([0, 90, 0]) cylinder(L / 2, d_hole / 2, d_hole / 2, center = false);
|
||||
// joint slot
|
||||
translate([L / 8, 0, 0]) cube([L / 4, d - t * 2, d], center = true);
|
||||
}
|
||||
// joint
|
||||
translate([joint_axial_offset, 0, 0]) rotate([90, 0, 0]) cylinder(d, t, t, center = true);
|
||||
}
|
||||
}
|
||||
|
||||
// output
|
||||
translate([100, 0, 0]) universal_joint_half();
|
||||
universal_joint();
|
||||
|
||||
// shopping
|
||||
//https://www.amazon.co.uk/Ohamtes-diameter-universal-coupling-Rotatable/dp/B09NXCKJY7/ref=sr_1_1_sspa?crid=3DS7BH7WHYTF4&dib=eyJ2IjoiMSJ9.qTSAOeHpLAIx1plz8THvnJuCvLh8y4zf-H37BRTvT5TTF4M6kqHBg50e-40C5hjdmTAPJLEgHg0Jx5cbB8m_wQM7WCaEibSQJBNZnTwHBZ3w0jHw-znfaRDSaMRP0xlHOblYtwBc9XbF5-KNpHR9dtRmXPDooHcnFM8vchBOqGp-5rR5c6o9Nh0TCq9APO-csslNPAa4bTVjWtniflkcqc39VaQL55CghNaz2NQGdQRrifAgcEqwIM5BpJODfEizqzlotNlbrk6F1gdAZw2clQOw5dIVvjbKLGTCgXnK2xI.vL2JYm04p6ohOn9Jf1OMaPuo9PoqjzItE0AQg2irL0E&dib_tag=se&keywords=UNIVERSAL%2BJOINT&qid=1739725484&sprefix=universal%2Bjoint%2Caps%2C66&sr=8-1-spons&sp_csd=d2lkZ2V0TmFtZT1zcF9hdGY&th=1
|
||||
7
models/common/washer.json
Normal file
7
models/common/washer.json
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"parameterSets": {
|
||||
"ANGLE": ""
|
||||
},
|
||||
"parameterSets": "",
|
||||
"fileFormatVersion": "1"
|
||||
}
|
||||
15
models/common/washer.scad
Normal file
15
models/common/washer.scad
Normal file
@@ -0,0 +1,15 @@
|
||||
include <../../config.scad>;
|
||||
|
||||
module washer(t, d_outer, d_inner, centre = true) {
|
||||
r_outer = d_outer / 2;
|
||||
r_inner = d_inner / 2;
|
||||
color("silver") difference() {
|
||||
cylinder(t, r_outer, r_outer, center = centre);
|
||||
cylinder(t, r_inner, r_inner, center = centre);
|
||||
}
|
||||
// Shopping
|
||||
echo(str("Washer: Washer Φ", d_outer, "mm x ", d_inner, "mm x ", t, "mm - x1"));
|
||||
}
|
||||
|
||||
// $fn = 200;
|
||||
washer(3, 10, 40);
|
||||
12
models/common/wheel.scad
Normal file
12
models/common/wheel.scad
Normal file
@@ -0,0 +1,12 @@
|
||||
include <../../config.scad>;
|
||||
|
||||
module wheel() {
|
||||
r_wheel = D_WHEEL / 2;
|
||||
r_wheel_bore = D_WHEEL_BORE / 2;
|
||||
color("red") rotate([0, 90, 0]) difference() {
|
||||
cylinder(T_WHEEL, r_wheel, r_wheel, center = true);
|
||||
cylinder(T_WHEEL, r_wheel_bore, r_wheel_bore, center = true);
|
||||
}
|
||||
// Shopping
|
||||
echo("Wheel: Wheel - x1");
|
||||
}
|
||||
Reference in New Issue
Block a user