bluemira.codes.fast_ctd.pipeline
Pipeline for converting STEP files to DAGMC models using fast_ctd.
Functions
|
|
|
Convert a STEP file to a DAGMC model using fast_ctd. |
Module Contents
- bluemira.codes.fast_ctd.pipeline._run_check_or_make_watertight(dagmc_file: pathlib.Path, output_h5m_file: pathlib.Path, *, check_or_make: Literal['check', 'make'])
- Parameters:
dagmc_file (pathlib.Path)
output_h5m_file (pathlib.Path)
check_or_make (Literal['check', 'make'])
- bluemira.codes.fast_ctd.pipeline.step_to_dagmc_pipeline(step_file_path: str | pathlib.Path, output_dagmc_model_path: str | pathlib.Path, comp_name_to_material_name_map: dict[str, str] | None = None, *, minimum_include_volume: float = 1.0, fix_step_to_brep_geometry: bool = False, merge_dist_tolerance: float = 0.001, lin_deflection_tol: float = 0.001, lin_deflection_is_absolute: bool = False, angular_deflection_tol: float = 0.5, run_make_watertight: bool = True, save_vtk_model: bool = True, enable_ext_debug_logging: bool = False, use_cached_files: bool = True, clean_up_cached: bool = True, **kwargs) list[str]
Convert a STEP file to a DAGMC model using fast_ctd.
- This function performs the following steps:
Convert the STEP file to a BREP file.
Create a CSV file mapping component names to materials.
Perform a merge of similar (imprinted) entities.
Facet/mesh the BREP model and convert it into DAGMC model using MOAB.
Make the DAGMC model watertight.
Clean up intermediate files.
- Parameters:
step_file_path (str | pathlib.Path) – The path to the input STEP file.
output_dagmc_model_path (str | pathlib.Path) – The path to the output DAGMC model file.
comp_name_to_material_name_map (dict[str, str] | None) – A dictionary mapping component names to material names. If None, the component names are used as the material names.
minimum_include_volume (float)
fix_step_to_brep_geometry (bool)
merge_dist_tolerance (float)
lin_deflection_tol (float)
lin_deflection_is_absolute (bool)
angular_deflection_tol (float)
run_make_watertight (bool)
save_vtk_model (bool)
enable_ext_debug_logging (bool)
use_cached_files (bool)
clean_up_cached (bool)
- Returns:
The list of material names used by the model.
- Return type:
list[str]
- Raises:
CalledProcessError – If make_watertight fails.