mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 09:21:46 +00:00
bonsai - fix ifcsqlite import (546a042)
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
from __future__ import annotations
|
||||
import re
|
||||
import json
|
||||
import types
|
||||
import numpy as np
|
||||
import numpy.typing as npt
|
||||
import ifcopenshell
|
||||
@@ -316,6 +317,14 @@ class sqlite(file):
|
||||
# The best option we've got for mimicing `file.schema_identifier`.
|
||||
return self._schema
|
||||
|
||||
@property
|
||||
def header(self) -> types.SimpleNamespace:
|
||||
# Mimicking `file_header` object from `ifcopenshell.file`.
|
||||
header = types.SimpleNamespace(
|
||||
file_description=types.SimpleNamespace(description=(self.mvd_str,)),
|
||||
)
|
||||
return header
|
||||
|
||||
|
||||
class sqlite_entity(entity_instance):
|
||||
sqlite_wrapper: sqlite_wrapper
|
||||
|
||||
@@ -294,6 +294,10 @@ try:
|
||||
f"No `wrapped_data` for {class_name}. `ifcopenshell.{class_name}` is probably confused with `ifcopenshell.file`."
|
||||
)
|
||||
|
||||
@property
|
||||
def header(self) -> NoReturn:
|
||||
raise NotImplementedError("`stream.header` is not implemented yet.")
|
||||
|
||||
@property
|
||||
def schema(self) -> ifcopenshell.util.schema.IFC_SCHEMA:
|
||||
return self._schema
|
||||
|
||||
Reference in New Issue
Block a user