stellarmesh.DAGMCModel

class DAGMCModel(core_or_file: str | bytes | PathLike | Core)Source

DAGMC Model.

static check_overlap(input_filename: str | bytes | PathLike, binary_path: str = 'overlap_check', points_per_edge: int = 0, num_threads: int = 1) boolSource

Check mesh for overlaps.

Parameters:
  • input_filename – Input .h5m filename.

  • binary_path – Path to overlap_check or default to find in path. Defaults to

  • "overlap_check".

  • points_per_edge – Number of evenly-spaced points to test on each triangle edge. If points_per_edge=0, only triangle vertex locations are checked. Defaults to 0.

  • num_threads – Number of threads.

Returns:

True if no overlaps are found, else False.

static check_watertight(input_filename: str | bytes | PathLike, binary_path: str = 'check_watertight')Source

Check mesh for watertightness.

Parameters:
  • input_filename – Input .h5m filename.

  • binary_path – Path to overlap_check or default to find in path. Defaults to

  • "check_watertight".

Returns:

True if mesh is watertight, else False.

create_curve(global_id: int | None = None) DAGMCCurveSource

Create new curve.

Parameters:

global_id – Global ID.

Returns:

curve object.

create_group(group_name: str) DAGMCGroupSource

Create new group.

Parameters:

group_name – Name assigned to the new group

Returns:

Group object.

create_surface(global_id: int | None = None) DAGMCSurfaceSource

Create new surface.

Parameters:

global_id – Global ID.

Returns:

Surface object.

create_volume(global_id: int | None = None) DAGMCVolumeSource

Create new volume.

Parameters:

global_id – Global ID.

Returns:

Volume object.

property curves: list[DAGMCCurve]Source

Get curves in this model.

Returns:

Curve.

classmethod from_mesh(mesh: Mesh) DAGMCModelSource

Compose DAGMC MOAB .h5m file from mesh.

Parameters:

mesh – Mesh from which to build DAGMC geometry.

property groups: list[DAGMCGroup]Source

Get list of groups.

classmethod make_from_mesh(mesh: Mesh) DAGMCModelSource

Compose DAGMC MOAB .h5m file from mesh.

Parameters:

mesh – Mesh from which to build DAGMC geometry.

static make_watertight(input_filename: str | bytes | PathLike, output_filename: str | bytes | PathLike, binary_path: str = 'make_watertight') boolSource

Make mesh watertight.

Parameters:
  • input_filename – Input .h5m filename.

  • output_filename – Output watertight .h5m filename.

  • binary_path – Path to make_watertight or default to find in path. Defaults to

  • "make_watertight".

property surfaces: list[DAGMCSurface]Source

Get surfaces in this model.

Returns:

Surfaces.

property volumes: list[DAGMCVolume]Source

Get volumes in this model.

Returns:

Volumes.