Skip to content
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

Allow adding surface number labels to plot #145

Open
MicahGale opened this issue Jun 4, 2024 · 4 comments
Open

Allow adding surface number labels to plot #145

MicahGale opened this issue Jun 4, 2024 · 4 comments

Comments

@MicahGale
Copy link

Sometimes it's useful to see which surface is which and enabling the surface IDs to be printed can help this.

Has this been considered before and rejected? Basically, am I too MCNP-brained right now?

@paulromano
Copy link
Contributor

That would be a really nice feature. It's never been rejected but it would be rather complicated to implement given that we generate plots via rasterization (picking a bunch of points and doing "find cell").

@shimwell
Copy link
Member

shimwell commented Jun 6, 2024

Would this have to involve some Ray firing from one of the perimeter edges of the plotted area across the plot? The distance to each surface could be calculated and then we would have the information for the location of the surfaces on the raster plot.

I guess the surface distance cpp methods don't have a python binding.

| ---------x---‐---------------x--------->
| ------------x‐----------x-------------->
| ------------‐-----x------------------->
| ------------‐-x----------------------->
| ----------x--‐------------------------>
| ------x------‐------------------------>
| ---x---------‐------------------------>
| ------------‐------------------------>
| ------------‐------------------------>

@MicahGale
Copy link
Author

Which if I understand correctly that's how MCNP implements their plotter. This be a significant change to the rendering engine. I think for now I want to keep this open to discuss how this could one day be implemented.

One thought I had: there is support for drawing the outline. I was wondering: if you change the surface equations to be a parametric form could you do a find the intersection of the surfaces in the region with the outline and identify them that way? It would be a bit more complicated. But overall I think this might be easier to implement in @gridley's work.

@pshriwise
Copy link
Collaborator

That's how I understand it as well, @MicahGale, the MCNP plots are ray traced along each pixel row. And, were we to ray trace the pixel rows, that's how I'd prefer to do the outline, yes. The way we do it now is a little hacky, but effective. I was thinking that @gridley's work would be useful here as well (both in changing between plotting modes and to provide 3D renderings of models).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants