My self-made 3D-printable designs, mainly in OpenSCAD
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

sign.scad 4.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. // ----------------------------------------------------
  2. /*
  3. sign_width = 86;
  4. sign_length = 20;
  5. text_str = "xythobuz.de";
  6. text_font = "Liberation Sans:style=Bold";
  7. text_size_off = 4;
  8. text_double = false;
  9. sign_base_height = 3;
  10. sign_border_height = 2;
  11. sign_border_width = 3;
  12. fillet = 0.5;
  13. */
  14. // ----------------------------------------------------
  15. sign_width = 105;
  16. sign_length = 22;
  17. text_str = "xythobuz.de";
  18. text_str2 = "Thomas Buck";
  19. text_font = "Liberation Sans:style=Bold";
  20. text_size_off = 5;
  21. text_double = true;
  22. text_double_off = 11;
  23. sign_base_height = 3;
  24. sign_border_height = 4;
  25. sign_border_width = 3;
  26. fillet = 1.0;
  27. // ----------------------------------------------------
  28. /*
  29. sign_width = 65;
  30. sign_length = 20;
  31. text_str = "Toolbox";
  32. text_font = "Liberation Sans:style=Bold";
  33. text_size_off = 3;
  34. text_double = false;
  35. sign_base_height = 3;
  36. sign_border_height = 2;
  37. sign_border_width = 3;
  38. fillet = 0.5;
  39. */
  40. // ----------------------------------------------------
  41. /*
  42. sign_width = 80;
  43. sign_length = 20;
  44. text_str = "Toolbox";
  45. text_str2 = "Bodensee";
  46. text_font = "Liberation Sans:style=Bold";
  47. text_size_off = 3;
  48. text_double = true;
  49. text_double_off = 13;
  50. sign_base_height = 3;
  51. sign_border_height = 2;
  52. sign_border_width = 3;
  53. fillet = 0.5;
  54. */
  55. // ----------------------------------------------------
  56. draw_bottom = true;
  57. draw_walls = true;
  58. draw_text = false;
  59. color_base = "grey";
  60. color_walls = "grey";
  61. color_text = "white";
  62. // ----------------------------------------------------
  63. text_size = sign_length - (2 * sign_border_width) - text_size_off;
  64. include <rounded.scad>
  65. // ----------------------------------------------------
  66. if (draw_bottom) {
  67. if (text_double) {
  68. // base
  69. color(color_base)
  70. rounded_cube(sign_width, sign_length + text_double_off, sign_base_height, fillet, fillet, fillet, false, true, true);
  71. } else {
  72. // base
  73. color(color_base)
  74. rounded_cube(sign_width, sign_length, sign_base_height, fillet, fillet, fillet, false, true, true);
  75. }
  76. }
  77. if (draw_walls) {
  78. // top walls
  79. color(color_walls)
  80. translate([0, 0, sign_base_height])
  81. difference() {
  82. union() {
  83. rounded_cube(sign_width, sign_border_width, sign_border_height, fillet, fillet, fillet, false, true, false);
  84. if (text_double) {
  85. rounded_cube(sign_border_width, sign_length + text_double_off, sign_border_height, fillet, fillet, fillet, false, true, false);
  86. translate([sign_width - sign_border_width, 0, 0])
  87. rounded_cube(sign_border_width, sign_length + text_double_off, sign_border_height, fillet, fillet, fillet, false, true, false);
  88. translate([0, sign_length + text_double_off - sign_border_width, 0])
  89. rounded_cube(sign_width, sign_border_width, sign_border_height, fillet, fillet, fillet, false, true, false);
  90. } else {
  91. rounded_cube(sign_border_width, sign_length, sign_border_height, fillet, fillet, fillet, false, true, false);
  92. translate([sign_width - sign_border_width, 0, 0])
  93. rounded_cube(sign_border_width, sign_length, sign_border_height, fillet, fillet, fillet, false, true, false);
  94. translate([0, sign_length - sign_border_width, 0])
  95. rounded_cube(sign_width, sign_border_width, sign_border_height, fillet, fillet, fillet, false, true, false);
  96. }
  97. }
  98. }
  99. }
  100. if (draw_text) {
  101. if (text_double) {
  102. // text
  103. color(color_text)
  104. translate([sign_width / 2, sign_length / 2 + text_double_off, sign_base_height])
  105. linear_extrude(height = sign_border_height)
  106. text(text = text_str, font = text_font, size = text_size, valign = "center", halign = "center");
  107. color(color_text)
  108. translate([sign_width / 2, sign_length / 2, sign_base_height])
  109. linear_extrude(height = sign_border_height)
  110. text(text = text_str2, font = text_font, size = text_size, valign = "center", halign = "center");
  111. } else {
  112. // text
  113. color(color_text)
  114. translate([sign_width / 2, sign_length / 2, sign_base_height])
  115. linear_extrude(height = sign_border_height)
  116. text(text = text_str, font = text_font, size = text_size, valign = "center", halign = "center");
  117. }
  118. }