My self designed awesome 3D printer
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

tslot.scad 1.6KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. //(C) Nathan Zadoks 2011
  2. //CC-BY-SA or GPLv2, pick your poison.
  3. // retrieved from https://www.thingiverse.com/thing:11142
  4. module tslot(
  5. size=10, //size of each side
  6. length=10, //length. descriptive enough, no?
  7. thickness=3, //thickness of the 'sheet'
  8. gap=0, //gap, thickness of the lower part of the 'T'
  9. center=false, //somewhat vague. todo.
  10. nut=false, //set to true to make a fitting T-slot nut
  11. ){
  12. start=thickness/sqrt(2);
  13. if(nut){
  14. linear_extrude(height=10)
  15. intersection(){
  16. polygon([[size/2-gap/2,0],[size/2-gap/2,thickness],[thickness+start,thickness],[size/2,size/2-2],[size-thickness-start,thickness],[size/2+gap/2,thickness],[size/2+gap/2,0]]);
  17. square([size,size/2-(gap+thickness)/2]);
  18. }
  19. }
  20. else{
  21. color([0.5,0.5,0.5])
  22. linear_extrude(height=length,center=center)
  23. translate([15,15])
  24. difference(){
  25. union(){
  26. for(d=[0:3]) rotate([0,0,d*90]) polygon(points=[
  27. [0,0],
  28. [0,start],[size/2-thickness-start,size/2-thickness],[gap/2,size/2-thickness],[gap/2,size/2],
  29. [size/2,size/2],[size/2,gap/2],[size/2-thickness,gap/2],[size/2-thickness,size/2-thickness-start],[start,0]
  30. ]);
  31. square(gap+thickness,center=true);
  32. }
  33. circle(r=gap/2,center=true);
  34. }
  35. }
  36. }
  37. module tslot20(length,nut){
  38. tslot(size=20,gap=5.26,thickness=1.5,length=length,nut=nut);
  39. }
  40. module tslot30(length,nut){
  41. tslot(size=30,gap=8.13,thickness=2.55,length=length,nut=nut);
  42. }
  43. module tslot20_2040(length,nut){
  44. union(){
  45. tslot20(length,nut);
  46. translate([0,20,0])
  47. tslot20(length,nut);
  48. }
  49. }
  50. module tslot30_3060(length,nut){
  51. union(){
  52. tslot30(length,nut);
  53. translate([0,30,0])
  54. tslot30(length,nut);
  55. }
  56. }