修改数据格式和双面板优化
This commit is contained in:
@@ -49,15 +49,18 @@ def load_data(filename: str):
|
||||
except:
|
||||
part_data = pd.DataFrame(columns=part_col)
|
||||
|
||||
|
||||
for _, data in step_data.iterrows():
|
||||
if data.part not in part_data.part.values:
|
||||
raise Exception("unregistered component: " + data.part)
|
||||
|
||||
if coordinate == "UPPER RIGHT" or coordinate == "LOWER RIGHT":
|
||||
data.x = -data.x
|
||||
if coordinate == "UPPER LEFT" or coordinate == "UPPER RIGHT":
|
||||
data.y = data.y
|
||||
data.x, data.y = data.x + origin.x, data.y + origin.y
|
||||
if coordinate == "UPPER RIGHT" or coordinate == "LOWER RIGHT":
|
||||
step_data['x'] = -step_data['x']
|
||||
if coordinate == "UPPER LEFT" or coordinate == "UPPER RIGHT":
|
||||
step_data['y'] = -step_data['y']
|
||||
|
||||
step_data['x'] += origin.x
|
||||
step_data['y'] += origin.y
|
||||
|
||||
return part_data, step_data
|
||||
|
||||
|
||||
Reference in New Issue
Block a user