mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-11 18:16:40 +00:00
typing
This commit is contained in:
@@ -60,7 +60,7 @@ IFC4x3_SPEC_URL_TEMPLATE = "https://ifc43-docs.standards.buildingsmart.org/IFC/R
|
||||
# child -> description
|
||||
# note: in IFC4x3 there is no children[] for properties
|
||||
|
||||
SUPPORTED_SCHEMA = Literal["IFC2X3", "IFC4", "IFC4X3"]
|
||||
SUPPORTED_SCHEMA = ifcopenshell.util.schema.IFC_SCHEMA
|
||||
SCHEMA_FILES: dict[SUPPORTED_SCHEMA, dict] = {
|
||||
"IFC2X3": {
|
||||
"entities": BASE_MODULE_PATH / "schema/ifc2x3_entities.json",
|
||||
|
||||
@@ -22,11 +22,12 @@ import time
|
||||
import ifcopenshell
|
||||
import ifcopenshell.util.attribute
|
||||
import ifcopenshell.ifcopenshell_wrapper as ifcopenshell_wrapper
|
||||
from typing import Union, Any
|
||||
from typing import Union, Any, Literal
|
||||
|
||||
# This is highly experimental and incomplete, however, it may work for simple datasets.
|
||||
|
||||
cwd = os.path.dirname(os.path.realpath(__file__))
|
||||
IFC_SCHEMA = Literal["IFC2X3", "IFC4", "IFC4X3"]
|
||||
|
||||
|
||||
def get_fallback_schema(version: str) -> str:
|
||||
|
||||
@@ -23,8 +23,8 @@ from typing import List
|
||||
|
||||
cwd = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
entity_to_type_map = {}
|
||||
type_to_entity_map = {}
|
||||
entity_to_type_map: dict[ifcopenshell.util.schema.IFC_SCHEMA, dict[str, list[str]]] = {}
|
||||
type_to_entity_map: dict[ifcopenshell.util.schema.IFC_SCHEMA, dict[str, list[str]]] = {}
|
||||
|
||||
mapped_schemas = {
|
||||
"IFC2X3": "entity_to_type_map_2x3.json",
|
||||
|
||||
Reference in New Issue
Block a user