#!/usr/bin/env python3

from argparse import ArgumentParser

import openmc


if __name__ == "__main__":
    # Process command line arguments
    parser = ArgumentParser('Converts a voxel HDF5 file to a VTK file')
    parser.add_argument("voxel_file", help="Path to voxel h5 file")
    parser.add_argument(
        "-o",
        "--output",
        action="store",
        default="plot",
        help="Path to output VTK file.",
    )
    args = parser.parse_args()
    print("Reading and translating data...")
    openmc.voxel_to_vtk(args.voxel_file, args.output)
    print(f"Written VTK file {args.output}...")
