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

Shortcuts (e.g., Interpolate) in geometry definitions discards some user formatting #527

Open
MicahGale opened this issue Aug 29, 2024 · 0 comments
Labels
bugs A deviation from expected behavior that does not reach the level of being reportable as an "Error". low priority

Comments

@MicahGale
Copy link
Collaborator

Describe the bug

Some user formatting is lost when Geometry definition shortcuts are re-exported. This was discovered/created while fixing #489.

To Reproduce

montepy.read_input("foo.imcnp").write_problem("bar.imcnp")

MCNP input file snippet

This example is from tests\inputs\test_interp_edge.imcnp

Surface interpolate edge case$
10214   0    (1  2i  4)

1 CZ 0
2 CZ 0
3 CZ 0
4 CZ 0

This is then exported as:

10214   0    (1  2I 4 )

1 CZ 0
2 CZ 0
3 CZ 0
4 CZ 0


IMP:n 0.0

Version

  • Version 0.4.0

Additional context

This is due to the ShortcutNode -> GeometryTree -> ShortcutNode conversion cycle.

@MicahGale MicahGale added bugs A deviation from expected behavior that does not reach the level of being reportable as an "Error". low priority labels Aug 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugs A deviation from expected behavior that does not reach the level of being reportable as an "Error". low priority
Projects
None yet
Development

No branches or pull requests

1 participant