dip4of6.fpd 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. /* MACHINE-GENERATED ! */
  2. frame hole {
  3. __0: vec @(hole/2, hole/2)
  4. __1: vec @(-hole/2, -hole/2)
  5. hole . __0
  6. }
  7. frame pin {
  8. __2: vec @(-ratio*hole/2, ratio*hole/2)
  9. __3: vec @(ratio*hole/2, -ratio*hole/2)
  10. rpad "$n" __2 . bare
  11. frame hole @
  12. }
  13. frame pin_top {
  14. set n = N-i
  15. frame pin @
  16. }
  17. frame pin_bottom {
  18. set n = i+1
  19. frame pin @
  20. }
  21. frame pins {
  22. loop i = 0, populated-1
  23. __0: vec @(pitch*(i-(side-1)/2), 0mm)
  24. __1: vec .(0mm, width/2)
  25. frame pin_top .
  26. __2: vec __0(0mm, -width/2)
  27. frame pin_bottom .
  28. }
  29. frame holes {
  30. loop i = populated, side-1
  31. __0: vec @(pitch*(i-(side-1)/2), 0mm)
  32. __1: vec .(0mm, width/2)
  33. frame hole .
  34. __2: vec __0(0mm, -width/2)
  35. frame hole .
  36. }
  37. frame marker {
  38. set r = (side*pitch-x)/2-w
  39. set clear = 0.3mm
  40. __0: vec @(-x/2-r-clear, -y/2+r)
  41. __1: vec .(0mm, r)
  42. circ __0 . w
  43. }
  44. frame outline {
  45. set x = (side-1)*pitch+ratio*hole
  46. set y = width-pitch
  47. set w = 5mil
  48. __0: vec @(x/2, y/2)
  49. __1: vec @(-x/2, -y/2)
  50. rect . __0 w
  51. frame marker @
  52. }
  53. package "DIP-${N}/${M}-${width}"
  54. unit mm
  55. set N = 2*populated
  56. set M = 2*side
  57. set width = 300mil
  58. set hole = 0.8mm
  59. set ratio = 2
  60. set pitch = 100mil
  61. set side = 3
  62. set populated = 2
  63. frame outline @
  64. frame pins @
  65. frame holes @
  66. measx hole.__1 -> hole.__0 -1mm
  67. measx pin.__2 -> pin.__3 -3mm
  68. measx outline.__1 >> outline.__0 -4mm
  69. measy outline.__0 >> outline.__1 1mm
  70. measy holes.__1 >> holes.__2 3mm
  71. measx pins.__2 >> pins.__2 2mm