Completed design for v2.
This commit is contained in:
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);
|
||||
17
models/common/br_t_nut.scad
Normal file
17
models/common/br_t_nut.scad
Normal file
@@ -0,0 +1,17 @@
|
||||
// include <../../config.scad>;
|
||||
|
||||
module br_t_nut(centre = true) {
|
||||
difference() {
|
||||
union() {
|
||||
translate([0, 0, 3.2 / 2]) cube([5.7, 11.5, 3.2], center = true);
|
||||
translate([0, 0, -1 / 2]) cube([5.7, 5.7, 1], center = true);
|
||||
}
|
||||
cylinder(20, 4 / 2, 4 / 2, center = true);
|
||||
}
|
||||
// Shopping
|
||||
echo(str("BR T Nut: BR T Nut M4 - x1"));
|
||||
}
|
||||
|
||||
// $fn = 50;
|
||||
// Outputs
|
||||
br_t_nut();
|
||||
BIN
models/common/br_t_nut.stl
Normal file
BIN
models/common/br_t_nut.stl
Normal file
Binary file not shown.
15
models/common/c_channel_beam.scad
Normal file
15
models/common/c_channel_beam.scad
Normal file
@@ -0,0 +1,15 @@
|
||||
|
||||
|
||||
module c_channel_beam(length, width, depth, thickness, suppress_shopping_outputs = false) {
|
||||
translate([-width / 2, 0, -length / 2]) difference() {
|
||||
cube([width, depth, length], center = false);
|
||||
translate([thickness, thickness, 0]) cube([width - thickness * 2, depth - thickness, length], center = false);
|
||||
translate([0, depth, 0]) cube([width, thickness, length], center = false);
|
||||
}
|
||||
// Shopping
|
||||
if (!suppress_shopping_outputs) {
|
||||
echo(str("Rectangular Aluminium channel beam: Rectangular Aluminium channel beam ", length, "mm x ", width, "mm x ", depth, "mm x ", thickness, "mm - x1"));
|
||||
}
|
||||
}
|
||||
|
||||
c_channel_beam(500, 19, 19, 1.6);
|
||||
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, head_height / 2, center = true);
|
||||
// Head
|
||||
translate([0, 0, length / 2 + head_height / 2]) beam_hexagonal(head_height, head_diameter, centre = true, suppress_shopping_outputs = true);
|
||||
if (has_nut) {
|
||||
// Nut
|
||||
translate([0, 0, -(length / 2 - head_height / 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
|
||||
;
|
||||
33
models/common/metric_countersunk_head_bolt.scad
Normal file
33
models/common/metric_countersunk_head_bolt.scad
Normal file
@@ -0,0 +1,33 @@
|
||||
// include <../../config.scad>;
|
||||
use <./beam_hexagonal.scad>;
|
||||
use <./metric_countersunk_head_bolt_functions.scad>;
|
||||
use <./metric_bolt_functions.scad>;
|
||||
use <./metric_nut.scad>;
|
||||
|
||||
module metric_countersunk_head_bolt(size, length, has_nut = true, offset_nut_from_end = 0) {
|
||||
echo("Metric countersunk head bolt assembly:");
|
||||
head_height = get_metric_countersunk_head_bolt_head_height(size);
|
||||
head_diameter = get_metric_countersunk_head_bolt_head_diameter(size);
|
||||
nut_height = get_metric_bolt_head_height(size);
|
||||
color("gray") union() {
|
||||
// Stem
|
||||
cylinder(length, size / 2, size / 2, center = true);
|
||||
// Head
|
||||
translate([0, 0, length / 2 + head_height / 2]) difference() {
|
||||
cylinder(head_height, size / 2, head_diameter / 2, center = true);
|
||||
translate([0, 0, head_height / 2 - head_diameter / 10 / 2]) cube([head_diameter / 5, head_diameter, head_diameter / 10], center = true);
|
||||
}
|
||||
if (has_nut) {
|
||||
// Nut
|
||||
translate([0, 0, -(length / 2 - nut_height / 2) + offset_nut_from_end]) metric_nut(size);
|
||||
}
|
||||
}
|
||||
// Shopping
|
||||
echo(str("Bolt: Countersunk head bolt M", size, " x ", length, "mm - x1"));
|
||||
}
|
||||
|
||||
// $fn = 200;
|
||||
metric_countersunk_head_bolt(4, 40);
|
||||
translate([30, 0, 0]) metric_countersunk_head_bolt(12, 200, false);
|
||||
translate([60, 0, 0]) metric_countersunk_head_bolt(12, 200, true, 10);
|
||||
translate([90, 0, 0]) metric_countersunk_head_bolt(12, 100, true, 5);
|
||||
@@ -0,0 +1,9 @@
|
||||
|
||||
function get_metric_countersunk_head_bolt_head_height(size) = size / 2;
|
||||
function get_metric_countersunk_head_bolt_head_diameter(size) = size * 2;
|
||||
function get_metric_countersunk_head_bolt_washer_diameter_safe_working_clearance(size) =
|
||||
(size < 20) ?
|
||||
4 * size
|
||||
:
|
||||
3 * size
|
||||
;
|
||||
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);
|
||||
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);
|
||||
Reference in New Issue
Block a user