You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently I can export to .bim and read from .bim exported by building3d. However, I cannot import models exported from other software, because I need specific metadata in the .bim file.
So I have this check when reading a .bim file:
def read_dotbim(path: str) -> Building:
"""Load model from .bim."""
bim = {}
with open(path, "r") as f:
bim = json.load(f)
error_msg = ".bim format not compatible with Building3D"
if not "generated_by" in bim["info"].keys():
raise KeyError(error_msg)
elif bim["info"]["generated_by"] != TOOL_NAME:
raise ValueError(error_msg)
Proposed fix:
check if the required metadata exists
if not, load the model similarly like STL - treat each triangle as a separate polygon
The text was updated successfully, but these errors were encountered:
Currently I can export to .bim and read from .bim exported by
building3d
. However, I cannot import models exported from other software, because I need specific metadata in the .bim file.So I have this check when reading a .bim file:
Proposed fix:
The text was updated successfully, but these errors were encountered: