Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
pub
libraries
Commits
1e33378b
Commit
1e33378b
authored
Jul 22, 2021
by
Neil Gershenfeld
Browse files
wip
parent
609d76a8
Pipeline
#12134
passed with stage
in 2 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
python/pcb.py
View file @
1e33378b
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
# usage:
# usage:
# pcb.py | frep.py [dpi [filename]]
# pcb.py | frep.py [dpi [filename]]
#
#
# Neil Gershenfeld
1/5
/21
# Neil Gershenfeld
7/22
/21
#
#
# This work may be reproduced, modified, distributed,
# This work may be reproduced, modified, distributed,
# performed, and displayed for any purpose, but must
# performed, and displayed for any purpose, but must
...
@@ -1112,6 +1112,41 @@ class SJ(part):
...
@@ -1112,6 +1112,41 @@ class SJ(part):
# discretes
# discretes
############################################################
############################################################
class
ST4EB
(
part
):
#
# Nidec Copal ST4ETB103 trimpot
#
def
__init__
(
self
,
value
=
''
):
pad1
=
cube
(
-
.
032
,.
032
,
-
.
039
,.
039
,
0
,
0
)
pad2
=
cube
(
-
.
039
,.
039
,
-
.
039
,.
039
,
0
,
0
)
self
.
value
=
value
self
.
labels
=
[]
self
.
pad
=
[
point
(
0
,
0
,
0
)]
self
.
shape
=
translate
(
pad1
,
-
.
046
,
-
.
118
,
0
)
self
.
pad
.
append
(
point
(
-
.
046
,
-
.
118
,
0
))
self
.
shape
=
add
(
self
.
shape
,
translate
(
pad1
,.
046
,
-
.
118
,
0
))
self
.
pad
.
append
(
point
(.
046
,
-
.
118
,
0
))
self
.
shape
=
add
(
self
.
shape
,
translate
(
pad2
,
0
,.
118
,
0
))
self
.
pad
.
append
(
point
(
0
,.
118
,
0
))
class
C_FND
(
part
):
#
# Panasonic FN series, size code D
# 100uF: EEE-FN1E101UL
#
def
__init__
(
self
,
value
=
''
):
pad
=
cube
(
-
.
032
,.
032
,
-
.
06
,.
06
,
0
,
0
)
self
.
value
=
value
self
.
labels
=
[]
self
.
pad
=
[
point
(
0
,
0
,
0
)]
self
.
shape
=
translate
(
pad
,
0
,.
11
,
0
)
self
.
pad
.
append
(
point
(
0
,.
11
,
0
))
self
.
labels
.
append
(
self
.
text
(
self
.
pad
[
-
1
].
x
,
self
.
pad
[
-
1
].
y
,
self
.
pad
[
-
1
].
z
,
'+'
,
angle
=
90
))
self
.
shape
=
add
(
self
.
shape
,
translate
(
pad
,
0
,
-
.
11
,
0
))
self
.
pad
.
append
(
point
(
0
,
-
.
11
,
0
))
self
.
labels
.
append
(
self
.
text
(
self
.
pad
[
-
1
].
x
,
self
.
pad
[
-
1
].
y
,
self
.
pad
[
-
1
].
z
,
'-'
,
angle
=
90
))
pad_0402
=
cube
(
-
.
0175
,.
0175
,
-
.
014
,.
014
,
0
,
0
)
pad_0402
=
cube
(
-
.
0175
,.
0175
,
-
.
014
,.
014
,
0
,
0
)
class
R_0402
(
part
):
class
R_0402
(
part
):
...
@@ -1189,6 +1224,62 @@ class choke(part):
...
@@ -1189,6 +1224,62 @@ class choke(part):
# connectors
# connectors
############################################################
############################################################
class
header_2H
(
part
):
#
# 2x1x0.1 cable header
# Sullins GEC36SBSN-M89
#
def
__init__
(
self
,
value
=
''
):
self
.
value
=
value
self
.
pad
=
[
point
(
0
,
0
,
0
)]
self
.
labels
=
[]
#
# pin 1
#
self
.
shape
=
translate
(
pad_header
,
0
,.
05
,
0
)
self
.
pad
.
append
(
point
(
0
,.
05
,
0
))
self
.
labels
.
append
(
self
.
text
(
self
.
pad
[
-
1
].
x
,
self
.
pad
[
-
1
].
y
,
self
.
pad
[
-
1
].
z
,
'1'
))
#
# pin 2
#
self
.
shape
=
add
(
self
.
shape
,
translate
(
pad_header
,
0
,
-
.
05
,
0
))
self
.
pad
.
append
(
point
(
0
,
-
.
05
,
0
))
self
.
labels
.
append
(
self
.
text
(
self
.
pad
[
-
1
].
x
,
self
.
pad
[
-
1
].
y
,
self
.
pad
[
-
1
].
z
,
'2'
))
class
header_4H
(
part
):
#
# 4x1x0.1 cable header
# Sullins GEC36SBSN-M89
#
def
__init__
(
self
,
value
=
''
):
self
.
value
=
value
self
.
pad
=
[
point
(
0
,
0
,
0
)]
self
.
labels
=
[]
#
# pin 1
#
self
.
shape
=
translate
(
pad_header
,
0
,.
15
,
0
)
self
.
pad
.
append
(
point
(
0
,.
15
,
0
))
self
.
labels
.
append
(
self
.
text
(
self
.
pad
[
-
1
].
x
,
self
.
pad
[
-
1
].
y
,
self
.
pad
[
-
1
].
z
,
'1'
))
#
# pin 2
#
self
.
shape
=
add
(
self
.
shape
,
translate
(
pad_header
,
0
,.
05
,
0
))
self
.
pad
.
append
(
point
(
0
,.
05
,
0
))
self
.
labels
.
append
(
self
.
text
(
self
.
pad
[
-
1
].
x
,
self
.
pad
[
-
1
].
y
,
self
.
pad
[
-
1
].
z
,
'2'
))
#
# pin 3
#
self
.
shape
=
add
(
self
.
shape
,
translate
(
pad_header
,
0
,
-
.
05
,
0
))
self
.
pad
.
append
(
point
(
0
,
-
.
05
,
0
))
self
.
labels
.
append
(
self
.
text
(
self
.
pad
[
-
1
].
x
,
self
.
pad
[
-
1
].
y
,
self
.
pad
[
-
1
].
z
,
'3'
))
#
# pin 4
#
self
.
shape
=
add
(
self
.
shape
,
translate
(
pad_header
,
0
,
-
0.15
,
0
))
self
.
pad
.
append
(
point
(
0
,
-
.
15
,
0
))
self
.
labels
.
append
(
self
.
text
(
self
.
pad
[
-
1
].
x
,
self
.
pad
[
-
1
].
y
,
self
.
pad
[
-
1
].
z
,
'4'
))
class
header_NEO_6M
(
part
):
class
header_NEO_6M
(
part
):
#
#
# NEO_6M GPS module
# NEO_6M GPS module
...
@@ -4526,6 +4617,125 @@ class XTAL_CSM_7(part):
...
@@ -4526,6 +4617,125 @@ class XTAL_CSM_7(part):
# diodes, transistors, regulators, sensors
# diodes, transistors, regulators, sensors
############################################################
############################################################
class
DRV8428_HTSSOP
(
part
):
#
# TI DRV8428PWPR stepper driver
# HTSSOP package
#
def
__init__
(
self
,
value
=
''
):
self
.
value
=
value
self
.
pad
=
[
point
(
0
,
0
,
0
)]
self
.
labels
=
[]
d
=
0.12
w
=
0.029
h
=
0.0053
p
=
0.02559
pad
=
cube
(
-
w
,
w
,
-
h
,
h
,
0
,
0
)
s
=
0.003
#
# pin 1
#
self
.
shape
=
translate
(
pad
,
-
d
,
3.5
*
p
,
0
)
self
.
shape
=
add
(
self
.
shape
,
cylinder
(
-
d
-
w
,
3.5
*
p
,
0
,
0
,
h
))
self
.
pad
.
append
(
point
(
-
d
,
3.5
*
p
,
0
))
self
.
labels
.
append
(
self
.
text
(
self
.
pad
[
-
1
].
x
,
self
.
pad
[
-
1
].
y
,
self
.
pad
[
-
1
].
z
,
'.VM'
,
line
=
s
))
#
# pin 2
#
self
.
shape
=
add
(
self
.
shape
,
translate
(
pad
,
-
d
,
2.5
*
p
,
0
))
self
.
pad
.
append
(
point
(
-
d
,
2.5
*
p
,
0
))
self
.
labels
.
append
(
self
.
text
(
self
.
pad
[
-
1
].
x
,
self
.
pad
[
-
1
].
y
,
self
.
pad
[
-
1
].
z
,
'PGND'
,
line
=
s
))
#
# pin 3
#
self
.
shape
=
add
(
self
.
shape
,
translate
(
pad
,
-
d
,
1.5
*
p
,
0
))
self
.
pad
.
append
(
point
(
-
d
,
1.5
*
p
,
0
))
self
.
labels
.
append
(
self
.
text
(
self
.
pad
[
-
1
].
x
,
self
.
pad
[
-
1
].
y
,
self
.
pad
[
-
1
].
z
,
'AOUT1'
,
line
=
s
))
#
# pin 4
#
self
.
shape
=
add
(
self
.
shape
,
translate
(
pad
,
-
d
,.
5
*
p
,
0
))
self
.
pad
.
append
(
point
(
-
d
,.
5
*
p
,
0
))
self
.
labels
.
append
(
self
.
text
(
self
.
pad
[
-
1
].
x
,
self
.
pad
[
-
1
].
y
,
self
.
pad
[
-
1
].
z
,
'AOUT2'
,
line
=
s
))
#
# pin 5
#
self
.
shape
=
add
(
self
.
shape
,
translate
(
pad
,
-
d
,
-
.
5
*
p
,
0
))
self
.
pad
.
append
(
point
(
-
d
,
-
.
5
*
p
,
0
))
self
.
labels
.
append
(
self
.
text
(
self
.
pad
[
-
1
].
x
,
self
.
pad
[
-
1
].
y
,
self
.
pad
[
-
1
].
z
,
'BOUT2'
,
line
=
s
))
#
# pin 6
#
self
.
shape
=
add
(
self
.
shape
,
translate
(
pad
,
-
d
,
-
1.5
*
p
,
0
))
self
.
pad
.
append
(
point
(
-
d
,
-
1.5
*
p
,
0
))
self
.
labels
.
append
(
self
.
text
(
self
.
pad
[
-
1
].
x
,
self
.
pad
[
-
1
].
y
,
self
.
pad
[
-
1
].
z
,
'BOUT1'
,
line
=
s
))
#
# pin 7
#
self
.
shape
=
add
(
self
.
shape
,
translate
(
pad
,
-
d
,
-
2.5
*
p
,
0
))
self
.
pad
.
append
(
point
(
-
d
,
-
2.5
*
p
,
0
))
self
.
labels
.
append
(
self
.
text
(
self
.
pad
[
-
1
].
x
,
self
.
pad
[
-
1
].
y
,
self
.
pad
[
-
1
].
z
,
'GND'
,
line
=
s
))
#
# pin 8
#
self
.
shape
=
add
(
self
.
shape
,
translate
(
pad
,
-
d
,
-
3.5
*
p
,
0
))
self
.
pad
.
append
(
point
(
-
d
,
-
3.5
*
p
,
0
))
self
.
labels
.
append
(
self
.
text
(
self
.
pad
[
-
1
].
x
,
self
.
pad
[
-
1
].
y
,
self
.
pad
[
-
1
].
z
,
'DVDD'
,
line
=
s
))
#
# pin 9
#
self
.
shape
=
add
(
self
.
shape
,
translate
(
pad
,
d
,
-
3.5
*
p
,
0
))
self
.
pad
.
append
(
point
(
d
,
-
3.5
*
p
,
0
))
self
.
labels
.
append
(
self
.
text
(
self
.
pad
[
-
1
].
x
,
self
.
pad
[
-
1
].
y
,
self
.
pad
[
-
1
].
z
,
'VREF'
,
line
=
s
))
#
# pin 10
#
self
.
shape
=
add
(
self
.
shape
,
translate
(
pad
,
d
,
-
2.5
*
p
,
0
))
self
.
pad
.
append
(
point
(
d
,
-
2.5
*
p
,
0
))
self
.
labels
.
append
(
self
.
text
(
self
.
pad
[
-
1
].
x
,
self
.
pad
[
-
1
].
y
,
self
.
pad
[
-
1
].
z
,
'M0'
,
line
=
s
))
#
# pin 11
#
self
.
shape
=
add
(
self
.
shape
,
translate
(
pad
,
d
,
-
1.5
*
p
,
0
))
self
.
pad
.
append
(
point
(
d
,
-
1.5
*
p
,
0
))
self
.
labels
.
append
(
self
.
text
(
self
.
pad
[
-
1
].
x
,
self
.
pad
[
-
1
].
y
,
self
.
pad
[
-
1
].
z
,
'DECAY'
,
line
=
s
))
#
# pin 12
#
self
.
shape
=
add
(
self
.
shape
,
translate
(
pad
,
d
,
-
.
5
*
p
,
0
))
self
.
pad
.
append
(
point
(
d
,
-
.
5
*
p
,
0
))
self
.
labels
.
append
(
self
.
text
(
self
.
pad
[
-
1
].
x
,
self
.
pad
[
-
1
].
y
,
self
.
pad
[
-
1
].
z
,
'M1'
,
line
=
s
))
#
# pin 13
#
self
.
shape
=
add
(
self
.
shape
,
translate
(
pad
,
d
,.
5
*
p
,
0
))
self
.
pad
.
append
(
point
(
d
,.
5
*
p
,
0
))
self
.
labels
.
append
(
self
.
text
(
self
.
pad
[
-
1
].
x
,
self
.
pad
[
-
1
].
y
,
self
.
pad
[
-
1
].
z
,
'STEP'
,
line
=
s
))
#
# pin 14
#
self
.
shape
=
add
(
self
.
shape
,
translate
(
pad
,
d
,
1.5
*
p
,
0
))
self
.
pad
.
append
(
point
(
d
,
1.5
*
p
,
0
))
self
.
labels
.
append
(
self
.
text
(
self
.
pad
[
-
1
].
x
,
self
.
pad
[
-
1
].
y
,
self
.
pad
[
-
1
].
z
,
'DIR'
,
line
=
s
))
#
# pin 15
#
self
.
shape
=
add
(
self
.
shape
,
translate
(
pad
,
d
,
2.5
*
p
,
0
))
self
.
pad
.
append
(
point
(
d
,
2.5
*
p
,
0
))
self
.
labels
.
append
(
self
.
text
(
self
.
pad
[
-
1
].
x
,
self
.
pad
[
-
1
].
y
,
self
.
pad
[
-
1
].
z
,
'EN'
,
line
=
s
))
#
# pin 16
#
self
.
shape
=
add
(
self
.
shape
,
translate
(
pad
,
d
,
3.5
*
p
,
0
))
self
.
pad
.
append
(
point
(
d
,
3.5
*
p
,
0
))
self
.
labels
.
append
(
self
.
text
(
self
.
pad
[
-
1
].
x
,
self
.
pad
[
-
1
].
y
,
self
.
pad
[
-
1
].
z
,
'SLEEP'
,
line
=
s
))
#
# pin 17
#
self
.
shape
=
add
(
self
.
shape
,
translate
(
cube
(
-
.
06
,.
06
,
-
.
09
,.
09
,
0
,
0
),
0
,
0
,
0
))
self
.
pad
.
append
(
point
(
0
,
0
,
0
))
self
.
labels
.
append
(
self
.
text
(
self
.
pad
[
-
1
].
x
,
self
.
pad
[
-
1
].
y
,
self
.
pad
[
-
1
].
z
,
'GND'
,
line
=
s
))
class
LED_3014_1100
(
part
):
class
LED_3014_1100
(
part
):
#
#
# Luminus MP-3014-1100-50-80
# Luminus MP-3014-1100-50-80
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment