propangas.scad 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. /* [OpenSCAD] */
  2. $fn=60; // [30:6:180]
  3. Debug = false; // [true,false]
  4. Schnitt = false;
  5. /* [Ding] */
  6. // Welches Teil
  7. Teil = 1; // [1:Fluegelmutter_Flasche, 2:Schlauch_Abgang]
  8. // Griff: Durchmesser, Anzahl und Dicke der Rändel
  9. Griff = [50, 16, 4];
  10. /* [Hidden] */
  11. Delta = 0.01;
  12. Inch = 25.4;
  13. W21 = [21.8, 14];
  14. SW = 17;
  15. Laenge = 8;
  16. Durchmesser=25.6;
  17. Flansch=3.6;
  18. use <threads.scad>
  19. // Gewinde: W21.8 x 1/14 LH
  20. // https://gist.github.com/plumbum/78e3c8281e1c031601456df2aa8e37c6
  21. module sector(h, d, a1, a2) {
  22. if (a2 - a1 > 180) {
  23. difference() {
  24. cylinder(h=h, d=d);
  25. translate([0,0,-0.5]) sector(h+1, d+1, a2-360, a1);
  26. }
  27. } else {
  28. difference() {
  29. cylinder(h=h, d=d);
  30. rotate([0,0,a1]) translate([-d/2, -d/2, -0.5])
  31. cube([d, d/2, h+1]);
  32. rotate([0,0,a2]) translate([-d/2, 0, -0.5])
  33. cube([d, d/2, h+1]);
  34. }
  35. }
  36. }
  37. module Handrad() {
  38. union() {
  39. cylinder(d=Griff.x, h=Laenge);
  40. for (i=[0:360/Griff.y:359]) rotate([0,0,i]) translate([Griff.x/2,0,0]) cylinder(d=Griff.z, h=Laenge);
  41. }
  42. }
  43. module Loch() {
  44. translate([Griff.x/2-4,0,0]) union() {
  45. cylinder(d=3, h=3*Laenge+1, center=true);
  46. cylinder(d1=4, d2=3, h=0.5);
  47. translate([0,0,Laenge+2*Delta]) rotate([180,0,0]) cylinder(d1=4, d2=3, h=0.5);
  48. }
  49. }
  50. module Flasche() {
  51. difference() {
  52. // Außen
  53. Handrad();
  54. // Innen
  55. translate([0,0,-0.01]) union() {
  56. cylinder(d=Durchmesser, h=Laenge+1);
  57. rotate([0,0,-90]) for (i=[0:360/5:359]) rotate([0,0,i]) translate([Durchmesser/2,0,0]) hull() {
  58. cylinder(d=Flansch, h=Laenge+1);
  59. translate([Flansch/2,0,0]) cylinder(d=Flansch, h=Laenge+1);
  60. }
  61. rotate([0,0,90]) Loch();
  62. }
  63. }
  64. }
  65. module Schlauch() {
  66. difference() {
  67. // Außen
  68. union() {
  69. Handrad();
  70. translate([0,0,Laenge]) intersection() {
  71. Handrad();
  72. sector(h=Laenge+1, d=2*Griff.x, a1=60, a2=-60);
  73. }
  74. }
  75. // Innen
  76. translate([0,0,-0.01]) union() {
  77. cylinder(r=SW/sqrt(3), h=2*Laenge+1, $fn=6);
  78. sector(h=Laenge+1, d=2*Griff.x, a1=-60, a2=60);
  79. rotate([0,0,90]) Loch();
  80. rotate([0,0,-90]) Loch();
  81. }
  82. }
  83. }
  84. intersection() {
  85. union() scale(1.015) {
  86. if (Teil==1) { Flasche(); }
  87. if (Teil==2) { Schlauch(); }
  88. }
  89. translate([(Schnitt)?-50:0,0,0]) cube(100, center=true);
  90. }