UltimateCodeWarrior

hull diff

Sep 30th, 2024
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.50 KB | None | 0 0
  1. use <threads-scad/threads.scad>;
  2.  
  3. $fa=1;
  4. $fs= 0.4;
  5.  
  6. $fn = $preview ? 64:360;
  7.  
  8.  
  9. $vpr=[90,0,45]; // Right Side
  10.  
  11.  
  12. c_h = 120; // height
  13. c_r = 100; // radius
  14. c_t = 5; //thickness
  15. c_2t = 2*c_t;
  16.  
  17. pi_l= 85+3; // +3 is the overhang of usb/ether
  18. pi_w= 56;
  19. pi_h= 20;
  20. pi_hole_r= 2.7;
  21. pi_edge_off = 3.5;
  22. pi_hole_wid_dist = 49;
  23. pi_hole_len_dist = 58;
  24.  
  25.  
  26. // Bezel Threads
  27. bezel_diameter = 60;
  28. bezel_rod_height=24;
  29. bezel_thread_length = 42;
  30. bezel_thread_pitch = 5;
  31. bezel_pipe_diameter = bezel_diameter-3*c_t;
  32.  
  33.  
  34.  
  35.  
  36. module vent_grid(hole_dia=2, hole_space=5, x_count=20, y_count=20, depth=30) {
  37.  
  38. for(x=[1:1:x_count]){
  39. for(y=[1:1:y_count]){
  40.  
  41. translate([x*(hole_dia+hole_space)/2,y*(hole_dia+hole_space)/2,0])
  42. cylinder(depth,d=hole_dia,true);
  43.  
  44. }
  45. }
  46.  
  47.  
  48. }
  49.  
  50.  
  51.  
  52. module main_hull(){
  53.  
  54. // If I don't specify r= for radius, it becomes a cone?
  55. difference() {
  56. //cylinder(h=c_h,r=c_r,true);
  57.  
  58. color("green",1.0)
  59. bare_threaded_cylinder(c_r*2,c_h,5);
  60. translate([0,0,-5])
  61. cylinder(h=c_h*1.2,r=c_r-c_2t,false);
  62.  
  63. translate([30,-75,25])
  64. rotate([0,0,45])
  65. rotate([90,0,0])
  66. vent_grid();
  67.  
  68.  
  69.  
  70.  
  71. }
  72.  
  73.  
  74.  
  75.  
  76. }
  77.  
  78. module bare_threaded_cylinder(rod_diameter,thread_length,thread_pitch) {
  79. RodStart(rod_diameter, 0,thread_length,rod_diameter,thread_pitch);
  80. }
  81.  
  82.  
  83. main_hull();
  84.  
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
Advertisement
Add Comment
Please, Sign In to add comment