Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to verify whether a .bim file is correctly formatted? #9

Open
krzysztofarendt opened this issue May 26, 2024 · 3 comments
Open
Labels
enhancement New feature or request

Comments

@krzysztofarendt
Copy link

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?

@paireks
Copy link
Owner

paireks commented May 26, 2024

Hello @krzysztofarendt :)

You are absolutely right, this request for some automatic checker exist and from time to time I remind myself about it, I even created a reminder right there: paireks/dotbim#34, but still I haven't started it yet.

Right now when someone is creating a .bim builder I always try to help as much as I can, and try to verify the files myself on some platforms, manually. So you can send me on email or here some .bim files, I will try to check if something is wrong, or if something could be better :)

Automatic verification system would be great. Maybe it won't catch all the potential problems, but there are some that could be verified for sure!

If you'd like to check your files: feel free to send it to me to check, and if you'd like to try to build dotbim_health_status here - I would be also happy with such contribution :)

Best regards,
Wojciech :)

@paireks paireks added the enhancement New feature or request label May 26, 2024
@krzysztofarendt
Copy link
Author

Thanks, let's stay in touch!

@gedw99
Copy link

gedw99 commented Jan 16, 2025

Is there a json schema yet ?

This will make it quite easy to validate a openbim file.

it will also allow CRDT style merging of openbim file to allow document synchronisation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants