Skip to content

Instantly share code, notes, and snippets.

@jarondl
Last active December 13, 2018 02:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jarondl/23d5c35453761601bcc67c8f962a1180 to your computer and use it in GitHub Desktop.
Save jarondl/23d5c35453761601bcc67c8f962a1180 to your computer and use it in GitHub Desktop.
R1 = 17;
R2 = 12;
R3 = 2.5;
// Minimal thickness in hole
H0 = 1;
// Height of bars
H1 = 4;
// Height of circle
H2 = 6;
// Extra hole padding
E = 0.5;
// L is the distance between wheels,
// Full width will be L + 2 * H2
L = 45;
// Number of bars
N = 4;
// Width of bar
A = 3.5;
$fa=1;
$fs = 0.01;
// Radius of intersection of bars.
rr = A/(2*sin(90/N));
module wheel() {
intersection(){
cylinder(h=3*L, r=R1, center=true);
union() {
translate([0,0,H1])
cylinder(h=H2-H1, r1=rr, r2=R3);
difference(){
cylinder(h=H2, r=2*R1);
cylinder(h=3*L, r=R2, center=true);
}
for(n=[0:N]){
translate([0,0,H1/2])
rotate([0, 0, 180*n/N])
cube([A, 2*R1, H1], center=true);
}
}
}
}
module wheel_axle(with_axle) {
if (with_axle) {
union() {
wheel();
cylinder(h=L+2*H2, r=R3);
}
} else {
difference() {
wheel();
translate([0,0,H0])
cylinder(h=2*H2-H0,r=R3+E);
}
}
}
union(){
wheel_axle(true);
translate([0, 2*R1+2, 0])
wheel_axle(false);
}
Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment