Advertisement
Guest User

Untitled

a guest
Mar 19th, 2019
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.79 KB | None | 0 0
  1. /*--------------------------------------------------------------*/
  2. /*------- Parameters --------*/
  3. /*--------------------------------------------------------------*/
  4.  
  5. /* [DIMENSIONS] */
  6.  
  7. // Length (top to bottom)
  8. length = 86;
  9.  
  10. // Width (left to right)
  11. width = 57;
  12.  
  13. // Height (thickness)
  14. height = 2;
  15.  
  16. // The radius of the curve for the corners (roundness)
  17. round = 2;
  18.  
  19. // Makes the curves smooth
  20. $fn = 20;
  21.  
  22. // This is how thick each piece will be
  23. thick = 3;
  24.  
  25. /* [TEXT] */
  26.  
  27. // Logo name
  28. writing = "mrmath3";
  29.  
  30. /*--------------------------------------------------------------*/
  31. /*------- Code --------*/
  32. /*--------------------------------------------------------------*/
  33.  
  34. /* [HIDDEN] */
  35.  
  36. fudge = .01; // to get difference command to work properly
  37.  
  38. /* [RENDER] */
  39.  
  40. 3D();
  41.  
  42. /* [MODULES] */
  43.  
  44. module 3D() {
  45. difference() {
  46. linear_extrude(thick)
  47. curve() 2D();
  48. %translate([0, 0, thick / 2 + fudge])
  49. linear_extrude(thick / 2)
  50. text(writing, 8, halign = "center", valign = "center");
  51. } // end difference
  52. } // end module
  53.  
  54. module 2D() {
  55. difference() {
  56. square([width, length]);
  57. strap_indent();
  58. translate([width - 1.35 + fudge * 2, 0, 0])
  59. strap_indent();
  60. finger_hole();
  61. } // end difference
  62. } // end module
  63.  
  64. module strap_indent() {
  65. translate([-fudge, 33, 0])
  66. square([1.35, 21]);
  67. } // end module
  68.  
  69. module finger_hole() {
  70. translate([-23.5 / 2 + width / 2, 0, 0])
  71. polygon(points=[[0,0],[5.5,27],[18,27],[23.5,0]]);
  72. }
  73.  
  74. module curve() {
  75. offset(r = round) // add outer roundness
  76. offset(delta = -round) // make smaller
  77. offset(r = -round) // add innner roundness
  78. offset(delta = round) // make bigger
  79. children();
  80. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement