Alternatively, I am trying to convert using ifcopenshell-python, but it seems to fail with errors. Here is the code. fn = ifcopenshell.open(ifc_file) ifcopenshell.ifcopenshell_wrapper.turn_off_detailed_logging() ifcopenshell.ifcopenshell_wrapper.set_log_format_json() settings = ifcopenshell.geom.settings( APPLY_DEFAULT_MATERIALS=True ) settings.set(settings.USE_ELEMENT_GUIDS, True) sr = ifcopenshell.geom.serializers.gltf(glb_file_name, settings) sr.writeHeader() for elem in ifcopenshell.geom.iterate(...
Alternatively, I am trying to convert using ifcopenshell-python, but it seems to fail with errors. Here is the code. fn = ifcopenshell.open(ifc_file) ifcopenshell.ifcopenshell_wrapper.turn_off_detailed_logging() ifcopenshell.ifcopenshell_wrapper.set_log_format_json() settings = ifcopenshell.geom.settings( APPLY_DEFAULT_MATERIALS=True ) settings.set(settings.USE_ELEMENT_GUIDS, True) sr = ifcopenshell.geom.serializers.gltf(glb_file_name, settings) sr.writeHeader() for elem in ifcopenshell.geom.iterate(...
@aothms, Thank you for your reply, I checked as you suggesed, I noticed only \n characters in the file.
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.