| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100 |
- /* [OpenSCAD] */
- $fn=60; // [30:6:180]
- Debug = false; // [true,false]
- Schnitt = false;
- /* [Ding] */
- // Welches Teil
- Teil = 1; // [1:Fluegelmutter_Flasche, 2:Schlauch_Abgang]
- // Griff: Durchmesser, Anzahl und Dicke der Rändel
- Griff = [50, 16, 4];
- /* [Hidden] */
- Delta = 0.01;
- Inch = 25.4;
- W21 = [21.8, 14];
- SW = 17;
- Laenge = 8;
- Durchmesser=25.6;
- Flansch=3.6;
- use <threads.scad>
- // Gewinde: W21.8 x 1/14 LH
- // https://gist.github.com/plumbum/78e3c8281e1c031601456df2aa8e37c6
- module sector(h, d, a1, a2) {
- if (a2 - a1 > 180) {
- difference() {
- cylinder(h=h, d=d);
- translate([0,0,-0.5]) sector(h+1, d+1, a2-360, a1);
- }
- } else {
- difference() {
- cylinder(h=h, d=d);
- rotate([0,0,a1]) translate([-d/2, -d/2, -0.5])
- cube([d, d/2, h+1]);
- rotate([0,0,a2]) translate([-d/2, 0, -0.5])
- cube([d, d/2, h+1]);
- }
- }
- }
- module Handrad() {
- union() {
- cylinder(d=Griff.x, h=Laenge);
- for (i=[0:360/Griff.y:359]) rotate([0,0,i]) translate([Griff.x/2,0,0]) cylinder(d=Griff.z, h=Laenge);
- }
- }
- module Loch() {
- translate([Griff.x/2-4,0,0]) union() {
- cylinder(d=3, h=3*Laenge+1, center=true);
- cylinder(d1=4, d2=3, h=0.5);
- translate([0,0,Laenge+2*Delta]) rotate([180,0,0]) cylinder(d1=4, d2=3, h=0.5);
- }
- }
- module Flasche() {
- difference() {
- // Außen
- Handrad();
- // Innen
- translate([0,0,-0.01]) union() {
- cylinder(d=Durchmesser, h=Laenge+1);
- rotate([0,0,-90]) for (i=[0:360/5:359]) rotate([0,0,i]) translate([Durchmesser/2,0,0]) hull() {
- cylinder(d=Flansch, h=Laenge+1);
- translate([Flansch/2,0,0]) cylinder(d=Flansch, h=Laenge+1);
- }
- rotate([0,0,90]) Loch();
- }
- }
- }
- module Schlauch() {
- difference() {
- // Außen
- union() {
- Handrad();
- translate([0,0,Laenge]) intersection() {
- Handrad();
- sector(h=Laenge+1, d=2*Griff.x, a1=60, a2=-60);
- }
- }
- // Innen
- translate([0,0,-0.01]) union() {
- cylinder(r=SW/sqrt(3), h=2*Laenge+1, $fn=6);
- sector(h=Laenge+1, d=2*Griff.x, a1=-60, a2=60);
- rotate([0,0,90]) Loch();
- rotate([0,0,-90]) Loch();
- }
- }
- }
- intersection() {
- union() scale(1.015) {
- if (Teil==1) { Flasche(); }
- if (Teil==2) { Schlauch(); }
- }
- translate([(Schnitt)?-50:0,0,0]) cube(100, center=true);
- }
|