While I am converting IFC to OBJ using c# pipeline it all works fine. but when I try to convert to GLB the file cannot be opened in any viewers, i ran GLB validator and it seems to always have issues like "GLB_CHUNK_LENGTH_UNALIGNED", "GLB_UNEXPECTED_FIRST_CHUNK" and others. When we do this conversion manually it works fine. I tried using additional options like --center-model-geometry. Still did not work. Any clues will be much appreciated.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Judging by the information you give us I'd be tempted to think it is related to binary vs text streams. If you open the outputs in text mode \r\n characters will get mapped to \n causing the chunks to no longer align. By random chance with binary floating pointing point numbers you're likely to have a couple of \r\n sequences.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
While I am converting IFC to OBJ using c# pipeline it all works fine. but when I try to convert to GLB the file cannot be opened in any viewers, i ran GLB validator and it seems to always have issues like "GLB_CHUNK_LENGTH_UNALIGNED", "GLB_UNEXPECTED_FIRST_CHUNK" and others. When we do this conversion manually it works fine. I tried using additional options like --center-model-geometry. Still did not work. Any clues will be much appreciated.
Judging by the information you give us I'd be tempted to think it is related to binary vs text streams. If you open the outputs in text mode
\r\ncharacters will get mapped to\ncausing the chunks to no longer align. By random chance with binary floating pointing point numbers you're likely to have a couple of\r\nsequences.@aothms, Thank you for your reply, I checked as you suggesed, I noticed only
\ncharacters in the file.Alternatively, I am trying to convert using ifcopenshell-python, but it seems to fail with errors. Here is the code.
Error:
Please not converting to obj seems to work fine but we are looking for glb for optimization.
Last edit: Vidyaranya Malladi 2023-06-25
Because you've added:
You get return a pair of progress as integer and the currently processed elem.
So either change to
or to