From 0d3f580be8e3e55c7aa02708ffb2f8c8716c72fa Mon Sep 17 00:00:00 2001 From: shimwell Date: Mon, 14 Oct 2024 13:00:35 +0100 Subject: [PATCH] moved sync to try except --- src/cad_to_dagmc/core.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/cad_to_dagmc/core.py b/src/cad_to_dagmc/core.py index 13af7dd..b29217a 100644 --- a/src/cad_to_dagmc/core.py +++ b/src/cad_to_dagmc/core.py @@ -193,15 +193,16 @@ def get_volumes(gmsh, assembly): try: # try in memory import volumes = gmsh.model.occ.importShapesNativePointer(assembly.wrapped._address()) + gmsh.model.occ.synchronize() except Exception as e: # fall back to writing file and reading it back in from cadquery import exporters - exporters.export(assembly, "temp.step") + exporters.export(assembly, "temp.step") # TODO see if brep file is possible volumes = gmsh.model.occ.importShapes("temp.step") - gmsh.model.occ.synchronize() + gmsh.model.occ.synchronize() return gmsh, volumes