Created
July 30, 2019 18:21
-
-
Save majabojarska/449cd900a24266022bd6c1ef67552305 to your computer and use it in GitHub Desktop.
OpenSCAD Custom Shim Generator
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
This script generates a custom shim based | |
on the given parameter values | |
*/ | |
$fn=50; | |
internal_diameter=4; | |
external_diameter=8; | |
height=4; | |
Shim(internal_diameter, external_diameter, height); | |
module Shim(int_diam, ext_diam, height){ | |
assert(int_diam < ext_diam); | |
assert(height > 0); | |
difference(){ | |
cylinder(h=height,d=ext_diam); | |
translate([0,0,-1]) cylinder(h=height+2,d=int_diam); | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment