Skip to content

Conversation

@pshriwise
Copy link
Contributor

Description

Implements CAPI functions for the SolidRayTracePlot C++ class and a openmc.lib.SolidRayTracePlot class. With the refactor in #3776 adding create_image, the plot output can now be accessed via the Python interface in openmc.lib, making inline visualization of these images more straightforward.

image

It also allows for easier connection to other apps for interactive rendering (i.e. the plotter utility)

Screencast.from.2026-02-03.09-54-50.webm

I added a few tests in test_lib.py to ensure that we can create a SolidRayTracePlot object, produce outputs, modify the object parameters, and produce an updated image.

Checklist

  • I have performed a self-review of my own code
  • I have run clang-format (version 15) on any C++ source files (if applicable)
  • I have followed the style guidelines for Python source files (if applicable)
  • I have made corresponding changes to the documentation (if applicable)
  • I have added tests that prove my fix is effective or that my feature works (if applicable)

Copy link
Contributor

@nuclearkevin nuclearkevin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is awesome! Do you think it would be worthwhile to add a quick tutorial in the User's Guide (under geometry visualization) to showcase how these plots can be created with the Python lib bindings? I can see people wanting to use this more often now that they don't need to run OpenMC in plotting mode to generate ray traced plots.

Co-authored-by: GuySten <62616591+GuySten@users.noreply.github.com>
@pshriwise
Copy link
Contributor Author

This is awesome! Do you think it would be worthwhile to add a quick tutorial in the User's Guide (under geometry visualization) to showcase how these plots can be created with the Python lib bindings? I can see people wanting to use this more often now that they don't need to run OpenMC in plotting mode to generate ray traced plots.

Yeah I think that would be a good idea. Probably the best place for it would be in our example notebooks, no?

Copy link
Contributor

@nuclearkevin nuclearkevin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I think that would be a good idea. Probably the best place for it would be in our example notebooks, no?

Agreed, definitely a better place for it then the User's Guide.

@GuySten GuySten added the Merging Soon PR will be merged in < 24 hrs if no further comments are made. label Feb 12, 2026
@GuySten GuySten merged commit bcb9395 into openmc-dev:develop Feb 13, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Merging Soon PR will be merged in < 24 hrs if no further comments are made.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants