AlanFord / ZapMeNot

Python library for simple point-kernel photon shielding analyses
GNU General Public License v3.0
10 stars 3 forks source link

'tuple' object does not support item assignment #20

Open Bernard13090 opened 1 year ago

Bernard13090 commented 1 year ago

In my exemple I reduce the size of the box

`File c:\program files\python39\lib\zapmenot\model.py:346, in Model._findBoundingBox(self) 344 bounds[1] = bounds[1] + min_width/2 345 if y_width < min_width: --> 346 bounds[2] = bounds[2] - min_width/2 347 bounds[3] = bounds[3] + min_width/2 348 if z_width < min_width:

TypeError: 'tuple' object does not support item assignment`

So I found that if I change 👍 `# define a minimum dimension as 20% of the maximum dimension

Modif Bernard

    min_width = max_width * 0.20` to 0.05

It work fine.

Why have you introduce 20% in the code.

Best Regards

Bernard