-
Notifications
You must be signed in to change notification settings - Fork 605
SolidRayTracePlot CAPI #3789
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
SolidRayTracePlot CAPI #3789
Conversation
nuclearkevin
left a comment
There was a problem hiding this 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.
| new_plot->pixels()[0] = 400; | ||
| new_plot->pixels()[1] = 400; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better extract these magic numbers into a global module variable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mmm yeah these slipped through the cracks. They should probably be defined independently on the object tbh. I'll take a look.
Co-authored-by: GuySten <62616591+GuySten@users.noreply.github.com>
Yeah I think that would be a good idea. Probably the best place for it would be in our example notebooks, no? |
nuclearkevin
left a comment
There was a problem hiding this 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.
Description
Implements CAPI functions for the
SolidRayTracePlotC++ class and aopenmc.lib.SolidRayTracePlotclass. With the refactor in #3776 addingcreate_image, the plot output can now be accessed via the Python interface inopenmc.lib, making inline visualization of these images more straightforward.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.pyto ensure that we can create aSolidRayTracePlotobject, produce outputs, modify the object parameters, and produce an updated image.Checklist