Created
October 2, 2016 19:26
-
-
Save ednisley/9ec9c0892319ffbb4480f66dac06519c to your computer and use it in GitHub Desktop.
OpenSCAD Source Code: Pencil guide for ruler quilting design
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
// Quilting Ruler Adapters | |
// Ed Nisley KE4ZNU October 2016 | |
//- Extrusion parameters must match reality! | |
ThreadThick = 0.25; | |
ThreadWidth = 0.40; | |
HoleWindage = 0.2; | |
Protrusion = 0.1; // make holes end cleanly | |
inch = 25.4; | |
function IntegerMultiple(Size,Unit) = Unit * ceil(Size / Unit); | |
//---------- | |
// Dimensions | |
ID = 0; | |
OD = 1; | |
LENGTH = 2; | |
Offset = 0.25 * inch; | |
Template = [2.0,2*Offset,3.0]; | |
NumSides = 16*4; | |
HoleSides = 8; | |
//---------------------- | |
// Useful routines | |
module PolyCyl(Dia,Height,ForceSides=0) { // based on nophead's polyholes | |
Sides = (ForceSides != 0) ? ForceSides : (ceil(Dia) + 2); | |
FixDia = Dia / cos(180/Sides); | |
cylinder(d=(FixDia + HoleWindage),h=Height,$fn=Sides); | |
} | |
//---------- | |
// Build it | |
difference() { | |
cylinder(d=Template[OD],h=Template[LENGTH],$fn=NumSides); | |
translate([0,0,-Template[LENGTH]]) | |
PolyCyl(Template[ID],3*Template[LENGTH],HoleSides); | |
translate([0,0,-Protrusion]) | |
cylinder(d1=2*Template[ID],d2=Template[ID],h=Template[LENGTH]/3 + Protrusion,$fn=HoleSides); | |
translate([0,0,Template[LENGTH] + Protrusion]) | |
mirror([0,0,1]) | |
cylinder(d1=2*Template[ID],d2=Template[ID],h=Template[LENGTH]/3 + Protrusion,$fn=HoleSides); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
More details on my blog at http://wp.me/poZKh-6dI