GEOUNED-org / GEOUNED

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

[BUG] - AttributeError: 'int' object has no attribute 'check' in removeExtraSurfaces #250

Open vtalanov opened 2 months ago

vtalanov commented 2 months ago

Describe the bug

I am using GEOUNED to convert a STEP-file to MCNP and to build a void using "simplify = voidfull" option. Version 0.9.8.2 succefully decomposes the solids, builds the cells and then creates the void. However, the version 1.0.1 (run over the same STEP-file using the same config,ini) fails to build complementary at some point (see below).

To Reproduce

See the Python script below used to run GEOUNED. The only diffrerence would be in the second line: sys.path.append('/home/l_talanov/GEOUNED-1.0.1') instead of: sys.path.append('/home/l_talanov/GEOUNED-0.9.8.2')

IMPORTANT It does not look possible to isolate a single body since then the error during building void will disappear.

Expected behavior

GEOUNED version 1.0.1 completes building the void as the version 0.9.8.2 does.

Error message

Loop, Box to Split : 7 28 build complementary 7 0 build complementary 7 2 build complementary 7 4 build complementary 7 7 build complementary 7 9 build complementary 7 11 Traceback (most recent call last): File "/home/l_talanov/Desktop/Data/07-02_v01g_re/1.0.1/myConvert_v1.py", line 10, in GEO.Start() File "/home/l_talanov/GEOUNED-1.0.1/GEOUNED/init.py", line 550, in Start MetaVoid = Void.voidGeneration( File "/home/l_talanov/GEOUNED-1.0.1/GEOUNED/Void/Void.py", line 43, in voidGeneration voids = GetVoidDef(newMetaList, Surfaces, EnclosureBox, setting, Lev0=True) File "/home/l_talanov/GEOUNED-1.0.1/GEOUNED/Void/Void.py", line 120, in GetVoidDef cell, CellIn = z.getVoidComplementary(Surfaces, simplify=simplifyVoid) File "/home/l_talanov/GEOUNED-1.0.1/GEOUNED/Void/VoidBoxClass.py", line 266, in getVoidComplementary newSolid = removeExtraSurfaces(solDef, CTable) File "/home/l_talanov/GEOUNED-1.0.1/GEOUNED/Utils/BooleanSolids.py", line 334, in removeExtraSurfaces subCell.check() AttributeError: 'int' object has no attribute 'check'

Please complete the following information):

Additional context

config-ini.txt myConvert_v1-py.txt STEP-file of the problem can be provided bilaterally by request.

shimwell commented 2 months ago

Apologies for the changing API, the current versions of GEOUNED now make use of a JSON file format instead of the config.ini. Would it be possible to try again with the JSON or directly with the Python API.