Skip to content

Instantly share code, notes, and snippets.

@reconbot
Created February 8, 2025 03:47
Show Gist options
  • Save reconbot/be0da59f0b02ce481b654c04e0a22947 to your computer and use it in GitHub Desktop.
Save reconbot/be0da59f0b02ce481b654c04e0a22947 to your computer and use it in GitHub Desktop.
include <BOSL2/std.scad>
// make it pretty
$fs = $preview ? 1 : 0.1;
$fa = $preview ? 3 : 0.1;
size = 140;
margin = 2;
lip = 15;
lip_thickness = 0.5;
depth = 25.4; // insert
corner_size = 6.35;
wall_thickness = 1;
render() simple();
module simple() {
insert_outside = size - margin * 2;
insert_inside = size - margin * 2 - wall_thickness * 2;
recolor("white")
diff()
cuboid([insert_outside, insert_outside, depth], rounding=corner_size, edges="Z")
tag_this("remove")
cuboid([insert_inside, insert_inside, depth], rounding=corner_size, edges="Z")
tag("keep")
attach(BOTTOM)
cuboid([insert_outside, insert_outside, 1.5], rounding=corner_size, edges="Z", anchor=TOP)
attach(TOP)
cuboid([size + lip, size + lip, lip_thickness], rounding=corner_size, edges="Z");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment