Added kingpins and got them in the right places!

This commit is contained in:
Simon Brooke 2026-09-14 14:12:21 +01:00
parent 8e0e6adacb
commit 01d92421cf
3 changed files with 76 additions and 28 deletions

View file

@ -16,5 +16,5 @@ translate([-900,0,130])
suspension();
translate([1100,0,130])
suspension();
suspension(cst=0);

View file

@ -23,6 +23,39 @@ lug_thickness = stock_section/6;
// radius of suspension pivots
pivot_radius = stock_section/3; //for now
// aft tilt of kingpins in degrees from vertical
caster_angle = 7;
// inward tilt of the kingpins in degrees from vertical
// TODO: should be calculated from hub width and wheel radius?
camber_angle = 10;
module kingpin( h = 300, r = 12.5,
cmb = camber_angle, cst = caster_angle,
al = 100) {
kl = h * (1/cos(90 - cmb)) * (1/cos(90 - cst));
// kingpin itself
rotate([cmb, cst, 0])
cylinder( h=h, r=r, center=true);
// stub axle
// axle offset as a fraction of the lenth of the kingpin
aof = 0.35 * h;
camber_offset = aof/tan(90-cmb);
caster_offset = 0 - aof/tan(90-cst);
translate([caster_offset, al + camber_offset, 0-aof])
rotate([ 90, 0, 0])
cylinder( h=al, r=r);
translate([caster_offset, al, 0-aof])
wheel();
}
module lug() {
difference() {
union() {
@ -38,7 +71,7 @@ module lug() {
}
}
module wishbone(l, w, is_upper = true) {
module wishbone(l, w, skew = 0, is_upper = true) {
ssd2 = stock_section/2;
ssm2 = stock_section * 2;
ssm3 = stock_section * 3;
@ -72,20 +105,23 @@ module wishbone(l, w, is_upper = true) {
union() {
intersection(){
linear_extrude(stock_section)
polygon( points=[[0-(l/2), ssd2], [l/2, ssd2],
[3*ssd2, w-(3*ssd2)],
[0-(3*ssd2), w-(3*ssd2)],
polygon( points=[[0-(l/2), ssd2],
[l/2, ssd2],
[skew + (3*ssd2), w-(3*ssd2)],
[skew -(3*ssd2), w-(3*ssd2)],
// hole in the middle
[0-(l/2 - 3*ssd2), 3*ssd2],
[l/2 - 3*ssd2, 3*ssd2],
[ssd2, w-(5*ssd2)], [0-ssd2, w-(5*ssd2)]],
paths=[[0, 1, 2, 3], [4, 5, 6, 7]]);
[(0 - (l/2 - 3*ssd2)), 3*ssd2],
[(l/2 - 3*ssd2), 3*ssd2],
[skew + ssd2, w-(5*ssd2)],
[skew - ssd2, w-(5*ssd2)]],
paths=[[0, 1, 2, 3], [4, 5, 6, 7]
]);
translate([0 - (l - ssd2)/2, 0, 0 - stock_section])
cube([l-ssd2, w, ssm3]);
}
translate([-3*ssd2, w-3*ssd2, 0])
translate([skew-3*ssd2, w-3*ssd2, 0])
cube( [stock_section, 3*ssd2, stock_section]);
translate([ssd2, w-3*ssd2, 0])
translate([skew+ssd2, w-3*ssd2, 0])
cube( [stock_section, 3*ssd2, stock_section]);
};
color("darkgray")
@ -93,10 +129,9 @@ module wishbone(l, w, is_upper = true) {
rotate([0, 90, 0])
cylinder(h=l, r=pivot_radius, center=true);
color("darkgray")
translate([0, w - ssd2, ssd2])
translate([skew, w - ssd2, ssd2])
rotate([0, 90, 0])
cylinder(h=ssm3, r=pivot_radius, center=true);
}
module subframe(l, w, h) {
@ -111,17 +146,22 @@ module wishbone(l, w, is_upper = true) {
}
module suspension( l = 300, w = 300, h = 300,
track = 1400, hub_width = 135, wheel_diameter=600) {
track = 1400, hub_width = 135, wheel_diameter=600,
cmb=camber_angle, cst=caster_angle) {
subframe(l,w,h);
wishbone_length = 500; // TODO: calculate
camber_offset = h/tan(90-cmb);
caster_offset = h/tan(90-cst);
// Upper wishbones
translate([0, w/2, (h/2) - stock_section])
wishbone( l, wishbone_length);
wishbone( l, wishbone_length - camber_offset, caster_offset);
mirror([0,1, 0]) {
translate([0, w/2, (h/2) - stock_section])
wishbone( l, wishbone_length);
wishbone( l, wishbone_length - camber_offset, caster_offset);
}
shock_extent = wishbone_length - (5.5 * stock_section);
@ -130,25 +170,28 @@ module suspension( l = 300, w = 300, h = 300,
// lower wishbones
translate([0, w/2, 0 -(h/2)]) {
wishbone( l, wishbone_length, false);
translate([0, wishbone_length + 75, stock_section])
wheel();
wishbone( l, wishbone_length, 0, false);
translate([0, (stock_section*2), h-(stock_section/2)])
rotate([shock_angle +180, 0, 0])
shockabsorber(length=shock_length,eid=stock_section/2);
}
mirror([0,1, 0]) {
translate([0, w/2, 0 -(h/2)]) {
wishbone( l, wishbone_length, false);
translate([0, wishbone_length + 75, stock_section])
wheel();
wishbone( l, wishbone_length, 0, false);
translate([0, (stock_section*2), h-(stock_section/2)])
rotate([shock_angle +180, 0, 0])
shockabsorber(length=shock_length,
eid=stock_section/2);
}
}
translate([caster_offset/2,
wishbone_length + (stock_section * 4), 0])
kingpin(cst=cst);
mirror([0,1, 0])
translate([caster_offset/2,
wishbone_length + (stock_section * 4), 0])
kingpin(cst=cst);
}
// suspension();

View file

@ -105,7 +105,12 @@ module front_bulkhead() {
cube([sheet_thickness, floor_width, e]);
}
module rear_bulkhead() {
module rear_bulkhead(fl=floor_length, fw = floor_width,
st = sheet_thickness, la = layback_angle_r,
msh = sill_max_height) {
translate([ (fl/2) + (msh/(2*sin(la))), 0, msh/2])
rotate([0, la, 0])
cube([st, fw, msh * 1/cos(la)], center=true);
}
module tub(fl=floor_length, fw=floor_width, st=sheet_thickness,
@ -124,7 +129,7 @@ module tub(fl=floor_length, fw=floor_width, st=sheet_thickness,
front_bulkhead();
rear_bulkhead();
rear_bulkhead(fl = fl, fw = fw, st = st);
}
// tub();