FIX: export both vrml and step files of generated footprints
This commit is contained in:
@@ -162,6 +162,7 @@ for foot in saved:
|
|||||||
|
|
||||||
# Export the step file
|
# 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 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
|
# Import the 3d model of the actual PCB
|
||||||
dummy = FOOTPRINT(pcb)
|
dummy = FOOTPRINT(pcb)
|
||||||
@@ -179,7 +180,9 @@ pcb.Add(dummy)
|
|||||||
# Save and export step of board + mating connectors
|
# Save and export step of board + mating connectors
|
||||||
SaveBoard("test/test.kicad_pcb", pcb)
|
SaveBoard("test/test.kicad_pcb", pcb)
|
||||||
final_model_path = sys.path[0] + "/../../libs/melon3d/" + foot_path + ".3dshapes/" + foot_name + ".wrl"
|
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 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
|
# Generate footprint
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user