Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
OpenSCAD source code: Miniblind cord cap
// Cap for miniblind cord
// Ed Nisley KE4ZNU - August 2016
//- Extrusion parameters - must match reality!
ThreadThick = 0.25;
ThreadWidth = 0.40;
Protrusion = 0.1;
HoleWindage = 0.2;
//------
// Dimensions
OD1 = 0;
OD2 = 1;
LENGTH = 2;
Cap = [9.0,16.0,25.0];
Cord = [2.5,7.0,Cap[LENGTH] - 5];
NumSides = 8;
//----------------------
//- Build it
difference() {
hull() { // overall shape
translate([0,0,Cap[LENGTH] - Cap[OD1]/2])
sphere(d=Cap[OD1],$fn=NumSides);
translate([0,0,0.5*Cap[OD2]/2])
sphere(d=Cap[OD2],$fn=2*NumSides); // round the bottom just a bit
}
translate([0,0,-Cap[LENGTH]/2]) // trim bottom
cube([2*Cap[OD2],2*Cap[OD2],Cap[LENGTH]],center=true);
translate([0,0,Cap[LENGTH] + 0.8*Cap[OD1]]) // trim top (arbitrarily)
cube([2*Cap[OD1],2*Cap[OD1],2*Cap[OD1]],center=true);
translate([0,0,-Protrusion])
cylinder(d=Cord[OD1],h=(Cap[LENGTH] + 2*Protrusion),$fn=NumSides);
translate([0,0,-Protrusion])
cylinder(d1=Cord[OD2],d2=Cord[OD1],h=(Cord[LENGTH] + Protrusion),$fn=NumSides);
}
@ednisley

This comment has been minimized.

Copy link
Owner Author

@ednisley ednisley commented Aug 19, 2016

More detail on my blog at http://wp.me/poZKh-67A

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment