Skip to content

Commit 4ec8272

Browse files
committed
Refactor folding platform arm angle iron modeling
Replaces the for-loop approach with explicit left and right side angle iron modeling for the folding platform arms. Improves parametric positioning, clarifies orientation, and ensures correct mirroring and alignment with pivot plates. Also updates deck translation to sit properly on angle iron legs.
1 parent 773b955 commit 4ec8272

File tree

1 file changed

+75
-43
lines changed

1 file changed

+75
-43
lines changed

LifeTrac-v25/mechanical_design/openscad/lifetrac_v25.scad

Lines changed: 75 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -2482,44 +2482,79 @@ module folding_platform_assembly(fold_angle=90) {
24822482
// When deployed: extends BACKWARD (-Y) from pivot under the deck
24832483
// When stowed: extends UPWARD (+Z) against rear of machine
24842484

2485-
for (side = [-1, 1]) {
2486-
arm_x = side * arm_x_pos;
2485+
// Inner wall inner face X position (for aligning angle iron flush with pivot plates)
2486+
inner_wall_inner_face_x = TRACK_WIDTH/2 - SANDWICH_SPACING/2 - PANEL_THICKNESS;
2487+
2488+
// Parametric positioning for angle irons relative to pivot plates
2489+
// Pivot bracket center X = inner_wall_inner_face_x - PLATFORM_THICKNESS/2
2490+
// Angle iron positioned adjacent to pivot bracket with small clearance
2491+
angle_iron_clearance = PLATFORM_THICKNESS / 2; // Clearance between angle iron and pivot bracket
2492+
angle_iron_x_from_center = inner_wall_inner_face_x - PLATFORM_THICKNESS/2 - angle_iron_clearance;
2493+
2494+
// Bolt hole diameter for angle iron
2495+
angle_bolt_hole_dia = PLATFORM_BOLT_DIA + PLATFORM_BOLT_CLEARANCE;
2496+
2497+
// LEFT SIDE angle iron (side = -1)
2498+
// Positioned parametrically relative to pivot plate
2499+
color("DimGray")
2500+
translate([-angle_iron_x_from_center, pivot_y, pivot_z])
2501+
rotate([fold_angle, 0, 0]) // Fold rotation around X axis
2502+
rotate([0, 0, -90]) // Rotated so vertical leg faces outward (toward pivot bracket on left)
2503+
difference() {
2504+
linear_extrude(height=PLATFORM_ARM_LENGTH)
2505+
polygon([
2506+
[0, 0],
2507+
[PLATFORM_ANGLE_LEG, 0],
2508+
[PLATFORM_ANGLE_LEG, PLATFORM_ANGLE_THICK],
2509+
[PLATFORM_ANGLE_THICK, PLATFORM_ANGLE_THICK],
2510+
[PLATFORM_ANGLE_THICK, PLATFORM_ANGLE_LEG],
2511+
[0, PLATFORM_ANGLE_LEG]
2512+
]);
24872513

2488-
color("DimGray")
2489-
translate([arm_x, pivot_y, pivot_z])
2490-
rotate([fold_angle, 0, 0]) // Fold rotation around X axis
2491-
{
2492-
// Angle iron L-profile extruded along arm length
2493-
// Rotated so vertical leg faces outward (toward pivot bracket)
2494-
translate([0, 0, 0])
2495-
rotate([0, 0, side * 90]) // Rotate profile so vertical leg faces outward toward wall
2496-
difference() {
2497-
linear_extrude(height=PLATFORM_ARM_LENGTH)
2498-
// L-shape profile - vertical leg will face outward after rotation
2499-
polygon([
2500-
// Start at inner corner
2501-
[0, 0],
2502-
[PLATFORM_ANGLE_LEG, 0],
2503-
[PLATFORM_ANGLE_LEG, PLATFORM_ANGLE_THICK],
2504-
[PLATFORM_ANGLE_THICK, PLATFORM_ANGLE_THICK],
2505-
[PLATFORM_ANGLE_THICK, PLATFORM_ANGLE_LEG],
2506-
[0, PLATFORM_ANGLE_LEG]
2507-
]);
2508-
2509-
// Bolt holes at pivot bracket end (through vertical leg, near Z=0)
2510-
bolt_hole_dia = PLATFORM_BOLT_DIA + PLATFORM_BOLT_CLEARANCE;
2511-
for (z_off = [arm_pivot_bolt_dist - bolt_spacing, arm_pivot_bolt_dist, arm_pivot_bolt_dist + bolt_spacing]) {
2512-
translate([PLATFORM_ANGLE_THICK/2, PLATFORM_ANGLE_LEG/2, z_off])
2513-
rotate([0, 90, 0])
2514-
cylinder(d=bolt_hole_dia, h=PLATFORM_ANGLE_THICK + 2, center=true, $fn=24);
2515-
}
2516-
2517-
// Bolt holes at deck end (through horizontal leg, near Z=arm_deck_bolt_dist)
2518-
for (z_off = [arm_deck_bolt_dist - bolt_spacing, arm_deck_bolt_dist, arm_deck_bolt_dist + bolt_spacing]) {
2519-
translate([PLATFORM_ANGLE_LEG/2, PLATFORM_ANGLE_THICK/2, z_off])
2520-
cylinder(d=bolt_hole_dia, h=PLATFORM_ANGLE_THICK + 2, center=true, $fn=24);
2521-
}
2522-
}
2514+
// Bolt holes at pivot bracket end
2515+
for (z_off = [arm_pivot_bolt_dist - bolt_spacing, arm_pivot_bolt_dist, arm_pivot_bolt_dist + bolt_spacing]) {
2516+
translate([PLATFORM_ANGLE_THICK/2, PLATFORM_ANGLE_LEG/2, z_off])
2517+
rotate([0, 90, 0])
2518+
cylinder(d=angle_bolt_hole_dia, h=PLATFORM_ANGLE_THICK + 2, center=true, $fn=24);
2519+
}
2520+
2521+
// Bolt holes at deck end
2522+
for (z_off = [arm_deck_bolt_dist - bolt_spacing, arm_deck_bolt_dist, arm_deck_bolt_dist + bolt_spacing]) {
2523+
translate([PLATFORM_ANGLE_LEG/2, PLATFORM_ANGLE_THICK/2, z_off])
2524+
cylinder(d=angle_bolt_hole_dia, h=PLATFORM_ANGLE_THICK + 2, center=true, $fn=24);
2525+
}
2526+
}
2527+
2528+
// RIGHT SIDE angle iron (side = 1)
2529+
// Mirrored orientation to match Left Side but mirrored
2530+
// Extrudes from pivot backward (same direction as Left Side)
2531+
color("DimGray")
2532+
translate([angle_iron_x_from_center, pivot_y, pivot_z])
2533+
rotate([fold_angle, 0, 0]) // Fold rotation around X axis
2534+
mirror([1, 0, 0]) // Mirror left side configuration
2535+
rotate([0, 0, -90]) // Same rotation as left side, then mirrored
2536+
difference() {
2537+
linear_extrude(height=PLATFORM_ARM_LENGTH)
2538+
polygon([
2539+
[0, 0],
2540+
[PLATFORM_ANGLE_LEG, 0],
2541+
[PLATFORM_ANGLE_LEG, PLATFORM_ANGLE_THICK],
2542+
[PLATFORM_ANGLE_THICK, PLATFORM_ANGLE_THICK],
2543+
[PLATFORM_ANGLE_THICK, PLATFORM_ANGLE_LEG],
2544+
[0, PLATFORM_ANGLE_LEG]
2545+
]);
2546+
2547+
// Bolt holes at pivot bracket end
2548+
for (z_off = [arm_pivot_bolt_dist - bolt_spacing, arm_pivot_bolt_dist, arm_pivot_bolt_dist + bolt_spacing]) {
2549+
translate([PLATFORM_ANGLE_THICK/2, PLATFORM_ANGLE_LEG/2, z_off])
2550+
rotate([0, 90, 0])
2551+
cylinder(d=angle_bolt_hole_dia, h=PLATFORM_ANGLE_THICK + 2, center=true, $fn=24);
2552+
}
2553+
2554+
// Bolt holes at deck end
2555+
for (z_off = [arm_deck_bolt_dist - bolt_spacing, arm_deck_bolt_dist, arm_deck_bolt_dist + bolt_spacing]) {
2556+
translate([PLATFORM_ANGLE_LEG/2, PLATFORM_ANGLE_THICK/2, z_off])
2557+
cylinder(d=angle_bolt_hole_dia, h=PLATFORM_ANGLE_THICK + 2, center=true, $fn=24);
25232558
}
25242559
}
25252560

@@ -2528,11 +2563,7 @@ module folding_platform_assembly(fold_angle=90) {
25282563
// =================================================================
25292564
// Pivot brackets mount flush against INSIDE of inner wall panels
25302565
// They rotate with the platform and connect angle iron to pivot pin
2531-
2532-
// Inner wall inner face X position (facing center of machine)
2533-
// Inner panel outer face is at TRACK_WIDTH/2 - SANDWICH_SPACING/2
2534-
// Inner panel inner face is at TRACK_WIDTH/2 - SANDWICH_SPACING/2 - PANEL_THICKNESS
2535-
inner_wall_inner_face_x = TRACK_WIDTH/2 - SANDWICH_SPACING/2 - PANEL_THICKNESS; // ~377mm
2566+
// (inner_wall_inner_face_x already calculated above in angle iron section)
25362567

25372568
for (side = [-1, 1]) {
25382569
// Bracket X position: flush against INSIDE face of inner wall
@@ -2566,7 +2597,8 @@ module folding_platform_assembly(fold_angle=90) {
25662597
color("DarkSlateGray")
25672598
translate([0, pivot_y, pivot_z])
25682599
rotate([fold_angle, 0, 0]) // Same rotation as angle irons
2569-
translate([0, PLATFORM_ANGLE_THICK + PLATFORM_THICKNESS/2, arm_deck_bolt_dist])
2600+
// Deck sits on top of angle iron horizontal legs
2601+
translate([0, PLATFORM_THICKNESS/2, arm_deck_bolt_dist])
25702602
rotate([90, 0, 0]) // Rotate deck to be horizontal in local coords
25712603
platform_deck();
25722604

0 commit comments

Comments
 (0)