UltimateCodeWarrior

Female Picatinny Mod

Sep 24th, 2024
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.13 KB | None | 0 0
  1. /*
  2. This was originally:
  3.  
  4. Picatinny rail for G36 airsoft gun
  5. By Stuart Livings, Matthew Roberts. (C) 2010
  6.  
  7. This work is free software; you can redistribute it and/or modify it under
  8. the terms of the GNU General Public License as published by the Free Software
  9. Foundation; version 2.
  10.  
  11. This work is distributed in the hope that it will be useful, but WITHOUT ANY
  12. WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
  13. A PARTICULAR PURPOSE. See the version 2 of the GNU General Public License for
  14. more details.
  15.  
  16.  
  17. Only the spacing has been tweaked. The center-to-center distance between gaps
  18. in the rail should be 0.394 inches, or 10.0076 mm. The gap itself should be
  19. 0.206 inches; with a tolerance of -0.000" +0.008". To ensure any ridges from
  20. printing don't try and make that go negative, I've set the gap to be 0.210 inches.
  21. */
  22.  
  23. //rail(3);
  24. sleve(3);
  25.  
  26. module sleve(sections){
  27. //translate(v = [0, 0, -5 * sections - 2.5])
  28. difference() {
  29. translate([-12.5,-2.0,1])
  30. cube([25, 8, (10.0076 * (0.5 + sections))-5]);
  31. scale([1.1,1.1,1.1]) // Scale it up by 1 on the X/Y%
  32. linear_extrude(height = (10.0076 * (0.5 + sections)))
  33. railprofile();
  34.  
  35. }
  36. translate([0,0,-100])
  37. linear_extrude(height = (10.0076 * (0.5 + sections)))
  38. railprofile();
  39. }
  40.  
  41. module rail(sections) {
  42. translate(v = [0, 0, -5 * sections - 2.5])
  43. difference() {
  44. linear_extrude(height = (10.0076 * (0.5 + sections)))
  45. railprofile();
  46. translate([0,-0.6,0])
  47. union() {
  48. for (s = [1:sections]) {
  49. translate(v = [0, 0, s * 10.0076 - 10.0076/2.0])
  50. #linear_extrude(height = 5.334)
  51. cutprofile();
  52. }
  53. }
  54. }
  55. }
  56.  
  57. module railprofile() {
  58. extra_height = 2.4;
  59. polygon(points=[[-10.6,0],[-8.4,2.2],[8.4,2.2],[10.6,0],[7.8,-2.8],[7.8,-3.8-extra_height],[-7.8,-3.8-extra_height],[-7.8,-2.8]], paths=[[0,1,2,3,4,5,6,7,0]]);
  60. }
  61.  
  62. module cutprofile() {
  63. polygon(points=[[-12, -0.8], [-12, 3], [12, 3], [12, -0.8]], paths=[[0,1,2,3,0]]);
  64. }
  65.  
  66.  
Advertisement
Add Comment
Please, Sign In to add comment