fix spring terminal body

This commit is contained in:
King Kévin 2023-10-17 00:56:34 +02:00
parent 5526f452ce
commit d5b63448ff
2 changed files with 28 additions and 23 deletions

View File

@ -5,6 +5,11 @@
# number of possible pins # number of possible pins
variations = (2..12).to_a variations = (2..12).to_a
# X offset is hand adjusted
x = [0] * 13
x[3] = 5.1
x[8] = 11.5
puts "name: KF141V-2.54 puts "name: KF141V-2.54
description: spring loaded terminal, with lever, 0.1 in/2.54 mm pitch, vertical insertion description: spring loaded terminal, with lever, 0.1 in/2.54 mm pitch, vertical insertion
variations: #{variations.collect {|p| p.to_s + 'P'} * ', '} variations: #{variations.collect {|p| p.to_s + 'P'} * ', '}
@ -38,9 +43,9 @@ housing@#{v}P:
<<: *template <<: *template
bodyWidth: #{(2.54 * v + 2.54).round(2)} bodyWidth: #{(2.54 * v + 2.54).round(2)}
model: model:
file: 'library/connector/KF141V-2.54-#{v}P.step' file: 'library/connector/KF141V-2.54/KF141V-2.54-#{v}P.step'
rotation: -90,0,-180 rotation: -90,0,-180
position: 11.5,6.3,0 position: #{x[v]},6.3,0
columnCount: #{v} columnCount: #{v}
numbers: #{v.times.collect {|i| [i + 1]}.flatten * 2 * ', '} numbers: #{v.times.collect {|i| [i + 1]}.flatten * 2 * ', '}
" "

View File

