Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Making use of faster binary brep export #111

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/cad_to_dagmc/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,9 +209,10 @@ def get_volumes(gmsh, assembly, method="file", scale_factor=1.0):
elif method == "file":
with tempfile.NamedTemporaryFile(suffix=".brep") as temp_file:
if isinstance(assembly, cq.Assembly):
assembly.toCompound().exportBrep(temp_file.name)
# binary brep export (Bin), requires cq 2.5.2 or greater but is faster than exportBrep
assembly.toCompound().exportBin(temp_file.name)
shimwell marked this conversation as resolved.
Show resolved Hide resolved
else:
assembly.exportBrep(temp_file.name)
assembly.exportBin(temp_file.name)
volumes = gmsh.model.occ.importShapes(temp_file.name)

# updating the model to ensure the entities in the geometry are found
Expand Down
Loading