rename
This commit is contained in:
@@ -124,7 +124,7 @@ class Panel:
|
|||||||
txt =\
|
txt =\
|
||||||
"PNL (x,y): (" + float_to_str_mm(self.dims[0],4) + ", " + float_to_str_mm(self.dims[1],4) + ")\n" +\
|
"PNL (x,y): (" + float_to_str_mm(self.dims[0],4) + ", " + float_to_str_mm(self.dims[1],4) + ")\n" +\
|
||||||
"SPA (x,y): (" + float_to_str_mm(self.spacing[0],2) + ", " + float_to_str_mm(self.spacing[1],2) +")\n" +\
|
"SPA (x,y): (" + float_to_str_mm(self.spacing[0],2) + ", " + float_to_str_mm(self.spacing[1],2) +")\n" +\
|
||||||
"BRD (x,y),r: (" + float_to_str_mm(board.dims[0],4) + ", " + float_to_str_mm(board.dims[1],4) + "), " +\
|
"BRD (x,y): (" + float_to_str_mm(board.dims[0],4) + ", " + float_to_str_mm(board.dims[1],4) + "), " +\
|
||||||
"FIDS (x,y) : " + board.fids
|
"FIDS (x,y) : " + board.fids
|
||||||
self.text.update(Text(txt, txt_loc[1], txt_off[1], txt_rot, just=txt_just[1]).to_dict(1))
|
self.text.update(Text(txt, txt_loc[1], txt_off[1], txt_rot, just=txt_just[1]).to_dict(1))
|
||||||
|
|
||||||
@@ -168,9 +168,9 @@ if __name__ == '__main__':
|
|||||||
json_str = json_file.read()
|
json_str = json_file.read()
|
||||||
panel_json = json.loads(json_str)
|
panel_json = json.loads(json_str)
|
||||||
|
|
||||||
frame = Frame(panel_json["framing"]["type"], panel_json["framing"]["width"], panel_json["framing"]["space"])
|
frame = Frame(panel_json["framing"]["type"], panel_json["framing"]["width"], panel_json["framing"]["slotwidth"])
|
||||||
board = Board(fids, panel_json["layout"].get("rotation", "0deg"), (sourceArea.GetWidth()/PCB_DIV_MM, sourceArea.GetHeight()/PCB_DIV_MM))
|
board = Board(fids, panel_json["layout"].get("rotation", "0deg"), (sourceArea.GetWidth()/PCB_DIV_MM, sourceArea.GetHeight()/PCB_DIV_MM))
|
||||||
panel = Panel(panel_json["layout"]["space"], (int(panel_json["layout"]["rows"]), int(panel_json["layout"]["cols"])), frame, board)
|
panel = Panel(panel_json["layout"]["hspace"], (int(panel_json["layout"]["rows"]), int(panel_json["layout"]["cols"])), frame, board)
|
||||||
|
|
||||||
import pathlib
|
import pathlib
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user