A quick edit and the rears are done to a slightly different design.
This is the code for both wheels, you can copy and paste the text straight into Openscad.
I don't have the tyres yet, I am just a little cautious about whether the outer rim is thick enough to take the pressure from the Lego tyre bead, if they break I'll just thicken them to make them stronger, and reprint them.
//rotate([-90,0,0])frontwheel();
rotate([-90,0,0])rearwheel();
//**************************
module frontwheel () {
$fn=100;
difference (){
union () {
translate ([0,0,-3])cylinder(18,17,17);
translate ([0,0,-3])cylinder(1.5,19,19);
translate ([0,0,13.5])cylinder(1.5,19,19);
translate ([0,0,0])cylinder(1.5,21.5,21.5);
translate ([0,0,10.5])cylinder(1.5,21.5,21.15);
}
translate ([0,0,-5.25])cylinder(15,14,14);
translate ([0,0,11])cylinder(5,14,15);
translate ([0,0,0])cylinder(16,1,1);
translate ([0,0,14])cylinder(2,16,16);
translate ([0,0,14.5])cylinder(2,17,17);
translate ([0,0,12.25])cylinder(10,2.7,2.7);
translate([0,0,7])rotate([0,0,30])cylinder(9.41,3.25,3.25,$fn=6,center=true);
}
difference(){
union(){
translate ([0,0,10.5])cylinder(2,12,9);
translate ([0,0,2.5])cylinder(12,4,4);
translate ([0,0,11.25])cylinder(3,6,5.5);
translate([0,0,6.5])rotate ([0,0,0]) cube ([32,2,8],center=true);
translate([0,0,6.5])rotate ([0,0,90]) cube ([32,2,8],center=true);
}
translate([0,0,7])rotate([0,0,30])cylinder(9.41,3.25,3.25,$fn=6,center=true);
translate ([0,0,8])cylinder(10,1,1);
translate ([0,0,12.25])cylinder(10,2.7,2.7);
}
for (z = [0:45:360])rotate(a=(360/55)+z,v=[0,0,1])translate([12.5,(10/55),11]) cylinder(1,1,1,$fn=6,center=true);
for (z = [0:45:360])rotate(a=(360/55)+z,v=[0,0,1])translate([7,(45/55),12.5])cylinder(1,1,1,$fn=6,center=true);
for (z = [0:45:360])rotate(a=(360/55)+z,v=[0,0,1])translate([4.5,(35/55),14.25])cylinder(1,0.75,0.75,$fn=6,center=true);
}
//**************************
module rearwheel () {
$fn=100;
difference (){
union () {
translate ([0,0,-3])cylinder(18,17,17);
translate ([0,0,-3])cylinder(1.5,19,19);
translate ([0,0,13.5])cylinder(1.5,19,19);
translate ([0,0,0])cylinder(1.5,21.5,21.5);
translate ([0,0,10.5])cylinder(1.5,21.5,21.15);
}
translate ([0,0,-5.25])cylinder(15,14,14);
translate ([0,0,11])cylinder(5,14,15);
translate ([0,0,0])cylinder(16,1,1);
translate ([0,0,14])cylinder(2,16,16);
translate ([0,0,14.5])cylinder(2,17,17);
translate ([0,0,12.25])cylinder(10,2.7,2.7);
translate([0,0,7])rotate([0,0,30])cylinder(9.41,3.25,3.25,$fn=6,center=true);
}
difference(){
union(){
translate ([0,0,2.5])cylinder(12,4,4);
translate ([0,0,11.25])cylinder(3.5,5,4);
translate([0,0,6.5])rotate ([0,0,0]) cube ([32,2,8],center=true);
translate([0,0,6.5])rotate ([0,0,90]) cube ([32,2,8],center=true);
}
translate([0,0,7])rotate([0,0,30])cylinder(9.41,3.25,3.25,$fn=6,center=true);
translate ([0,0,8])cylinder(10,1,1);
translate ([0,0,12.25])cylinder(10,2.7,2.7);
}
for (z = [0:45:360])rotate(a=(360/55)+z,v=[0,0,1])translate([9,(10/55),11]) cylinder(1,1,1,$fn=6,center=true);
for (z = [0:45:360])rotate(a=(360/55)+z,v=[0,0,1])translate([13.75,(45/55),11])sphere(0.5,$fn=100,center=true);
for (z = [0:45:360])rotate(a=(360/55)+z,v=[0,0,1])translate([3.5,(10/55),14.5]) cylinder(1,0.5,0.5,$fn=6,center=true);
translate([0,0,10.25])rotate_extrude(convexity = 10)translate([13.5, 0, 0])circle(r = 1);
}