1059.fpd 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. /* MACHINE-GENERATED ! */
  2. frame smt {
  3. table
  4. { Cx, Px, Py }
  5. { 29.31mm, 2.59mm+add, 3.61mm+add }
  6. table
  7. { pad, dx }
  8. { 1, -1 }
  9. { 2, 1 }
  10. set add = 0.1mm
  11. loop if = th, 0
  12. __0: vec @(Cx/2*dx, 0mm)
  13. __1: vec .(Px/2, Py/2)
  14. __2: vec __0(-Px/2, -Py/2)
  15. pad "$pad" . __1
  16. }
  17. frame th {
  18. table
  19. { Cx, Cy, Hd }
  20. { 26.92mm, 2.54mm, 0.97mm }
  21. set aspect = 2.5
  22. set Rd = Hd*aspect
  23. table
  24. { pin, dx, dy }
  25. { 1, -1, 0 }
  26. { 2, 1, 1 }
  27. { 2, 1, -1 }
  28. loop if = 1, th
  29. __0: vec @(Cx/2*dx, Cy/2*dy)
  30. __1: vec .(Hd/2, Hd/2)
  31. __2: vec __0(-Hd/2, -Hd/2)
  32. hole . __1
  33. __3: vec __0(-Rd/2, Rd/2)
  34. __4: vec __0(Rd/2, -Rd/2)
  35. rpad "$pin" __3 .
  36. }
  37. frame battery {
  38. __0: vec @(batr, 0mm)
  39. circ @ . w
  40. }
  41. frame corners {
  42. table
  43. { dx, dy, corner }
  44. { -1, -1, 0mm }
  45. { -1, 1, 0mm }
  46. { 1, -1, 0mm }
  47. { 1, 1, 1.5mm }
  48. set h = My/2*dy
  49. __0: vec @(Mx/2*dx, My/2*dy)
  50. __1: vec .(0mm, corner*-dy)
  51. __2: vec __0(corner*-dx, 0mm)
  52. line . __1 w
  53. __3: vec __0(0mm, (My-Ty)/2*-dy)
  54. line __1 . w
  55. __5: vec .((Tx-Mx)/2*dx, 0mm)
  56. line . __3 w
  57. __4: vec @(sqrt(batr*batr-h*h)*dx, h)
  58. line . __2 w
  59. }
  60. package "KS-$name"
  61. unit mm
  62. set batr = 10mm
  63. set w = 5mil
  64. table
  65. { Mx, My, Tx, Ty }
  66. { 22mm, 16mm, 28.4mm, 7mm }
  67. table
  68. { name, th }
  69. { "1059", 1 }
  70. { "1060", 0 }
  71. frame battery @
  72. frame corners @
  73. frame th @
  74. frame smt @
  75. measx corners.__0 -> corners.__0 -4mm
  76. measx corners.__5 -> corners.__5 -10mm
  77. measy corners.__0 -> corners.__0 9mm
  78. measy corners.__5 -> corners.__5 4mm
  79. measy smt.__2 -> smt.__1 -3.6mm
  80. measx smt.__2 -> smt.__1 -1mm
  81. measx smt.__0 >> smt.__0 12mm
  82. measx th.__0 >> th.__0 12mm
  83. measx th.__3 >> th.__4 12mm
  84. measy th.__2 -> th.__1 -3mm
  85. measx th.__3 -> th.__4 -3.5mm
  86. measx smt.__2 >> smt.__1 15mm