Skip to content

Commit

Permalink
simplify gmsh import (as suggested by akoen)
Browse files Browse the repository at this point in the history
related to openmsr#59
  • Loading branch information
ebknudsen committed Oct 9, 2023
1 parent dd30e0d commit 37aa015
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/CAD_to_OpenMC/assemblymesher_gmsh.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,7 @@ def _cq_solids_to_gmsh(self):
#create a compund cq solid from entities
solids=[e.solid for e in self.gmsh_mesher_entities]
compound=cq.Compound.makeCompound(solids)
with tempfile.TemporaryDirectory() as td:
outpath=os.path.join(td,'export.'+self.IntermediateLayer)
compound.exportBrep(outpath)
vols=gmsh.model.occ.importShapes(outpath)
vols = gmsh.model.occ.importShapesNativePointer(compound)
gmsh.model.occ.synchronize()
self._reorder()

Expand Down

0 comments on commit 37aa015

Please sign in to comment.