Advertisement
Guest User

Untitled

a guest
Jun 10th, 2022
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.68 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=96;
  10. use <./threads_v2p1.scad>
  11.  
  12. translate([-15,-15,-H/2])import("NutShell.stl", convexity=3);
  13.  
  14. // Create a thread
  15. diameter = 18; // OD
  16. pitch = 2.5; // pitch
  17.  
  18. // part OD
  19. OD=21.5;
  20. H=15.5;
  21.  
  22. module RHole(height, position=[0,0,0], rotation=[0,0,0], tolerance=0.6) {
  23. ScrewHole(diameter, 1.5*H, position=position, rotation=rotation,
  24. pitch=pitch, tolerance=tolerance)
  25. children();
  26. }
  27. module LHole(height, position=[0,0,0], rotation=[0,0,0], tolerance=0.6) {
  28. mirror([1,0,0])ScrewHole(diameter, 1.5*H, position=position, rotation=rotation,
  29. pitch=pitch, tolerance=tolerance)
  30. children();
  31. }
  32.  
  33. module HermiNut() {
  34. difference () {
  35. translate([0,0,0])cylinder($fn=96, h = H, r1 = (OD)/2, r2 = (OD)/2, center = true);
  36. # translate([0,0,H])RHole(2*H);
  37. # translate([0,0,H])LHole(2*H);
  38. }
  39. }
  40. module ThreadChamferID() {
  41. cylinder(h = pitch, r1 = (diameter+0.75*pitch)/2, r2 = (diameter-2*pitch)/2, center = false);
  42. }
  43.  
  44. module NutChamfer(){
  45. difference(){
  46. cylinder(h = pitch, r1 = (OD+0.50*pitch)/2, r2 = (OD+0.5*pitch)/2, center = false);
  47. cylinder(h = pitch, r1 = (OD-2*pitch)/2, r2 = (OD+0.125*pitch)/2, center = false);
  48. }}
  49.  
  50. difference() {
  51. HermiNut();
  52. translate([0,0,-H/2-0.01])ThreadChamferID();
  53. translate([0,0,H/2+0.01])rotate([0,180,0])ThreadChamferID();
  54. // translate([0,0,-.001-H/2])NutChamfer();
  55. translate([0,0,0.001+H/2])rotate([0,180,0])NutChamfer();
  56. }
  57.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement