Merge branch 'dwn_chk_app' into dev

This commit is contained in:
andrewc
2025-06-30 19:13:42 +10:00
38 changed files with 1910 additions and 559 deletions

View File

@@ -57,14 +57,17 @@ for item in pcb.GetDrawings():
foot = foot_sp[0].strip()
offset = (0,0)
# Optional offset tuple
if len(foot_sp) == 2:
if len(foot_sp) > 1:
print("Foot sp: ", foot_sp)
offset = foot_sp[1].strip(" ()").split(',')
print("Offset: ", offset)
offset[0] = FromMM(float(offset[0]))
offset[1] = FromMM(float(offset[1]))
disable_model = False
if len(foot_sp) > 2:
disable_model = eval(foot_sp[2])
new_foots[ref] = [foot, offset]
new_foots[ref] = [foot, offset, disable_model]
# pins = sp[1]
# pin_refs = []
# for pin in pins.split(','):
@@ -130,6 +133,9 @@ for foot in saved:
cent_diff = orig_cent - new_cent
load_foot.SetX(load_foot.GetX() + cent_diff.x + vals[1][0])
load_foot.SetY(load_foot.GetY() + cent_diff.y + vals[1][1])
# Disable model if applicable
if vals[2]:
load_foot.Models().clear()
# Flip the net assignments of the pads
pad_map = {}
for pad in load_foot.Pads():

View File

@@ -1,4 +1,5 @@
import csv
import os
import sys
from copy import deepcopy
from glob import glob
@@ -31,8 +32,9 @@ print("bottom Orig: ", bottomOrig)
output_dir = deepcopy(pcb_dir)
csv_files = glob(output_dir + "/*.csv")
print("CSV Files: ", csv_files)
if len(csv_files) < 1:
output_dir = "Fabrication/" + output_dir
output_dir = os.path.join(os.environ.get('CI_PROJECT_DIR', ''), '') + "Fabrication/" + output_dir
csv_files = glob(output_dir + "/*.csv")
input = next(filter(lambda f: KI_POS_SUFFIX in f, csv_files))