@ -28,9 +28,9 @@ housing@2P:
<<: *template <<: *template
bodyWidth: 7.62 bodyWidth: 7.62
model: model:
file: 'library/connector/KF141V-2.54-2P.step' file: 'library/connector/KF141V-2.54/KF141V-2.54-2P.step'
rotation: -90,0,-180 rotation: -90,0,-180
position: 11.5,6.3,0 position: 0,6.3,0
columnCount: 2 columnCount: 2
numbers: 1, 2, 1, 2 numbers: 1, 2, 1, 2
@ -46,9 +46,9 @@ housing@3P:
<<: *template <<: *template
bodyWidth: 10.16 bodyWidth: 10.16
model: model:
file: 'library/connector/KF141V-2.54-3P.step' file: 'library/connector/KF141V-2.54/KF141V-2.54-3P.step'
rotation: -90,0,-180 rotation: -90,0,-180
position: 11.5,6.3,0 position: 5.1,6.3,0
columnCount: 3 columnCount: 3
numbers: 1, 2, 3, 1, 2, 3 numbers: 1, 2, 3, 1, 2, 3
@ -64,9 +64,9 @@ housing@4P:
<<: *template <<: *template
bodyWidth: 12.7 bodyWidth: 12.7
model: model:
file: 'library/connector/KF141V-2.54-4P.step' file: 'library/connector/KF141V-2.54/KF141V-2.54-4P.step'
rotation: -90,0,-180 rotation: -90,0,-180
position: 11.5,6.3,0 position: 0,6.3,0
columnCount: 4 columnCount: 4
numbers: 1, 2, 3, 4, 1, 2, 3, 4 numbers: 1, 2, 3, 4, 1, 2, 3, 4
@ -82,9 +82,9 @@ housing@5P:
<<: *template <<: *template
bodyWidth: 15.24 bodyWidth: 15.24
model: model:
file: 'library/connector/KF141V-2.54-5P.step' file: 'library/connector/KF141V-2.54/KF141V-2.54-5P.step'
rotation: -90,0,-180 rotation: -90,0,-180
position: 11.5,6.3,0 position: 0,6.3,0
columnCount: 5 columnCount: 5
numbers: 1, 2, 3, 4, 5, 1, 2, 3, 4, 5 numbers: 1, 2, 3, 4, 5, 1, 2, 3, 4, 5
@ -100,9 +100,9 @@ housing@6P:
<<: *template <<: *template
bodyWidth: 17.78 bodyWidth: 17.78
model: model:
file: 'library/connector/KF141V-2.54-6P.step' file: 'library/connector/KF141V-2.54/KF141V-2.54-6P.step'
rotation: -90,0,-180 rotation: -90,0,-180
position: 11.5,6.3,0 position: 0,6.3,0
columnCount: 6 columnCount: 6
numbers: 1, 2, 3, 4, 5, 6, 1, 2, 3, 4, 5, 6 numbers: 1, 2, 3, 4, 5, 6, 1, 2, 3, 4, 5, 6
@ -118,9 +118,9 @@ housing@7P:
<<: *template <<: *template
bodyWidth: 20.32 bodyWidth: 20.32
model: model:
file: 'library/connector/KF141V-2.54-7P.step' file: 'library/connector/KF141V-2.54/KF141V-2.54-7P.step'
rotation: -90,0,-180 rotation: -90,0,-180
position: 11.5,6.3,0 position: 0,6.3,0
columnCount: 7 columnCount: 7
numbers: 1, 2, 3, 4, 5, 6, 7, 1, 2, 3, 4, 5, 6, 7 numbers: 1, 2, 3, 4, 5, 6, 7, 1, 2, 3, 4, 5, 6, 7
@ -136,7 +136,7 @@ housing@8P:
<<: *template <<: *template
bodyWidth: 22.86 bodyWidth: 22.86
model: model:
file: 'library/connector/KF141V-2.54-8P.step' file: 'library/connector/KF141V-2.54/KF141V-2.54-8P.step'
rotation: -90,0,-180 rotation: -90,0,-180
position: 11.5,6.3,0 position: 11.5,6.3,0
columnCount: 8 columnCount: 8
@ -154,9 +154,9 @@ housing@9P:
<<: *template <<: *template
bodyWidth: 25.4 bodyWidth: 25.4
model: model:
file: 'library/connector/KF141V-2.54-9P.step' file: 'library/connector/KF141V-2.54/KF141V-2.54-9P.step'
rotation: -90,0,-180 rotation: -90,0,-180
position: 11.5,6.3,0 position: 0,6.3,0
columnCount: 9 columnCount: 9
numbers: 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9 numbers: 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9
@ -172,9 +172,9 @@ housing@10P:
<<: *template <<: *template
bodyWidth: 27.94 bodyWidth: 27.94
model: model:
file: 'library/connector/KF141V-2.54-10P.step' file: 'library/connector/KF141V-2.54/KF141V-2.54-10P.step'
rotation: -90,0,-180 rotation: -90,0,-180
position: 11.5,6.3,0 position: 0,6.3,0
columnCount: 10 columnCount: 10
numbers: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 numbers: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10
@ -190,9 +190,9 @@ housing@11P:
<<: *template <<: *template
bodyWidth: 30.48 bodyWidth: 30.48
model: model:
file: 'library/connector/KF141V-2.54-11P.step' file: 'library/connector/KF141V-2.54/KF141V-2.54-11P.step'
rotation: -90,0,-180 rotation: -90,0,-180
position: 11.5,6.3,0 position: 0,6.3,0
columnCount: 11 columnCount: 11
numbers: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 numbers: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11
@ -208,8 +208,8 @@ housing@12P:
<<: *template <<: *template
bodyWidth: 33.02 bodyWidth: 33.02
model: model:
file: 'library/connector/KF141V-2.54-12P.step' file: 'library/connector/KF141V-2.54/KF141V-2.54-12P.step'
rotation: -90,0,-180 rotation: -90,0,-180
position: 11.5,6.3,0 position: 0,6.3,0
columnCount: 12 columnCount: 12
numbers: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 numbers: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12