Skip to content

Instantly share code, notes, and snippets.

@erenon
Last active March 14, 2025 19:26
Show Gist options
  • Save erenon/9788cdbe3c79128a117406eb3c7af36f to your computer and use it in GitHub Desktop.
Save erenon/9788cdbe3c79128a117406eb3c7af36f to your computer and use it in GitHub Desktop.
V=2;
W=15;
D=30;
H1=50;
cube([D, V, W]);
cube([D, H1, V]);
difference() {
cube([V, H1, W]);
translate([-V/2, 10, 8])
rotate ([0,90,0])
cylinder(2*V, r=2, true);
}
difference() {
translate([D, 0, 0]) cube([V, H1, W]);
translate([D-V/2, 10, 8])
rotate ([0,90,0])
cylinder(2*V, r=2, true);
}
// Copied from https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/
// Create a half-pyramid from a single linear extrusion
module halfpyramid(base, height) {
linear_extrude(height, scale=0.01)
translate([-base/2, 0, 0]) square([base, base/2]);
}
translate([0,0,7.5])
rotate ([90,90,0])
halfpyramid(W, 10);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment