OpenSCAD source code: single-layer cover for seam ripper
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
// Cover for old seam ripper | |
// Ed Nisley - KE4ZNU | |
// 2019-03 | |
/* [Layout Options] */ | |
Layout = "Build"; // [Show,Build] | |
Part = "Handle"; // [Handle,CoverSolid,Cover] | |
/* [Extrusion Parameters] */ | |
ThreadWidth = 0.40; | |
ThreadThick = 0.25; | |
HoleWindage = 0.2; | |
Protrusion = 0.1; | |
//----- | |
// Dimensions | |
/* [Dimensions] */ | |
WallThick = 1*ThreadWidth; | |
CapInsideLength = 48.0; | |
CornerRadius = 2.0; // handle at base | |
Base = [11.0,5.5,0.0]; // handle at base | |
Tip = [8.2,3.7,CapInsideLength]; // inferred at tip | |
HandleOC = [Base - 2*[CornerRadius,CornerRadius,0.0], | |
Tip - 2*[CornerRadius,CornerRadius,CornerRadius/2] | |
]; | |
NumSides = 2*3*4; | |
//----- | |
// Useful pieces | |
// Handle is basically the interior of the cover | |
module Handle() { | |
intersection() { | |
hull() | |
for (i=[-1,1], j=[-1,1], k=[0,1]) | |
translate([i*HandleOC[k].x/2,j*HandleOC[k].y/2,k*HandleOC[k].z]) | |
sphere(r=CornerRadius,$fn=NumSides); | |
translate([0,0,-CornerRadius/2]) // chop tip for better bridging | |
rotate([45,0,0]) | |
cube([2*Base.x,CapInsideLength*sqrt(2),CapInsideLength*sqrt(2)],center=true); | |
} | |
} | |
module CoverSolid() { | |
hull() | |
for (i=[-1,1], j=[-1,1], k=[0,1]) | |
translate([i*HandleOC[k].x/2,j*HandleOC[k].y/2,k*HandleOC[k].z]) | |
sphere(r=CornerRadius + WallThick,$fn=NumSides); | |
} | |
module Cover() { | |
difference() { | |
CoverSolid(); | |
Handle(); | |
translate([0,0,-CornerRadius]) | |
cube(2*Base + [0,0,2*CornerRadius],center=true); | |
} | |
} | |
//----- | |
// Build things | |
if (Layout == "Build") { | |
Cover(); | |
} | |
if (Layout == "Show") | |
if (Part == "Handle") | |
Handle(); | |
else if (Part == "CoverSolid") | |
CoverSolid(); | |
else if (Part == "Cover") | |
Cover(); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
More details on my blog at https://wp.me/poZKh-89m