Skip to main content

Find the bounding box and other related properties of a DAGMC h5m file

Project description

N|Python

CI with install

PyPI anaconda-publish

Features

Finds the bounding box of a DAGMC geometry file.

The bounding box is a pair of coordinates that define the upper right and lower left corner of the geometry.

This which is particularly useful when assigning a regular mesh tally over the entire DAGMC geometry.

Installation

Using Pip

pip install dagmc_bounding_box

Using Conda

conda install -c fusion-energy -c conda-forge dagmc_bounding_box

Usage

Find the bounding box

from dagmc_bounding_box import DagmcBoundingBox
my_corners = DagmcBoundingBox("dagmc.h5m").corners()
print(my_corners)
>>> ((-100, -100, -100), (100, 100, 100))

Extend the bounding box

from dagmc_bounding_box import DagmcBoundingBox
my_corners = DagmcBoundingBox("dagmc.h5m").corners(extend=(10, 5, 2)
print(my_corners)
>>> ((-110, -105, -102), (110, 105, 102))

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dagmc_bounding_box-0.2.1.tar.gz (13.7 kB view hashes)

Uploaded Source

Built Distribution

dagmc_bounding_box-0.2.1-py3-none-any.whl (4.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page