From 8f0b2a1b0f9c931c6329e442144e3ebf114a8717 Mon Sep 17 00:00:00 2001 From: Patrick Sauvan Date: Mon, 1 Jul 2024 08:54:39 +0200 Subject: [PATCH] fix bug in "from_json method" (#248) * fix bug in "from_json method" Load_step_file method was called before Settings class was updated. * puto black --- src/geouned/GEOUNED/core.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/geouned/GEOUNED/core.py b/src/geouned/GEOUNED/core.py index 0125f4d5..b003639d 100644 --- a/src/geouned/GEOUNED/core.py +++ b/src/geouned/GEOUNED/core.py @@ -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"]: @@ -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"])