Closed MicheleLungaroni closed 2 months ago
This bug happens because of the sequence of reading step_file (and materials card) and setting class settings options. This problem was solved with PR #248
To solve your issue you can either change the lines in your code or use the dev branch (which includes other solved issues)
Description of the bug
I am using your code and I've encountered a potential problem. This concerns the assignment of materials/density, and the splitting number of the cells, an operations that I cannot do well with version 1.2.0. The two folders containing the files used with Version 1.1.0 and Version 1.2.0 are attached
Actions performed with Version 1.1.0
However, with version 1.1.0 I can do well this. What I did in version 1.1.0 is:
In this way everything works well, as you can verify from the code present in the "Version_1.1.0" folders. It is very useful to assign specific materials only to the component (in the tree) so that each body underlying the component automatically acquires the material without ever losing the segmentation information (the number of cells, in this case 8)
Test with Version 1.2.0
However, using the same procedures I cannot obtain the same good result with the version 1.2.0. First of all, by always feeding the same step file in the conversion, I obtain a number of cells equal to the number of components and not equal to the number of bodies as in the previous version. So the new cell number 3 corresponds to [3 4 5 6 7 8] as I had segmented.
Even bypassing this obstacle, which would mean:
But, the output that I get in the end fails to read the density values assigned in the materials.txt file. It assigns the right materials to the cells, but I don't understand why it doesn't assign the density (-100). In the "Version 1.2.0" folder you can easily see that the outputs are not consistent.
Suggestions
From my point of view, how the code in version 1.1.0 is structured is perfect:
Versions.zip