79 lines
2.7 KiB
OpenSCAD
79 lines
2.7 KiB
OpenSCAD
/*
|
|
* Storz - Generate Storz style couplings
|
|
*
|
|
* Copyright (C) 2023 Matthias Neeracher <microtherion@gmail.com
|
|
*/
|
|
|
|
$fn = $preview ? 32 : 64;
|
|
|
|
min_radius = 0.5;
|
|
|
|
function corner(radius, scale) = max(radius*scale, min_radius);
|
|
|
|
module base_profile(scale=1.0) {
|
|
outer_rim = 19*scale;
|
|
tight_corner = corner(0.5, scale);
|
|
medium_corner = corner(1.5, scale);
|
|
wide_corner = corner(2.0, scale);
|
|
hull() {
|
|
translate([tight_corner, tight_corner]) circle(r=tight_corner);
|
|
translate([tight_corner, 4*scale-tight_corner]) circle(r=tight_corner);
|
|
translate([outer_rim-wide_corner, wide_corner]) circle(r=wide_corner);
|
|
translate([outer_rim-0.01, 4*scale-0.01]) square(size=0.01);
|
|
}
|
|
hull() {
|
|
translate([outer_rim-wide_corner, 17*scale-wide_corner]) circle(r=wide_corner);
|
|
translate([outer_rim-6*scale+medium_corner, 17*scale-medium_corner]) circle(r=medium_corner);
|
|
translate([outer_rim-6*scale, 4*scale]) square([6*scale, 0.01]);
|
|
}
|
|
translate([outer_rim-6*scale-wide_corner, 4*scale]) difference() {
|
|
square(size=wide_corner);
|
|
translate([0, wide_corner]) circle(r=wide_corner);
|
|
}
|
|
}
|
|
|
|
module knagge_profile(scale=1.0) {
|
|
tight_corner = corner(0.5, scale);
|
|
medium_corner = corner(1.5, scale);
|
|
wide_corner = corner(2.0, scale);
|
|
base = sqrt(25-4.55*4.55);
|
|
|
|
square([10*scale+medium_corner, 13*scale]);
|
|
translate([0.0, 13*scale]) square([6.0*scale, 5.0*scale]);
|
|
translate([0.0, 18*scale]) square([9.1*scale, (1.5+base)*scale]);
|
|
translate([4.55*scale, 19.5*scale]) difference() {
|
|
circle(r=5.0*scale);
|
|
translate([-5.0*scale, -5.0*scale]) square([10.0*scale, (5.0+base)*scale]);
|
|
}
|
|
}
|
|
|
|
module knagge(diameter=60.0, scale=1.0) {
|
|
rotate_extrude(angle=30.0) translate([diameter*0.5+3*scale, 4.0*scale]) knagge_profile(scale);
|
|
}
|
|
|
|
module lip_profile(scale=1.0) {
|
|
tight_corner = corner(0.5, scale);
|
|
medium_corner = corner(1.5, scale);
|
|
wide_corner = corner(2.0, scale);
|
|
|
|
hull() {
|
|
translate([medium_corner, 4.5*scale-medium_corner]) circle(r=medium_corner);
|
|
translate([3.5*scale, 0.0]) square([medium_corner, 4.5*scale]);
|
|
square(size=medium_corner);
|
|
}
|
|
}
|
|
|
|
module lip(diameter=60.0, scale=1.0) {
|
|
rotate_extrude(angle=100.0) translate([diameter*0.5+9.5*scale, 12.5*scale]) lip_profile(scale);
|
|
}
|
|
|
|
module storz(diameter=60.0, scale=1.0) {
|
|
rotate_extrude() translate([diameter*0.5, 0]) base_profile(scale);
|
|
rotate([0, 0, 75]) knagge(diameter, scale);
|
|
rotate([0, 0, -105]) knagge(diameter, scale);
|
|
rotate([0, 0, 120]) lip(diameter, scale);
|
|
rotate([0, 0, -60]) lip(diameter, scale);
|
|
}
|
|
|
|
storz(diameter=20.0, scale=0.5);
|