Advertisement
sinned6915

original_nut_syntax

Jun 11th, 2022 (edited)
42
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.29 KB | None | 0 0
  1. // Created 2018-2017 by D. Pantazis
  2. // Used thread library created by Ryan A. Colyer.
  3. // http://www.thingiverse.com/thing:1686322
  4. // This work is released with CC0 into the public domain.
  5. // https://creativecommons.org/publicdomain/zero/1.0/
  6. //
  7. // v1.0
  8. //
  9. $fn=360;
  10.  
  11. // use <threads.scad>
  12.  
  13. use <./threads_v2p1.scad>
  14.  
  15. // use <knurledFinishLib_v2.scad>
  16. /*
  17. * in your OpenSCAD script and call either...
  18. *
  19. * knurled_cyl( Knurled cylinder height,
  20. * Knurled cylinder outer diameter,
  21. * Knurl polyhedron width,
  22. * Knurl polyhedron height,
  23. * Knurl polyhedron depth,
  24. * Cylinder ends smoothed height,
  25. * Knurled surface smoothing amount );
  26. *
  27. * knurled_cyl(k_cyl_hg, k_cyl_od,
  28. * knurl_wd, knurl_hg, knurl_dp,
  29. * e_smooth, s_smooth);
  30. * }
  31. */
  32.  
  33.  
  34. // Create a 1.5" nut with 8 tpi.
  35. diameter_in = 1.5;
  36. tpi = 8;
  37. diameter = diameter_in * 25.4;
  38. pitch = 25.4/tpi;
  39. // part OD
  40. OD=52;
  41. H=20;
  42.  
  43. module RHole(height, position=[0,0,0], rotation=[0,0,0], tolerance=0.027*25.4) {
  44. ScrewHole(diameter, height, position=position, rotation=rotation,
  45. pitch=pitch, tolerance=tolerance)
  46. children();
  47. }
  48. module LHole(height, position=[0,0,0], rotation=[0,0,0], tolerance=0.027*25.4) {
  49. mirror([1,0,0])ScrewHole(diameter, height, position=position, rotation=rotation,
  50. pitch=pitch, tolerance=tolerance)
  51. children();
  52. }
  53.  
  54. module HermiNut() {
  55. // translate([0,0,0])knurled_cyl(H, OD+pitch, 4, 4, 2, 3,0);
  56. translate([0,0,0])cylinder($fn=6, h = H, r1 = (OD)/2, r2 = (OD)/2, center = true);
  57. }
  58. module ThreadChamferID() {
  59. cylinder(h = pitch, r1 = diameter/2, r2 = (diameter-2*pitch)/2, center = false);
  60. }
  61.  
  62. module NutChamfer(){
  63. difference(){
  64. cylinder(h = pitch, r1 = (OD+0.50*pitch)/2, r2 = (OD+0.5*pitch)/2, center = false);
  65. cylinder(h = pitch, r1 = (OD-2*pitch)/2, r2 = (OD+0.125*pitch)/2, center = false);
  66. }}
  67. difference() {
  68. HermiNut();
  69. union(){
  70. translate([0,0,-H/2])RHole(H);
  71. translate([0,0,-H/2])LHole(H);
  72. }
  73. translate([0,0,-0.01-H/2])ThreadChamferID();
  74. translate([0,0,0.01+H/2])rotate([0,180,0])ThreadChamferID();
  75. translate([0,0,-.01-H/2])NutChamfer();
  76. translate([0,0,0.01+H/2])rotate([0,180,0])NutChamfer();
  77. }
  78.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement