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

[BUG] - 9 entry transforms cause error when converting to CAD #251

Open
py1sl opened this issue Jul 3, 2024 · 1 comment
Open

[BUG] - 9 entry transforms cause error when converting to CAD #251

py1sl opened this issue Jul 3, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@py1sl
Copy link
Contributor

py1sl commented Jul 3, 2024

Describe the bug

MCNP allows 9 entry transforms, 3 entries for translation then two parts of the rotation. MCNP will then calculate the 3rd part of the rotation. When using converting from MCNP to CAD if an input file has a 9 entry transform an index out of range error is produced. It appears in the MCNPinput in the getTransMatrix() function there are if statements dealling with just translation and all others are assumed to be 12 entry transforms.

To Reproduce

Steps to reproduce the behavior:
for example:

  1. use function getTransMatrix()
  2. insert this argument (0, 0, 0, 90, 90 0, 145, 55, 90)
  3. See error - tuple index out of bounds

IMPORTANT
If you failed to convert a specific geometry, please isolate the geometry features producing the bug (ideally a single body), save it as a STEP file and attach it to this issue. Include also all the files used in the conversion as well as the GEOUNED version used.

Expected behavior

No error to be produced. there should probably be an extra else case for 9 entry transforms which calculates the extra part of the rotation part of the transform.
mcnp file to convert to CAD

Error message

File "/home/py1sl/conda/envs/geouned_env/lib/python3.11/site-packages/geouned/GEOReverse/Modules/MCNPinput.py", line 403, in getTransMatrix
coeff[6],
~~~~~^^^
IndexError: tuple index out of range

Please complete the following information):

  • OS: ubuntu via WSL
  • GEOUNED version
  • Python version 3.11

Additional context

Add any other context about the problem here.

@py1sl py1sl added the bug Something isn't working label Jul 3, 2024
@py1sl
Copy link
Contributor Author

py1sl commented Jul 3, 2024

The simple work around is to calculate the additional part of the rotation and add it to the mcnp input file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant