MH61-S01.scad 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. $fn = 180;
  2. swept_angle = 15/45; //
  3. twist = -4;
  4. wingspan = 500;
  5. angle_comp = -0.7;
  6. core_span = 70;
  7. CORE = true;
  8. WING = true;
  9. module wing(size, tw) {
  10. rotate([180,0,0])
  11. linear_extrude(height=size, twist=tw, slices=60)
  12. import("mh61_minikowski_3_25mm.dxf", center=true);
  13. }
  14. module rod() {
  15. translate([200,0,8])
  16. rotate([0,90,0])
  17. cylinder(r=1., h=300, center=true);
  18. }
  19. module elevon() {
  20. rotate([90, 0, 0])
  21. hull(){
  22. translate([310, 8, 0])
  23. cylinder(r=2, h=40);
  24. translate([350, 8, 0])
  25. cylinder(r=0.25, h=40);
  26. }
  27. }
  28. module rod_support()
  29. {
  30. hull(){
  31. translate([35,0,7])
  32. rotate([0,90,0])
  33. cylinder(r=2, h=1, center=true);
  34. translate([105,0,8])
  35. rotate([0,90,0])
  36. cylinder(r=2, h=4, center=true);
  37. }
  38. rod();
  39. }
  40. // Support containing avionics
  41. // TODO: Full blown support
  42. // For the moment, just an attaching surface
  43. module support(span)
  44. {
  45. translate([-20,0,-9])
  46. cube([40, span, 5], center=true);
  47. }
  48. M = [
  49. [1, 0, -swept_angle, 0],
  50. [0, 1, 0, 0],// The "0.7" is the skew value; pushed along the y axis
  51. [0, 0, 1, 0],
  52. [0, 0, 0, 1]];
  53. //scale(0.25)
  54. if(CORE){
  55. difference(){
  56. color([0.2,0.7,0.6], alpha=0.7)
  57. union(){
  58. rotate([-90,0,0])
  59. multmatrix(M){
  60. rotate([0,0,-0.4])
  61. resize([158, 25, 0])
  62. wing(core_span/2, -0.25);
  63. }
  64. mirror([0,1,1])
  65. multmatrix(M) {
  66. rotate([0,0,-0.4])
  67. resize([158, 25, 0])
  68. wing(core_span/2, -0.25);
  69. }
  70. support(core_span);
  71. }
  72. translate([-2,0,0]){
  73. rotate([-90,0,0])
  74. multmatrix(M) {
  75. wing(wingspan/2, twist);
  76. }
  77. mirror([0,1,1])
  78. multmatrix(M) {
  79. wing(wingspan/2, twist);
  80. }
  81. }
  82. }
  83. if(WING)
  84. {
  85. elevon();
  86. mirror([0,1,0])
  87. elevon();
  88. color([0.5,0.1,0.5], alpha=0.18)
  89. rotate([-90,0,0]){
  90. multmatrix(M) {
  91. wing(wingspan/2, twist);
  92. }
  93. mirror([0,0,1])
  94. multmatrix(M) {
  95. wing(wingspan/2, twist);
  96. }
  97. }
  98. }
  99. }