Oh, my, Jamie! Whatcha’ doing? Anything useful? ![]()
This is getting to be real fun. What you are doing looks to be way above my pay grade… it was a fun read.
I’ve spent the last several hours just playing with OpenSCAD and Gemini… learning how to prompt AI with the proper information to get something parametric and workable. I told Gemini I wanted to start simple and just concentrate on the original goal… to investigate the triangular beam idea originating with Peter’s triangular cardboard mailing tube idea.
After learning that OpenSCAD simply can’t parse STEP files perfectly as CAD software can… I gave up on the idea of simply creating parts. I then decided to ask Gemini, " I want to design a 3-axis CNC machine using R&P drive on all axis… using 3/4" EMT, skate bearings, etc…" and it came back with a bunch of words and finally asked if I wanted to code up the entire machine in OpenSCAD. I said, NO! Let’s start small… just a basic beam assembly.
We started and in short order we came up with this which is surprisingly close to my real beam assembly…
We finally got to here which is far from finished but IMO promising…
with this code (which I didn’t write a single line)…
// =================================================================
// PARAMETRIC TRIANGULAR BEAM ASSEMBLY
// Fixed: Shortened rails to expose the end-bracket solid wall
// =================================================================
/* [Beam & Rail Setup] */
rail_od = 23.4;
truss_side = 100.0;
beam_length = 500.0;
/* [End Support Brackets] */
bracket_thick = 35.0;
stop_wall_thick = 3.0;
knockout_hole_d = 20.0;
foot_clearance = 25.0;
wall_thick = 10.0;
base_thick = 12.0;
bolt_hole_dia = 6.5;
bolt_cb_dia = 11.0;
bolt_cb_depth = 5.0;
/* [Tie-Rods & Face Counterbores] */
tierod_dia = 6.5;
tierod_cb_dia = 12.0;
tierod_cb_depth = 6.0;
/* [Inner Core Setup] */
core_wall_thick = 6.0;
/* [Gear Rack Settings] */
enable_rack = true;
rack_width = 12.0;
rack_height = 10.0;
module_m = 1.5;
/* [Display & View Options] */
render_view = "assembly";
/* [Hidden] */
$fn = 60;
r_rail = rail_od / 2;
r_hex = r_rail / cos(30);
socket_depth = bracket_thick - stop_wall_thick;
r_pocket = r_rail + wall_thick;
tri_height = truss_side * sqrt(3) / 2;
z_rail_bottom = foot_clearance + r_pocket;
p1 = [0, z_rail_bottom];
p2 = [0, z_rail_bottom + truss_side];
p3 = [tri_height, z_rail_bottom + (truss_side / 2)];
p_center = [tri_height / 3, z_rail_bottom + (truss_side / 2)];
tr1 = p1 + (p_center - p1) * 0.55;
tr2 = p2 + (p_center - p2) * 0.55;
tr3 = p3 + (p_center - p3) * 0.55;
// =================================================================
// MODULES
// =================================================================
module rail_positions() {
translate([p1[0], p1[1], 0]) children();
translate([p2[0], p2[1], 0]) children();
translate([p3[0], p3[1], 0]) children();
}
module tierod_positions() {
translate([tr1[0], tr1[1], 0]) children();
translate([tr2[0], tr2[1], 0]) children();
translate([tr3[0], tr3[1], 0]) children();
}
module end_foot() {
difference() {
union() {
hull() {
rail_positions()
cylinder(r = r_pocket, h = bracket_thick);
}
translate([-r_pocket, 0, 0])
cube([r_pocket * 2, z_rail_bottom, bracket_thick]);
hull() {
translate([p3[0], p3[1], 0])
cylinder(r = r_pocket, h = bracket_thick);
translate([p3[0] - r_pocket, 0, 0])
cube([r_pocket * 2, base_thick, bracket_thick]);
}
translate([-r_pocket - 15, 0, 0])
cube([tri_height + (2 * r_pocket) + 30, base_thick, bracket_thick]);
}
rail_positions()
translate([0, 0, stop_wall_thick])
rotate([0, 0, 30])
cylinder(r = r_hex, h = socket_depth + 1, $fn = 6);
rail_positions()
translate([0, 0, -1])
cylinder(d = knockout_hole_d, h = stop_wall_thick + 2);
tierod_positions() {
translate([0, 0, -1])
cylinder(d = tierod_dia, h = bracket_thick + 2);
translate([0, 0, -1])
cylinder(d = tierod_cb_dia, h = tierod_cb_depth + 1);
}
for (x_pos = [-r_pocket - 7.5, tri_height + r_pocket + 15]) {
translate([x_pos, base_thick + 1, bracket_thick / 2])
rotate([90, 0, 0])
cylinder(d = bolt_hole_dia, h = base_thick + 2);
translate([x_pos, base_thick - bolt_cb_depth + 0.1, bracket_thick / 2])
rotate([90, 0, 0])
cylinder(d = bolt_cb_dia, h = bolt_cb_depth + 1);
}
}
}
module inner_core() {
color("tan")
difference() {
hull() {
rail_positions()
cylinder(r = r_rail, h = beam_length);
}
hull() {
rail_positions()
cylinder(r = max(1, r_rail - core_wall_thick), h = beam_length + 2);
}
rail_positions()
translate([0, 0, -1])
cylinder(r = r_rail + 0.1, h = beam_length + 2);
tierod_positions()
translate([0, 0, -1])
cylinder(d = tierod_dia + 0.5, h = beam_length + 2);
if (enable_rack) {
translate([p3[0] / 2 - (rack_width / 2) - 2, z_rail_bottom + 2, -1])
cube([rack_width + 4, rack_height + 2, beam_length + 2]);
}
}
}
module gear_rack() {
pitch = PI * module_m;
num_teeth = floor(beam_length / pitch);
color("DimGray")
translate([p3[0] / 2 - (rack_width / 2), z_rail_bottom + 3, 0]) {
difference() {
cube([rack_width, rack_height, beam_length]);
for (i = [0 : num_teeth]) {
translate([-1, 0, i * pitch])
rotate([0, 90, 0])
linear_extrude(height = rack_width + 2)
polygon(points = [[0, 0], [pitch / 2, module_m * 2.25], [pitch, 0]]);
}
}
}
}
// Fixed: Rail length adjusted to stop 3mm inside each end support
module rails() {
color("LightGrey")
rail_positions()
translate([0, 0, stop_wall_thick])
cylinder(r = r_rail, h = beam_length - (2 * stop_wall_thick));
}
// =================================================================
// RENDER EVALUATION
// =================================================================
if (render_view == "foot") {
end_foot();
} else if (render_view == "core") {
inner_core();
} else if (render_view == "rack") {
gear_rack();
} else {
translate([0, 0, 0])
end_foot();
translate([0, 0, beam_length - bracket_thick])
end_foot();
rails();
inner_core();
if (enable_rack) gear_rack();
}
With OpenSCAD’s Customizer GUI open, I can see that this might be a way for a person to share his parametric code… and the person on the other end could change a few parameters to suit and create his custom STL. I’m sure there will be gotchas but for as far as I’ve gone today… maybe it’s possible.
This is wild! I’m really interested, Jamie, in what you are doing. It looks to me that you had AI analyze the forum thread from “alpha3” start and summarize the content. Then you’ve decided on some important parameters and… ??? Are you trying to get AI to duplicate the alpha3 machine in OpenSCAD parametric code?
What FUN!













