https://github.com/fusion-energy/dagmc_bounding_box
Finds the bounding box and related properties of a DAGMC geometry
https://github.com/fusion-energy/dagmc_bounding_box
bounding box coordinates corners dagmc openmc
Last synced: 3 months ago
JSON representation
Finds the bounding box and related properties of a DAGMC geometry
- Host: GitHub
- URL: https://github.com/fusion-energy/dagmc_bounding_box
- Owner: fusion-energy
- License: mit
- Created: 2021-11-23T20:23:47.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-05-12T17:30:35.000Z (about 4 years ago)
- Last Synced: 2025-08-24T22:55:47.146Z (10 months ago)
- Topics: bounding, box, coordinates, corners, dagmc, openmc
- Language: Python
- Homepage:
- Size: 38.1 KB
- Stars: 0
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
[](https://www.python.org)
[](https://github.com/fusion-energy/dagmc_bounding_box/actions/workflows/ci_with_install.yml)
[](https://pypi.org/project/paramak/)
[](https://github.com/fusion-energy/dagmc_bounding_box/actions/workflows/anaconda-publish.yml)
# 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
```bash
pip install dagmc_bounding_box
```
Using Conda
```bash
conda install -c fusion-energy -c conda-forge dagmc_bounding_box
```
# Usage
Find the bounding box
```python
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
```python
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))
```