Skip to content

Instantly share code, notes, and snippets.

@yefriddavid
Last active June 23, 2024 16:40
Show Gist options
  • Save yefriddavid/2261a1183cec3d060565b7941be7f444 to your computer and use it in GitHub Desktop.
Save yefriddavid/2261a1183cec3d060565b7941be7f444 to your computer and use it in GitHub Desktop.
OpenScad - Support Half Moon
h=100;
r_cylinder=62.5;
r_hole=[2,3,4];
r_bighole=10;
distances=[32,40,50];
n=24;
$fn=120;
module repeatInCircle(n,di){
for(i=[0:n-1])
rotate([0,0,(i+di)*360/n]) children();
}
difference(){
cylinder(h, r=r_cylinder,center=true);
translate([0,23,0]) cylinder(h+1,r=r_bighole,center=true);
//color("green")
translate([-70,10,-40]) cube([150,150,80],false); // inner
//color("red")
translate([-70,-200,-55]) cube([150,200,110],false); //outer
for(j=[2:2])
repeatInCircle(n,j/4) translate([distances[j],0,0]) cylinder(h+1, r=r_hole[j], center=true);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment