Tilt a Rectangular Parallelepiped

Is there a way to tilt a RectangularParallelepiped (Python API) by an arbitrary angle?
I need to have a 45° tilted Parallelepiped (compared to an already existing geometry): am I wrong or the only way to do that is to use 6 x planes or a regtangular prism plus 2 x planes?

Thank you!

@loresupercap You can use the RectangularParallelepiped composite surface:

rpp = openmc.model.RectangularParallelepiped(xmin, xmax, ymin, ymax, zmin, zmax)

Then take the interior of the surface and rotate it as needed:

rotated_region = (-rpp).rotate((0., 45., 0.))

I’ve put together a Jupyter notebook demonstrating this here.

1 Like