Last active
December 10, 2015 05:58
-
-
Save chuck-h/4391674 to your computer and use it in GitHub Desktop.
sample extopenscad module with units
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
/* size34.escad, units=inch, for 3.4-inch-frame motor */ | |
module size34_cutout() { | |
unit("in") { | |
pilot_dia = 2.875+0.015; | |
bolt_hole_spacing = 2.75; | |
hole_dia = 0.21; | |
union(r=0.25) { | |
circle(pilot_dia/2); | |
for (rot = [0, 90, 180, 270]) { | |
rotate(rot+45) union() { | |
bolt_rad = bolt_hole_spacing/sqrt(2); | |
translate([bolt_rad, 0]) circle(hole_dia/2); | |
translate([bolt_rad/2,0]) square([bolt_rad, hole_dia], center=true); | |
} | |
} | |
} | |
} | |
} | |
/* this should put the pattern in the middle of a 4x4 inch plate */ | |
unit("in") { | |
difference() { | |
square([4,4], center=true); | |
size34_cutout(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment