Created
October 10, 2016 00:21
-
-
Save ednisley/61ca7e79b2202226d6e2498c79ec8217 to your computer and use it in GitHub Desktop.
OpenSCAD Source Code: Pencil guide and alignment reticle 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 them | |
translate([-Template[OD],0,0]) | |
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); | |
} | |
translate([Template[OD],0,0]) | |
difference() { | |
cylinder(d=Template[OD],h=Template[LENGTH],$fn=NumSides); | |
for (a=[45,135]) | |
rotate(a) | |
cube([0.70*Template[OD],0.15*Template[OD],3*Template[LENGTH]],center=true); | |
} | |
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-6e3