cmlibs / zinc

Source code repository for OpenCMISS-Zinc
Mozilla Public License 2.0
15 stars 18 forks source link

EX version 3 Node/Element groups should not be written if empty #218

Closed rchristie closed 2 years ago

rchristie commented 2 years ago

This only occurs when the group is not empty, but the write criterion e.g. 'write only fields with listed names' means no nodes/element are written: the format fails as no content is written. Simplest solution is to list "-1" as the only member in such cases & check that can be read. Cleanest output would be to not write the group at all if can predetermine all objects fail to meet write criterion.

It's a serious bug as the files written are unable to be re-read.

rchristie commented 2 years ago

This error was actually caused by #220, but it's still technically possible if the Write Criterion is used. Currently this is only possible from Cmgui. So a fix is worth doing even if it can't be tested in the API yet.