summaryrefslogtreecommitdiff
path: root/footprint_generator.py
diff options
context:
space:
mode:
authorjaseg <git@jaseg.de>2023-10-06 14:01:21 +0200
committerjaseg <git@jaseg.de>2023-10-06 14:01:21 +0200
commit3d84cb48227217a6a480f5021f67fb798f6015a9 (patch)
treec45dff84b9e17a6341d21558b088f2a1edf496ae /footprint_generator.py
parentf439d10280df7544cfc4fe52bed98ab37d0a1171 (diff)
downloadkimesh-3d84cb48227217a6a480f5021f67fb798f6015a9.tar.gz
kimesh-3d84cb48227217a6a480f5021f67fb798f6015a9.tar.bz2
kimesh-3d84cb48227217a6a480f5021f67fb798f6015a9.zip
Add mesh direction indicator to footprints
Diffstat (limited to 'footprint_generator.py')
-rwxr-xr-xfootprint_generator.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/footprint_generator.py b/footprint_generator.py
index 731f6e8..af98d41 100755
--- a/footprint_generator.py
+++ b/footprint_generator.py
@@ -44,6 +44,25 @@ def generate_footprints(output_dir, trace_width, clearance, conductors):
layer='F.Cu',
fill=footprints.Atom.solid)
for i in range(2*conductors)],
+ lines=[footprints.Line(footprints.XYCoord(pitch/2 + trace/2 + 0.25 + x1, y1),
+ footprints.XYCoord(pitch/2 + trace/2 + 0.25 + x2, y2),
+ 'F.Fab',
+ stroke=footprints.Stroke(width=0.25))
+ for x1, y1, x2, y2 in [
+ (0, pitch * (conductors - 0.5) + trace/2 - 0.25/2,
+ 0, pitch * (-conductors + 0.5) - trace/2 + 0.25/2),
+ (0, 0, conductors * pitch, 0),
+ (conductors * pitch, 0, conductors * pitch/2, conductors * pitch/2),
+ (conductors * pitch, 0, conductors * pitch/2, -conductors * pitch/2),
+ ]],
+ texts=[
+ footprints.Text(
+ text='Mesh',
+ at=footprints.AtPos(pitch/2 + trace/2 + 0.25 + conductors * pitch + 0.5, 0),
+ layer='F.Fab',
+ effects=footprints.TextEffect(justify=footprints.Justify(h=footprints.Atom.left))
+ )
+ ],
pads=[
footprints.Pad(
number=f'{i+1}',