gecos-lab / PZero

GNU Affero General Public License v3.0
22 stars 2 forks source link

Boundary crashing when displaying Z values #62

Open r-monti14 opened 6 months ago

r-monti14 commented 6 months ago

AttributeError: 'NoneType' object has no attribute 'GetNumberOfComponents' error when displaying a property different from strat_0 (e.g. the XYZ) for boundaries

andrea-bistacchi commented 2 weeks ago

Not clear. Please add more details.

r-monti14 commented 1 week ago

In the 3D view, when displaying the scalar field box from 3D Meshes and Grids, if the X, Y or Z properties are selected, a crash occurs with the following message: AttributeError: 'NoneType' object has no attribute 'GetNumberOfComponents'

andrea-bistacchi commented 1 week ago

This is because Voxets, that are based on a regular grid defined as an origin point and a step along three orthogonal vectors, do not have points where X Y Z is explicitly defined (e.g. X Y Z of the grid nodes are not registered on disk or in the RAM). So...

1) interrogating a Voxet for its X, Y Z coordinates would rise an error, so...

2) we have not implemented a way to show X Y Z because of the previous problem, but the X Y Z labels exist in the tree view and when you select them you get another error.

We have two possibilities to deal with this:

a) implement a method that automatically adds X Y Z properties to Voxet cells and/or nodes when the Voxet is created

b) remove the X Y Z labels from the tree.

r-monti14 commented 1 week ago

I think we can remove them for now, just to make sure they are not accidentally selected (as I did by touching the scroller). Maybe we can improve them in the future if needed.

andrea-bistacchi commented 1 week ago

Agreed!