Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@mprymek
Created October 17, 2019 20:13
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mprymek/cfc0b6979d5cefa8eac7e2f9fb66a6f2 to your computer and use it in GitHub Desktop.
Save mprymek/cfc0b6979d5cefa8eac7e2f9fb66a6f2 to your computer and use it in GitHub Desktop.
/*
Simple OpenSCAD DIN rail clip.
*/
module clip(z = 6) {
a = 7;
b = 1.2; // metal sheet thickness, should be ~ 1
c = 2.5;
d = 4;
e = 3;
f = 4;
g = 4;
h = 13;
i = 1.5;
j = 2;
k = 25;
//l = 5.5;
l = 0;
echo("this should be 35 ... ", e+f+g+h+g+f+e);
linear_extrude(height=z)
polygon(points=[
[j+e+f+g+h+g+f+e+d, 0],
[j+e+f+g+h+g+f+e+d, a+b+c],
[j+e+f+g+h+g+f, a+b+c],
//[j+e+f+g+h+g+f, a+b],
[j+e+f+g+h+g+f, a+b+(c/4)],
[j+e+f+g+h+g+f+e, a+b],
[j+e+f+g+h+g+f+e, a],
[j+e+f+g+h+g, a],
[j+e+f+g+h+g, a+l],
[j+e+f+g+h, a+l],
[j+e+f+g+h, a],
[j+e+f+g, a],
[j+e+f+g, a+l],
[j+e+f, a+l],
[j+e+f, a],
[j+i, a],
[j+i, 0],
[j, 0],
[j, a+b],
[j+e, a+b],
[j+e, a+b+(c/3)],
[j, a+b+c],
[-k, a+b+c],
[-k, a+b],
[0, a+b],
[0, 0]
]);
// demo base
//translate([-3,-3,0]) cube([3+j+e+f+g+h+g+f+e+d+3, 3, z]);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment