Skip to content

Instantly share code, notes, and snippets.

@ednisley
Last active June 24, 2022 20:04
Embed
What would you like to do?
OpenSCAD source code: replacement clips for fake muntin grille
// Window Muntin Clips
// Ed Nisley KE4ZNU June 2022
Layout = "Show"; // [Build, Show]
/* [Hidden] */
ThreadThick = 0.25;
ThreadWidth = 0.40;
HoleWindage = 0.2;
Protrusion = 0.1; // make holes end cleanly
inch = 25.4;
ID = 0;
OD = 1;
LENGTH = 2;
function IntegerMultiple(Size,Unit) = Unit * ceil(Size / Unit);
//----------------------
// Dimensions
ClipOA = [13.0,18.7,8.0];
TongueAngle = 70;
TongueOA = [14.0,10.0,1.8 - 0.2]; // minus Z windage for angular slices
BuildGap = 5.0;
//----------------------
// 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(r=(FixDia + HoleWindage)/2,
h=Height,
$fn=Sides);
}
//----------------------
// Pieces
module Shell() {
// Clip base as 2D polygon
// Magic numbers from measurements
cx = ClipOA.x;
cy = ClipOA.y;
cz = ClipOA.z;
ClipPts = [
[0,0],[0,cz],[0.3,cz],
[1.0,cz-1.0],[2.0,cz-2.3],[2.0,cz-3.0],[1.3,cz-3.5],
[1.3,1.6],[17.4,1.6],
[17.4,cz-3.5],[16.7,cz-3.0],[16.7,cz-2.3],[17.7,cz-1.0],
[18.4,cz],[18.7,cz],[18.7,0.0],[0,0]
];
difference() {
translate([-ClipOA.x,-ClipOA.y/2,0])
rotate([90,0,90])
linear_extrude(height=ClipOA.x,convexity=3)
polygon(convexity=3,points=ClipPts);
translate([-(ClipOA.x - 3.0/2 + Protrusion),0,0])
cube([3.0 + Protrusion,ClipOA.y - 2*1.3,4*1.6],center=true);
}
}
module Tongue() {
tx = TongueOA.x;
ty = TongueOA.y;
tz = TongueOA.z;
tt = ty - 2*sqrt(2)*tz; // width at top of tapers
td = ThreadWidth; // min size of features
intersection() {
rotate([0,-TongueAngle,0]) {
difference() {
union() {
hull() {
for (j=[-1,1]) {
translate([td/2,j*(ty - td)/2,td/2])
cube(td,center=true);
translate([td/2,j*(tt - td)/2,tz - td/2])
cube(td,center=true);
}
translate([10.0,0,0])
rotate(180/12)
cylinder(d=ty,h=td,center=false,$fn=12);
translate([10.0,0,tz - td/2])
rotate(180/12)
cylinder(d=tt,h=td,center=false,$fn=12);
};
translate([10.0,0,-5.2])
rotate(180/12)
cylinder(d=5.0,h=5.2,center=false,$fn=12);
translate([10.0,0,-5.2])
rotate(180/12)
resize([0,0,2.0])
sphere(d=5.0/cos(180/12),$fn=12);
}
if (false)
translate([10.0,0,-10]) // stiffening hole
rotate(180/6)
PolyCyl(0.1,20,6);
}
}
cube([2*ClipOA.x,2*ClipOA.y,2*IntegerMultiple(13.0,ThreadThick)],center=true);
}
}
module Clip() {
Shell();
Tongue();
}
//----------------------
// Build it
if (Layout == "Show") {
Clip();
}
if (Layout == "Build") {
Clip();
}
@ednisley
Copy link
Author

More details on my blog at https://wp.me/poZKh-b2J

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