GEOUNED-org / GEOUNED

A tool to convert CAD to CSG & CSG to CAD for Monte Carlo transport codes
European Union Public License 1.2
57 stars 31 forks source link

[BUG] - MCNP: cell references a null surface and contains other bounding surfaces #269

Closed SterlingButters closed 2 months ago

SterlingButters commented 2 months ago

Describe the bug

A clear and concise description of what the bug is. Remember to try to reproduce your bug with the latest version of the dev branch, the problem may already have been solved.

To Reproduce

Steps to reproduce the behavior: for example:

  1. Generate csg.mcnp with default arguments
  2. Observe null surface (0) in cell definitions

IMPORTANT Cannot provide problem parts.

Expected behavior

Didn't expect any surfaces with ID 0 since startSurf=1

Error message

MCNP: fatal error. cell <cell> references a null surface and contains other bounding surfaces.

Please complete the following information):

psauvan commented 2 months ago

It is very difficult to found the reasons of the bug with so little information. May be the CAD file has some features that FreeCAD doesn't handle correctly and produce this error in GEOUNED. Try to open your CAD file with FreeCAD and check if it looks like your original CAD.

SterlingButters commented 2 months ago

@psauvan Done - not seeing anything weird in the representation of the geometry. I was hoping there was some obvious explanation for why GEOUNED might be introducing a null surface (ID=0) e.g. inappropriate indexing. Is there a way for me to determine what surface in the geometry GOEUNED intended for the null surface (or is there another known reason for why GEOUNED would introduce a null surface)?

akolsek commented 2 months ago

@SterlingButters, if you use SpaceClaim, try to check that your geometry doesn't have splines or that splines were not introduced while saving the geometry in a different format. I have seen a "surface ID 0" issue when a spline was present in the model. Removing the spline solved the issue. See issue 201.

SterlingButters commented 2 months ago

@akolsek Yes that was the issue! The script in #201 helped me resolve the issue. I just didn't sort through the issues well enough. Closing the issue now - thanks!