Geometry in 3D view

Hi,

I am wondering how I can visualize the geometry in 3D in openmc?

Thanks,
Fahima

For 3D visualization, Simply change the plot type = ‘voxel’

vox = openmc.Plot()
vox.type = 'voxel'
vox.filename = 'voxelPlot'
vox.width = ..
vox.pixels = ..
vox.origin = ..
vox.color_by = 'material'

plots = openmc.Plots([vox])
plots.export_to_xml()

Here’s a link to the user manual, which explains how to create a 3D voxel plot.

2 Likes