Skip to content

feature request model.voxel_plot #3677

@shimwell

Description

@shimwell

Description

I have been using model.plot and geometry.plot for a while and was thinking it might be a good idea to add the equivalent functions for voxel plots. model.voxel_plot, geometry.voxel_plot, universe.voxel_plot cell.voxel_plot, region.voxel_plot.

One downside of this is that it would add about 400 lines of code to the repo

Alternatives

Continue to use the existing method, which requires an xml export and not particularly convenient for users as there is little automation.

my_geometry.export_to_xml()
vox_plot = openmc.VoxelPlot()
vox_plot.width = my_geometry.bounding_box.width
vox_plot.origin = my_geometry.bounding_box.center
vox_plot.pixels = [int(w* 0.1) for w in my_geometry.bounding_box.width]
vox_plot.color_by = 'material'
vox_plot.to_vtk(output='voxel_plot.vti')

Compatibility

compatibility would be fine, existing method would continue to work

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions