add spring terminal

This commit is contained in:
King Kévin 2023-12-06 18:56:50 +01:00
parent 3384d33139
commit 41c31b0914
4 changed files with 42379 additions and 0 deletions

View File

@ -0,0 +1,88 @@
#!/usr/bin/env ruby
# encoding: utf-8
# ruby: 3.0.1
# number of possible pins
variations = (2..12).to_a
puts "name: KF250-3.5
description: spring loaded terminal, with lever, 3.5 mm pitch, vertical insertion
variations: #{variations.collect {|p| p.to_s + 'P-1'} * ', '}, #{variations.collect {|p| p.to_s + 'P-2'} * ', '}
datasheet: https://a3.ldycdn.com/KF250-3.5-aidqkBpqKirRljSkrnijolli.pdf
distibutors: LCSC C475162
housing: &template
pattern: custom
height: 13.3
bodyLength: 12.1
bodyPosition: -0.2, #{(12.1/2 - 2.25 - 5.0/2).round(2)}
leadHeight: 3.6
leadWidth: 0.85
leadLength: 0.4
# top row
holeDiameter: 1.2
horizontalPitch: 7.0
rowCount: 1
# bottom row
holeDiameter1: 1.2
horizontalPitch1: 7.0
rowCount1: 1
"
variations.each do |v|
v_pad = v.to_s.rjust(2,'0')
puts "
pinout@#{v}P-1: 1-#{v}
schematic@#{v}P-1:
suffix: -#{v_pad}P-1
symbol: connector
left: 1-#{v}
housing@#{v}P-1:
suffix: -#{v_pad}P-1
<<: *template
bodyWidth: #{(3.5 * v + 1.7).round(2)}
model:
file: 'library/connector/terminal-spring_kf250-3.5/KF250-3.5-#{v_pad}P-1.step'
rotation: 0,0,0
position: 0,0,0
# top row
columnCount: #{(v/2.0).ceil}
rowDX: #{v.even? ? -1.75 : 0}
rowDY: -2.5
numbers: #{v.times.collect {|i| i+1}.select{|i| 1 == i%2}.flatten * ', '}
# bottom row
columnCount1: #{(v/2.0).floor}
rowDX1: #{v.even? ? 1.75 : 0}
rowDY1: 2.5
numbers1: #{v.times.collect {|i| i+1}.select{|i| 0 == i%2}.flatten * ', '}
"
puts "
pinout@#{v}P-2: 1-#{v}
schematic@#{v}P-2:
suffix: -#{v_pad}P-2
symbol: connector
left: 1-#{v}
housing@#{v}P-2:
suffix: -#{v_pad}P-2
<<: *template
bodyWidth: #{(3.5 * v + 1.7).round(2)}
model:
file: 'library/connector/terminal-spring_kf250-3.5/KF250-3.5-#{v_pad}P-2.step'
rotation: 0,0,0
position: 0,0,0
# top row
columnCount: #{(v/2.0).ceil}
rowDX: #{v.even? ? -1.75 : 0}
rowDY: 2.5
numbers: #{v.times.collect {|i| i+1}.select{|i| 1 == i%2}.flatten * ', '}
# bottom row
columnCount1: #{(v/2.0).floor}
rowDX1: #{v.even? ? 1.75 : 0}
rowDY1: -2.5
numbers1: #{v.times.collect {|i| i+1}.select{|i| 0 == i%2}.flatten * ', '}
"
end

View File

