Skip to content

Instantly share code, notes, and snippets.

@alufers
Created October 14, 2021 16:35
Show Gist options
  • Save alufers/511d2a693aba1f2681c886c70e108c5b to your computer and use it in GitHub Desktop.
Save alufers/511d2a693aba1f2681c886c70e108c5b to your computer and use it in GitHub Desktop.
openscad parser bug
REMOTE_DIAM = 40;
// mm
enclosure_margin = 2.5;
// mm
wall_thickness = 0.5;
pcb_thickness = 1;
bat_thickness = 5;
pcb_components_thickness = 6;
enclosure_height = pcb_thickness + bat_thickness + wall_thickness + pcb_components_thickness;
module centercube_xy(size) {
translate([0, 0, size.z / 2])
cube(size, center = true);
}
module enclosure_base() {
centercube_xy([REMOTE_DIAM + enclosure_margin * 2, REMOTE_DIAM + enclosure_margin * 2, enclosure_height]);
}
enclosure_base();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment