Skip to content

Commit

Permalink
fix bug in "from_json method" (#248)
Browse files Browse the repository at this point in the history
* fix bug in "from_json method"

Load_step_file method was called before Settings class was updated.

* puto black
  • Loading branch information
psauvan authored Jul 1, 2024
1 parent c14ad1d commit 8f0b2a1
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/geouned/GEOUNED/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,6 @@ def from_json(cls, filename: str):

cad_to_csg = cls()

cad_to_csg.load_step_file(**config["load_step_file"])

for key in config.keys():

if key in ["load_step_file", "export_csg"]:
Expand All @@ -254,6 +252,7 @@ def from_json(cls, filename: str):
f"Invalid key '{key}' found in config file {filename}. Acceptable key names are 'load_step_file', 'export_csg', 'Settings', 'Parameters', 'Tolerances' and 'NumericFormat'"
)

cad_to_csg.load_step_file(**config["load_step_file"])
cad_to_csg.start()
if "export_csg" in config.keys():
cad_to_csg.export_csg(**config["export_csg"])
Expand Down

0 comments on commit 8f0b2a1

Please sign in to comment.