A minimal package that uses CadQuery functionality to convert Cad geometry to DAGMC h5m files
This particular method of producing DAGMC compatible h5m files from CAD geometry is intended to convert STP files or CadQuery objects to h5m file.
One unique feature of this package is the ability to combine STP files with CadQuery objects. This allows for the addition of parametric geometry to static geometry.
Creates a new empty Conda environment and activate it
conda create --name new_env python=3.9
conda activate new_env
Installs cad_to_dagmc and dependencies
conda install -c fusion-energy -c cadquery -c conda-forge cad_to_dagmc
Creates a new empty Conda environment and activate it
conda create --name new_env python=3.9
conda activate new_env
Installs Mamba
conda install -c conda-forge mamba
Installs cad_to_dagmc and dependencies
mamba install -c fusion-energy -c cadquery -c conda-forge cad_to_dagmc
You will need to install some dependencies that are not available via PyPi. This example uses mamba but conda could also be used.
conda install -c conda-forge mamba
mamba install -c conda-forge moab
mamba install -c conda-forge gmsh
mamba install -c conda-forge python-gmsh
mamba install -c cadquery -c conda-forge cadquery=master
Then you can install the cad_to_dagmc package with pip
pip install cad_to_dagmc
To use the h5m geometry you will need a transport code with DAGMC enabled such as OpenMC. Just to note that currently the conda install for CadQuery and OpenMC can't be installed in the same conda environment. A work around for this is to create the h5m geometry in one conda environment and simulate with OpenMC in another conda environment.
For examples see the examples folder