@ -0,0 +1,594 @@
name: KF250-3.5
description: spring loaded terminal, with lever, 3.5 mm pitch, vertical insertion
variations: 2P-1, 3P-1, 4P-1, 5P-1, 6P-1, 7P-1, 8P-1, 9P-1, 10P-1, 11P-1, 12P-1, 2P-2, 3P-2, 4P-2, 5P-2, 6P-2, 7P-2, 8P-2, 9P-2, 10P-2, 11P-2, 12P-2
datasheet: https://a3.ldycdn.com/KF250-3.5-aidqkBpqKirRljSkrnijolli.pdf
distibutors: LCSC C475162
housing: &template
pattern: custom
height: 13.3
bodyLength: 12.1
bodyPosition: -0.2, 1.3
leadHeight: 3.6
leadWidth: 0.85
leadLength: 0.4
# top row
holeDiameter: 1.2
horizontalPitch: 7.0
rowCount: 1
# bottom row
holeDiameter1: 1.2
horizontalPitch1: 7.0
rowCount1: 1
pinout@2P-1: 1-2
schematic@2P-1:
suffix: -02P-1
symbol: connector
left: 1-2
housing@2P-1:
suffix: -02P-1
<<: *template
bodyWidth: 8.7
model:
file: 'library/connector/terminal-spring_kf250-3.5/KF250-3.5-02P-1.step'
rotation: 0,0,0
position: 0,0,0
# top row
columnCount: 1
rowDX: -1.75
rowDY: -2.5
numbers: 1
# bottom row
columnCount1: 1
rowDX1: 1.75
rowDY1: 2.5
numbers1: 2
pinout@2P-2: 1-2
schematic@2P-2:
suffix: -02P-2
symbol: connector
left: 1-2
housing@2P-2:
suffix: -02P-2
<<: *template
bodyWidth: 8.7
model:
file: 'library/connector/terminal-spring_kf250-3.5/KF250-3.5-02P-2.step'
rotation: 0,0,0
position: 0,0,0
# top row
columnCount: 1
rowDX: -1.75
rowDY: 2.5
numbers: 1
# bottom row
columnCount1: 1
rowDX1: 1.75
rowDY1: -2.5
numbers1: 2
pinout@3P-1: 1-3
schematic@3P-1:
suffix: -03P-1
symbol: connector
left: 1-3
housing@3P-1:
suffix: -03P-1
<<: *template
bodyWidth: 12.2
model:
file: 'library/connector/terminal-spring_kf250-3.5/KF250-3.5-03P-1.step'
rotation: 0,0,0
position: 0,0,0
# top row
columnCount: 2
rowDX: 0
rowDY: -2.5
numbers: 1, 3
# bottom row
columnCount1: 1
rowDX1: 0
rowDY1: 2.5
numbers1: 2
pinout@3P-2: 1-3
schematic@3P-2:
suffix: -03P-2
symbol: connector
left: 1-3
housing@3P-2:
suffix: -03P-2
<<: *template
bodyWidth: 12.2
model:
file: 'library/connector/terminal-spring_kf250-3.5/KF250-3.5-03P-2.step'
rotation: 0,0,0
position: 0,0,0
# top row
columnCount: 2
rowDX: 0
rowDY: 2.5
numbers: 1, 3
# bottom row
columnCount1: 1
rowDX1: 0
rowDY1: -2.5
numbers1: 2
pinout@4P-1: 1-4
schematic@4P-1:
suffix: -04P-1
symbol: connector
left: 1-4
housing@4P-1:
suffix: -04P-1
<<: *template
bodyWidth: 15.7
model:
file: 'library/connector/terminal-spring_kf250-3.5/KF250-3.5-04P-1.step'
rotation: 0,0,0
position: 0,0,0
# top row
columnCount: 2
rowDX: -1.75
rowDY: -2.5
numbers: 1, 3
# bottom row
columnCount1: 2
rowDX1: 1.75
rowDY1: 2.5
numbers1: 2, 4
pinout@4P-2: 1-4
schematic@4P-2:
suffix: -04P-2
symbol: connector
left: 1-4
housing@4P-2:
suffix: -04P-2
<<: *template
bodyWidth: 15.7
model:
file: 'library/connector/terminal-spring_kf250-3.5/KF250-3.5-04P-2.step'
rotation: 0,0,0
position: 0,0,0
# top row
columnCount: 2
rowDX: -1.75
rowDY: 2.5
numbers: 1, 3
# bottom row
columnCount1: 2
rowDX1: 1.75
rowDY1: -2.5
numbers1: 2, 4
pinout@5P-1: 1-5
schematic@5P-1:
suffix: -05P-1
symbol: connector
left: 1-5
housing@5P-1:
suffix: -05P-1
<<: *template
bodyWidth: 19.2
model:
file: 'library/connector/terminal-spring_kf250-3.5/KF250-3.5-05P-1.step'
rotation: 0,0,0
position: 0,0,0
# top row
columnCount: 3
rowDX: 0
rowDY: -2.5
numbers: 1, 3, 5
# bottom row
columnCount1: 2
rowDX1: 0
rowDY1: 2.5
numbers1: 2, 4
pinout@5P-2: 1-5
schematic@5P-2:
suffix: -05P-2
symbol: connector
left: 1-5
housing@5P-2:
suffix: -05P-2
<<: *template
bodyWidth: 19.2
model:
file: 'library/connector/terminal-spring_kf250-3.5/KF250-3.5-05P-2.step'
rotation: 0,0,0
position: 0,0,0
# top row
columnCount: 3
rowDX: 0
rowDY: 2.5
numbers: 1, 3, 5
# bottom row
columnCount1: 2
rowDX1: 0
rowDY1: -2.5
numbers1: 2, 4
pinout@6P-1: 1-6
schematic@6P-1:
suffix: -06P-1
symbol: connector
left: 1-6
housing@6P-1:
suffix: -06P-1
<<: *template
bodyWidth: 22.7
model:
file: 'library/connector/terminal-spring_kf250-3.5/KF250-3.5-06P-1.step'
rotation: 0,0,0
position: 0,0,0
# top row
columnCount: 3
rowDX: -1.75
rowDY: -2.5
numbers: 1, 3, 5
# bottom row
columnCount1: 3
rowDX1: 1.75
rowDY1: 2.5
numbers1: 2, 4, 6
pinout@6P-2: 1-6
schematic@6P-2:
suffix: -06P-2
symbol: connector
left: 1-6
housing@6P-2:
suffix: -06P-2
<<: *template
bodyWidth: 22.7
model:
file: 'library/connector/terminal-spring_kf250-3.5/KF250-3.5-06P-2.step'
rotation: 0,0,0
position: 0,0,0
# top row
columnCount: 3
rowDX: -1.75
rowDY: 2.5
numbers: 1, 3, 5
# bottom row
columnCount1: 3
rowDX1: 1.75
rowDY1: -2.5
numbers1: 2, 4, 6
pinout@7P-1: 1-7
schematic@7P-1:
suffix: -07P-1
symbol: connector
left: 1-7
housing@7P-1:
suffix: -07P-1
<<: *template
bodyWidth: 26.2
model:
file: 'library/connector/terminal-spring_kf250-3.5/KF250-3.5-07P-1.step'
rotation: 0,0,0
position: 0,0,0
# top row
columnCount: 4
rowDX: 0
rowDY: -2.5
numbers: 1, 3, 5, 7
# bottom row
columnCount1: 3
rowDX1: 0
rowDY1: 2.5
numbers1: 2, 4, 6
pinout@7P-2: 1-7
schematic@7P-2:
suffix: -07P-2
symbol: connector
left: 1-7
housing@7P-2:
suffix: -07P-2
<<: *template
bodyWidth: 26.2
model:
file: 'library/connector/terminal-spring_kf250-3.5/KF250-3.5-07P-2.step'
rotation: 0,0,0
position: 0,0,0
# top row
columnCount: 4
rowDX: 0
rowDY: 2.5
numbers: 1, 3, 5, 7
# bottom row
columnCount1: 3
rowDX1: 0
rowDY1: -2.5
numbers1: 2, 4, 6
pinout@8P-1: 1-8
schematic@8P-1:
suffix: -08P-1
symbol: connector
left: 1-8
housing@8P-1:
suffix: -08P-1
<<: *template
bodyWidth: 29.7
model:
file: 'library/connector/terminal-spring_kf250-3.5/KF250-3.5-08P-1.step'
rotation: 0,0,0
position: 0,0,0
# top row
columnCount: 4
rowDX: -1.75
rowDY: -2.5
numbers: 1, 3, 5, 7
# bottom row
columnCount1: 4
rowDX1: 1.75
rowDY1: 2.5
numbers1: 2, 4, 6, 8
pinout@8P-2: 1-8
schematic@8P-2:
suffix: -08P-2
symbol: connector
left: 1-8
housing@8P-2:
suffix: -08P-2
<<: *template
bodyWidth: 29.7
model:
file: 'library/connector/terminal-spring_kf250-3.5/KF250-3.5-08P-2.step'
rotation: 0,0,0
position: 0,0,0
# top row
columnCount: 4
rowDX: -1.75
rowDY: 2.5
numbers: 1, 3, 5, 7
# bottom row
columnCount1: 4
rowDX1: 1.75
rowDY1: -2.5
numbers1: 2, 4, 6, 8
pinout@9P-1: 1-9
schematic@9P-1:
suffix: -09P-1
symbol: connector
left: 1-9
housing@9P-1:
suffix: -09P-1
<<: *template
bodyWidth: 33.2
model:
file: 'library/connector/terminal-spring_kf250-3.5/KF250-3.5-09P-1.step'
rotation: 0,0,0
position: 0,0,0
# top row
columnCount: 5
rowDX: 0
rowDY: -2.5
numbers: 1, 3, 5, 7, 9
# bottom row
columnCount1: 4
rowDX1: 0
rowDY1: 2.5
numbers1: 2, 4, 6, 8
pinout@9P-2: 1-9
schematic@9P-2:
suffix: -09P-2
symbol: connector
left: 1-9
housing@9P-2:
suffix: -09P-2
<<: *template
bodyWidth: 33.2
model:
file: 'library/connector/terminal-spring_kf250-3.5/KF250-3.5-09P-2.step'
rotation: 0,0,0
position: 0,0,0
# top row
columnCount: 5
rowDX: 0
rowDY: 2.5
numbers: 1, 3, 5, 7, 9
# bottom row
columnCount1: 4
rowDX1: 0
rowDY1: -2.5
numbers1: 2, 4, 6, 8
pinout@10P-1: 1-10
schematic@10P-1:
suffix: -10P-1
symbol: connector
left: 1-10
housing@10P-1:
suffix: -10P-1
<<: *template
bodyWidth: 36.7
model:
file: 'library/connector/terminal-spring_kf250-3.5/KF250-3.5-10P-1.step'
rotation: 0,0,0
position: 0,0,0
# top row
columnCount: 5
rowDX: -1.75
rowDY: -2.5
numbers: 1, 3, 5, 7, 9
# bottom row
columnCount1: 5
rowDX1: 1.75
rowDY1: 2.5
numbers1: 2, 4, 6, 8, 10
pinout@10P-2: 1-10
schematic@10P-2:
suffix: -10P-2
symbol: connector
left: 1-10
housing@10P-2:
suffix: -10P-2
<<: *template
bodyWidth: 36.7
model:
file: 'library/connector/terminal-spring_kf250-3.5/KF250-3.5-10P-2.step'
rotation: 0,0,0
position: 0,0,0
# top row
columnCount: 5
rowDX: -1.75
rowDY: 2.5
numbers: 1, 3, 5, 7, 9
# bottom row
columnCount1: 5
rowDX1: 1.75
rowDY1: -2.5
numbers1: 2, 4, 6, 8, 10
pinout@11P-1: 1-11
schematic@11P-1:
suffix: -11P-1
symbol: connector
left: 1-11
housing@11P-1:
suffix: -11P-1
<<: *template
bodyWidth: 40.2
model:
file: 'library/connector/terminal-spring_kf250-3.5/KF250-3.5-11P-1.step'
rotation: 0,0,0
position: 0,0,0
# top row
columnCount: 6
rowDX: 0
rowDY: -2.5
numbers: 1, 3, 5, 7, 9, 11
# bottom row
columnCount1: 5
rowDX1: 0
rowDY1: 2.5
numbers1: 2, 4, 6, 8, 10
pinout@11P-2: 1-11
schematic@11P-2:
suffix: -11P-2
symbol: connector
left: 1-11
housing@11P-2:
suffix: -11P-2
<<: *template
bodyWidth: 40.2
model:
file: 'library/connector/terminal-spring_kf250-3.5/KF250-3.5-11P-2.step'
rotation: 0,0,0
position: 0,0,0
# top row
columnCount: 6
rowDX: 0
rowDY: 2.5
numbers: 1, 3, 5, 7, 9, 11
# bottom row
columnCount1: 5
rowDX1: 0
rowDY1: -2.5
numbers1: 2, 4, 6, 8, 10
pinout@12P-1: 1-12
schematic@12P-1:
suffix: -12P-1
symbol: connector
left: 1-12
housing@12P-1:
suffix: -12P-1
<<: *template
bodyWidth: 43.7
model:
file: 'library/connector/terminal-spring_kf250-3.5/KF250-3.5-12P-1.step'
rotation: 0,0,0
position: 0,0,0
# top row
columnCount: 6
rowDX: -1.75
rowDY: -2.5
numbers: 1, 3, 5, 7, 9, 11
# bottom row
columnCount1: 6
rowDX1: 1.75
rowDY1: 2.5
numbers1: 2, 4, 6, 8, 10, 12
pinout@12P-2: 1-12
schematic@12P-2:
suffix: -12P-2
symbol: connector
left: 1-12
housing@12P-2:
suffix: -12P-2
<<: *template
bodyWidth: 43.7
model:
file: 'library/connector/terminal-spring_kf250-3.5/KF250-3.5-12P-2.step'
rotation: 0,0,0
position: 0,0,0
# top row
columnCount: 6
rowDX: -1.75
rowDY: 2.5
numbers: 1, 3, 5, 7, 9, 11
# bottom row
columnCount1: 6
rowDX1: 1.75
rowDY1: -2.5
numbers1: 2, 4, 6, 8, 10, 12

File diff suppressed because it is too large Load Diff