GEOUNED-org / GEOUNED

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

[BUG] - Geometry converts but fails in transport. #209

Open shimwell opened 3 weeks ago

shimwell commented 3 weeks ago

Describe the bug

Geometry converts but fails in transport and volume tests

This could well be an error with the cad geometry, as the geometry has many planar surfaces and was made with this experimental package for removing splines from a geometry.

To Reproduce

Run this script on the dev branch with the attached step file from the zip file

import geouned
geo = geouned.CadToCsg()
geo.load_step_file('solid_without_splines.step')
geo.start()
geo.export_csg()

solid_without_splines.zip

Expected behavior

Should work with particle transport.

Error message

If applicable, include the error message displayed in the console: strange type of surface, unexpected exit, python exception…

Screenshots

cad without spines

Please complete the following information):

psauvan commented 3 weeks ago

The problem are the vertexes belonging to several planes.

imagen

Numerically it is impossible that the vertexes of basic solids created after decomposition are exactly at the same point of the original vertex. I think in this case the lost particle issue can be fixed if the CAD conversion is run using noOverlapping option set to True.

Moreover this kind of structure created after applying the conversion of spline to plane is typically the one the cuboid option is able to manage. But further development must be carried out since so far cuboid option works only if solids are compound only by planes.

shimwell commented 3 weeks ago

Many thanks, I shall give the noOverlapping a go and report back