Hi @paireks ! Thanks for your work on .bim!
What is the best way to check whether a .bim file is correctly formatted?
Up to now I have been testing if my files are correctly displayed in Online 3D Viewer.
I have been writing a reader/writer for .bim for my hobby project and I noticed that:
- When
indices is a list of lists instead of a flat list then Online 3D Viewer freezes and never displays my file, but at the same time there is no error displayed. I know the error was on my side, but it took my a while to find it.
schema_version is ignored in Online 3D Viewer. It can contain any string. It is unclear what are the available versions which are recognized by tools. I think the documentation mentions 1.0.0 and 1.1.0. The only difference I noticed is the use of optional face_colors. But dotbimpy is ignoring schema_version and just looks if face_colors are present or not.
It could be useful to have a function like dotbim_health_status(path_to_file) which would e.g.:
- print errors if some obligatory keys are missing,
- print errors if the format of the obligatory values is incorrect (e.g. lists need to be flat,
schema_version need to be recognizable),
- print warnings if there are meshes not referenced by any of the
elements,
- print warnings if there are elements referencing non-existent meshes,
- print warnings if there are
coordinates not referenced in indices.
Is there anything like this?
I am pretty sure there is not in dotbimpy, but maybe in some other project of yours?
Hi @paireks ! Thanks for your work on .bim!
What is the best way to check whether a .bim file is correctly formatted?
Up to now I have been testing if my files are correctly displayed in Online 3D Viewer.
I have been writing a reader/writer for .bim for my hobby project and I noticed that:
indicesis a list of lists instead of a flat list then Online 3D Viewer freezes and never displays my file, but at the same time there is no error displayed. I know the error was on my side, but it took my a while to find it.schema_versionis ignored in Online 3D Viewer. It can contain any string. It is unclear what are the available versions which are recognized by tools. I think the documentation mentions 1.0.0 and 1.1.0. The only difference I noticed is the use of optionalface_colors. Butdotbimpyis ignoringschema_versionand just looks ifface_colorsare present or not.It could be useful to have a function like
dotbim_health_status(path_to_file)which would e.g.:schema_versionneed to be recognizable),elements,coordinatesnot referenced inindices.Is there anything like this?
I am pretty sure there is not in
dotbimpy, but maybe in some other project of yours?