Treppe.scad 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. /* [OpenSCAD] */
  2. $fn=36;
  3. /* [Konstruktion] */
  4. Radius = 5;
  5. Schlitze = 5;
  6. Mittelteil = 15;
  7. M3 = 2.5;
  8. /* [Debug] */
  9. debug=false;
  10. // Auf Z Achse schneiden
  11. slice_xy = 320; //[0.5:0.5:50]
  12. // Auf X Achse schneiden
  13. slice_yz = 260; //[0.5:0.5:30]
  14. // Auf Y Achse schneiden
  15. slice_xz = 160; //[0.5:0.5:30]
  16. /* [Hidden] */
  17. //build_volume = [ 130, 80, 160];
  18. build_volume = [ 50, 50, 50];
  19. module ei(radius, oben=true, unten=true) {
  20. translate([0,0,radius]) {
  21. //translate([0,0,-0.1])
  22. if (unten) intersection() {
  23. sphere(radius);
  24. translate([0,0,-2*radius]) cube(4*radius, center=true);
  25. }
  26. if (oben) intersection() {
  27. scale([1,1,2]) sphere(radius);
  28. translate([0,0,+2*radius]) cube(4*radius, center=true);
  29. }
  30. }
  31. }
  32. module kopf() {
  33. difference() {
  34. ei(Radius);
  35. ei(Radius-1.5);
  36. translate([0,0,Radius*1.5]) for(i=[0:360/Schlitze:360]) rotate([45,0,i]) translate([Radius,0,0]) scale([0.5,2,1]) cylinder(r=Radius, h=Radius/5, center=true);
  37. }
  38. }
  39. module stoepsel() {
  40. translate([0,0,Mittelteil]) kopf();
  41. translate([0,0,-2*Radius]) ei(Radius, unten=false);
  42. translate([0,0,-Radius/2]) difference() {
  43. cylinder(d=Radius-1, h=Mittelteil);
  44. cylinder(d=M3, h=Mittelteil);
  45. }
  46. }
  47. module adapter() {
  48. translate([0,0,-2*Radius]) {
  49. ei(Radius, oben=false);
  50. cylinder(r1=Radius, d2=M3, h=Radius*2);
  51. }
  52. cylinder(d1=M3, d2=M3*3/5, h=Mittelteil);
  53. }
  54. !kopf();
  55. //translate([10,10,0])
  56. stoepsel();
  57. //translate([-10,-10,0])
  58. adapter();
  59. //
  60. //// Schnittbild wie im CT/MR:
  61. //intersection() {
  62. //
  63. //
  64. // if (debug) {
  65. // cube( [ build_volume.x, build_volume.y, slice_xy ], center=true );
  66. // cube( [ build_volume.x, slice_xz, build_volume.z ], center=true );
  67. // cube( [ slice_yz, build_volume.y, build_volume.z ], center=true );
  68. // }
  69. //}
  70. //