FIX: export both vrml and step files of generated footprints

This commit is contained in:
ac
2025-05-29 13:29:57 +10:00
parent f17468f13b
commit 266fad8b9c

View File

@@ -162,6 +162,7 @@ for foot in saved:
# Export the step file
os.system("kicad-cli pcb export vrml --units 'tenths' -f --user-origin " + str(ToMM(brd_cent.x)) + "x" + str(ToMM(brd_cent.y)) + "mm -o /tmp/dummy.wrl " + sys.argv[1])
os.system("kicad-cli pcb export step -f --subst-models --user-origin " + str(ToMM(brd_cent.x)) + "x" + str(ToMM(brd_cent.y)) + "mm -o /tmp/dummy.stp " + sys.argv[1])
# Import the 3d model of the actual PCB
dummy = FOOTPRINT(pcb)
@@ -179,7 +180,9 @@ pcb.Add(dummy)
# Save and export step of board + mating connectors
SaveBoard("test/test.kicad_pcb", pcb)
final_model_path = sys.path[0] + "/../../libs/melon3d/" + foot_path + ".3dshapes/" + foot_name + ".wrl"
final_model_path_stp = sys.path[0] + "/../../libs/melon3d/" + foot_path + ".3dshapes/" + foot_name + ".stp"
os.system("kicad-cli pcb export vrml -f --units 'mm' --user-origin " + str(ToMM(brd_cent.x)) + "x" + str(ToMM(brd_cent.y)) + "mm -o " + final_model_path + " test/test.kicad_pcb")
os.system("kicad-cli pcb export step -f --subst-models --user-origin " + str(ToMM(brd_cent.x)) + "x" + str(ToMM(brd_cent.y)) + "mm -o " + final_model_path_stp + " test/test.kicad_pcb")
# Generate footprint