diff --git a/.github/workflows/ci-blenderbim-matrix.yml b/.github/workflows/ci-blenderbim-matrix.yml
index 49e3b5190f..8aef990087 100644
--- a/.github/workflows/ci-blenderbim-matrix.yml
+++ b/.github/workflows/ci-blenderbim-matrix.yml
@@ -3,8 +3,18 @@ name: Publish-blenderbim-multiplatform
on:
push:
paths:
- - 'src/blenderbim/**'
- '.github/workflows/ci-blenderbim-matrix.yml'
+ - 'src/blenderbim/**'
+ - 'src/ifcopenshell-python/ifcopenshell/**'
+ - 'src/bcf/src/bcf/**'
+ - 'src/ifcclash/ifcclash/**'
+ - 'src/ifccobie/**'
+ - 'src/ifcdiff/**'
+ - 'src/ifccsv/**'
+ - 'src/ifcpatch/ifcpatch/**'
+ - 'src/ifc4d/ifc4d/**'
+ - 'src/ifc5d/ifc5d/**'
+ - 'src/ifccityjson/**'
branches:
- v0.7.0
diff --git a/.github/workflows/ci-py-only.yml b/.github/workflows/ci-py-only.yml
new file mode 100644
index 0000000000..b427954ac8
--- /dev/null
+++ b/.github/workflows/ci-py-only.yml
@@ -0,0 +1,95 @@
+name: ci_py_only
+
+on:
+ push:
+ paths:
+ - 'src/**'
+ - 'test/**'
+ - 'conda/**'
+ - 'cmake/**'
+ - '.github/workflows/ci_py_only.yml'
+ pull_request:
+
+jobs:
+ activate:
+ runs-on: ubuntu-latest
+ if: |
+ github.repository == 'IfcOpenShell/IfcOpenShell' &&
+ !contains(github.event.head_commit.message, 'skip ci')
+ steps:
+ - run: echo ok go
+
+ build:
+ runs-on: ubuntu-20.04
+ needs: activate
+ steps:
+ - uses: actions/checkout@v2
+ with:
+ submodules: recursive
+ - name: Install C++ dependencies
+ run: |
+ sudo apt update
+ sudo apt-get install --no-install-recommends \
+ git cmake gcc g++ \
+ libboost-date-time-dev \
+ libboost-filesystem-dev \
+ libboost-iostreams-dev \
+ libboost-program-options-dev \
+ libboost-regex-dev \
+ libboost-system-dev \
+ libboost-thread-dev \
+ python3-all-dev python3-pip \
+ swig libpcre3-dev libxml2-dev \
+ libtbb-dev nlohmann-json3-dev \
+ libocct-foundation-dev libocct-modeling-algorithms-dev libocct-modeling-data-dev libocct-ocaf-dev libocct-visualization-dev libocct-data-exchange-dev \
+ libhdf5-dev libcgal-dev
+
+ - name: ccache
+ uses: hendrikmuhs/ccache-action@v1
+
+ - name: Build ifcopenshell
+ run: |
+ mkdir build && cd build
+ cmake \
+ -DCMAKE_C_COMPILER_LAUNCHER=ccache \
+ -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_PREFIX_PATH=/usr \
+ -DCMAKE_SYSTEM_PREFIX_PATH=/usr \
+ -DOCC_INCLUDE_DIR=/usr/include/opencascade \
+ -DOCC_LIBRARY_DIR=/usr/lib/x86_64-linux-gnu \
+ -DPYTHON_EXECUTABLE:FILEPATH=/usr/bin/python3 \
+ -DPYTHON_INCLUDE_DIR:PATH=/usr/include/python3.8 \
+ -DPYTHON_LIBRARY:FILEPATH=/usr/lib/x86_64-linux-gnu/libpython3.8.so \
+ -DCOLLADA_SUPPORT=Off \
+ "-DSCHEMA_VERSIONS=2x3;4" \
+ -DBUILD_CONVERT=Off \
+ -DGLTF_SUPPORT=On \
+ -DJSON_INCLUDE_DIR=/usr/include \
+ -DCGAL_INCLUDE_DIR=/usr/include \
+ -DGMP_INCLUDE_DIR=/usr/include \
+ -DMPFR_INCLUDE_DIR=/usr/include \
+ -DGMP_LIBRARY_DIR=/usr/lib/x86_64-linux-gnu \
+ -DMPFR_LIBRARY_DIR=/usr/lib/x86_64-linux-gnu \
+ -DHDF5_INCLUDE_DIR=/usr/include/hdf5/serial \
+ ../cmake
+ sudo make -j $(nproc)
+ sudo make install
+
+ - name: Install Python dependencies
+ run: |
+ sudo /usr/bin/python -m pip install -U pip
+ sudo /usr/bin/python -m pip install xmlschema numpy lxml
+ sudo /usr/bin/python -m pip install src/bcf
+ sudo /usr/bin/python -m pip install pytest
+ sudo /usr/bin/python -m pip install isodate
+ sudo /usr/bin/python -m pip install lark
+ sudo /usr/bin/python -m pip install networkx
+
+ - name: Test
+ run: |
+ cd test
+ sudo /usr/bin/python tests.py
+ cd ../src/ifcopenshell-python
+ mv ifcopenshell ifcopenshell-local # Force testing on installed module
+ make test
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 563db5dd14..d600baa5b8 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -62,7 +62,7 @@ jobs:
-DPYTHON_INCLUDE_DIR:PATH=/usr/include/python3.8 \
-DPYTHON_LIBRARY:FILEPATH=/usr/lib/x86_64-linux-gnu/libpython3.8.so \
-DCOLLADA_SUPPORT=Off \
- "-DSCHEMA_VERSIONS=2x3;4" \
+ "-DSCHEMA_VERSIONS=2x3;4;4x3" \
-DGLTF_SUPPORT=On \
-DJSON_INCLUDE_DIR=/usr/include \
-DCGAL_INCLUDE_DIR=/usr/include \
diff --git a/.gitmodules b/.gitmodules
index ccec1ac990..e15dfb45d8 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -10,4 +10,4 @@
url = https://github.com/IfcOpenShell/svgfill
[submodule "src/ifcopenshell-python/test/Sample-BIM-Files"]
path = src/ifcopenshell-python/test/Sample-BIM-Files
- url = https://github.com/atomczak/Sample-BIM-Files
+ url = https://github.com/IfcOpenShell/ids-test-files
\ No newline at end of file
diff --git a/choco/blenderbim/blenderbim.nuspec b/choco/blenderbim/blenderbim.nuspec
new file mode 100644
index 0000000000..16c878bc12
--- /dev/null
+++ b/choco/blenderbim/blenderbim.nuspec
@@ -0,0 +1,34 @@
+
+
+
+
+ blenderbim-nightly
+ blenderbim_build_version
+ https://github.com/IfcOpenShell/IfcOpenShell
+ fbpyr
+
+ BlenderBIM install nightly
+ Dion Moult and many more, see: https://github.com/IfcOpenShell/IfcOpenShell/graphs/contributors
+ https://github.com/IfcOpenShell/IfcOpenShell
+ https://rawcdn.githack.com/fbpyr/IfcOpenShell/9662598ad4a7e4b6cd8980e430d07263835d0eda/choco/blenderbim/blenderbim.png
+
+ https://github.com/IfcOpenShell/IfcOpenShell/blob/v0.7.0/COPYING
+ true
+ https://github.com/IfcOpenShell/IfcOpenShell
+ https://blenderbim.org/docs/
+
+ https://github.com/IfcOpenShell/IfcOpenShell/issues
+ blender bim blenderbim python opensource foss
+ opensource bim
+ opensource bim addon for blender
+
+
+
+
+
+
+
+
+
+
+
diff --git a/choco/blenderbim/blenderbim.png b/choco/blenderbim/blenderbim.png
new file mode 100644
index 0000000000..3df402d817
Binary files /dev/null and b/choco/blenderbim/blenderbim.png differ
diff --git a/choco/blenderbim/check_repo_infos.py b/choco/blenderbim/check_repo_infos.py
new file mode 100644
index 0000000000..d3865c87d3
--- /dev/null
+++ b/choco/blenderbim/check_repo_infos.py
@@ -0,0 +1,78 @@
+import sys
+import re
+import datetime
+from urllib import request
+
+
+def request_repo_info(url: str):
+ req = request.Request(url)
+ resp = request.urlopen(req)
+ if not resp.status == 200:
+ print(f"[ERROR] could not contact server: {url}")
+ quit(1)
+ return resp
+
+
+if sys.argv[1] == "--do_choco_release?":
+ now = datetime.datetime.now()
+ blenderbim_date = now.strftime("%y%m%d")
+ url = "https://github.com/IfcOpenShell/IfcOpenShell/releases/latest"
+ resp = request_repo_info(url)
+ if blenderbim_date in resp.url:
+ print("do_choco_release", end="")
+
+
+elif sys.argv[1] == "--latest_blender_release_min_maj_pat?":
+ re_blender_version_min_maj_pat = r"Latest Version.+Blender (\d+\.\d+\.\d+)"
+ url = "https://community.chocolatey.org/packages/blender"
+ resp = request_repo_info(url)
+ html_txt = str(resp.read())
+ found = re.findall(re_blender_version_min_maj_pat, html_txt)
+ if found:
+ print(found[0], end="")
+
+
+elif sys.argv[1] == "--latest_blender_release_min_maj?":
+ re_blender_version_min_maj = r"Latest Version.+Blender (\d+\.\d+)\..+"
+ url = "https://community.chocolatey.org/packages/blender"
+ resp = request_repo_info(url)
+ html_txt = str(resp.read())
+ found = re.findall(re_blender_version_min_maj, html_txt)
+ if found:
+ print(found[0], end="")
+
+elif sys.argv[1] == "--latest_blender_python_version_maj_min?":
+ # get latest blender version first
+ re_blender_version_min_maj_pat = r"Latest Version.+Blender (\d+\.\d+\.\d+)"
+ url = "https://community.chocolatey.org/packages/blender"
+ resp = request_repo_info(url)
+ html_txt = str(resp.read())
+ found = re.findall(re_blender_version_min_maj_pat, html_txt)
+ if found:
+ latest_blender_version_tag = f"v{found[0]}"
+ re_blender_python_version_maj_min = r"SET\(PYTHON_VERSION (\d+.\d+) "
+ url = f"https://raw.githubusercontent.com/blender/blender/{latest_blender_version_tag}/build_files/cmake/Modules/FindPythonLibsUnix.cmake"
+ resp = request_repo_info(url)
+ html_txt = str(resp.read())
+ found = re.findall(re_blender_python_version_maj_min, html_txt)
+ if found:
+ print(found[0], end="")
+
+
+elif sys.argv[1] == "--pyver?":
+ # get latest blender version first
+ re_blender_version_min_maj_pat = r"Latest Version.+Blender (\d+\.\d+\.\d+)"
+ url = "https://community.chocolatey.org/packages/blender"
+ resp = request_repo_info(url)
+ html_txt = str(resp.read())
+ found = re.findall(re_blender_version_min_maj_pat, html_txt)
+ if found:
+ latest_blender_version_tag = f"v{found[0]}"
+ re_blender_python_version_maj_min = r"SET\(PYTHON_VERSION (\d+.\d+) "
+ url = f"https://raw.githubusercontent.com/blender/blender/{latest_blender_version_tag}/build_files/cmake/Modules/FindPythonLibsUnix.cmake"
+ resp = request_repo_info(url)
+ html_txt = str(resp.read())
+ found = re.findall(re_blender_python_version_maj_min, html_txt)
+ if found:
+ print(f"py{found[0].replace('.', '')}", end="")
+
diff --git a/choco/blenderbim/fill_dynamic_parameters.py b/choco/blenderbim/fill_dynamic_parameters.py
new file mode 100644
index 0000000000..738a779b91
--- /dev/null
+++ b/choco/blenderbim/fill_dynamic_parameters.py
@@ -0,0 +1,49 @@
+import os
+from pathlib import Path
+
+
+print("[INFO] inserting dynamic chocolatey package parameters")
+HERE_DIR = Path(__file__).parent.absolute()
+# print(f"[INFO] HERE_DIR: {HERE_DIR}")
+
+topics = {
+ "spec": {
+ "path": HERE_DIR / "blenderbim.nuspec",
+ "env_vars": {
+ "latest_blender_version_maj_min_pat",
+ "blenderbim_build_version",
+ },
+ },
+ "install": {
+ "path": HERE_DIR / "tools" / "chocolateyinstall.ps1",
+ "env_vars": {
+ "url_blenderbim_py310_win_zip",
+ "sha256sum_blenderbim_py310_win_zip",
+ "latest_blender_version_maj_min",
+ },
+ },
+ "uninstall": {
+ "path": HERE_DIR / "tools" / "chocolateyuninstall.ps1",
+ "env_vars": {
+ "latest_blender_version_maj_min",
+ },
+ },
+}
+
+for topic, info in topics.items():
+ print(f"[INFO] {topic}:")
+ for env_var_name in info["env_vars"]:
+ print(f"[INFO] {env_var_name} exists?: {os.environ[env_var_name]}")
+
+ with open(info["path"], encoding="utf-8") as txt:
+ content = txt.read()
+
+ for env_var_name in info["env_vars"]:
+ # print(f"[INFO] replace: {env_var_name}")
+ content = content.replace(env_var_name, os.environ[env_var_name])
+
+ with open(info["path"], "w", encoding="utf-8") as txt:
+ txt.write(content)
+ print(f"[INFO] written: {info['path']}")
+
+print("[INFO] inserting dynamic chocolatey package parameters successful")
diff --git a/choco/blenderbim/tools/chocolateybeforemodify.ps1 b/choco/blenderbim/tools/chocolateybeforemodify.ps1
new file mode 100644
index 0000000000..4aa0f65d59
--- /dev/null
+++ b/choco/blenderbim/tools/chocolateybeforemodify.ps1
@@ -0,0 +1,11 @@
+$processName = "blender"
+$blenderIsRunning = Get-Process -Name $processName -ErrorAction SilentlyContinue
+
+if($blenderIsRunning -eq $null) {
+ echo "Blender is not running ready for next action."
+}
+else {
+ Write-Warning "$processName is still running - installer cannot safely proceed to next action."
+ Write-Warning "Please retry after closing all running blender applications."
+ exit 1
+}
diff --git a/choco/blenderbim/tools/chocolateyinstall.ps1 b/choco/blenderbim/tools/chocolateyinstall.ps1
new file mode 100644
index 0000000000..d79c87b1bb
--- /dev/null
+++ b/choco/blenderbim/tools/chocolateyinstall.ps1
@@ -0,0 +1,29 @@
+$ErrorActionPreference = 'Stop'
+
+$url64 = 'url_blenderbim_py310_win_zip'
+$checksum64 = 'sha256sum_blenderbim_py310_win_zip'
+$checksumType64 = 'sha256'
+
+$appDataUserDir = [System.Environment]::GetEnvironmentVariable('appdata')
+$unzipTargetDir = "$appDataUserDir\Blender Foundation\Blender\latest_blender_version_maj_min\scripts\addons"
+
+$chocoBaseDir = [System.Environment]::GetEnvironmentVariable('ChocolateyInstall')
+$addonEnable = "$chocoBaseDir\lib\blenderbim\tools\enable_blenderbim_addon.py"
+
+$programFilesDir = [System.Environment]::GetEnvironmentVariable('ProgramFiles')
+$blenderExePath = "$env:ProgramFiles\Blender Foundation\Blender latest_blender_version_maj_min\blender.exe"
+
+$processName = "blender"
+$blenderIsRunning = Get-Process -Name $processName -ErrorAction SilentlyContinue
+
+
+if($blenderIsRunning -eq $null) {
+ echo "attempting to install blenderbim."
+ Install-ChocolateyZipPackage -PackageName $env:ChocolateyPackageName -Url64 $url64 -Checksum64 $checksum64 -checksumType $checksumType64 -UnzipLocation $unzipTargetDir
+ Start-Process -FilePath $blenderExePath -ArgumentList "-b", "-y", "--python", "$addonEnable"
+}
+else {
+ Write-Warning "$processName is still running - blenderbim cannot be safely installed."
+ Write-Warning "Please retry after closing all running blender applications."
+ exit 1
+}
diff --git a/choco/blenderbim/tools/chocolateyuninstall.ps1 b/choco/blenderbim/tools/chocolateyuninstall.ps1
new file mode 100644
index 0000000000..7c319b2829
--- /dev/null
+++ b/choco/blenderbim/tools/chocolateyuninstall.ps1
@@ -0,0 +1,22 @@
+$appDataUserDir = [System.Environment]::GetEnvironmentVariable('appdata')
+$unzippedDir = "$appDataUserDir\Blender Foundation\Blender\latest_blender_version_maj_min\scripts\addons\blenderbim"
+
+$chocoBaseDir = [System.Environment]::GetEnvironmentVariable('ChocolateyInstall')
+$addonDisable = "$chocoBaseDir\lib\blenderbim\tools\disable_blenderbim_addon.py"
+
+$programFilesDir = [System.Environment]::GetEnvironmentVariable('ProgramFiles')
+$blenderExePath = "$env:ProgramFiles\Blender Foundation\Blender latest_blender_version_maj_min\blender.exe"
+
+$processName = "blender"
+$blenderIsRunning = Get-Process -Name $processName -ErrorAction SilentlyContinue
+
+if($blenderIsRunning -eq $null) {
+ echo "attempting to uninstall blenderbim."
+ Start-Process -FilePath $blenderExePath -ArgumentList "-b", "-y", "--python", "$addonDisable"
+ Remove-Item -LiteralPath $unzippedDir -Force -Recurse
+}
+else {
+ Write-Warning "$processName is still running - blenderbim cannot be safely uninstalled."
+ Write-Warning "Please retry after closing all running blender applications."
+ exit 1
+}
diff --git a/choco/blenderbim/tools/disable_blenderbim_addon.py b/choco/blenderbim/tools/disable_blenderbim_addon.py
new file mode 100644
index 0000000000..c7355eb7d9
--- /dev/null
+++ b/choco/blenderbim/tools/disable_blenderbim_addon.py
@@ -0,0 +1,8 @@
+import bpy
+
+
+bpy.ops.preferences.addon_disable(module='blenderbim')
+bpy.ops.wm.save_userpref()
+
+print("disabled blenderbim addon successfully.")
+
diff --git a/choco/blenderbim/tools/enable_blenderbim_addon.py b/choco/blenderbim/tools/enable_blenderbim_addon.py
new file mode 100644
index 0000000000..eae588e5f8
--- /dev/null
+++ b/choco/blenderbim/tools/enable_blenderbim_addon.py
@@ -0,0 +1,8 @@
+import bpy
+
+
+bpy.ops.preferences.addon_enable(module='blenderbim')
+bpy.ops.wm.save_userpref()
+
+print("enabled blenderbim addon successfully.")
+
diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt
index 1fed2f1189..2d341e287f 100644
--- a/cmake/CMakeLists.txt
+++ b/cmake/CMakeLists.txt
@@ -620,13 +620,16 @@ function(files_for_ifc_version IFC_VERSION RESULT_NAME)
endfunction()
if(NOT SCHEMA_VERSIONS)
- set(SCHEMA_VERSIONS "2x3" "4" "4x1" "4x2" "4x3_rc1" "4x3_rc2" "4x3_rc3" "4x3_rc4")
+ set(SCHEMA_VERSIONS "2x3" "4" "4x1" "4x2" "4x3_rc1" "4x3_rc2" "4x3_rc3" "4x3_rc4" "4x3")
endif()
foreach(s ${SCHEMA_VERSIONS})
add_definitions(-DHAS_SCHEMA_${s})
endforeach()
+string(REPLACE ";" ")(" schema_version_seq "(${SCHEMA_VERSIONS})")
+ADD_DEFINITIONS(-DSCHEMA_SEQ=${schema_version_seq})
+
if(COMPILE_SCHEMA)
# @todo, this appears to be untested at the moment
@@ -696,7 +699,7 @@ if (BUILD_IFCGEOM)
endforeach()
set(IFCOPENSHELL_LIBRARIES ${IFCOPENSHELL_LIBRARIES} IfcGeom ${IFCGEOM_SCHEMA_LIBRARIES} IfcGeom ${IFCGEOM_SCHEMA_LIBRARIES})
endif()
-if (BUILD_CONVERT)
+if (BUILD_CONVERT OR BUILD_IFCPYTHON)
foreach(s ${SCHEMA_VERSIONS})
set(SERIALIZER_SCHEMA_LIBRARIES ${SERIALIZER_SCHEMA_LIBRARIES} Serializers_ifc${s})
endforeach()
@@ -769,7 +772,7 @@ TARGET_LINK_LIBRARIES(IfcGeom IfcParse ${IFCGEOM_SCHEMA_LIBRARIES} ${CMAKE_THREA
endif(BUILD_IFCGEOM)
-if (BUILD_CONVERT)
+if (BUILD_CONVERT OR BUILD_IFCPYTHON)
# Serializers
file(GLOB SERIALIZERS_H_FILES ../src/serializers/*.h)
@@ -790,6 +793,10 @@ set_target_properties(Serializers PROPERTIES COMPILE_FLAGS "-DIFC_GEOM_EXPORTS $
TARGET_LINK_LIBRARIES(Serializers ${SERIALIZER_SCHEMA_LIBRARIES} ${OPENCOLLADA_LIBRARIES})
+endif(BUILD_CONVERT or BUILD_IFCPYTHON)
+
+if (BUILD_CONVERT)
+
# IfcConvert
file(GLOB IFCCONVERT_CPP_FILES ../src/ifcconvert/*.cpp)
file(GLOB IFCCONVERT_H_FILES ../src/ifcconvert/*.h)
diff --git a/src/blenderbim/Makefile b/src/blenderbim/Makefile
index fc2c644ea3..608f9e54fa 100644
--- a/src/blenderbim/Makefile
+++ b/src/blenderbim/Makefile
@@ -210,9 +210,9 @@ endif
# Required by IFCDiff
mkdir dist/working
- cd dist/working && wget https://github.com/Moult/deepdiff/archive/master.zip
- cd dist/working && unzip master.zip
- cp -r dist/working/deepdiff-master/deepdiff dist/blenderbim/libs/site/packages/
+ cd dist/working && wget https://files.pythonhosted.org/packages/0f/ca/caead2949fbb824c7142e3774fa841aa853bb4d4331b440da8c8514dfc6f/deepdiff-5.8.1.tar.gz
+ cd dist/working && tar -xzvf deepdiff*
+ cp -r dist/working/deepdiff-5.8.1/deepdiff dist/blenderbim/libs/site/packages/
rm -rf dist/working
# Required by deepdiff
diff --git a/src/blenderbim/blenderbim/bim/__init__.py b/src/blenderbim/blenderbim/bim/__init__.py
index c29a3f9298..ff52cf6ed9 100644
--- a/src/blenderbim/blenderbim/bim/__init__.py
+++ b/src/blenderbim/blenderbim/bim/__init__.py
@@ -92,7 +92,9 @@ classes = [
operator.SelectIfcFile,
operator.SelectSchemaDir,
operator.SelectURIAttribute,
+ operator.EditBlenderCollection,
prop.StrProperty,
+ operator.BIM_OT_enum_property_search, # /!\ Register AFTER prop.StrProperty
prop.ObjProperty,
prop.Attribute,
prop.ModuleVisibility,
diff --git a/src/blenderbim/blenderbim/bim/helper.py b/src/blenderbim/blenderbim/bim/helper.py
index f0dab98427..06508b50fa 100644
--- a/src/blenderbim/blenderbim/bim/helper.py
+++ b/src/blenderbim/blenderbim/bim/helper.py
@@ -38,11 +38,14 @@ def draw_attribute(attribute, layout, copy_operator=None):
if not value_name:
layout.label(text=attribute.name)
return
- layout.prop(
- attribute,
- value_name,
- text=attribute.name,
- )
+ if value_name == "enum_value":
+ prop_with_search(layout, attribute, "enum_value", text=attribute.name)
+ else:
+ layout.prop(
+ attribute,
+ value_name,
+ text=attribute.name,
+ )
if attribute.is_optional:
layout.prop(attribute, "is_null", icon="RADIOBUT_OFF" if attribute.is_null else "RADIOBUT_ON", text="")
if copy_operator:
@@ -105,6 +108,39 @@ def export_attributes(props, callback=None):
return attributes
+def prop_with_search(layout, data, prop_name, **kwargs):
+ # kwargs are layout.prop arguments (text, icon, etc.)
+ row = layout.row(align=True)
+ # Magick courtesy of https://blender.stackexchange.com/a/203443/86891
+ row.context_pointer_set(name="data", data=data)
+ row.prop(data, prop_name, **kwargs)
+ op = row.operator("bim.enum_property_search", text="", icon="VIEWZOOM")
+ op.prop_name = prop_name
+
+
+def get_enum_items(data, prop_name, context):
+ # Retrieve items from a dynamic EnumProperty, which is otherwise not supported
+ # Or throws an error in the console when the items callback returns an empty list
+ # See https://blender.stackexchange.com/q/215781/86891
+ prop = data.__annotations__[prop_name]
+ items = prop.keywords.get("items")
+ if items is None:
+ return
+ if not isinstance(items, (list, tuple)):
+ # items are retrieved through a callback, not a static list :
+ items = items(data, context)
+ return items
+
+
+# hack to close popup
+# https://blender.stackexchange.com/a/202576/130742
+def close_operator_panel(event):
+ x, y = event.mouse_x, event.mouse_y
+ bpy.context.window.cursor_warp(10, 10)
+ move_back = lambda: bpy.context.window.cursor_warp(x, y)
+ bpy.app.timers.register(move_back, first_interval=0.01)
+
+
class IfcHeaderExtractor:
def __init__(self, filepath: str):
self.filepath = filepath
diff --git a/src/blenderbim/blenderbim/bim/import_ifc.py b/src/blenderbim/blenderbim/bim/import_ifc.py
index 6098132078..85cf80cc63 100644
--- a/src/blenderbim/blenderbim/bim/import_ifc.py
+++ b/src/blenderbim/blenderbim/bim/import_ifc.py
@@ -245,8 +245,8 @@ class IfcImporter:
self.create_structural_items()
self.profile_code("Create structural items")
if not self.ifc_import_settings.is_coordinating:
- self.create_type_products()
- self.profile_code("Create type products")
+ self.create_element_types()
+ self.profile_code("Create element types")
self.place_objects_in_collections()
self.profile_code("Place objects in collections")
self.add_project_to_scene()
@@ -326,6 +326,7 @@ class IfcImporter:
self.elements = [e for e in self.elements if e.Representation and not e.is_a("IfcFeatureElement")]
self.elements = set(self.elements[offset:offset_limit])
+ self.element_types = set([ifcopenshell.util.element.get_type(e) for e in self.elements])
if self.ifc_import_settings.has_filter and self.ifc_import_settings.should_filter_spatial_elements:
self.spatial_elements = self.get_spatial_elements_filtered_by_elements(self.elements)
@@ -576,19 +577,13 @@ class IfcImporter:
self.set_matrix_world(obj, grid_obj.matrix_world)
grid_collection.objects.link(obj)
- def create_type_products(self):
- # TODO allow filtering of spatial elements too
- if self.ifc_import_settings.has_filter:
- type_products = set([ifcopenshell.util.element.get_type(e) for e in self.elements])
- else:
- type_products = self.file.by_type("IfcTypeProduct")
-
- for type_product in type_products:
- if not type_product:
+ def create_element_types(self):
+ for element_type in self.element_types:
+ if not element_type:
continue
- self.create_type_product(type_product)
+ self.create_element_type(element_type)
- def create_type_product(self, element):
+ def create_element_type(self, element):
self.ifc_import_settings.logger.info("Creating object %s", element)
representation_map = self.get_type_product_body_representation_map(element)
mesh = None
diff --git a/src/blenderbim/blenderbim/bim/module/bcf/operator.py b/src/blenderbim/blenderbim/bim/module/bcf/operator.py
index 3ff328fe78..eaa5f9bb74 100644
--- a/src/blenderbim/blenderbim/bim/module/bcf/operator.py
+++ b/src/blenderbim/blenderbim/bim/module/bcf/operator.py
@@ -768,6 +768,8 @@ class ActivateBcfViewpoint(bpy.types.Operator):
bcfxml = bcfstore.BcfStore.get_bcfxml()
props = context.scene.BCFProperties
blender_topic = props.active_topic
+ if blender_topic is None:
+ return False
topic = bcfxml.topics[blender_topic.name]
return topic.viewpoints
@@ -880,7 +882,7 @@ class ActivateBcfViewpoint(bpy.types.Operator):
# Operators with context overrides are used because they are
# significantly faster than looping through all objects
- exception_global_ids = [v.ifc_guid for v in viewpoint.components.visibility.exceptions]
+ exception_global_ids = {v.ifc_guid for v in viewpoint.components.visibility.exceptions}
if viewpoint.components.visibility.default_visibility:
old = context.area.type
diff --git a/src/blenderbim/blenderbim/bim/module/bcf/prop.py b/src/blenderbim/blenderbim/bim/module/bcf/prop.py
index e24f5adba0..066982c67d 100644
--- a/src/blenderbim/blenderbim/bim/module/bcf/prop.py
+++ b/src/blenderbim/blenderbim/bim/module/bcf/prop.py
@@ -95,7 +95,7 @@ def getBcfViewpoints(self, context, force_update=False):
props = context.scene.BCFProperties
bcfxml = bcfstore.BcfStore.get_bcfxml()
topic = props.active_topic
- viewpoints = bcfxml.get_viewpoints(topic.name)
+ viewpoints = bcfxml.get_viewpoints(topic.name) if topic else {}
bcfviewpoints_enum.extend([(v, f"Viewpoint {i+1}", "") for i, v in enumerate(viewpoints.keys())])
return bcfviewpoints_enum
diff --git a/src/blenderbim/blenderbim/bim/module/brick/ui.py b/src/blenderbim/blenderbim/bim/module/brick/ui.py
index da3647ab6d..bb8898b2c0 100644
--- a/src/blenderbim/blenderbim/bim/module/brick/ui.py
+++ b/src/blenderbim/blenderbim/bim/module/brick/ui.py
@@ -18,6 +18,7 @@
import blenderbim.tool as tool
from bpy.types import Panel, UIList
+from blenderbim.bim.helper import prop_with_search
from blenderbim.bim.module.brick.data import BrickschemaData, BrickschemaReferencesData
@@ -48,7 +49,8 @@ class BIM_PT_brickschema(Panel):
row.operator("bim.close_brick_project", text="", icon="CANCEL")
row = self.layout.row(align=True)
- row.prop(self.props, "namespace", text="")
+ prop_with_search(row, self.props, "namespace", text="")
+ prop_with_search(row, self.props, "brick_equipment_class", text="")
row.prop(self.props, "brick_equipment_class", text="")
row.operator("bim.add_brick", text="", icon="ADD")
@@ -101,7 +103,7 @@ class BIM_PT_ifc_brickschema_references(Panel):
return
row = self.layout.row(align=True)
- row.prop(self.props, "libraries")
+ prop_with_search(row, self.props, "libraries")
row.operator("bim.convert_brick_project", text="", icon="ADD")
row = self.layout.row(align=True)
diff --git a/src/blenderbim/blenderbim/bim/module/context/ui.py b/src/blenderbim/blenderbim/bim/module/context/ui.py
index 685acb1817..58449f6d45 100644
--- a/src/blenderbim/blenderbim/bim/module/context/ui.py
+++ b/src/blenderbim/blenderbim/bim/module/context/ui.py
@@ -64,8 +64,8 @@ class BIM_PT_context(bpy.types.Panel):
row.operator("bim.remove_context", icon="X", text="").context = ifc_context["id"]
row = box.row(align=True)
- row.prop(props, "subcontexts", text="")
- row.prop(props, "target_views", text="")
+ blenderbim.bim.helper.prop_with_search(row, props, "subcontexts", text="")
+ blenderbim.bim.helper.prop_with_search(row, props, "target_views", text="")
op = row.operator("bim.add_context", icon="ADD", text="")
op.context_type = ifc_context["context_type"]
op.context_identifier = props.subcontexts
diff --git a/src/blenderbim/blenderbim/bim/module/debug/operator.py b/src/blenderbim/blenderbim/bim/module/debug/operator.py
index bdf852b568..5d723020ea 100644
--- a/src/blenderbim/blenderbim/bim/module/debug/operator.py
+++ b/src/blenderbim/blenderbim/bim/module/debug/operator.py
@@ -112,6 +112,7 @@ class CreateAllShapes(bpy.types.Operator):
def execute(self, context):
self.file = IfcStore.get_file()
elements = self.file.by_type("IfcElement") + self.file.by_type("IfcSpace")
+
total = len(elements)
settings = ifcopenshell.geom.settings()
failures = []
diff --git a/src/blenderbim/blenderbim/bim/module/diff/__init__.py b/src/blenderbim/blenderbim/bim/module/diff/__init__.py
index 02c9fbda20..4888dfd661 100644
--- a/src/blenderbim/blenderbim/bim/module/diff/__init__.py
+++ b/src/blenderbim/blenderbim/bim/module/diff/__init__.py
@@ -25,6 +25,7 @@ classes = (
operator.SelectDiffOldFile,
operator.SelectDiffNewFile,
operator.ExecuteIfcDiff,
+ prop.Relationships,
prop.DiffProperties,
ui.BIM_PT_diff,
)
diff --git a/src/blenderbim/blenderbim/bim/module/diff/data.py b/src/blenderbim/blenderbim/bim/module/diff/data.py
new file mode 100644
index 0000000000..0d12d0bafc
--- /dev/null
+++ b/src/blenderbim/blenderbim/bim/module/diff/data.py
@@ -0,0 +1,59 @@
+# BlenderBIM Add-on - OpenBIM Blender Add-on
+# Copyright (C) 2022 Dion Moult
+#
+# This file is part of BlenderBIM Add-on.
+#
+# BlenderBIM Add-on is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# BlenderBIM Add-on is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with BlenderBIM Add-on. If not, see .
+
+import bpy
+import json
+import blenderbim.tool as tool
+
+
+def refresh():
+ DiffData.is_loaded = False
+
+
+class DiffData:
+ data = {}
+ is_loaded = False
+ diff_json_file = None
+ diff = None
+
+ @classmethod
+ def load(cls):
+ cls.data = {"diff_json": cls.diff_json(), "changes": cls.changes()}
+ cls.is_loaded = True
+
+ @classmethod
+ def diff_json(cls):
+ props = bpy.context.scene.DiffProperties
+ if not props.diff_json_file:
+ cls.diff = None
+ return
+ if props.diff_json_file != cls.diff_json_file:
+ cls.diff_json_file = props.diff_json_file
+ with open(props.diff_json_file, "r") as file:
+ cls.diff = json.load(file)
+ return cls.diff
+
+ @classmethod
+ def changes(cls):
+ diff = cls.diff_json()
+ if not diff:
+ return {}
+ element = tool.Ifc.get_entity(bpy.context.active_object)
+ if not element or not hasattr(element, "GlobalId"):
+ return {}
+ return {k.upper().replace("_", " "): str(v) for k, v in diff["changed"].get(element.GlobalId, {}).items()}
diff --git a/src/blenderbim/blenderbim/bim/module/diff/operator.py b/src/blenderbim/blenderbim/bim/module/diff/operator.py
index 574c79a1b7..56307ef5e0 100644
--- a/src/blenderbim/blenderbim/bim/module/diff/operator.py
+++ b/src/blenderbim/blenderbim/bim/module/diff/operator.py
@@ -20,6 +20,7 @@ import bpy
import ifccsv
import ifcopenshell
import json
+import blenderbim.tool as tool
from blenderbim.bim.ifc import IfcStore
@@ -44,21 +45,23 @@ class VisualiseDiff(bpy.types.Operator):
bl_options = {"REGISTER", "UNDO"}
def execute(self, context):
- # ifc_file = IfcStore.get_file() # In case we get from Store
- ifc_file = ifcopenshell.open(context.scene.DiffProperties.diff_new_file) # for Now refer to the new file
+ ifc_file = tool.Ifc.get()
with open(context.scene.DiffProperties.diff_json_file, "r") as file:
diff = json.load(file)
for obj in context.visible_objects:
- obj.color = (1.0, 1.0, 1.0, 0.2)
- global_id = ifc_file.by_id(obj.BIMObjectProperties.ifc_definition_id).GlobalId
+ obj.color = (1.0, 1.0, 1.0, 1.0)
+ element = tool.Ifc.get_entity(obj)
+ if not element:
+ continue
+ global_id = getattr(element, "GlobalId", None)
if not global_id:
continue
if global_id in diff["deleted"]:
- obj.color = (1.0, 0.0, 0.0, 0.2)
+ obj.color = (1.0, 0.0, 0.0, 1.0)
elif global_id in diff["added"]:
- obj.color = (0.0, 1.0, 0.0, 0.2)
+ obj.color = (0.0, 1.0, 0.0, 1.0)
elif global_id in diff["changed"]:
- obj.color = (0.0, 0.0, 1.0, 0.2)
+ obj.color = (0.0, 0.0, 1.0, 1.0)
area = next(area for area in context.screen.areas if area.type == "VIEW_3D")
area.spaces[0].shading.color_type = "OBJECT"
return {"FINISHED"}
@@ -113,9 +116,11 @@ class ExecuteIfcDiff(bpy.types.Operator):
context.scene.DiffProperties.diff_old_file,
context.scene.DiffProperties.diff_new_file,
self.filepath,
- context.scene.DiffProperties.diff_relationships.split(),
+ [r.relationship for r in context.scene.DiffProperties.diff_relationships],
+ context.scene.DiffProperties.diff_filter_elements,
)
- ifc_diff.diff()
+ diff = ifc_diff.diff()
ifc_diff.export()
context.scene.DiffProperties.diff_json_file = self.filepath
+ context.scene.DiffProperties.diff_result = diff
return {"FINISHED"}
diff --git a/src/blenderbim/blenderbim/bim/module/diff/prop.py b/src/blenderbim/blenderbim/bim/module/diff/prop.py
index 1ae467c960..9b04aa024f 100644
--- a/src/blenderbim/blenderbim/bim/module/diff/prop.py
+++ b/src/blenderbim/blenderbim/bim/module/diff/prop.py
@@ -18,6 +18,7 @@
import bpy
from blenderbim.bim.prop import StrProperty
+from blenderbim.bim.module.diff.data import DiffData
from bpy.types import PropertyGroup
from bpy.props import (
PointerProperty,
@@ -31,8 +32,21 @@ from bpy.props import (
)
+def update_diff_json_file(self, context):
+ DiffData.data["diff_json"] = DiffData.diff_json()
+
+
+class Relationships(PropertyGroup):
+ relationship: EnumProperty(
+ name="Relationship",
+ items=[(r, r.capitalize(), r) for r in ["type", "property", "container", "aggregate", "classification"]],
+ )
+
+
class DiffProperties(PropertyGroup):
- diff_json_file: StringProperty(default="", name="Diff JSON File")
+ diff_json_file: StringProperty(default="", name="Diff JSON File", update=update_diff_json_file)
diff_old_file: StringProperty(default="", name="Diff Old IFC File")
diff_new_file: StringProperty(default="", name="Diff New IFC File")
- diff_relationships: StringProperty(default="", name="Diff Relationships")
+ diff_relationships: CollectionProperty(type=Relationships, name="Diff Relationships")
+ diff_filter_elements: StringProperty(default="", name="Diff Filter")
+ diff_result: StringProperty(default="", name="Diff Result")
diff --git a/src/blenderbim/blenderbim/bim/module/diff/ui.py b/src/blenderbim/blenderbim/bim/module/diff/ui.py
index f5dd1d1a6d..9ff84125d9 100644
--- a/src/blenderbim/blenderbim/bim/module/diff/ui.py
+++ b/src/blenderbim/blenderbim/bim/module/diff/ui.py
@@ -18,6 +18,9 @@
from bpy.types import Panel
from blenderbim.bim.ifc import IfcStore
+from blenderbim.bim.module.diff.data import DiffData
+import blenderbim.tool as tool
+import json
class BIM_PT_diff(Panel):
@@ -30,6 +33,9 @@ class BIM_PT_diff(Panel):
bl_parent_id = "BIM_PT_quality_control"
def draw(self, context):
+ if not DiffData.is_loaded:
+ DiffData.load()
+
layout = self.layout
layout.use_property_split = True
@@ -48,12 +54,41 @@ class BIM_PT_diff(Panel):
row = layout.row(align=True)
row.prop(bim_properties, "diff_relationships")
+ row.context_pointer_set("bim_prop_group", bim_properties)
+ add = row.operator("bim.edit_blender_collection", icon="ADD", text="")
+ add.option = "add"
+ add.collection = "diff_relationships"
+
+ for index, r in enumerate(bim_properties.diff_relationships):
+ row = layout.row(align=True)
+ row.context_pointer_set("bim_prop_group", bim_properties)
+ row.prop(r, "relationship", text=" ")
+ remove = row.operator("bim.edit_blender_collection", icon="REMOVE", text="")
+ remove.option = "remove"
+ remove.collection = "diff_relationships"
+ remove.index = index
+
+ row = layout.row(align=True)
+ row.prop(bim_properties, "diff_filter_elements")
+ row.operator("bim.ifc_selector", icon="FILTER", text="")
row = layout.row()
row.operator("bim.execute_ifc_diff")
+ if bim_properties.diff_result:
+ row = layout.row()
+ row.alignment = "CENTER"
+ row.label(text=bim_properties.diff_result)
# TODO: show if there ifc diff operation is sucessful
row = layout.row(align=True)
row.prop(bim_properties, "diff_json_file")
row.operator("bim.select_diff_json_file", icon="FILE_FOLDER", text="")
row.operator("bim.visualise_diff", icon="HIDE_OFF", text="")
+
+ if DiffData.data["changes"]:
+ row = layout.row()
+ row.label(text="Diff Results:")
+ for key, value in DiffData.data["changes"].items():
+ row = layout.row()
+ row.label(text=key)
+ row.label(text=value)
diff --git a/src/blenderbim/blenderbim/bim/module/drawing/operator.py b/src/blenderbim/blenderbim/bim/module/drawing/operator.py
index 91dcdd3b67..eca88ec09d 100644
--- a/src/blenderbim/blenderbim/bim/module/drawing/operator.py
+++ b/src/blenderbim/blenderbim/bim/module/drawing/operator.py
@@ -41,6 +41,7 @@ import blenderbim.bim.module.drawing.helper as helper
import blenderbim.bim.export_ifc
from lxml import etree
from mathutils import Vector
+from timeit import default_timer as timer
from blenderbim.bim.module.drawing.prop import RasterStyleProperty
from blenderbim.bim.ifc import IfcStore
from ifcopenshell.api.group.data import Data as GroupData
@@ -49,6 +50,21 @@ from ifcopenshell.api.pset.data import Data as PsetData
cwd = os.path.dirname(os.path.realpath(__file__))
+class profile:
+ """
+ A python context manager timing utility
+ """
+
+ def __init__(self, task):
+ self.task = task
+
+ def __enter__(self):
+ self.start = timer()
+
+ def __exit__(self, *args):
+ print(self.task, timer() - self.start)
+
+
def open_with_user_command(user_command, path):
if user_command:
commands = eval(user_command)
@@ -115,34 +131,39 @@ class CreateDrawing(bpy.types.Operator):
self.camera = context.scene.camera
self.camera_element = tool.Ifc.get_entity(self.camera)
self.file = IfcStore.get_file()
- self.time = None
- start = time.time()
- self.profile_code("Start drawing generation process")
- self.props = context.scene.DocProperties
- self.cprops = self.camera.data.BIMCameraProperties
- self.drawing_name = self.file.by_id(self.camera.BIMObjectProperties.ifc_definition_id).Name
- self.get_scale()
- if self.cprops.update_representation(self.camera):
- bpy.ops.bim.update_representation(obj=self.camera.name, ifc_representation_class="")
- self.svg_writer = svgwriter.SvgWriter()
- self.svg_writer.human_scale = self.human_scale
- self.svg_writer.scale = self.scale
- self.svg_writer.data_dir = context.scene.BIMProperties.data_dir
- self.svg_writer.camera = self.camera
- self.svg_writer.camera_width, self.svg_writer.camera_height = self.get_camera_dimensions()
- self.svg_writer.camera_projection = tuple(self.camera.matrix_world.to_quaternion() @ Vector((0, 0, -1)))
+ with profile("Drawing generation process"):
+
+ with profile("Initialize drawing generation process"):
+ self.props = context.scene.DocProperties
+ self.cprops = self.camera.data.BIMCameraProperties
+ self.drawing_name = self.file.by_id(self.camera.BIMObjectProperties.ifc_definition_id).Name
+ self.get_scale()
+ if self.cprops.update_representation(self.camera):
+ bpy.ops.bim.update_representation(obj=self.camera.name, ifc_representation_class="")
+
+ self.svg_writer = svgwriter.SvgWriter()
+ self.svg_writer.human_scale = self.human_scale
+ self.svg_writer.scale = self.scale
+ self.svg_writer.data_dir = context.scene.BIMProperties.data_dir
+ self.svg_writer.camera = self.camera
+ self.svg_writer.camera_width, self.svg_writer.camera_height = self.get_camera_dimensions()
+ self.svg_writer.camera_projection = tuple(self.camera.matrix_world.to_quaternion() @ Vector((0, 0, -1)))
+
+ with profile("Generate underlay"):
+ underlay_svg = self.generate_underlay(context)
+
+ with profile("Generate linework"):
+ linework_svg = self.generate_linework(context)
+
+ with profile("Generate annotation"):
+ annotation_svg = self.generate_annotation(context)
+
+ with profile("Combine SVG layers"):
+ svg_path = self.combine_svgs(context, underlay_svg, linework_svg, annotation_svg)
- underlay_svg = self.generate_underlay(context)
- self.profile_code("Generate underlay")
- linework_svg = self.generate_linework(context)
- self.profile_code("Generate linework")
- annotation_svg = self.generate_annotation(context)
- self.profile_code("Generate annotation")
- svg_path = self.combine_svgs(context, underlay_svg, linework_svg, annotation_svg)
- self.profile_code("Combine SVG layers")
open_with_user_command(context.preferences.addons["blenderbim"].preferences.svg_command, svg_path)
- print("Total Time: {:.2f}".format(time.time() - start))
+
return {"FINISHED"}
def get_camera_dimensions(self):
@@ -155,12 +176,6 @@ class CreateDrawing(bpy.types.Operator):
width = height / render.resolution_y * render.resolution_x
return width, height
- def profile_code(self, message):
- if not self.time:
- self.time = time.time()
- print("{} :: {:.2f}".format(message, time.time() - self.time))
- self.time = time.time()
-
def combine_svgs(self, context, underlay, linework, annotation):
# Hacky :)
svg_path = os.path.join(context.scene.BIMProperties.data_dir, "diagrams", self.drawing_name + ".svg")
@@ -255,13 +270,14 @@ class CreateDrawing(bpy.types.Operator):
if os.path.isfile(svg_path) and self.props.should_use_linework_cache:
return svg_path
- # All very hackish whilst prototyping
- exporter = blenderbim.bim.export_ifc.IfcExporter(None)
- exporter.file = tool.Ifc.get()
- invalidated_guids = exporter.sync_deletions()
- invalidated_elements = exporter.sync_all_objects()
- invalidated_elements += exporter.sync_edited_objects()
- [invalidated_guids.append(e.GlobalId) for e in invalidated_elements if hasattr(e, "GlobalId")]
+ with profile("sync"):
+ # All very hackish whilst prototyping
+ exporter = blenderbim.bim.export_ifc.IfcExporter(None)
+ exporter.file = tool.Ifc.get()
+ invalidated_guids = exporter.sync_deletions()
+ invalidated_elements = exporter.sync_all_objects()
+ invalidated_elements += exporter.sync_edited_objects()
+ [invalidated_guids.append(e.GlobalId) for e in invalidated_elements if hasattr(e, "GlobalId")]
# If we have already calculated it in the SVG in the past, don't recalculate
edited_guids = set()
@@ -312,40 +328,46 @@ class CreateDrawing(bpy.types.Operator):
cache = IfcStore.get_cache()
[cache.remove(guid) for guid in invalidated_guids]
- if target_view_contexts and elements:
- geom_settings = ifcopenshell.geom.settings(
- DISABLE_TRIANGULATION=True, STRICT_TOLERANCE=True, INCLUDE_CURVES=True
- )
- geom_settings.set_context_ids(target_view_contexts)
- it = ifcopenshell.geom.iterator(geom_settings, ifc, multiprocessing.cpu_count(), include=elements)
- it.set_cache(cache)
- processed = set()
- for elem in self.yield_from_iterator(it):
- processed.add(ifc.by_id(elem.id))
- self.serialiser.write(elem)
- elements -= processed
+ with profile("Processing target view context"):
+ if target_view_contexts and elements:
+ geom_settings = ifcopenshell.geom.settings(
+ DISABLE_TRIANGULATION=True, STRICT_TOLERANCE=True, INCLUDE_CURVES=True
+ )
+ geom_settings.set_context_ids(target_view_contexts)
+ it = ifcopenshell.geom.iterator(geom_settings, ifc, multiprocessing.cpu_count(), include=elements)
+ it.set_cache(cache)
+ processed = set()
+ for elem in self.yield_from_iterator(it):
+ processed.add(ifc.by_id(elem.id))
+ self.serialiser.write(elem)
+ elements -= processed
- if body_contexts and elements:
+ with profile("Processing body context"):
+ if body_contexts and elements:
+ geom_settings = ifcopenshell.geom.settings(DISABLE_TRIANGULATION=True, STRICT_TOLERANCE=True)
+ geom_settings.set_context_ids(body_contexts)
+ it = ifcopenshell.geom.iterator(geom_settings, ifc, multiprocessing.cpu_count(), include=elements)
+ it.set_cache(cache)
+ for elem in self.yield_from_iterator(it):
+ self.serialiser.write(elem)
+
+ with profile("Camera element"):
+ # @todo tfk: is this needed?
geom_settings = ifcopenshell.geom.settings(DISABLE_TRIANGULATION=True, STRICT_TOLERANCE=True)
- geom_settings.set_context_ids(body_contexts)
- it = ifcopenshell.geom.iterator(geom_settings, ifc, multiprocessing.cpu_count(), include=elements)
- it.set_cache(cache)
+ it = ifcopenshell.geom.iterator(geom_settings, ifc, include=[self.camera_element])
for elem in self.yield_from_iterator(it):
self.serialiser.write(elem)
- geom_settings = ifcopenshell.geom.settings(DISABLE_TRIANGULATION=True, STRICT_TOLERANCE=True)
- it = ifcopenshell.geom.iterator(geom_settings, ifc, include=[self.camera_element])
- for elem in self.yield_from_iterator(it):
- self.serialiser.write(elem)
-
- self.serialiser.finalize()
+ with profile("Finalizing"):
+ self.serialiser.finalize()
results = self.svg_buffer.get_value()
- root = etree.fromstring(results)
- self.enrich_linework_with_metadata(root)
- self.move_projection_to_bottom(root)
- with open(svg_path, "wb") as svg:
- svg.write(etree.tostring(root))
+ with profile("Post processing"):
+ root = etree.fromstring(results)
+ self.enrich_linework_with_metadata(root)
+ self.move_projection_to_bottom(root)
+ with open(svg_path, "wb") as svg:
+ svg.write(etree.tostring(root))
return svg_path
@@ -487,8 +509,11 @@ class AddAnnotation(bpy.types.Operator, Operator):
def _execute(self, context):
drawing = tool.Ifc.get_entity(context.scene.camera)
if not drawing:
+ self.report({"WARNING"}, "Not a BIM camera")
return
- core.add_annotation(tool.Ifc, tool.Collector, tool.Drawing, drawing=drawing, object_type=self.object_type)
+ r = core.add_annotation(tool.Ifc, tool.Collector, tool.Drawing, drawing=drawing, object_type=self.object_type)
+ if isinstance(r, str):
+ self.report({"WARNING"}, r)
class AddSheet(bpy.types.Operator, Operator):
diff --git a/src/blenderbim/blenderbim/bim/module/drawing/prop.py b/src/blenderbim/blenderbim/bim/module/drawing/prop.py
index 2016f23dd2..b20f871d11 100644
--- a/src/blenderbim/blenderbim/bim/module/drawing/prop.py
+++ b/src/blenderbim/blenderbim/bim/module/drawing/prop.py
@@ -392,6 +392,7 @@ class BIMTextProperties(PropertyGroup):
name="Font Size",
)
+
class BIMAssignedProductProperties(PropertyGroup):
is_editing_product: BoolProperty(name="Is Editing Product", default=False)
relating_product: PointerProperty(name="Relating Product", type=bpy.types.Object)
diff --git a/src/blenderbim/blenderbim/bim/module/drawing/sheeter.py b/src/blenderbim/blenderbim/bim/module/drawing/sheeter.py
index 7855e6067c..4df0f4e9f9 100644
--- a/src/blenderbim/blenderbim/bim/module/drawing/sheeter.py
+++ b/src/blenderbim/blenderbim/bim/module/drawing/sheeter.py
@@ -118,7 +118,7 @@ class SheetBuilder:
sheet_tree = ET.parse(sheet_path)
sheet_root = sheet_tree.getroot()
- for g in sheet_root.findall('{http://www.w3.org/2000/svg}g'):
+ for g in sheet_root.findall("{http://www.w3.org/2000/svg}g"):
if g.attrib.get("data-id") == str(reference.id()):
sheet_root.remove(g)
break
diff --git a/src/blenderbim/blenderbim/bim/module/drawing/svgwriter.py b/src/blenderbim/blenderbim/bim/module/drawing/svgwriter.py
index 891b8f2092..74b3b06642 100644
--- a/src/blenderbim/blenderbim/bim/module/drawing/svgwriter.py
+++ b/src/blenderbim/blenderbim/bim/module/drawing/svgwriter.py
@@ -70,7 +70,7 @@ class SvgWriter:
viewBox=("0 0 {} {}".format(self.width, self.height)),
id="root",
data_scale=self.human_scale,
- debug=False, # Disable validation so that we can insert the IFC namespace
+ debug=False, # Disable validation so that we can insert the IFC namespace
)
self.svg.attribs["xmlns:ifc"] = "http://www.ifcopenshell.org/ns"
return self
@@ -81,7 +81,9 @@ class SvgWriter:
def draw_underlay(self, image):
self.svg.add(
self.svg.image(
- os.path.join("..", "diagrams", os.path.basename(image)), width=self.width, height=self.height,
+ os.path.join("..", "diagrams", os.path.basename(image)),
+ width=self.width,
+ height=self.height,
)
)
return self
@@ -252,7 +254,9 @@ class SvgWriter:
end = Vector(((x_offset + v1.x), (y_offset - v1.y)))
vector = end - start
line = self.svg.add(
- self.svg.line(start=tuple(start * self.svg_scale), end=tuple(end * self.svg_scale), class_=" ".join(classes))
+ self.svg.line(
+ start=tuple(start * self.svg_scale), end=tuple(end * self.svg_scale), class_=" ".join(classes)
+ )
)
line["stroke-dasharray"] = "12.5, 3, 3, 3"
axis_tag = tool.Ifc.get_entity(obj).Name
@@ -361,7 +365,9 @@ class SvgWriter:
end = Vector(((x_offset + v1.x), (y_offset - v1.y)))
vector = end - start
line = self.svg.add(
- self.svg.line(start=tuple(start * self.svg_scale), end=tuple(end * self.svg_scale), class_=" ".join(classes))
+ self.svg.line(
+ start=tuple(start * self.svg_scale), end=tuple(end * self.svg_scale), class_=" ".join(classes)
+ )
)
def draw_leader_annotation(self, obj):
@@ -427,7 +433,9 @@ class SvgWriter:
(symbol_position * self.svg_scale)[1],
)
- self.svg.add(self.svg.use("#elevation-arrow", insert=tuple(symbol_position * self.svg_scale), transform=transform))
+ self.svg.add(
+ self.svg.use("#elevation-arrow", insert=tuple(symbol_position * self.svg_scale), transform=transform)
+ )
self.svg.add(self.svg.use("#elevation-tag", insert=tuple(symbol_position * self.svg_scale)))
reference_id, sheet_id = self.get_reference_and_sheet_id_from_annotation(tool.Ifc.get_entity(obj))
@@ -666,7 +674,7 @@ class SvgWriter:
dir2 = ((arc_matrix.inverted() @ arc_end_pts[1]) - (arc_matrix.inverted() @ center)).normalized()
angle = -dir1.xy.angle_signed(dir2.xy)
- #if is_reflex:
+ # if is_reflex:
# angle = angle % (math.pi * 2)
# Center of gravity of all vertices, used to help position the text
@@ -680,7 +688,9 @@ class SvgWriter:
arc_midpoint = center + ((cog - center).normalized() * radius)
text_position = self.project_point_onto_camera(arc_midpoint)
- text_position = Vector(((x_offset + text_position.x) * self.svg_scale, (y_offset - text_position.y) * self.svg_scale))
+ text_position = Vector(
+ ((x_offset + text_position.x) * self.svg_scale, (y_offset - text_position.y) * self.svg_scale)
+ )
center_projected = self.project_point_onto_camera(center)
center_position = Vector(
@@ -704,8 +714,12 @@ class SvgWriter:
# Draw SVG arc, see for details: http://xahlee.info/js/svg_circle_arc.html
arc_proj_end_pts = [self.project_point_onto_camera(v) for v in arc_end_pts]
- p1 = Vector(((x_offset + arc_proj_end_pts[0].x) * self.svg_scale, (y_offset - arc_proj_end_pts[0].y) * self.svg_scale))
- p2 = Vector(((x_offset + arc_proj_end_pts[1].x) * self.svg_scale, (y_offset - arc_proj_end_pts[1].y) * self.svg_scale))
+ p1 = Vector(
+ ((x_offset + arc_proj_end_pts[0].x) * self.svg_scale, (y_offset - arc_proj_end_pts[0].y) * self.svg_scale)
+ )
+ p2 = Vector(
+ ((x_offset + arc_proj_end_pts[1].x) * self.svg_scale, (y_offset - arc_proj_end_pts[1].y) * self.svg_scale)
+ )
r = radius * self.svg_scale
# reflex = 1 if angle > math.pi else 0
reflex = is_reflex
@@ -735,10 +749,16 @@ class SvgWriter:
path = self.svg.add(self.svg.path(d=d, class_=" ".join(classes)))
p0 = Vector(
- ((x_offset + projected_points[0].x) * self.svg_scale, (y_offset - projected_points[0].y) * self.svg_scale)
+ (
+ (x_offset + projected_points[0].x) * self.svg_scale,
+ (y_offset - projected_points[0].y) * self.svg_scale,
+ )
)
p1 = Vector(
- ((x_offset + projected_points[1].x) * self.svg_scale, (y_offset - projected_points[1].y) * self.svg_scale)
+ (
+ (x_offset + projected_points[1].x) * self.svg_scale,
+ (y_offset - projected_points[1].y) * self.svg_scale,
+ )
)
text_offset = (p0 - p1).xy.normalized() * 5
text_position = projected_points[0]
@@ -823,7 +843,9 @@ class SvgWriter:
text_position = (mid * self.svg_scale) + perpendicular
rotation = math.degrees(vector.angle_signed(Vector((1, 0))))
line = self.svg.add(
- self.svg.line(start=tuple(start * self.svg_scale), end=tuple(end * self.svg_scale), class_=" ".join(classes))
+ self.svg.line(
+ start=tuple(start * self.svg_scale), end=tuple(end * self.svg_scale), class_=" ".join(classes)
+ )
)
if text_override is not None:
text = text_override
diff --git a/src/blenderbim/blenderbim/bim/module/geometry/operator.py b/src/blenderbim/blenderbim/bim/module/geometry/operator.py
index 541cb0a92d..14b67b7203 100644
--- a/src/blenderbim/blenderbim/bim/module/geometry/operator.py
+++ b/src/blenderbim/blenderbim/bim/module/geometry/operator.py
@@ -130,10 +130,6 @@ class UpdateRepresentation(bpy.types.Operator):
obj: bpy.props.StringProperty()
ifc_representation_class: bpy.props.StringProperty()
- @classmethod
- def poll(cls, context):
- return context.active_object.mode == "OBJECT"
-
def execute(self, context):
return IfcStore.execute_ifc_operator(self, context)
@@ -141,6 +137,10 @@ class UpdateRepresentation(bpy.types.Operator):
if not ContextData.is_loaded:
ContextData.load(IfcStore.get_file())
+ if context.active_object and context.active_object.mode != "OBJECT":
+ # Ensure mode is object to prevent invalid mesh data causing CTD
+ bpy.ops.object.mode_set(mode="OBJECT", toggle=False)
+
objs = [bpy.data.objects.get(self.obj)] if self.obj else context.selected_objects
self.file = IfcStore.get_file()
@@ -207,7 +207,10 @@ class UpdateRepresentation(bpy.types.Operator):
new_representation = ifcopenshell.api.run("geometry.add_representation", self.file, **representation_data)
if tool.Geometry.is_body_representation(new_representation):
- [tool.Geometry.run_style_add_style(obj=mat) for mat in tool.Geometry.get_object_materials_without_styles(obj)]
+ [
+ tool.Geometry.run_style_add_style(obj=mat)
+ for mat in tool.Geometry.get_object_materials_without_styles(obj)
+ ]
ifcopenshell.api.run(
"style.assign_representation_styles",
self.file,
@@ -237,7 +240,7 @@ class UpdateParametricRepresentation(bpy.types.Operator):
@classmethod
def poll(cls, context):
- return context.active_object.mode == "OBJECT"
+ return context.active_object and context.active_object.mode == "OBJECT"
def execute(self, context):
self.file = IfcStore.get_file()
diff --git a/src/blenderbim/blenderbim/bim/module/geometry/ui.py b/src/blenderbim/blenderbim/bim/module/geometry/ui.py
index 78c8e21414..5f7c918de0 100644
--- a/src/blenderbim/blenderbim/bim/module/geometry/ui.py
+++ b/src/blenderbim/blenderbim/bim/module/geometry/ui.py
@@ -19,6 +19,7 @@
import bpy
from bpy.types import Panel
from blenderbim.bim.ifc import IfcStore
+from blenderbim.bim.helper import prop_with_search
from blenderbim.bim.module.geometry.data import RepresentationsData, DerivedPlacementsData
@@ -50,7 +51,7 @@ class BIM_PT_representations(Panel):
layout.label(text="No representations found")
row = layout.row(align=True)
- row.prop(context.scene.BIMRootProperties, "contexts", text="")
+ prop_with_search(row, context.scene.BIMRootProperties, "contexts", text="")
row.operator("bim.add_representation", icon="ADD", text="")
for representation in RepresentationsData.data["representations"]:
diff --git a/src/blenderbim/blenderbim/bim/module/group/__init__.py b/src/blenderbim/blenderbim/bim/module/group/__init__.py
index ddfc4ff48c..bc16858fd2 100644
--- a/src/blenderbim/blenderbim/bim/module/group/__init__.py
+++ b/src/blenderbim/blenderbim/bim/module/group/__init__.py
@@ -21,8 +21,10 @@ from . import ui, prop, operator
classes = (
operator.LoadGroups,
+ operator.ToggleGroup,
operator.DisableGroupEditingUI,
operator.AddGroup,
+ operator.AddGroupToGroup,
operator.EditGroup,
operator.RemoveGroup,
operator.ToggleAssigningGroup,
@@ -31,6 +33,8 @@ classes = (
operator.EnableEditingGroup,
operator.DisableEditingGroup,
operator.SelectGroupProducts,
+ operator.UpdateGroup,
+ prop.ExpandedGroups,
prop.Group,
prop.BIMGroupProperties,
ui.BIM_PT_groups,
@@ -42,7 +46,9 @@ classes = (
def register():
bpy.types.Scene.BIMGroupProperties = bpy.props.PointerProperty(type=prop.BIMGroupProperties)
+ bpy.types.Scene.ExpandedGroups = bpy.props.PointerProperty(type=prop.ExpandedGroups)
def unregister():
del bpy.types.Scene.BIMGroupProperties
+ del bpy.types.Scene.ExpandedGroups
diff --git a/src/blenderbim/blenderbim/bim/module/group/operator.py b/src/blenderbim/blenderbim/bim/module/group/operator.py
index fdf7548826..5596bcd247 100644
--- a/src/blenderbim/blenderbim/bim/module/group/operator.py
+++ b/src/blenderbim/blenderbim/bim/module/group/operator.py
@@ -22,22 +22,86 @@ import ifcopenshell.api
import blenderbim.bim.helper
from blenderbim.bim.ifc import IfcStore
from ifcopenshell.api.group.data import Data
+from ifcopenshell.util.selector import Selector
+import json
class LoadGroups(bpy.types.Operator):
bl_idname = "bim.load_groups"
bl_label = "Load Groups"
bl_options = {"REGISTER", "UNDO"}
+ is_refresh: bpy.props.BoolProperty(default=False)
def execute(self, context):
- props = context.scene.BIMGroupProperties
- props.groups.clear()
+ self.props = context.scene.BIMGroupProperties
+ self.expanded_groups = json.loads(context.scene.ExpandedGroups.json_string)
+ self.props.groups.clear()
+ self.ifc = IfcStore.get_file()
+ if not self.is_refresh:
+ context.scene.ExpandedGroups.json_string = "{}"
+
for ifc_definition_id, group in Data.groups.items():
- new = props.groups.add()
- new.ifc_definition_id = ifc_definition_id
- new.name = group["Name"]
- props.is_editing = True
+ if not group["HasAssignments"]:
+ new = self.props.groups.add()
+ new.ifc_definition_id = ifc_definition_id
+ new.name = group["Name"]
+ new.selection_query = group["Description"].split("*selector*")[1] if group["Description"] else ""
+ new.tree_depth = 0
+
+ if group["IsGroupedBy"]:
+ # assumes 1:1 cardinality, will need to be updated to reflect IFC4 changes
+ # where the cardinality is 0:? - vulevukusej
+ sub_groups = [g for g in group["IsGroupedBy"][0].RelatedObjects if g.is_a("IfcGroup")]
+ new.has_children = True if len(sub_groups) != 0 else False
+
+ if self.is_refresh:
+ self.recursively_load_sub_groups(ifc_definition_id, new)
+
+ self.props.is_editing = True
bpy.ops.bim.disable_editing_group()
+ Data.load(IfcStore.get_file())
+ return {"FINISHED"}
+
+ def recursively_load_sub_groups(self, ifc_definition_id, parent):
+ sub_groups = [
+ k for k, v in Data.products.items() if self.ifc.by_id(k).is_a("IfcGroup") and ifc_definition_id in v
+ ]
+ if str(ifc_definition_id) not in self.expanded_groups or sub_groups == []:
+ return
+ else:
+ parent.is_expanded = True
+ parent.has_children = True
+ for group in sub_groups:
+ new = self.props.groups.add()
+ new.ifc_definition_id = group
+ new.name = Data.groups[group]["Name"]
+ new.selection_query = (
+ Data.groups[group]["Description"].split("*selector*")[1]
+ if Data.groups[group]["Description"]
+ else ""
+ )
+ new.has_children = True if len(Data.groups[group]["IsGroupedBy"]) != 0 else False
+ new.tree_depth = parent.tree_depth + 1
+ self.recursively_load_sub_groups(new.ifc_definition_id, new)
+
+
+class ToggleGroup(bpy.types.Operator):
+ bl_idname = "bim.toggle_group"
+ bl_label = "Toggle Group"
+ bl_options = {"REGISTER", "UNDO"}
+ ifc_definition_id: bpy.props.IntProperty()
+ index: bpy.props.IntProperty()
+ option: bpy.props.StringProperty(name="Expand or Collapse")
+
+ def execute(self, context):
+ context.scene.BIMGroupProperties.groups[self.index].is_expanded = True if self.option == "Expand" else False
+ json_string = json.loads(context.scene.ExpandedGroups.json_string)
+ if self.option == "Expand":
+ json_string.setdefault(str(self.ifc_definition_id), None)
+ else:
+ json_string.pop(str(self.ifc_definition_id), None)
+ context.scene.ExpandedGroups.json_string = json.dumps(json_string)
+ bpy.ops.bim.load_groups(is_refresh=True)
return {"FINISHED"}
@@ -54,7 +118,7 @@ class DisableGroupEditingUI(bpy.types.Operator):
class AddGroup(bpy.types.Operator):
bl_idname = "bim.add_group"
- bl_label = "Add Group"
+ bl_label = "Add New Group"
bl_options = {"REGISTER", "UNDO"}
def execute(self, context):
@@ -63,15 +127,38 @@ class AddGroup(bpy.types.Operator):
def _execute(self, context):
result = ifcopenshell.api.run("group.add_group", IfcStore.get_file())
Data.load(IfcStore.get_file())
- bpy.ops.bim.load_groups()
+
+ bpy.ops.bim.load_groups(is_refresh=True)
bpy.ops.bim.enable_editing_group(group=result.id())
return {"FINISHED"}
+class AddGroupToGroup(bpy.types.Operator):
+ bl_idname = "bim.add_group_to_group"
+ bl_label = "Add Group to Group"
+ bl_options = {"REGISTER", "UNDO"}
+ group: bpy.props.IntProperty(name="Group ID")
+
+ def execute(self, context):
+ return IfcStore.execute_ifc_operator(self, context)
+
+ def _execute(self, context):
+ self.file = IfcStore.get_file()
+ result = ifcopenshell.api.run("group.add_group", self.file)
+ ifcopenshell.api.run(
+ "group.assign_group", IfcStore.get_file(), **{"product": [result], "group": self.file.by_id(self.group)}
+ )
+ Data.load(IfcStore.get_file())
+ bpy.ops.bim.load_groups(is_refresh=True)
+ bpy.ops.bim.disable_group_editing_ui()
+ return {"FINISHED"}
+
+
class EditGroup(bpy.types.Operator):
bl_idname = "bim.edit_group"
bl_label = "Edit Group"
bl_options = {"REGISTER", "UNDO"}
+ copy_from_selector: bpy.props.BoolProperty(name="Copy from Selector", default=False)
def execute(self, context):
return IfcStore.execute_ifc_operator(self, context)
@@ -84,12 +171,16 @@ class EditGroup(bpy.types.Operator):
attributes[attribute.name] = None
else:
attributes[attribute.name] = attribute.string_value
+
+ if self.copy_from_selector:
+ attributes["Description"] = context.scene.IFCSelector.selection_query
+
self.file = IfcStore.get_file()
ifcopenshell.api.run(
"group.edit_group", self.file, **{"group": self.file.by_id(props.active_group_id), "attributes": attributes}
)
Data.load(IfcStore.get_file())
- bpy.ops.bim.load_groups()
+ bpy.ops.bim.load_groups(is_refresh=True)
return {"FINISHED"}
@@ -107,7 +198,7 @@ class RemoveGroup(bpy.types.Operator):
self.file = IfcStore.get_file()
ifcopenshell.api.run("group.remove_group", self.file, **{"group": self.file.by_id(self.group)})
Data.load(IfcStore.get_file())
- bpy.ops.bim.load_groups()
+ bpy.ops.bim.load_groups(is_refresh=True)
return {"FINISHED"}
@@ -120,9 +211,7 @@ class EnableEditingGroup(bpy.types.Operator):
def execute(self, context):
props = context.scene.BIMGroupProperties
props.group_attributes.clear()
-
blenderbim.bim.helper.import_attributes("IfcGroup", props.group_attributes, Data.groups[self.group])
-
props.active_group_id = self.group
return {"FINISHED"}
@@ -167,7 +256,7 @@ class AssignGroup(bpy.types.Operator):
"group.assign_group",
self.file,
**{
- "product": self.file.by_id(product.BIMObjectProperties.ifc_definition_id),
+ "product": [self.file.by_id(product.BIMObjectProperties.ifc_definition_id)],
"group": self.file.by_id(self.group),
}
)
@@ -219,3 +308,33 @@ class SelectGroupProducts(bpy.types.Operator):
if self.group in product_groups:
obj.select_set(True)
return {"FINISHED"}
+
+
+class UpdateGroup(bpy.types.Operator):
+ bl_idname = "bim.update_group"
+ bl_label = "Update Group"
+ bl_options = {"REGISTER", "UNDO"}
+ query: bpy.props.StringProperty()
+ group_id: bpy.props.IntProperty()
+
+ def execute(self, context):
+ return IfcStore.execute_ifc_operator(self, context)
+
+ def _execute(self, context):
+ self.file = IfcStore.get_file()
+ group = self.file.by_id(self.group_id)
+ query = self.query
+
+ new_products = Selector.parse(self.file, query)
+ ifcopenshell.api.run(
+ "group.update_group_products",
+ self.file,
+ **{
+ "group": group,
+ "products": new_products,
+
+ }
+ )
+ Data.load(IfcStore.get_file())
+ bpy.ops.bim.load_groups(is_refresh=True)
+ return {"FINISHED"}
diff --git a/src/blenderbim/blenderbim/bim/module/group/prop.py b/src/blenderbim/blenderbim/bim/module/group/prop.py
index 03011af513..9a6ef31958 100644
--- a/src/blenderbim/blenderbim/bim/module/group/prop.py
+++ b/src/blenderbim/blenderbim/bim/module/group/prop.py
@@ -18,7 +18,10 @@
import bpy
from blenderbim.bim.prop import StrProperty, Attribute
+from blenderbim.bim.helper import import_attributes
+from ifcopenshell.api.group.data import Data
from bpy.types import PropertyGroup
+import json
from bpy.props import (
PointerProperty,
StringProperty,
@@ -31,9 +34,17 @@ from bpy.props import (
)
+class ExpandedGroups(StrProperty):
+ json_string: StringProperty(name="JSON String", default="{}")
+
+
class Group(PropertyGroup):
name: StringProperty(name="Name")
ifc_definition_id: IntProperty(name="IFC Definition ID")
+ selection_query: StringProperty(name="Selection Query")
+ is_expanded: BoolProperty(name="Is Expanded", default=False)
+ has_children: BoolProperty(name="Has Children", default=False)
+ tree_depth: IntProperty(name="Tree Depth")
class BIMGroupProperties(PropertyGroup):
diff --git a/src/blenderbim/blenderbim/bim/module/group/ui.py b/src/blenderbim/blenderbim/bim/module/group/ui.py
index ce24d514cc..0f75e09097 100644
--- a/src/blenderbim/blenderbim/bim/module/group/ui.py
+++ b/src/blenderbim/blenderbim/bim/module/group/ui.py
@@ -40,7 +40,7 @@ class BIM_PT_groups(Panel):
self.props = context.scene.BIMGroupProperties
row = self.layout.row(align=True)
- row.label(text="{} Groups Found".format(len(Data.groups)), icon="OUTLINER")
+ row.label(text=f"{len(Data.groups)} Groups Found", icon="OUTLINER")
if self.props.is_editing:
row.operator("bim.add_group", text="", icon="ADD")
row.operator("bim.disable_group_editing_ui", text="", icon="CANCEL")
@@ -115,10 +115,22 @@ class BIM_PT_object_groups(Panel):
class BIM_UL_groups(UIList):
- def draw_item(self, context, layout, data, item, icon, active_data, active_propname):
+ def draw_item(self, context, layout, data, item, icon, active_data, active_propname, index):
if item:
row = layout.row(align=True)
- row.label(text=item.name)
+ for i in range(0, item.tree_depth):
+ row.label(text="", icon="BLANK1")
+ if item.has_children:
+ op = row.operator(
+ "bim.toggle_group", icon="TRIA_DOWN" if item.is_expanded else "TRIA_RIGHT", text="", emboss=False
+ )
+ op.ifc_definition_id = item.ifc_definition_id
+ op.index = index
+ op.option = "Collapse" if item.is_expanded else "Expand"
+ else:
+ row.label(text="", icon="BLANK1")
+
+ row.label(text=f"*{item.name}") if item.selection_query != "" else row.label(text=item.name)
group_id = item.ifc_definition_id
if context.scene.BIMGroupProperties.active_group_id == group_id:
op = row.operator("bim.select_group_products", text="", icon="RESTRICT_SELECT_OFF")
@@ -128,21 +140,46 @@ class BIM_UL_groups(UIList):
elif context.scene.BIMGroupProperties.active_group_id:
op = row.operator("bim.select_group_products", text="", icon="RESTRICT_SELECT_OFF")
op.group = group_id
+ op = row.operator("bim.add_group_to_group", text="", icon="ADD")
+ op.group = group_id
op = row.operator("bim.remove_group", text="", icon="X")
op.group = group_id
+ if item.selection_query != "":
+ op = row.operator("bim.update_group", text="", icon="FILE_REFRESH")
+ op.group_id = item.ifc_definition_id
+ op.query = item.selection_query
else:
op = row.operator("bim.select_group_products", text="", icon="RESTRICT_SELECT_OFF")
op.group = group_id
op = row.operator("bim.enable_editing_group", text="", icon="GREASEPENCIL")
op.group = group_id
+ op = row.operator("bim.add_group_to_group", text="", icon="ADD")
+ op.group = group_id
op = row.operator("bim.remove_group", text="", icon="X")
op.group = group_id
+ if item.selection_query != "":
+ op = row.operator("bim.update_group", text="", icon="FILE_REFRESH")
+ op.group_id = item.ifc_definition_id
+ op.query = item.selection_query
class BIM_UL_object_groups(UIList):
- def draw_item(self, context, layout, data, item, icon, active_data, active_propname):
+ def draw_item(self, context, layout, data, item, icon, active_data, active_propname, index):
if item:
row = layout.row(align=True)
+ for i in range(0, item.tree_depth):
+ row.label(text="", icon="BLANK1")
+ if item.has_children:
+ op = row.operator(
+ "bim.toggle_group", icon="TRIA_DOWN" if item.is_expanded else "TRIA_RIGHT", text="", emboss=False
+ )
+ op.ifc_definition_id = item.ifc_definition_id
+ op.index = index
+ op.option = "Collapse" if item.is_expanded else "Expand"
+ else:
+ row.label(text="", icon="BLANK1")
row.label(text=item.name)
+ op = row.operator("bim.remove_group", text="", icon="X")
+ op.group = item.ifc_definition_id
op = row.operator("bim.assign_group", text="", icon="ADD")
op.group = item.ifc_definition_id
diff --git a/src/blenderbim/blenderbim/bim/module/material/data.py b/src/blenderbim/blenderbim/bim/module/material/data.py
index 4d90a29408..78ef924562 100644
--- a/src/blenderbim/blenderbim/bim/module/material/data.py
+++ b/src/blenderbim/blenderbim/bim/module/material/data.py
@@ -84,7 +84,9 @@ class ObjectMaterialData:
@classmethod
def materials(cls):
- return sorted([(str(m.id()), m.Name or "Unnamed", "") for m in tool.Ifc.get().by_type("IfcMaterial")], key=lambda x: x[1])
+ return sorted(
+ [(str(m.id()), m.Name or "Unnamed", "") for m in tool.Ifc.get().by_type("IfcMaterial")], key=lambda x: x[1]
+ )
@classmethod
def type_material(cls):
diff --git a/src/blenderbim/blenderbim/bim/module/material/ui.py b/src/blenderbim/blenderbim/bim/module/material/ui.py
index d0048f5633..01391fa5f7 100644
--- a/src/blenderbim/blenderbim/bim/module/material/ui.py
+++ b/src/blenderbim/blenderbim/bim/module/material/ui.py
@@ -22,6 +22,7 @@ from ifcopenshell.api.material.data import Data
from ifcopenshell.api.profile.data import Data as ProfileData
from blenderbim.bim.ifc import IfcStore
from blenderbim.bim.helper import draw_attributes
+from blenderbim.bim.helper import prop_with_search
from blenderbim.bim.module.material.data import MaterialsData, ObjectMaterialData
@@ -50,7 +51,7 @@ class BIM_PT_materials(Panel):
row.operator("bim.disable_editing_materials", text="", icon="CANCEL")
else:
row = self.layout.row(align=True)
- row.prop(self.props, "material_type", text="")
+ prop_with_search(row, self.props, "material_type", text="")
row.operator("bim.load_materials", text="", icon="IMPORT")
return
@@ -188,9 +189,9 @@ class BIM_PT_object_material(Panel):
return self.draw_material_ui()
row = self.layout.row(align=True)
- row.prop(self.props, "material_type", text="")
+ prop_with_search(row, self.props, "material_type", text="")
if self.props.material_type == "IfcMaterial" or self.props.material_type == "IfcMaterialList":
- row.prop(self.props, "material", text="")
+ prop_with_search(row, self.props, "material", text="")
row.operator("bim.assign_material", icon="ADD", text="")
def draw_material_ui(self):
@@ -220,8 +221,7 @@ class BIM_PT_object_material(Panel):
return self.draw_read_only_single_ui()
def draw_editable_single_ui(self):
- row = self.layout.row(align=True)
- row.prop(self.props, "material", text="")
+ prop_with_search(self.layout, self.props, "material", text="")
def draw_read_only_single_ui(self):
material = Data.materials[self.product_data["id"]]
@@ -242,7 +242,7 @@ class BIM_PT_object_material(Panel):
row.prop(attribute, "string_value", text=attribute.name)
row.prop(attribute, "is_null", icon="RADIOBUT_OFF" if attribute.is_null else "RADIOBUT_ON", text="")
row = self.layout.row(align=True)
- row.prop(self.props, "material", text="")
+ prop_with_search(row, self.props, "material", text="")
op = row.operator(f"bim.add_{self.set_item_name}", icon="ADD", text="")
setattr(op, f"{self.set_item_name}_set", self.material_set_id)
diff --git a/src/blenderbim/blenderbim/bim/module/model/__init__.py b/src/blenderbim/blenderbim/bim/module/model/__init__.py
index c226210dae..858ba3c5c9 100644
--- a/src/blenderbim/blenderbim/bim/module/model/__init__.py
+++ b/src/blenderbim/blenderbim/bim/module/model/__init__.py
@@ -17,11 +17,12 @@
# along with BlenderBIM Add-on. If not, see .
import bpy
-from . import handler, prop, ui, grid, product, wall, slab, stair, opening, pie, workspace
+from . import handler, prop, ui, grid, product, wall, slab, stair, opening, pie, workspace, profile
classes = (
product.AddEmptyType,
- product.AddTypeInstance,
+ product.AddConstrTypeInstance,
+ product.DisplayConstrTypes,
product.AlignProduct,
product.DynamicallyVoidProduct,
workspace.Hotkey,
@@ -32,8 +33,10 @@ classes = (
opening.AddElementOpening,
profile.ExtendProfile,
prop.BIMModelProperties,
+ prop.ConstrTypeInfo,
ui.BIM_PT_authoring,
- ui.BIM_PT_authoring_architectural,
+ ui.DisplayConstrTypesUI,
+ ui.HelpConstrTypes,
grid.BIM_OT_add_object,
stair.BIM_OT_add_object,
opening.BIM_OT_add_object,
@@ -51,6 +54,7 @@ def register():
if not bpy.app.background:
bpy.utils.register_tool(workspace.BimTool, after={"builtin.scale_cage"}, separator=True, group=True)
bpy.types.Scene.BIMModelProperties = bpy.props.PointerProperty(type=prop.BIMModelProperties)
+ bpy.types.Scene.ConstrTypeInfo = bpy.props.CollectionProperty(type=prop.ConstrTypeInfo)
bpy.types.VIEW3D_MT_mesh_add.append(grid.add_object_button)
bpy.types.VIEW3D_MT_mesh_add.append(stair.add_object_button)
bpy.types.VIEW3D_MT_mesh_add.append(opening.add_object_button)
@@ -68,6 +72,7 @@ def unregister():
if not bpy.app.background:
bpy.utils.unregister_tool(workspace.BimTool)
del bpy.types.Scene.BIMModelProperties
+ del bpy.types.Scene.ConstrTypeInfo
bpy.app.handlers.load_post.remove(handler.load_post)
bpy.types.VIEW3D_MT_mesh_add.remove(grid.add_object_button)
bpy.types.VIEW3D_MT_mesh_add.remove(stair.add_object_button)
diff --git a/src/blenderbim/blenderbim/bim/module/model/data.py b/src/blenderbim/blenderbim/bim/module/model/data.py
index 393fe73273..93066affbd 100644
--- a/src/blenderbim/blenderbim/bim/module/model/data.py
+++ b/src/blenderbim/blenderbim/bim/module/model/data.py
@@ -16,8 +16,14 @@
# You should have received a copy of the GNU General Public License
# along with BlenderBIM Add-on. If not, see .
+import functools
import bpy
import blenderbim.tool as tool
+from blenderbim.bim.ifc import IfcStore
+
+
+preview_icon_ids = {}
+attempts = 0
def refresh():
@@ -31,10 +37,29 @@ class AuthoringData:
@classmethod
def load(cls):
cls.is_loaded = True
- cls.data = {
- "ifc_classes": cls.ifc_classes(),
- "relating_types": cls.relating_types(),
- }
+ if not hasattr(cls, "data"):
+ cls.data = {}
+ cls.props = bpy.context.scene.BIMModelProperties
+ cls.load_ifc_classes()
+ cls.load_relating_types()
+ cls.load_relating_types_browser()
+ cls.load_preview_constr_types()
+
+ @classmethod
+ def load_ifc_classes(cls):
+ cls.data["ifc_classes"] = cls.ifc_classes()
+
+ @classmethod
+ def load_relating_types(cls):
+ cls.data["relating_types_ids"] = cls.relating_types()
+
+ @classmethod
+ def load_relating_types_browser(cls):
+ cls.data["relating_types_browser_ids"] = cls.relating_types_browser()
+
+ @classmethod
+ def load_preview_constr_types(cls):
+ cls.data["preview_constr_types"] = preview_icon_ids
@classmethod
def ifc_classes(cls):
@@ -49,16 +74,123 @@ class AuthoringData:
return results
@classmethod
- def relating_types(cls):
- ifc_classes = cls.ifc_classes()
+ def constr_class_entities(cls, ifc_class=None):
+ ifc_classes = cls.data["ifc_classes"]
if not ifc_classes:
return []
results = []
- ifc_class = bpy.context.scene.BIMModelProperties.ifc_class
+ if ifc_class is None:
+ ifc_class = cls.props.ifc_class
if not ifc_class and ifc_classes:
ifc_class = ifc_classes[0][0]
if ifc_class:
- elements = [(str(e.id()), e.Name, e.Description or "") for e in tool.Ifc.get().by_type(ifc_class)]
- results.extend(sorted(elements, key=lambda s: s[1]))
+ elements = sorted(tool.Ifc.get().by_type(ifc_class), key=lambda s: s.Name)
+ results.extend(elements)
return results
return []
+
+ @classmethod
+ def relating_types(cls, ifc_class=None):
+ return [(str(e.id()), e.Name, e.Description or "") for e in cls.constr_class_entities(ifc_class=ifc_class)]
+
+ @classmethod
+ def relating_types_browser(cls):
+ return cls.relating_types(ifc_class=cls.props.ifc_class_browser)
+
+ @staticmethod
+ def new_relating_type_info(ifc_class):
+ relating_type_info = bpy.context.scene.ConstrTypeInfo.add()
+ relating_type_info.name = ifc_class
+ return relating_type_info
+
+ @classmethod
+ def assetize_constr_class(cls, ifc_class=None):
+ if ifc_class is None:
+ ifc_class = cls.props.ifc_class
+ relating_type_info = cls.relating_type_info(ifc_class)
+ _ = cls.new_relating_type_info(ifc_class) if relating_type_info is None else relating_type_info
+ constr_class_occurrences = cls.constr_class_entities(ifc_class)
+ preview_constr_types = cls.data["preview_constr_types"]
+ for constr_class_entity in constr_class_occurrences:
+
+ ### handle asset regeneration when library entity is updated ¿?
+ if (
+ ifc_class not in preview_constr_types
+ or str(constr_class_entity.id()) not in preview_constr_types[ifc_class]
+ ):
+ obj = tool.Ifc.get_object(constr_class_entity)
+ cls.assetize_object(obj, ifc_class, constr_class_entity)
+ relating_type_info = cls.relating_type_info(ifc_class)
+ relating_type_info.fully_loaded = True
+
+ @classmethod
+ def assetize_object(cls, obj, ifc_class, ifc_class_entity, from_selection=False):
+ relating_type_id = ifc_class_entity.id()
+ to_be_deleted = False
+ if obj.type == "EMPTY":
+ kwargs = {}
+ if not from_selection:
+ kwargs.update({"ifc_class": ifc_class, "relating_type_id": relating_type_id})
+ new_obj = cls.new_relating_type(**kwargs)
+ if new_obj is not None:
+ to_be_deleted = True
+ obj = new_obj
+ obj.asset_mark()
+ obj.asset_generate_preview()
+ icon_id = obj.preview.icon_id
+ if ifc_class not in cls.data["preview_constr_types"]:
+ cls.data["preview_constr_types"][ifc_class] = {}
+ cls.data["preview_constr_types"][ifc_class][str(relating_type_id)] = {"icon_id": icon_id, "object": obj}
+ if to_be_deleted:
+ for col in obj.users_collection:
+ col.objects.unlink(obj)
+
+ @classmethod
+ def assetize_relating_type_from_selection(cls, browser=False):
+ ifc_class = cls.props.ifc_class_browser if browser else cls.props.ifc_class
+ relating_type_id = cls.props.relating_type_id_browser if browser else cls.props.relating_type_id
+ constr_class_occurrences = cls.constr_class_entities(ifc_class=ifc_class)
+ constr_class_occurrences = [
+ entity for entity in constr_class_occurrences if entity.id() == int(relating_type_id)
+ ]
+ if len(constr_class_occurrences) == 0:
+ return False
+ constr_class_entity = constr_class_occurrences[0]
+ obj = tool.Ifc.get_object(constr_class_entity)
+ if obj is None:
+ return False
+ cls.assetize_object(obj, ifc_class, constr_class_entity, from_selection=True)
+ return True
+
+ @staticmethod
+ def relating_type_info(ifc_class):
+ relating_type_infos = [element for element in bpy.context.scene.ConstrTypeInfo if element.name == ifc_class]
+ return None if len(relating_type_infos) == 0 else relating_type_infos[0]
+
+ @classmethod
+ def new_relating_type(cls, ifc_class=None, relating_type_id=None):
+ if ifc_class is None:
+ bpy.ops.bim.add_constr_type_instance(
+ ifc_class=cls.props.ifc_class, relating_type_id=int(cls.props.relating_type_id)
+ )
+ else:
+ cls.props.updating = True
+ cls.props.ifc_class = ifc_class
+ cls.props.relating_type_id = str(relating_type_id)
+ cls.props.updating = False
+ bpy.ops.bim.add_constr_type_instance()
+ return bpy.context.selected_objects[-1]
+
+ @staticmethod
+ def relating_type_name_by_id(ifc_class, relating_type_id):
+ file = IfcStore.get_file()
+ try:
+ constr_class_entity = file.by_id(int(relating_type_id))
+ except (RuntimeError, ValueError):
+ return None
+ return constr_class_entity.Name if constr_class_entity.is_a() == ifc_class else None
+
+ @classmethod
+ def relating_type_id_by_name(cls, ifc_class, relating_type):
+ relating_types = [ct[0] for ct in cls.relating_types(ifc_class=ifc_class) if ct[1] == relating_type]
+ return None if len(relating_types) == 0 else relating_types[0]
diff --git a/src/blenderbim/blenderbim/bim/module/model/mep.py b/src/blenderbim/blenderbim/bim/module/model/mep.py
index 3fe07c3fe8..eeeaff9aee 100644
--- a/src/blenderbim/blenderbim/bim/module/model/mep.py
+++ b/src/blenderbim/blenderbim/bim/module/model/mep.py
@@ -65,14 +65,14 @@ class MepGenerator:
def create_rectangle_segment(self):
verts = [
- Vector((- self.width / 2, self.height / 2, 0)),
- Vector((- self.width / 2, - self.height / 2, 0)),
- Vector((- self.width / 2, self.height / 2, self.length)),
- Vector((- self.width / 2, - self.height / 2, self.length)),
+ Vector((-self.width / 2, self.height / 2, 0)),
+ Vector((-self.width / 2, -self.height / 2, 0)),
+ Vector((-self.width / 2, self.height / 2, self.length)),
+ Vector((-self.width / 2, -self.height / 2, self.length)),
Vector((self.width / 2, self.height / 2, 0)),
- Vector((self.width / 2, - self.height / 2, 0)),
+ Vector((self.width / 2, -self.height / 2, 0)),
Vector((self.width / 2, self.height / 2, self.length)),
- Vector((self.width / 2, - self.height / 2, self.length)),
+ Vector((self.width / 2, -self.height / 2, self.length)),
]
faces = [
[1, 3, 2, 0],
@@ -114,5 +114,13 @@ class MepGenerator:
tool.Ifc.run("system.assign_port", element=element, port=port)
tool.Ifc.run("geometry.edit_object_placement", product=port, matrix=obj.matrix_world @ mat, is_si=True)
- obj.select_set(True)
+ try:
+ obj.select_set(True)
+ except RuntimeError:
+ def msg(self, context):
+ txt = "The created object could not be assigned to a collection. "
+ txt += "Has any IfcSpatialElement been deleted?"
+ self.layout.label(text=txt)
+
+ bpy.context.window_manager.popup_menu(msg, title="Error", icon="ERROR")
return obj
diff --git a/src/blenderbim/blenderbim/bim/module/model/product.py b/src/blenderbim/blenderbim/bim/module/model/product.py
index b56712216d..de701fa449 100644
--- a/src/blenderbim/blenderbim/bim/module/model/product.py
+++ b/src/blenderbim/blenderbim/bim/module/model/product.py
@@ -29,9 +29,11 @@ import blenderbim.core.type
import blenderbim.core.geometry
from . import wall, slab, profile, mep
from blenderbim.bim.ifc import IfcStore
+from blenderbim.bim.module.model.data import AuthoringData
from ifcopenshell.api.pset.data import Data as PsetData
from mathutils import Vector, Matrix
from bpy_extras.object_utils import AddObjectHelper
+from . import prop
class AddEmptyType(bpy.types.Operator, AddObjectHelper):
@@ -53,13 +55,17 @@ def add_empty_type_button(self, context):
self.layout.operator(AddEmptyType.bl_idname, icon="FILE_3D")
-class AddTypeInstance(bpy.types.Operator):
- bl_idname = "bim.add_type_instance"
- bl_label = "Add Type Instance"
+class AddConstrTypeInstance(bpy.types.Operator):
+ bl_idname = "bim.add_constr_type_instance"
+ bl_label = "Add"
bl_options = {"REGISTER", "UNDO"}
- bl_description = "Add the selected Type Instance to the model"
+ bl_description = "Add Type Instance to the model"
ifc_class: bpy.props.StringProperty()
- relating_type: bpy.props.IntProperty()
+ relating_type_id: bpy.props.IntProperty()
+ from_invoke: bpy.props.BoolProperty(default=False)
+
+ def invoke(self, context, event):
+ return self.execute(context)
def execute(self, context):
return IfcStore.execute_ifc_operator(self, context)
@@ -67,11 +73,15 @@ class AddTypeInstance(bpy.types.Operator):
def _execute(self, context):
props = context.scene.BIMModelProperties
ifc_class = self.ifc_class or props.ifc_class
- relating_type_id = self.relating_type or props.relating_type
+ relating_type_id = self.relating_type_id or props.relating_type_id
if not ifc_class or not relating_type_id:
return {"FINISHED"}
+ if self.from_invoke:
+ props.ifc_class = self.ifc_class
+ props.relating_type_id = str(self.relating_type_id)
+
self.file = IfcStore.get_file()
instance_class = ifcopenshell.util.type.get_applicable_entities(ifc_class, self.file.schema)[0]
relating_type = self.file.by_id(int(relating_type_id))
@@ -120,9 +130,7 @@ class AddTypeInstance(bpy.types.Operator):
collection_obj = bpy.data.objects.get(collection.name)
bpy.ops.bim.assign_class(obj=obj.name, ifc_class=instance_class)
element = tool.Ifc.get_entity(obj)
- blenderbim.core.type.assign_type(
- tool.Ifc, tool.Type, element=element, type=relating_type
- )
+ blenderbim.core.type.assign_type(tool.Ifc, tool.Type, element=element, type=relating_type)
if building_obj:
if instance_class in ["IfcWindow", "IfcDoor"]:
@@ -152,7 +160,8 @@ class AddTypeInstance(bpy.types.Operator):
context.view_layer.objects.active = obj
return {"FINISHED"}
- def generate_layered_element(self, ifc_class, relating_type):
+ @staticmethod
+ def generate_layered_element(ifc_class, relating_type):
layer_set_direction = None
parametric = ifcopenshell.util.element.get_psets(relating_type).get("EPset_Parametric")
@@ -174,6 +183,24 @@ class AddTypeInstance(bpy.types.Operator):
pass # Dumb block generator? Eh? :)
+class DisplayConstrTypes(bpy.types.Operator):
+ bl_idname = "bim.display_constr_types"
+ bl_label = "Browse Construction Types"
+ bl_options = {"REGISTER"}
+ bl_description = "Display all available Construction Types to add new instances"
+
+ def invoke(self, context, event):
+ if not AuthoringData.is_loaded:
+ AuthoringData.load()
+ props = context.scene.BIMModelProperties
+ ifc_class = props.ifc_class
+ relating_type_info = AuthoringData.relating_type_info(ifc_class)
+ if relating_type_info is None or not relating_type_info.fully_loaded:
+ AuthoringData.assetize_constr_class(ifc_class)
+ bpy.ops.bim.display_constr_types_ui("INVOKE_DEFAULT")
+ return {"FINISHED"}
+
+
class AlignProduct(bpy.types.Operator):
bl_idname = "bim.align_product"
bl_label = "Align Product"
@@ -342,10 +369,13 @@ def ensure_material_assigned(usecase_path, ifc_file, settings):
if om is not None and om.BIMObjectProperties.ifc_definition_id
]
- if material[0].id() in object_material_ids:
+ if material and material[0].id() in object_material_ids:
continue
if len(obj.data.materials) == 1:
obj.data.materials.clear()
+ if not material:
+ continue
+
obj.data.materials.append(IfcStore.get_element(material[0].id()))
diff --git a/src/blenderbim/blenderbim/bim/module/model/profile.py b/src/blenderbim/blenderbim/bim/module/model/profile.py
index 1c3e6bbe26..6b81e28cf3 100644
--- a/src/blenderbim/blenderbim/bim/module/model/profile.py
+++ b/src/blenderbim/blenderbim/bim/module/model/profile.py
@@ -162,7 +162,16 @@ class DumbProfileGenerator:
pset = ifcopenshell.api.run("pset.add_pset", self.file, product=element, name="EPset_Parametric")
ifcopenshell.api.run("pset.edit_pset", self.file, pset=pset, properties={"Engine": "BlenderBIM.DumbProfile"})
MaterialData.load(self.file)
- obj.select_set(True)
+ try:
+ obj.select_set(True)
+ except RuntimeError:
+
+ def msg(self, context):
+ txt = "The created object could not be assigned to a collection. "
+ txt += "Has any IfcSpatialElement been deleted?"
+ self.layout.label(text=txt)
+
+ bpy.context.window_manager.popup_menu(msg, title="Error", icon="ERROR")
return obj
diff --git a/src/blenderbim/blenderbim/bim/module/model/prop.py b/src/blenderbim/blenderbim/bim/module/model/prop.py
index 1cbe8eb3df..05a38e4458 100644
--- a/src/blenderbim/blenderbim/bim/module/model/prop.py
+++ b/src/blenderbim/blenderbim/bim/module/model/prop.py
@@ -17,21 +17,8 @@
# along with BlenderBIM Add-on. If not, see .
import bpy
-import ifcopenshell.util.type
from blenderbim.bim.module.model.data import AuthoringData
-from blenderbim.bim.prop import StrProperty, Attribute
-from blenderbim.bim.ifc import IfcStore
from bpy.types import PropertyGroup
-from bpy.props import (
- PointerProperty,
- StringProperty,
- EnumProperty,
- BoolProperty,
- IntProperty,
- FloatProperty,
- FloatVectorProperty,
- CollectionProperty,
-)
def get_ifc_class(self, context):
@@ -43,18 +30,104 @@ def get_ifc_class(self, context):
def get_relating_type(self, context):
if not AuthoringData.is_loaded:
AuthoringData.load()
- return AuthoringData.data["relating_types"]
+ return AuthoringData.data["relating_types_ids"]
+
+
+def get_relating_type_browser(self, context):
+ if not AuthoringData.is_loaded:
+ AuthoringData.load()
+ return AuthoringData.data["relating_types_browser_ids"]
+
+
+def update_icon_id(self, context, browser=False):
+ ifc_class = self.ifc_class_browser if browser else self.ifc_class
+ relating_type_id = self.relating_type_id_browser if browser else self.relating_type_id
+ relating_type = AuthoringData.relating_type_name_by_id(ifc_class, relating_type_id)
+ if (
+ ifc_class not in AuthoringData.data["preview_constr_types"]
+ or relating_type_id not in AuthoringData.data["preview_constr_types"][ifc_class]
+ ) and relating_type is not None:
+ if not AuthoringData.assetize_relating_type_from_selection(browser=browser):
+ return
+ if ifc_class not in AuthoringData.data["preview_constr_types"]:
+ pass
+ self.icon_id = AuthoringData.data["preview_constr_types"][ifc_class][relating_type_id]["icon_id"]
def update_ifc_class(self, context):
- AuthoringData.is_loaded = False
+ AuthoringData.load_ifc_classes()
+ AuthoringData.load_relating_types()
+ if self.updating:
+ return
+
+
+def update_ifc_class_browser(self, context):
+ AuthoringData.load_ifc_classes()
+ AuthoringData.load_relating_types_browser()
+ if self.updating:
+ return
+ ifc_class = self.ifc_class_browser
+ relating_type_info = AuthoringData.relating_type_info(ifc_class)
+ if relating_type_info is None or not relating_type_info.fully_loaded:
+ AuthoringData.assetize_constr_class(ifc_class)
+
+
+def update_relating_type(self, context):
+ AuthoringData.load_relating_types()
+ if not self.updating:
+ update_icon_id(self, context)
+
+
+def update_relating_type_browser(self, context):
+ AuthoringData.load_relating_types_browser()
+ if not self.updating:
+ update_icon_id(self, context, browser=True)
+
+
+def update_relating_type_by_name(self, context):
+ AuthoringData.load_relating_types()
+ relating_type_id = AuthoringData.relating_type_id_by_name(self.ifc_class, self.relating_type)
+ if relating_type_id is not None:
+ self.relating_type_id = relating_type_id
+
+
+def update_preview_multiple(self, context):
+ if self.preview_multiple_constr_types:
+ ifc_class = self.ifc_class
+ relating_type_info = AuthoringData.relating_type_info(ifc_class)
+ if relating_type_info is None or not relating_type_info.fully_loaded:
+ AuthoringData.assetize_constr_class(ifc_class)
+ else:
+ update_relating_type(self, context)
class BIMModelProperties(PropertyGroup):
- ifc_class: bpy.props.EnumProperty(items=get_ifc_class, name="IFC Class", update=update_ifc_class)
- relating_type: bpy.props.EnumProperty(items=get_relating_type, name="Relating Type")
+ ifc_class: bpy.props.EnumProperty(items=get_ifc_class, name="Construction Class", update=update_ifc_class)
+ ifc_class_browser: bpy.props.EnumProperty(items=get_ifc_class, name="Construction Class",
+ update=update_ifc_class_browser)
+ relating_type: bpy.props.StringProperty(update=update_relating_type_by_name)
+ relating_type_id: bpy.props.EnumProperty(
+ items=get_relating_type, name="Construction Type", update=update_relating_type
+ )
+ relating_type_id_browser: bpy.props.EnumProperty(
+ items=get_relating_type_browser, name="Construction Type", update=update_relating_type_browser
+ )
+ icon_id: bpy.props.IntProperty()
+ preview_multiple_constr_types: bpy.props.BoolProperty(default=False, update=update_preview_multiple)
+ updating: bpy.props.BoolProperty(default=False)
occurrence_name_style: bpy.props.EnumProperty(
items=[("CLASS", "By Class", ""), ("TYPE", "By Type", ""), ("CUSTOM", "Custom", "")],
name="Occurrence Name Style",
)
occurrence_name_function: bpy.props.StringProperty(name="Occurrence Name Function")
+ getter_enum = {"ifc_class": get_ifc_class, "relating_type": get_relating_type}
+
+
+def get_relating_type_info(self, context):
+ return AuthoringData.relating_types(ifc_class=self.name)
+
+
+class ConstrTypeInfo(PropertyGroup):
+ name: bpy.props.StringProperty(name="Construction class")
+ relating_type: bpy.props.EnumProperty(name="Construction type", items=get_relating_type_info)
+ fully_loaded: bpy.props.BoolProperty(default=False)
diff --git a/src/blenderbim/blenderbim/bim/module/model/slab.py b/src/blenderbim/blenderbim/bim/module/model/slab.py
index 622f447e83..e0c02c47ff 100644
--- a/src/blenderbim/blenderbim/bim/module/model/slab.py
+++ b/src/blenderbim/blenderbim/bim/module/model/slab.py
@@ -166,7 +166,7 @@ def calculate_quantities(usecase_path, ifc_file, settings):
obj = settings["blender_object"]
product = ifc_file.by_id(obj.BIMObjectProperties.ifc_definition_id)
parametric = ifcopenshell.util.element.get_psets(product).get("EPset_Parametric")
- if not parametric or parametric["Engine"] != "BlenderBIM.DumbLayer3":
+ if not parametric or "Engine" not in parametric or parametric["Engine"] != "BlenderBIM.DumbLayer3":
return
qto = ifcopenshell.api.run(
"pset.add_qto", ifc_file, should_run_listeners=False, product=product, name="Qto_SlabBaseQuantities"
@@ -306,7 +306,16 @@ class DumbSlabGenerator:
pset = ifcopenshell.api.run("pset.add_pset", self.file, product=element, name="EPset_Parametric")
ifcopenshell.api.run("pset.edit_pset", self.file, pset=pset, properties={"Engine": "BlenderBIM.DumbLayer3"})
MaterialData.load(self.file)
- obj.select_set(True)
+ try:
+ obj.select_set(True)
+ except RuntimeError:
+
+ def msg(self, context):
+ txt = "The created object could not be assigned to a collection. "
+ txt += "Has any IfcSpatialElement been deleted?"
+ self.layout.label(text=txt)
+
+ bpy.context.window_manager.popup_menu(msg, title="Error", icon="ERROR")
return obj
@@ -342,6 +351,23 @@ class DumbSlabPlaner:
return
new_thickness = sum([l.LayerThickness for l in new_material.MaterialLayers])
material = ifcopenshell.util.element.get_material(settings["related_object"])
+
+ relating_type = settings["relating_type"]
+ if hasattr(relating_type, "HasPropertySets"):
+ psets = relating_type.HasPropertySets
+ if psets is not None:
+ for pset in psets:
+ if hasattr(pset, "HasProperties"):
+ pset_props = pset.HasProperties
+ if pset_props is not None:
+ for prop in pset_props:
+ if prop.Name == "LayerSetDirection":
+ if hasattr(prop, "NominalValue"):
+ nominal_value = prop.NominalValue
+ if hasattr(nominal_value, "wrappedValue"):
+ if nominal_value.wrappedValue == "AXIS2":
+ return
+
if material and material.is_a("IfcMaterialLayerSetUsage") and material.LayerSetDirection == "AXIS3":
self.change_thickness(settings["related_object"], new_thickness)
diff --git a/src/blenderbim/blenderbim/bim/module/model/ui.py b/src/blenderbim/blenderbim/bim/module/model/ui.py
index 8a198ce7a1..374b9a051b 100644
--- a/src/blenderbim/blenderbim/bim/module/model/ui.py
+++ b/src/blenderbim/blenderbim/bim/module/model/ui.py
@@ -16,54 +16,17 @@
# You should have received a copy of the GNU General Public License
# along with BlenderBIM Add-on. If not, see .
-import blenderbim.bim.module.type.prop as type_prop
-from bpy.types import Panel
-from blenderbim.bim.ifc import IfcStore
+from bpy.types import Panel, Operator
from blenderbim.bim.module.model.data import AuthoringData
+from blenderbim.bim.helper import prop_with_search, close_operator_panel
class BIM_PT_authoring(Panel):
- bl_idname = "BIM_PT_authoring"
- bl_label = "Authoring"
- bl_space_type = "VIEW_3D"
- bl_region_type = "UI"
- bl_category = "BlenderBIM"
-
- @classmethod
- def poll(cls, context):
- return IfcStore.get_file()
-
- def draw(self, context):
- if not AuthoringData.is_loaded:
- AuthoringData.load()
-
- props = context.scene.BIMModelProperties
- col = self.layout.column(align=True)
- enabled = True
-
- if AuthoringData.data["ifc_classes"]:
- col.prop(props, "ifc_class", text="", icon="FILE_VOLUME")
- else:
- col.label(text="No IFC Class", icon="FILE_VOLUME")
- enabled = False
- if AuthoringData.data["relating_types"]:
- col.prop(props, "relating_type", text="", icon="FILE_3D")
- else:
- col.label(text="No Relating Type", icon="FILE_3D")
- enabled = False
- row = col.row()
- row.operator("bim.add_type_instance", icon="ADD")
- row.enabled = enabled
-
-
-class BIM_PT_authoring_architectural(Panel):
bl_label = "Architectural"
- bl_idname = "BIM_PT_authoring_architectural"
- bl_options = {"DEFAULT_CLOSED"}
+ bl_idname = "BIM_PT_authoring"
bl_space_type = "VIEW_3D"
bl_region_type = "UI"
bl_category = "BlenderBIM"
- bl_parent_id = "BIM_PT_authoring"
def draw(self, context):
row = self.layout.row(align=True)
@@ -78,3 +41,108 @@ class BIM_PT_authoring_architectural(Panel):
row = self.layout.row(align=True)
row.operator("bim.flip_wall", icon="ORIENTATION_NORMAL", text="Flip")
row.operator("bim.split_wall", icon="MOD_PHYSICS", text="Split")
+
+
+class DisplayConstrTypesUI(Operator):
+ bl_idname = "bim.display_constr_types_ui"
+ bl_label = "Browse Construction Types"
+ bl_options = {"REGISTER"}
+ bl_description = "Display all available Construction Types to add new instances"
+
+ def execute(self, context):
+ return {"FINISHED"}
+
+ def invoke(self, context, event):
+ return context.window_manager.invoke_popup(self, width=550)
+
+ def draw(self, context):
+ props = context.scene.BIMModelProperties
+ if AuthoringData.data["ifc_classes"]:
+ row = self.layout.row()
+ row.label(text="", icon="FILE_VOLUME")
+ prop_with_search(row, props, "ifc_class_browser", text="")
+ ifc_class = props.ifc_class_browser
+ num_cols = 3
+ self.layout.row().separator(factor=0.25)
+ flow = self.layout.grid_flow(row_major=True, columns=num_cols, even_columns=True, even_rows=True, align=True)
+ relating_types = AuthoringData.relating_types_browser()
+ num_types = len(relating_types)
+ for idx, (relating_type_id, name, desc) in enumerate(relating_types):
+ outer_col = flow.column()
+ box = outer_col.box()
+ row = box.row()
+ row.label(text=name, icon="FILE_3D")
+ row.alignment = "CENTER"
+ row = box.row()
+ preview_constr_types = AuthoringData.data["preview_constr_types"]
+ if ifc_class in preview_constr_types:
+ preview_ifc_class = preview_constr_types[ifc_class]
+ if relating_type_id in preview_ifc_class:
+ icon_id = preview_ifc_class[relating_type_id]["icon_id"]
+ row.template_icon(icon_value=icon_id, scale=6.0)
+ row = box.row()
+ op = row.operator("bim.add_constr_type_instance", icon="ADD")
+ op.from_invoke = True
+ op.ifc_class = ifc_class
+ if relating_type_id.isnumeric():
+ op.relating_type_id = int(relating_type_id)
+ last_row_cols = num_types % num_cols
+ if last_row_cols != 0:
+ for _ in range(num_cols - last_row_cols):
+ flow.column()
+ row = self.layout.row()
+ row.alignment = "RIGHT"
+ row.operator("bim.help_relating_types", text="", icon="QUESTION")
+
+
+class HelpConstrTypes(Operator):
+ bl_idname = "bim.help_relating_types"
+ bl_label = "Construction Types Help"
+ bl_options = {"REGISTER", "UNDO"}
+ bl_description = "Click to read some contextual help"
+
+ def execute(self, context):
+ return {"FINISHED"}
+
+ def invoke(self, context, event):
+ return context.window_manager.invoke_popup(self, width=510)
+
+ def draw(self, context):
+ layout = self.layout
+ layout.row().separator(factor=0.5)
+ row = layout.row()
+ row.alignment = "CENTER"
+ row.label(text="BlenderBIM Help", icon="BLENDER")
+ layout.row().separator(factor=0.5)
+
+ row = layout.row().row()
+ row.label(text="Overview:", icon="KEYTYPE_MOVING_HOLD_VEC")
+ self.draw_lines(layout, self.message_summary)
+ layout.row().separator()
+
+ row = layout.row().row()
+ row.label(text="Further support:", icon="KEYTYPE_MOVING_HOLD_VEC")
+ layout.row().separator(factor=0.5)
+ row = layout.row()
+ op = row.operator("bim.open_upstream", text="Homepage", icon="HOME")
+ op.page = "home"
+ op = row.operator("bim.open_upstream", text="Docs", icon="DOCUMENTS")
+ op.page = "docs"
+ op = row.operator("bim.open_upstream", text="Wiki", icon="CURRENT_FILE")
+ op.page = "wiki"
+ op = row.operator("bim.open_upstream", text="Community", icon="COMMUNITY")
+ op.page = "community"
+ layout.row().separator()
+
+ def draw_lines(self, layout, lines):
+ box = layout.box()
+ for line in lines:
+ row = box.row()
+ row.label(text=f" {line}")
+
+ @property
+ def message_summary(self):
+ return [
+ "The Construction Type Browser allows to preview and add new instances to the model.",
+ "For further support, please click on the Documentation link below.",
+ ]
diff --git a/src/blenderbim/blenderbim/bim/module/model/wall.py b/src/blenderbim/blenderbim/bim/module/model/wall.py
index 368c907350..e6b55fc211 100644
--- a/src/blenderbim/blenderbim/bim/module/model/wall.py
+++ b/src/blenderbim/blenderbim/bim/module/model/wall.py
@@ -817,7 +817,16 @@ class DumbWallGenerator:
pset = ifcopenshell.api.run("pset.add_pset", self.file, product=element, name="EPset_Parametric")
ifcopenshell.api.run("pset.edit_pset", self.file, pset=pset, properties={"Engine": "BlenderBIM.DumbLayer2"})
MaterialData.load(self.file)
- obj.select_set(True)
+ try:
+ obj.select_set(True)
+ except RuntimeError:
+
+ def msg(self, context):
+ txt = "The created object could not be assigned to a collection. "
+ txt += "Has any IfcSpatialElement been deleted?"
+ self.layout.label(text=txt)
+
+ bpy.context.window_manager.popup_menu(msg, title="Error", icon="ERROR")
return obj
@@ -861,7 +870,7 @@ def calculate_quantities(usecase_path, ifc_file, settings):
obj = settings["blender_object"]
product = ifc_file.by_id(obj.BIMObjectProperties.ifc_definition_id)
parametric = ifcopenshell.util.element.get_psets(product).get("EPset_Parametric")
- if not parametric or parametric["Engine"] != "BlenderBIM.DumbLayer2":
+ if not parametric or "Engine" not in parametric or parametric["Engine"] != "BlenderBIM.DumbLayer2":
return
qto = ifcopenshell.api.run(
"pset.add_qto", ifc_file, should_run_listeners=False, product=product, name="Qto_WallBaseQuantities"
@@ -941,6 +950,23 @@ class DumbWallPlaner:
return
new_thickness = sum([l.LayerThickness for l in new_material.MaterialLayers])
material = ifcopenshell.util.element.get_material(settings["related_object"])
+
+ relating_type = settings["relating_type"]
+ if hasattr(relating_type, "HasPropertySets"):
+ psets = relating_type.HasPropertySets
+ if psets is not None:
+ for pset in psets:
+ if hasattr(pset, "HasProperties"):
+ pset_props = pset.HasProperties
+ if pset_props is not None:
+ for prop in pset_props:
+ if prop.Name == "LayerSetDirection":
+ if hasattr(prop, "NominalValue"):
+ nominal_value = prop.NominalValue
+ if hasattr(nominal_value, "wrappedValue"):
+ if nominal_value.wrappedValue == "AXIS3":
+ return
+
if material and material.is_a("IfcMaterialLayerSetUsage") and material.LayerSetDirection == "AXIS2":
self.change_thickness(settings["related_object"], new_thickness)
diff --git a/src/blenderbim/blenderbim/bim/module/model/workspace.py b/src/blenderbim/blenderbim/bim/module/model/workspace.py
index 20239c2855..295701231c 100644
--- a/src/blenderbim/blenderbim/bim/module/model/workspace.py
+++ b/src/blenderbim/blenderbim/bim/module/model/workspace.py
@@ -19,9 +19,11 @@
import os
import bpy
import blenderbim.bim.module.type.prop as type_prop
+from blenderbim.bim.helper import prop_with_search, close_operator_panel
from bpy.types import WorkSpaceTool
from blenderbim.bim.ifc import IfcStore
from blenderbim.bim.module.model.data import AuthoringData
+from blenderbim.bim.module.model import prop
class BimTool(WorkSpaceTool):
@@ -52,31 +54,81 @@ class BimTool(WorkSpaceTool):
)
def draw_settings(context, layout, tool):
- if not AuthoringData.is_loaded and IfcStore.get_file():
- AuthoringData.load()
+ props = context.scene.BIMModelProperties
+ is_tool_header = context.region.type == "TOOL_HEADER"
+ is_sidebar = context.region.type == "UI"
row = layout.row(align=True)
if not IfcStore.get_file():
row.label(text="No IFC Project", icon="ERROR")
return
- props = context.scene.BIMModelProperties
- if AuthoringData.data["ifc_classes"]:
- row.prop(props, "ifc_class", text="")
+
+ if not AuthoringData.is_loaded:
+ AuthoringData.load()
+
+ ifc_classes = AuthoringData.data[
+ "ifc_classes"] if "ifc_classes" in AuthoringData.data else False
+ relating_types_ids = AuthoringData.data[
+ "relating_types_ids"] if "relating_types_ids" in AuthoringData.data else False
+
+ if ifc_classes and relating_types_ids and not props.icon_id:
+ # hack Dion won't like to show a preview also on the first time the sidebar is shown
+ bpy.app.timers.register(lambda: prop.update_relating_type(props, context))
+
+ ifc_class = props.ifc_class
+ relating_type_id = props.relating_type_id
+
+ if is_tool_header:
+ row = layout.row(align=True)
+ if ifc_classes:
+ row.label(text="", icon="FILE_VOLUME")
+ row.prop(data=props, property="ifc_class", text="")
+ else:
+ row.label(text="No Construction Class", icon="FILE_VOLUME")
+ row = layout.row(align=True)
+ if relating_types_ids:
+ row.label(text="", icon="FILE_3D")
+ row.prop(data=props, property="relating_type_id", text="")
+ else:
+ row.label(text="No Construction Type", icon="FILE_3D")
+ if ifc_classes:
+ row = layout.row()
+ row.operator("bim.display_constr_types", icon="TRIA_DOWN", text="")
+ row = layout.row(align=True)
+ row.label(text="", icon="EVENT_SHIFT")
+ row.label(text="", icon="EVENT_A")
+ row.label(text=f" Add")
else:
- row.label(text="No IFC Class")
- if AuthoringData.data["relating_types"]:
- row.prop(props, "relating_type", text="")
- else:
- row.label(text="No Relating Type")
+ row = layout.row(align=True)
+ if ifc_classes:
+ row.label(text="", icon="FILE_VOLUME")
+ prop_with_search(row, props, "ifc_class", text="")
+ else:
+ row.label(text="No Construction Class", icon="FILE_VOLUME")
+ row = layout.row(align=True)
+ if relating_types_ids:
+ row.label(text="", icon="FILE_3D")
+ prop_with_search(row, props, "relating_type_id", text="")
+ else:
+ row.label(text="No Construction Type", icon="FILE_3D")
+ if is_sidebar and ifc_classes and relating_types_ids:
+ box = layout.box()
+ box.template_icon(icon_value=props.icon_id, scale=8)
+ row = layout.row()
+ op = row.operator("bim.add_constr_type_instance", icon="ADD")
+ op.from_invoke = True
+ op.ifc_class = ifc_class
+ if relating_type_id.isnumeric():
+ op.relating_type_id = int(relating_type_id)
- row.label(text="", icon="BLANK1")
+ if ifc_classes:
+ row = layout.row(align=True)
+ row.label(text="", icon="EVENT_SHIFT")
+ row.label(text="", icon="EVENT_A")
+ row.label(text=f" Add Type Instance")
- row = layout.row(align=True)
- row.label(text="", icon="EVENT_SHIFT")
- row.label(text="Add Type Instance", icon="EVENT_A")
-
- if AuthoringData.data["ifc_classes"]:
- if props.ifc_class == "IfcWallType":
+ if ifc_classes:
+ if ifc_class == "IfcWallType":
row = layout.row()
row.label(text="Join")
row = layout.row(align=True)
@@ -98,13 +150,23 @@ class BimTool(WorkSpaceTool):
row.label(text="", icon="EVENT_SHIFT")
row.label(text="Split", icon="EVENT_S")
- if props.ifc_class in ("IfcColumnType", "IfcBeamType", "IfcMemberType"):
+ if ifc_class in ("IfcColumnType", "IfcBeamType", "IfcMemberType"):
row = layout.row()
row.label(text="Join")
row = layout.row(align=True)
row.label(text="", icon="EVENT_SHIFT")
row.label(text="Extend", icon="EVENT_E")
+ if props.ifc_class in (
+ "IfcCableCarrierSegmentType",
+ "IfcCableSegmentType",
+ "IfcDuctSegmentType",
+ "IfcPipeSegmentType",
+ ):
+ row = layout.row(align=True)
+ row.label(text="", icon="EVENT_SHIFT")
+ row.label(text="Extend", icon="EVENT_E")
+
row = layout.row(align=True)
row.label(text="", icon="EVENT_SHIFT")
row.label(text="Opening", icon="EVENT_O")
@@ -156,7 +218,7 @@ class Hotkey(bpy.types.Operator):
return {"FINISHED"}
def hotkey_S_A(self):
- bpy.ops.bim.add_type_instance()
+ bpy.ops.bim.add_constr_type_instance()
def hotkey_S_C(self):
if self.has_ifc_class and self.props.ifc_class == "IfcWallType":
diff --git a/src/blenderbim/blenderbim/bim/module/owner/data.py b/src/blenderbim/blenderbim/bim/module/owner/data.py
index be1cae0192..068bf74164 100644
--- a/src/blenderbim/blenderbim/bim/module/owner/data.py
+++ b/src/blenderbim/blenderbim/bim/module/owner/data.py
@@ -253,10 +253,7 @@ class ObjectActorData:
@classmethod
def load(cls):
cls.is_loaded = True
- cls.data = {
- "actor": cls.actor(),
- "actors": cls.actors()
- }
+ cls.data = {"actor": cls.actor(), "actors": cls.actors()}
@classmethod
def actor(cls):
@@ -279,9 +276,9 @@ class ObjectActorData:
roles = cls.get_roles(actor.TheActor.ThePerson)
roles.extend(cls.get_roles(actor.TheActor.TheOrganization))
role = ", ".join(roles)
- results.append({
- "id": actor.id(), "name": actor.Name or "Unnamed", "role": role, "ifc_class": actor.is_a()
- })
+ results.append(
+ {"id": actor.id(), "name": actor.Name or "Unnamed", "role": role, "ifc_class": actor.is_a()}
+ )
return results
@classmethod
diff --git a/src/blenderbim/blenderbim/bim/module/patch/ui.py b/src/blenderbim/blenderbim/bim/module/patch/ui.py
index 618a5077ca..9e7a241e51 100644
--- a/src/blenderbim/blenderbim/bim/module/patch/ui.py
+++ b/src/blenderbim/blenderbim/bim/module/patch/ui.py
@@ -16,6 +16,7 @@
# You should have received a copy of the GNU General Public License
# along with BlenderBIM Add-on. If not, see .
+from blenderbim.bim.helper import prop_with_search
import bpy
from blenderbim.bim.helper import draw_attributes
@@ -37,7 +38,7 @@ class BIM_PT_patch(bpy.types.Panel):
scene = context.scene
props = scene.BIMPatchProperties
row = layout.row()
- row.prop(props, "ifc_patch_recipes")
+ prop_with_search(row, props, "ifc_patch_recipes")
row = layout.row(align=True)
row.prop(props, "ifc_patch_input")
diff --git a/src/blenderbim/blenderbim/bim/module/project/__init__.py b/src/blenderbim/blenderbim/bim/module/project/__init__.py
index a2929523cd..417f8ab7dc 100644
--- a/src/blenderbim/blenderbim/bim/module/project/__init__.py
+++ b/src/blenderbim/blenderbim/bim/module/project/__init__.py
@@ -36,6 +36,7 @@ classes = (
operator.RefreshLibrary,
operator.RewindLibrary,
operator.SaveLibraryFile,
+ operator.AppendEntireLibrary,
operator.SelectLibraryFile,
operator.ToggleFilterCategories,
operator.ToggleLinkVisibility,
diff --git a/src/blenderbim/blenderbim/bim/module/project/operator.py b/src/blenderbim/blenderbim/bim/module/project/operator.py
index f311ff50d5..37fdf91413 100644
--- a/src/blenderbim/blenderbim/bim/module/project/operator.py
+++ b/src/blenderbim/blenderbim/bim/module/project/operator.py
@@ -71,6 +71,7 @@ class SelectLibraryFile(bpy.types.Operator, IFCFileSelector):
bl_description = "Select an IFC file that can be used as a library"
filepath: bpy.props.StringProperty(subtype="FILE_PATH")
filter_glob: bpy.props.StringProperty(default="*.ifc;*.ifczip;*.ifcxml", options={"HIDDEN"})
+ append_all: bpy.props.BoolProperty(default=False)
def execute(self, context):
IfcStore.begin_transaction(self)
@@ -87,6 +88,8 @@ class SelectLibraryFile(bpy.types.Operator, IFCFileSelector):
bpy.ops.bim.refresh_library()
if context.area:
context.area.tag_redraw()
+ if self.append_all:
+ bpy.ops.bim.append_entire_library()
return {"FINISHED"}
def invoke(self, context, event):
@@ -105,6 +108,9 @@ class SelectLibraryFile(bpy.types.Operator, IFCFileSelector):
IfcStore.library_path = data["filepath"]
IfcStore.library_file = ifcopenshell.open(data["filepath"])
+ def draw(self, context):
+ self.layout.prop(self, "append_all", text="Append Entire Library")
+
class RefreshLibrary(bpy.types.Operator):
bl_idname = "bim.refresh_library"
@@ -282,16 +288,43 @@ class SaveLibraryFile(bpy.types.Operator):
return {"FINISHED"}
+class AppendEntireLibrary(bpy.types.Operator):
+ bl_idname = "bim.append_entire_library"
+ bl_label = "Append Entiry Library"
+
+ @classmethod
+ def poll(cls, context):
+ return IfcStore.get_file()
+
+ def execute(self, context):
+ return IfcStore.execute_ifc_operator(self, context)
+
+ def _execute(self, context):
+ self.file = IfcStore.get_file()
+ self.library = IfcStore.library_file
+
+ lib_elements = ifcopenshell.util.selector.Selector().parse(
+ self.library, ".IfcTypeProduct | .IfcMaterial | .IfcCostSchedule| .IfcProfileDef"
+ )
+ for element in lib_elements:
+ bpy.ops.bim.append_library_element(definition=element.id())
+ return {"FINISHED"}
+
+
class AppendLibraryElement(bpy.types.Operator):
bl_idname = "bim.append_library_element"
bl_label = "Append Library Element"
bl_options = {"REGISTER", "UNDO"}
+ bl_description = "Append element to the current project"
definition: bpy.props.IntProperty()
prop_index: bpy.props.IntProperty()
@classmethod
def poll(cls, context):
- return IfcStore.get_file()
+ poll = bool(IfcStore.get_file())
+ if bpy.app.version > (3, 0, 0) and not poll:
+ cls.poll_message_set("Please create or load a project first.")
+ return poll
def execute(self, context):
return IfcStore.execute_ifc_operator(self, context)
@@ -347,7 +380,7 @@ class AppendLibraryElement(bpy.types.Operator):
ifc_importer.material_creator.load_existing_materials()
self.import_type_materials(element, ifc_importer)
self.import_type_styles(element, ifc_importer)
- ifc_importer.create_type_product(element)
+ ifc_importer.create_element_type(element)
ifc_importer.place_objects_in_collections()
def import_type_materials(self, element, ifc_importer):
@@ -633,16 +666,20 @@ class LinkIfc(bpy.types.Operator):
bl_options = {"REGISTER", "UNDO"}
bl_description = "Link a Blender file"
filepath: bpy.props.StringProperty(subtype="FILE_PATH")
+ files: bpy.props.CollectionProperty(name="Files", type=bpy.types.OperatorFileListElement)
+ directory: bpy.props.StringProperty(subtype="DIR_PATH")
filter_glob: bpy.props.StringProperty(default="*.blend;*.blend1", options={"HIDDEN"})
use_relative_path: bpy.props.BoolProperty(name="Use Relative Path", default=False)
def execute(self, context):
- new = context.scene.BIMProjectProperties.links.add()
- filepath = self.filepath
- if self.use_relative_path:
- filepath = os.path.relpath(filepath, bpy.path.abspath("//"))
- new.name = filepath
- bpy.ops.bim.load_link(filepath=self.filepath)
+ files = [self.filepath] if self.filepath else [f.name for f in self.files]
+ for filename in files:
+ filepath = os.path.join(self.directory, filename)
+ new = context.scene.BIMProjectProperties.links.add()
+ if self.use_relative_path:
+ filepath = os.path.relpath(filepath, bpy.path.abspath("//"))
+ new.name = filepath
+ bpy.ops.bim.load_link(filepath=filepath)
return {"FINISHED"}
def invoke(self, context, event):
@@ -708,7 +745,6 @@ class LoadLink(bpy.types.Operator):
continue
bpy.data.scenes[0].collection.children.link(child)
link = context.scene.BIMProjectProperties.links.get(filepath)
- link.collection = child
link.is_loaded = True
return {"FINISHED"}
@@ -731,23 +767,25 @@ class ToggleLinkVisibility(bpy.types.Operator):
return {"FINISHED"}
def toggle_wireframe(self, link):
- objs = filter(lambda obj: "IfcOpeningElement" not in obj.name, link.collection.all_objects)
- for i,obj in enumerate(objs):
- if i == 0:
- if obj.display_type == "WIRE":
- display_type = "TEXTURED"
- else:
- display_type = "WIRE"
- obj.display_type = display_type
- link.is_wireframe = display_type == "WIRE"
+ for collection in self.get_linked_collections():
+ objs = filter(lambda obj: "IfcOpeningElement" not in obj.name, collection.all_objects)
+ for i, obj in enumerate(objs):
+ if i == 0:
+ if obj.display_type == "WIRE":
+ display_type = "TEXTURED"
+ else:
+ display_type = "WIRE"
+ obj.display_type = display_type
+ link.is_wireframe = display_type == "WIRE"
def toggle_visibility(self, link):
+ linked_collections = self.get_linked_collections()
queue = [bpy.context.view_layer.layer_collection]
layer_collection = None
while queue:
layer = queue.pop()
- if layer.collection == link.collection:
+ if layer.collection in linked_collections:
layer_collection = layer
break
queue.extend(list(layer.children))
@@ -756,6 +794,11 @@ class ToggleLinkVisibility(bpy.types.Operator):
layer_collection.exclude = not layer_collection.exclude
link.is_hidden = layer_collection.exclude
+ def get_linked_collections(self):
+ return [
+ c for c in bpy.data.collections if "IfcProject" in c.name and c.library and c.library.filepath == self.link
+ ]
+
class ExportIFC(bpy.types.Operator):
bl_idname = "export_ifc.bim"
diff --git a/src/blenderbim/blenderbim/bim/module/project/prop.py b/src/blenderbim/blenderbim/bim/module/project/prop.py
index 3fe5e5077f..9ef5dda676 100644
--- a/src/blenderbim/blenderbim/bim/module/project/prop.py
+++ b/src/blenderbim/blenderbim/bim/module/project/prop.py
@@ -92,7 +92,6 @@ class FilterCategory(PropertyGroup):
class Link(PropertyGroup):
name: StringProperty(name="Name")
- collection: PointerProperty(name="Collection", type=bpy.types.Collection)
is_loaded: BoolProperty(name="Is Loaded", default=False)
is_wireframe: BoolProperty(name="Is Wireframe", default=False)
is_hidden: BoolProperty(name="Is Hidden", default=False)
diff --git a/src/blenderbim/blenderbim/bim/module/project/ui.py b/src/blenderbim/blenderbim/bim/module/project/ui.py
index c8be2f2933..4aff3bb1d3 100644
--- a/src/blenderbim/blenderbim/bim/module/project/ui.py
+++ b/src/blenderbim/blenderbim/bim/module/project/ui.py
@@ -17,6 +17,7 @@
# along with BlenderBIM Add-on. If not, see .
import os
+from blenderbim.bim.helper import prop_with_search
from bpy.types import Panel, UIList
from blenderbim.bim.ifc import IfcStore
from blenderbim.bim.module.project.data import ProjectData
@@ -48,10 +49,8 @@ class BIM_PT_project(Panel):
def draw_load_ui(self, context):
pprops = context.scene.BIMProjectProperties
- row = self.layout.row()
- row.prop(pprops, "collection_mode")
- row = self.layout.row()
- row.prop(pprops, "filter_mode")
+ prop_with_search(self.layout, pprops, "collection_mode")
+ prop_with_search(self.layout, pprops, "filter_mode")
if pprops.filter_mode in ["DECOMPOSITION", "IFC_CLASS", "IFC_TYPE"]:
row = self.layout.row(align=True)
row.label(text=f"Total: {pprops.total_elements}")
@@ -84,8 +83,7 @@ class BIM_PT_project(Panel):
row = self.layout.row()
row.prop(pprops, "is_coordinating")
if pprops.is_coordinating:
- row = self.layout.row()
- row.prop(pprops, "merge_mode")
+ prop_with_search(self.layout, pprops, "merge_mode")
row = self.layout.row()
row.prop(pprops, "deflection_tolerance")
row = self.layout.row()
@@ -170,8 +168,7 @@ class BIM_PT_project(Panel):
def draw_create_project_ui(self, context):
props = context.scene.BIMProperties
pprops = context.scene.BIMProjectProperties
- row = self.layout.row()
- row.prop(pprops, "export_schema")
+ prop_with_search(self.layout, pprops, "export_schema")
row = self.layout.row()
row.prop(context.scene.unit_settings, "system")
row = self.layout.row()
@@ -180,8 +177,7 @@ class BIM_PT_project(Panel):
row.prop(props, "area_unit", text="Area Unit")
row = self.layout.row()
row.prop(props, "volume_unit", text="Volume Unit")
- row = self.layout.row()
- row.prop(pprops, "template_file", text="Template")
+ prop_with_search(self.layout, pprops, "template_file", text="Template")
row = self.layout.row(align=True)
row.operator("bim.create_project")
diff --git a/src/blenderbim/blenderbim/bim/module/pset/__init__.py b/src/blenderbim/blenderbim/bim/module/pset/__init__.py
index f86950c3b2..5e04e16662 100644
--- a/src/blenderbim/blenderbim/bim/module/pset/__init__.py
+++ b/src/blenderbim/blenderbim/bim/module/pset/__init__.py
@@ -35,6 +35,8 @@ classes = (
operator.BIM_OT_rename_parameters,
operator.BIM_OT_add_edit_custom_property,
operator.BIM_OT_bulk_remove_psets,
+ prop.IfcPropertyEnumeratedValue,
+ prop.IfcProperty,
prop.PsetProperties,
prop.MaterialPsetProperties,
prop.TaskPsetProperties,
diff --git a/src/blenderbim/blenderbim/bim/module/pset/operator.py b/src/blenderbim/blenderbim/bim/module/pset/operator.py
index 15cb559978..0b1a523efe 100644
--- a/src/blenderbim/blenderbim/bim/module/pset/operator.py
+++ b/src/blenderbim/blenderbim/bim/module/pset/operator.py
@@ -122,58 +122,100 @@ class EnablePsetEditing(bpy.types.Operator):
for prop_template in pset_template.HasPropertyTemplates:
if not prop_template.is_a("IfcSimplePropertyTemplate"):
continue # Other types not yet supported
-
if prop_template.TemplateType == "P_SINGLEVALUE":
- try:
- data_type = ifcopenshell.util.attribute.get_primitive_type(
- IfcStore.get_schema().declaration_by_name(prop_template.PrimaryMeasureType or "IfcLabel")
- )
- except:
- # TODO: Occurs if the data type is something that exists in
- # IFC4 and not in IFC2X3. To fully fix this we need to
- # generate the IFC2X3 pset template definitions.
- continue
+ self.load_single_value(prop_template, data)
+ elif prop_template.TemplateType.startswith("Q_"):
+ self.load_single_value(prop_template, data)
elif prop_template.TemplateType == "P_ENUMERATEDVALUE":
- data_type = "enum"
- enum_items = [v.wrappedValue for v in prop_template.Enumerators.EnumerationValues]
- elif prop_template.TemplateType in ["Q_LENGTH", "Q_AREA", "Q_VOLUME", "Q_WEIGHT", "Q_TIME"]:
- data_type = "float"
- elif prop_template.TemplateType == "Q_COUNT":
- data_type = "integer"
- else:
- continue # Other types not yet supported
+ self.load_enumerated_value(prop_template, data)
- new = self.props.properties.add()
- new.name = prop_template.Name
- new.is_null = data.get(prop_template.Name, None) is None
- new.is_optional = True
- new.data_type = data_type
- new.is_uri = prop_template.PrimaryMeasureType == "IfcURIReference"
+ def load_single_value(self, prop_template, data):
+ prop = self.props.properties.add()
+ prop.name = prop_template.Name
+ prop.value_type = "IfcPropertySingleValue"
+ metadata = prop.metadata
+ metadata.name = prop_template.Name
+ metadata.is_null = data.get(prop_template.Name, None) is None
+ metadata.is_optional = True
+ metadata.is_uri = prop_template.PrimaryMeasureType == "IfcURIReference"
+ metadata.data_type = self.get_data_type(prop_template)
- if data_type == "string":
- new.string_value = "" if new.is_null else data[prop_template.Name]
- elif data_type == "integer":
- new.int_value = 0 if new.is_null else data[prop_template.Name]
- elif data_type == "float":
- new.float_value = 0.0 if new.is_null else data[prop_template.Name]
- elif data_type == "boolean":
- new.bool_value = False if new.is_null else data[prop_template.Name]
- elif data_type == "enum":
- new.enum_items = json.dumps(enum_items)
- if data.get(prop_template.Name):
- new.enum_value = str(data[prop_template.Name])
+ if metadata.data_type == "string":
+ metadata.string_value = "" if metadata.is_null else data[prop_template.Name]
+ elif metadata.data_type == "integer":
+ metadata.int_value = 0 if metadata.is_null else data[prop_template.Name]
+ elif metadata.data_type == "float":
+ metadata.float_value = 0.0 if metadata.is_null else data[prop_template.Name]
+ elif metadata.data_type == "boolean":
+ metadata.bool_value = False if metadata.is_null else data[prop_template.Name]
+
+ def get_data_type(self, prop_template):
+ if prop_template.TemplateType in ["Q_LENGTH", "Q_AREA", "Q_VOLUME", "Q_WEIGHT", "Q_TIME"]:
+ return "float"
+ elif prop_template.TemplateType == "Q_COUNT":
+ return "integer"
+ try:
+ return ifcopenshell.util.attribute.get_primitive_type(
+ IfcStore.get_schema().declaration_by_name(prop_template.PrimaryMeasureType or "IfcLabel")
+ )
+ except:
+ # TODO: Occurs if the data type is something that exists in
+ # IFC4 and not in IFC2X3. To fully fix this we need to
+ # generate the IFC2X3 pset template definitions.
+ pass
+
+ def load_enumerated_value(self, prop_template, data):
+ enum_items = [v.wrappedValue for v in prop_template.Enumerators.EnumerationValues]
+ selected_enum_items = data.get(prop_template.Name, [])
+
+ prop = self.props.properties.add()
+ prop.name = prop_template.Name
+ prop.value_type = "IfcPropertyEnumeratedValue"
+ metadata = prop.metadata
+ metadata.name = prop_template.Name
+ metadata.is_null = data.get(prop_template.Name, None) is None
+ metadata.is_optional = True
+ metadata.is_uri = prop_template.PrimaryMeasureType == "IfcURIReference"
+
+ # Cute hack to abuse the metadata to find the Blender data_type
+ metadata.set_value(enum_items[0])
+ data_type = metadata.get_value_name()
+
+ for enum in enum_items:
+ new = prop.enumerated_value.enumerated_values.add()
+ setattr(new, data_type, enum)
+ new.is_selected = enum in selected_enum_items
def load_from_pset_data(self, pset_data):
for prop_id in pset_data["Properties"]:
prop = Data.properties[prop_id]
- value = prop["NominalValue"]
- new = self.props.properties.add()
- new.set_value(value)
- new.name = prop["Name"]
- new.is_null = value is None
- new.is_optional = True
- new.set_value(new.get_value_default() if new.is_null else value)
+ if prop["type"] == "IfcPropertyEnumeratedValue":
+ simple_prop = self.props.properties.add()
+ simple_prop.value_type = "IfcPropertyEnumeratedValue"
+ metadata = simple_prop.metadata
+ metadata.name = prop["Name"]
+ metadata.is_null = len(simple_prop.enumerated_value.enumerated_values) == 0
+ metadata.is_optional = True
+ metadata.set_value(prop["EnumerationReference"].EnumerationValues[0].wrappedValue)
+
+ enum_items = [v.wrappedValue for v in prop["EnumerationReference"].EnumerationValues]
+ selected_enum_items = [v.wrappedValue for v in prop["EnumerationValues"]]
+ data_type = metadata.get_value_name()
+
+ for enum in enum_items:
+ new = simple_prop.enumerated_value.enumerated_values.add()
+ setattr(new, data_type, enum)
+ new.is_selected = enum in selected_enum_items
+ else:
+ value = prop["NominalValue"]
+ new_prop = self.props.properties.add()
+ metadata = new_prop.metadata
+ metadata.set_value(value)
+ metadata.name = prop["Name"]
+ metadata.is_null = value is None
+ metadata.is_optional = True
+ metadata.set_value(metadata.get_value_default() if metadata.is_null else value)
class DisablePsetEditing(bpy.types.Operator, Operator):
@@ -209,7 +251,13 @@ class EditPset(bpy.types.Operator, Operator):
else:
data = Data.psets if pset_id in Data.psets else Data.qtos
for prop in props.properties:
- properties[prop.name] = prop.get_value()
+ if prop.value_type == "IfcPropertySingleValue":
+ properties[prop.metadata.name] = prop.metadata.get_value()
+ elif prop.value_type == "IfcPropertyEnumeratedValue":
+ value_name = prop.metadata.get_value_name()
+ properties[prop.metadata.name] = [
+ e[value_name] for e in prop.enumerated_value.enumerated_values if e.is_selected
+ ]
if pset_id in Data.psets:
ifcopenshell.api.run(
@@ -319,7 +367,7 @@ class GuessQuantity(bpy.types.Operator):
self.qto_calculator = QtoCalculator()
obj = context.active_object
prop = obj.PsetProperties.properties.get(self.prop)
- prop.float_value = self.guess_quantity(obj, context)
+ prop.metadata.float_value = self.guess_quantity(obj, context)
return {"FINISHED"}
def guess_quantity(self, obj, context):
@@ -363,7 +411,7 @@ class CopyPropertyToSelection(bpy.types.Operator, Operator):
def _execute(self, context):
is_pset = tool.Ifc.get().by_id(context.active_object.PsetProperties.active_pset_id).is_a("IfcPropertySet")
pset_name = context.active_object.PsetProperties.active_pset_name
- prop_value = context.active_object.PsetProperties.properties.get(self.name).get_value()
+ prop_value = context.active_object.PsetProperties.properties.get(self.name).metadata.get_value()
for obj in context.selected_objects:
core.copy_property_to_selection(
tool.Ifc,
@@ -381,9 +429,13 @@ class BIM_OT_add_property_to_edit(bpy.types.Operator):
bl_idname = "bim.add_property_to_edit"
bl_options = {"REGISTER", "UNDO"}
option: bpy.props.StringProperty()
+ index: bpy.props.IntProperty(default=-1)
def execute(self, context):
- getattr(context.scene, self.option).add()
+ if self.index == -1:
+ getattr(context.scene, self.option).add()
+ else:
+ getattr(context.scene, self.option)[self.index].enum_values.add()
return {"FINISHED"}
@@ -392,10 +444,14 @@ class BIM_OT_remove_property_to_edit(bpy.types.Operator):
bl_idname = "bim.remove_property_to_edit"
bl_options = {"REGISTER", "UNDO"}
index: bpy.props.IntProperty()
+ index2: bpy.props.IntProperty(default=-1)
option: bpy.props.StringProperty()
def execute(self, context):
- getattr(context.scene, self.option).remove(self.index)
+ if self.index2 == -1:
+ getattr(context.scene, self.option).remove(self.index)
+ else:
+ getattr(context.scene, self.option)[self.index].enum_values.remove(self.index2)
return {"FINISHED"}
@@ -471,16 +527,41 @@ class BIM_OT_add_edit_custom_property(bpy.types.Operator):
for prop in props:
value = getattr(prop, prop.get_value_name())
primary_measure_type = prop.primary_measure_type
- value_ifc_entity = getattr(self.file, f"create{primary_measure_type}")(value)
+
+ if prop.template_type == "IfcPropertyEnumeratedValue":
+ value_ifc_entity = self.generate_enum_entity(prop)
+ elif prop.template_type == "IfcPropertySingleValue":
+ value_ifc_entity = getattr(self.file, f"create{primary_measure_type}")(value)
new_pset = ifcopenshell.api.run("pset.add_pset", self.file, product=ifc_element, name=prop.pset_name)
ifcopenshell.api.run(
"pset.edit_pset", self.file, pset=new_pset, properties={prop.property_name: value_ifc_entity}
)
-
+ Data.load(IfcStore.get_file(), ifc_definition_id)
self.report({"INFO"}, "Finished applying changes")
return {"FINISHED"}
+ def generate_enum_entity(self, prop):
+ prop_type = prop.get_value_name()
+ prop_enum = self.file.create_entity(
+ "IFCPROPERTYENUMERATION",
+ Name=prop.property_name,
+ EnumerationValues=tuple(
+ self.file.create_entity(prop.primary_measure_type, ev[prop_type]) for ev in prop.enum_values
+ ),
+ )
+ prop_enum_value = self.file.create_entity(
+ "IFCPROPERTYENUMERATEDVALUE",
+ Name=prop.property_name,
+ EnumerationValues=tuple(
+ self.file.create_entity(prop.primary_measure_type, ev[prop_type])
+ for ev in prop.enum_values
+ if ev.is_selected == True
+ ),
+ EnumerationReference=prop_enum,
+ )
+ return prop_enum_value
+
class BIM_OT_bulk_remove_psets(bpy.types.Operator):
bl_label = "Bulk remove psets from selected objects"
diff --git a/src/blenderbim/blenderbim/bim/module/pset/prop.py b/src/blenderbim/blenderbim/bim/module/pset/prop.py
index 0ba32460b9..6d0d419157 100644
--- a/src/blenderbim/blenderbim/bim/module/pset/prop.py
+++ b/src/blenderbim/blenderbim/bim/module/pset/prop.py
@@ -18,7 +18,7 @@
import bpy
import blenderbim.bim.schema
-from blenderbim.bim.prop import Attribute
+from blenderbim.bim.prop import Attribute, StrProperty
import ifcopenshell
from ifcopenshell.api.pset.data import Data
from blenderbim.bim.module.pset.data import AddEditCustomPropertiesData
@@ -47,7 +47,7 @@ def purge():
qtonames = {}
-def getPsetNames(self, context):
+def get_pset_names(self, context):
global psetnames
obj = context.active_object
if not obj.BIMObjectProperties.ifc_definition_id:
@@ -122,7 +122,7 @@ def getWorkSchedulePsetNames(self, context):
return psetnames[ifc_class]
-def getQtoNames(self, context):
+def get_qto_names(self, context):
global qtonames
if "/" in context.active_object.name:
ifc_class = context.active_object.name.split("/")[0]
@@ -139,18 +139,30 @@ def get_primary_measure_type(self, context):
return AddEditCustomPropertiesData.data["primary_measure_type"]
+class IfcPropertyEnumeratedValue(PropertyGroup):
+ enumerated_values: CollectionProperty(type=Attribute)
+
+
+class IfcProperty(PropertyGroup):
+ metadata: PointerProperty(type=Attribute)
+ value_type: EnumProperty(
+ items=[(v, v, v) for v in ("IfcPropertySingleValue", "IfcPropertyEnumeratedValue")], name="Value Type"
+ )
+ enumerated_value: PointerProperty(type=IfcPropertyEnumeratedValue)
+
+
class PsetProperties(PropertyGroup):
active_pset_id: IntProperty(name="Active Pset ID")
active_pset_name: StringProperty(name="Pset Name")
- properties: CollectionProperty(name="Properties", type=Attribute)
- pset_name: EnumProperty(items=getPsetNames, name="Pset Name")
- qto_name: EnumProperty(items=getQtoNames, name="Qto Name")
+ properties: CollectionProperty(name="Properties", type=IfcProperty)
+ pset_name: EnumProperty(items=get_pset_names, name="Pset Name")
+ qto_name: EnumProperty(items=get_qto_names, name="Qto Name")
class MaterialPsetProperties(PropertyGroup):
active_pset_id: IntProperty(name="Active Pset ID")
active_pset_name: StringProperty(name="Pset Name")
- properties: CollectionProperty(name="Properties", type=Attribute)
+ properties: CollectionProperty(name="Properties", type=IfcProperty)
pset_name: EnumProperty(items=getMaterialPsetNames, name="Pset Name")
@@ -172,14 +184,14 @@ class ResourcePsetProperties(PropertyGroup):
class ProfilePsetProperties(PropertyGroup):
active_pset_id: IntProperty(name="Active Pset ID")
active_pset_name: StringProperty(name="Pset Name")
- properties: CollectionProperty(name="Properties", type=Attribute)
+ properties: CollectionProperty(name="Properties", type=IfcProperty)
pset_name: EnumProperty(items=getProfilePsetNames, name="Pset Name")
class WorkSchedulePsetProperties(PropertyGroup):
active_pset_id: IntProperty(name="Active Pset ID")
active_pset_name: StringProperty(name="Pset Name")
- properties: CollectionProperty(name="Properties", type=Attribute)
+ properties: CollectionProperty(name="Properties", type=IfcProperty)
pset_name: EnumProperty(items=getWorkSchedulePsetNames, name="Pset Name")
@@ -197,6 +209,14 @@ class AddEditProperties(PropertyGroup):
int_value: IntProperty(name="Value")
float_value: FloatProperty(name="Value")
primary_measure_type: EnumProperty(items=get_primary_measure_type, name="Primary Measure Type")
+ template_type: EnumProperty(
+ items=[
+ ("IfcPropertySingleValue", "IfcPropertySingleValue", "IfcPropertySingleValue"),
+ ("IfcPropertyEnumeratedValue", "IfcPropertyEnumeratedValue", "IfcPropertyEnumeratedValue"),
+ ],
+ name="Template Type",
+ )
+ enum_values: CollectionProperty(name="Enum Values", type=Attribute)
def get_value_name(self):
ifc_data_type = IfcStore.get_schema().declaration_by_name(self.primary_measure_type)
diff --git a/src/blenderbim/blenderbim/bim/module/pset/ui.py b/src/blenderbim/blenderbim/bim/module/pset/ui.py
index 15d9937d24..a74ad6078f 100644
--- a/src/blenderbim/blenderbim/bim/module/pset/ui.py
+++ b/src/blenderbim/blenderbim/bim/module/pset/ui.py
@@ -18,7 +18,7 @@
from bpy.types import Panel
from blenderbim.bim.ifc import IfcStore
-from blenderbim.bim.helper import draw_attribute
+from blenderbim.bim.helper import prop_with_search
from blenderbim.bim.module.pset.data import (
ObjectPsetsData,
ObjectQtosData,
@@ -31,6 +31,45 @@ from blenderbim.bim.module.pset.data import (
)
+def draw_property(prop, layout, copy_operator=None):
+ if prop.value_type == "IfcPropertySingleValue":
+ draw_single_property(prop, layout, copy_operator)
+ elif prop.value_type == "IfcPropertyEnumeratedValue":
+ draw_enumerated_property(prop, layout, copy_operator)
+
+
+def draw_single_property(prop, layout, copy_operator=None):
+ value_name = prop.metadata.get_value_name()
+ if not value_name:
+ layout.label(text=prop["Name"])
+ return
+ layout.prop(
+ prop.metadata,
+ value_name,
+ text=prop.metadata.name,
+ )
+ if prop.metadata.is_optional:
+ layout.prop(prop.metadata, "is_null", icon="RADIOBUT_OFF" if prop.metadata.is_null else "RADIOBUT_ON", text="")
+ if copy_operator:
+ op = layout.operator(f"{copy_operator}", text="", icon="COPYDOWN")
+ op.name = prop.metadata.name
+ if prop.metadata.is_uri:
+ op = layout.operator("bim.select_uri_prop", text="", icon="FILE_FOLDER")
+ op.data_path = prop.metadata.path_from_id("string_value")
+
+
+def draw_enumerated_property(prop, layout, copy_operator=None):
+ value_name = prop.metadata.get_value_name()
+ if not value_name:
+ layout.label(text=prop.metadata.name)
+ return
+ if len(prop.enumerated_value.enumerated_values) != 0:
+ layout.label(text=prop.metadata.name)
+ grid = layout.column_flow(columns=3)
+ for e in prop.enumerated_value.enumerated_values:
+ grid.prop(e, "is_selected", text=str(e[value_name]))
+
+
def get_active_pset_obj_name(context, obj_type):
if obj_type == "Object":
return context.active_object.name
@@ -95,7 +134,7 @@ def draw_psetqto_ui(context, pset_id, pset, props, layout, obj_type):
def draw_psetqto_editable_ui(box, props, prop):
row = box.row(align=True)
- draw_attribute(prop, row, copy_operator="bim.copy_property_to_selection")
+ draw_property(prop, row, copy_operator="bim.copy_property_to_selection")
if (
"length" in prop.name.lower()
or "width" in prop.name.lower()
@@ -138,7 +177,7 @@ class BIM_PT_object_psets(Panel):
props = context.active_object.PsetProperties
row = self.layout.row(align=True)
- row.prop(props, "pset_name", text="")
+ prop_with_search(row, props, "pset_name", text="")
op = row.operator("bim.add_pset", icon="ADD", text="")
op.obj = context.active_object.name
op.obj_type = "Object"
@@ -177,7 +216,7 @@ class BIM_PT_object_qtos(Panel):
props = context.active_object.PsetProperties
row = self.layout.row(align=True)
- row.prop(props, "qto_name", text="")
+ prop_with_search(row, props, "qto_name", text="")
op = row.operator("bim.add_qto", icon="ADD", text="")
op.obj = context.active_object.name
op.obj_type = "Object"
@@ -213,7 +252,7 @@ class BIM_PT_material_psets(Panel):
props = context.active_object.active_material.PsetProperties
row = self.layout.row(align=True)
- row.prop(props, "pset_name", text="")
+ prop_with_search(row, props, "pset_name", text="")
op = row.operator("bim.add_pset", icon="ADD", text="")
op.obj = context.active_object.active_material.name
op.obj_type = "Material"
@@ -309,7 +348,7 @@ class BIM_PT_resource_psets(Panel):
props = context.scene.ResourcePsetProperties
row = self.layout.row(align=True)
- row.prop(props, "pset_name", text="")
+ prop_with_search(row, props, "pset_name", text="")
op = row.operator("bim.add_pset", icon="ADD", text="")
op.obj_type = "Resource"
@@ -342,7 +381,7 @@ class BIM_PT_profile_psets(Panel):
props = context.scene.ProfilePsetProperties
row = self.layout.row(align=True)
- row.prop(props, "pset_name", text="")
+ prop_with_search(row, props, "pset_name", text="")
op = row.operator("bim.add_pset", icon="ADD", text="")
op.obj_type = "Profile"
@@ -371,7 +410,7 @@ class BIM_PT_work_schedule_psets(Panel):
props = context.scene.WorkSchedulePsetProperties
row = self.layout.row(align=True)
- row.prop(props, "pset_name", text="")
+ prop_with_search(row, props, "pset_name", text="")
op = row.operator("bim.add_pset", icon="ADD", text="")
op.obj_type = "WorkSchedule"
@@ -411,7 +450,7 @@ class BIM_PT_rename_parameters(Panel):
if props:
for index, prop in enumerate(props):
row = layout.row(align=True)
- row.prop(prop, "pset_name", text="")
+ prop_with_search(row, prop, "pset_name", text="")
row.prop(prop, "existing_property_name", text="")
row.prop(prop, "new_property_name", text="")
op = row.operator("bim.remove_property_to_edit", icon="X", text="")
@@ -441,18 +480,36 @@ class BIM_PT_add_edit_custom_properties(Panel):
row = layout.row()
op = row.operator("bim.add_property_to_edit", icon="ADD")
op.option = "AddEditProperties"
+ op.index = -1
if props:
for index, prop in enumerate(props):
row = layout.row(align=True)
- row.prop(prop, "pset_name", text="")
+ prop_with_search(row, prop, "pset_name", text="")
row.prop(prop, "property_name", text="")
- row.prop(prop, prop.get_value_name(), text="")
- row.prop(prop, "primary_measure_type", text="")
+ if prop.template_type == "IfcPropertySingleValue":
+ row.prop(prop, prop.get_value_name(), text="")
+ prop_with_search(row, prop, "primary_measure_type", text="")
+ row.prop(prop, "template_type", text="")
op = row.operator("bim.remove_property_to_edit", icon="X", text="")
op.index = index
op.option = "AddEditProperties"
+ if prop.template_type == "IfcPropertyEnumeratedValue":
+ op = row.operator("bim.add_property_to_edit", icon="ADD", text="Add Enum")
+ op.option = "AddEditProperties"
+ op.index = index
+ for index2, prop2 in enumerate(prop.enum_values):
+ row = layout.row()
+ row.separator()
+ row.separator()
+ row.prop(prop2, prop.get_value_name(), text=f"#{index2}")
+ row.prop(prop2, "is_selected")
+ op = row.operator("bim.remove_property_to_edit", icon="X", text="")
+ op.index = index
+ op.index2 = index2
+ op.option = "AddEditProperties"
+
if props:
row = layout.row(align=True)
op = row.operator("bim.add_edit_custom_property", icon="CHECKMARK", text="Apply Changes")
@@ -480,7 +537,7 @@ class BIM_PT_delete_psets(Panel):
if props:
for index, prop in enumerate(props):
row = layout.row(align=True)
- row.prop(prop, "pset_name", text="")
+ prop_with_search(row, prop, "pset_name", text="")
op = row.operator("bim.remove_property_to_edit", icon="X", text="")
op.index = index
op.option = "DeletePsets"
diff --git a/src/blenderbim/blenderbim/bim/module/pset_template/__init__.py b/src/blenderbim/blenderbim/bim/module/pset_template/__init__.py
index e4e5591da4..1f822620da 100644
--- a/src/blenderbim/blenderbim/bim/module/pset_template/__init__.py
+++ b/src/blenderbim/blenderbim/bim/module/pset_template/__init__.py
@@ -20,6 +20,8 @@ import bpy
from . import ui, prop, operator
classes = (
+ operator.RefreshPsetTemplates,
+ operator.AddPsetFile,
operator.SavePsetTemplateFile,
operator.AddPsetTemplate,
operator.EditPsetTemplate,
@@ -30,8 +32,11 @@ classes = (
operator.EnableEditingPsetTemplate,
operator.DisableEditingPsetTemplate,
operator.EnableEditingPropTemplate,
+ operator.DeletePropEnum,
+ operator.AddPropEnum,
operator.DisableEditingPropTemplate,
prop.PsetTemplate,
+ prop.EnumerationValues,
prop.PropTemplate,
prop.BIMPsetTemplateProperties,
ui.BIM_PT_pset_template,
diff --git a/src/blenderbim/blenderbim/bim/module/pset_template/operator.py b/src/blenderbim/blenderbim/bim/module/pset_template/operator.py
index 8699f6d327..c01aefe847 100644
--- a/src/blenderbim/blenderbim/bim/module/pset_template/operator.py
+++ b/src/blenderbim/blenderbim/bim/module/pset_template/operator.py
@@ -16,16 +16,66 @@
# You should have received a copy of the GNU General Public License
# along with BlenderBIM Add-on. If not, see .
+import os
import bpy
import ifcopenshell
import ifcopenshell.api
import blenderbim.bim.schema
import blenderbim.bim.handler
-from blenderbim.bim.module.pset_template.prop import updatePsetTemplateFiles, updatePsetTemplates, getPsetTemplates
+from blenderbim.bim.module.pset_template.prop import purge as purge_templates, updatePsetTemplates, getPsetTemplates
+from blenderbim.bim.module.pset.prop import purge as purge_psets
from ifcopenshell.api.pset_template.data import Data
from blenderbim.bim.ifc import IfcStore
+# This is just a temporary operator until
+# @Moult performs some of his refactor-magic ;) - vulevukusej
+class RefreshPsetTemplates(bpy.types.Operator):
+ bl_idname = "bim.refresh_psettemplates"
+ bl_label = "Refresh the data for PsetTemplates"
+ bl_options = {"REGISTER", "UNDO"}
+
+ def execute(self, context):
+ purge_templates()
+ purge_psets()
+ return {"FINISHED"}
+
+
+class AddPsetFile(bpy.types.Operator):
+ bl_idname = "bim.add_pset_file"
+ bl_label = "Add Pset File"
+ bl_options = {"REGISTER", "UNDO"}
+
+ def invoke(self, context, event):
+ return context.window_manager.invoke_props_dialog(self, width=250)
+
+ def draw(self, context):
+ self.props = context.scene.BIMPsetTemplateProperties
+ self.layout.prop(self.props, "new_template_filename", text="Filename:")
+
+ def execute(self, context):
+ template = ifcopenshell.file()
+ filepath = os.path.join(
+ context.scene.BIMProperties.data_dir,
+ "pset",
+ self.props.new_template_filename + ".ifc",
+ )
+
+ template.create_entity(
+ "IFCPROPERTYSETTEMPLATE",
+ **{
+ "GlobalId": ifcopenshell.guid.new(),
+ "Name": "Name",
+ "Description": "Description",
+ "TemplateType": "PSET_TYPEDRIVENONLY",
+ "ApplicableEntity": "IfcTypeObject",
+ }
+ )
+ template.write(filepath)
+ self.props.new_template_filename = ""
+ return {"FINISHED"}
+
+
class AddPsetTemplate(bpy.types.Operator):
bl_idname = "bim.add_pset_template"
bl_label = "Add Pset Template"
@@ -41,7 +91,6 @@ class AddPsetTemplate(bpy.types.Operator):
return result
def _execute(self, context):
- props = context.scene.BIMPsetTemplateProperties
ifcopenshell.api.run("pset_template.add_pset_template", IfcStore.pset_template_file)
Data.load(IfcStore.pset_template_file)
updatePsetTemplates(self, context)
@@ -139,6 +188,40 @@ class EnableEditingPropTemplate(bpy.types.Operator):
props.active_prop_template.name = template["Name"] or ""
props.active_prop_template.description = template["Description"] or ""
props.active_prop_template.primary_measure_type = template["PrimaryMeasureType"]
+ props.active_prop_template.template_type = template["TemplateType"]
+ props.active_prop_template.enum_values.clear()
+
+ if template["Enumerators"]:
+ props.active_prop_template.enum_values.clear()
+ data_type = props.active_prop_template.get_value_name()
+ for e in template["Enumerators"].EnumerationValues:
+ new = props.active_prop_template.enum_values.add()
+ setattr(new, data_type, e.wrappedValue)
+
+ return {"FINISHED"}
+
+
+class DeletePropEnum(bpy.types.Operator):
+ bl_idname = "bim.delete_prop_enum"
+ bl_label = "delete property enumeration"
+ bl_options = {"REGISTER", "UNDO"}
+ index: bpy.props.IntProperty()
+
+ def execute(self, context):
+ active_prop = context.scene.BIMPsetTemplateProperties.active_prop_template
+ active_prop.enum_values.remove(self.index)
+ return {"FINISHED"}
+
+
+class AddPropEnum(bpy.types.Operator):
+ bl_idname = "bim.add_prop_enum"
+ bl_label = "add property enumeration"
+ bl_options = {"REGISTER", "UNDO"}
+ index: bpy.props.IntProperty()
+
+ def execute(self, context):
+ active_prop = context.scene.BIMPsetTemplateProperties.active_prop_template
+ active_prop.enum_values.add()
return {"FINISHED"}
@@ -285,6 +368,10 @@ class EditPropTemplate(bpy.types.Operator):
def _execute(self, context):
props = context.scene.BIMPsetTemplateProperties
+ if props.active_prop_template.template_type == "P_ENUMERATEDVALUE":
+ enumerator = self.generate_prop_enum(props)
+ else:
+ enumerator = None
ifcopenshell.api.run(
"pset_template.edit_prop_template",
IfcStore.pset_template_file,
@@ -294,6 +381,8 @@ class EditPropTemplate(bpy.types.Operator):
"Name": props.active_prop_template.name,
"Description": props.active_prop_template.description,
"PrimaryMeasureType": props.active_prop_template.primary_measure_type,
+ "TemplateType": props.active_prop_template.template_type,
+ "Enumerators": enumerator,
},
}
)
@@ -301,6 +390,21 @@ class EditPropTemplate(bpy.types.Operator):
bpy.ops.bim.disable_editing_prop_template()
return {"FINISHED"}
+ # TODO -This will need to go into the
+ # api code at some point - vulevukusej
+ def generate_prop_enum(self, props):
+ self.file = IfcStore.pset_template_file
+ data_type = props.active_prop_template.get_value_name()
+ prop = props.active_prop_template
+ prop_enum = self.file.create_entity(
+ "IFCPROPERTYENUMERATION",
+ Name=prop.name,
+ EnumerationValues=tuple(
+ self.file.create_entity(prop.primary_measure_type, ev[data_type]) for ev in prop.enum_values
+ ),
+ )
+ return prop_enum
+
def rollback(self, data):
IfcStore.pset_template_file.undo()
diff --git a/src/blenderbim/blenderbim/bim/module/pset_template/prop.py b/src/blenderbim/blenderbim/bim/module/pset_template/prop.py
index 0d6a46a94e..6642534e88 100644
--- a/src/blenderbim/blenderbim/bim/module/pset_template/prop.py
+++ b/src/blenderbim/blenderbim/bim/module/pset_template/prop.py
@@ -94,63 +94,88 @@ def get_primary_measure_type(self, context):
return PsetTemplatesData.data["primary_measure_type"]
+def get_template_type(self, context):
+ return [
+ (
+ "PSET_TYPEDRIVENONLY",
+ "Pset - IfcTypeObject",
+ "The property sets defined by this IfcPropertySetTemplate can only be assigned to subtypes of IfcTypeObject.",
+ ),
+ (
+ "PSET_TYPEDRIVENOVERRIDE",
+ "Pset - IfcTypeObject - Override",
+ "The property sets defined by this IfcPropertySetTemplate can only be assigned to subtypes of IfcTypeObject.",
+ ),
+ (
+ "PSET_OCCURRENCEDRIVEN",
+ "Pset - IfcObject",
+ "The property sets defined by this IfcPropertySetTemplate can only be assigned to subtypes of IfcObject.",
+ ),
+ (
+ "PSET_PERFORMANCEDRIVEN",
+ "Pset - IfcPerformanceHistory",
+ "The property sets defined by this IfcPropertySetTemplate can only be assigned to IfcPerformanceHistory.",
+ ),
+ (
+ "QTO_TYPEDRIVENONLY",
+ "Qto - IfcTypeObject",
+ "The element quantity defined by this IfcPropertySetTemplate can only be assigned to subtypes of IfcTypeObject.",
+ ),
+ (
+ "QTO_TYPEDRIVENOVERRIDE",
+ "Qto - IfcTypeObject - Override",
+ "The element quantity defined by this IfcPropertySetTemplate can be assigned to subtypes of IfcTypeObject and can be overridden by an element quantity with same name at subtypes of IfcObject.",
+ ),
+ (
+ "QTO_OCCURRENCEDRIVEN",
+ "Qto - IfcObject",
+ "The element quantity defined by this IfcPropertySetTemplate can only be assigned to subtypes of IfcObject.",
+ ),
+ (
+ "NOTDEFINED",
+ "Not defined",
+ "No restriction provided, the property sets defined by this IfcPropertySetTemplate can be assigned to any entity, if not otherwise restricted by the ApplicableEntity attribute.",
+ ),
+ ]
+
+
class PsetTemplate(PropertyGroup):
global_id: StringProperty(name="Global ID")
name: StringProperty(name="Name")
description: StringProperty(name="Description")
- template_type: EnumProperty(
- items=[
- (
- "PSET_TYPEDRIVENONLY",
- "Pset - IfcTypeObject",
- "The property sets defined by this IfcPropertySetTemplate can only be assigned to subtypes of IfcTypeObject.",
- ),
- (
- "PSET_TYPEDRIVENOVERRIDE",
- "Pset - IfcTypeObject - Override",
- "The property sets defined by this IfcPropertySetTemplate can only be assigned to subtypes of IfcTypeObject.",
- ),
- (
- "PSET_OCCURRENCEDRIVEN",
- "Pset - IfcObject",
- "The property sets defined by this IfcPropertySetTemplate can only be assigned to subtypes of IfcObject.",
- ),
- (
- "PSET_PERFORMANCEDRIVEN",
- "Pset - IfcPerformanceHistory",
- "The property sets defined by this IfcPropertySetTemplate can only be assigned to IfcPerformanceHistory.",
- ),
- (
- "QTO_TYPEDRIVENONLY",
- "Qto - IfcTypeObject",
- "The element quantity defined by this IfcPropertySetTemplate can only be assigned to subtypes of IfcTypeObject.",
- ),
- (
- "QTO_TYPEDRIVENOVERRIDE",
- "Qto - IfcTypeObject - Override",
- "The element quantity defined by this IfcPropertySetTemplate can be assigned to subtypes of IfcTypeObject and can be overridden by an element quantity with same name at subtypes of IfcObject.",
- ),
- (
- "QTO_OCCURRENCEDRIVEN",
- "Qto - IfcObject",
- "The element quantity defined by this IfcPropertySetTemplate can only be assigned to subtypes of IfcObject.",
- ),
- (
- "NOTDEFINED",
- "Not defined",
- "No restriction provided, the property sets defined by this IfcPropertySetTemplate can be assigned to any entity, if not otherwise restricted by the ApplicableEntity attribute.",
- ),
- ],
- name="Template Type",
- )
+ template_type: EnumProperty(items=get_template_type, name="Template Type")
applicable_entity: StringProperty(name="Applicable Entity")
+class EnumerationValues(PropertyGroup):
+ string_value: StringProperty(name="Value")
+ bool_value: BoolProperty(name="Value")
+ int_value: IntProperty(name="Value")
+ float_value: FloatProperty(name="Value")
+
+
class PropTemplate(PropertyGroup):
global_id: StringProperty(name="Global ID")
name: StringProperty(name="Name")
description: StringProperty(name="Description")
primary_measure_type: EnumProperty(items=get_primary_measure_type, name="Primary Measure Type")
+ template_type: EnumProperty(
+ items=[("P_SINGLEVALUE", "P_SINGLEVALUE", ""), ("P_ENUMERATEDVALUE", "P_ENUMERATEDVALUE", "")],
+ name="Template Type",
+ )
+ enum_values: CollectionProperty(type=EnumerationValues)
+
+ def get_value_name(self):
+ ifc_data_type = IfcStore.get_schema().declaration_by_name(self.primary_measure_type)
+ data_type = ifcopenshell.util.attribute.get_primitive_type(ifc_data_type)
+ if data_type == "string":
+ return "string_value"
+ elif data_type == "boolean":
+ return "bool_value"
+ elif data_type == "integer":
+ return "int_value"
+ elif data_type == "float":
+ return "float_value"
class BIMPsetTemplateProperties(PropertyGroup):
@@ -162,3 +187,4 @@ class BIMPsetTemplateProperties(PropertyGroup):
active_prop_template_id: IntProperty(name="Active Prop Template Id")
active_pset_template: PointerProperty(type=PsetTemplate)
active_prop_template: PointerProperty(type=PropTemplate)
+ new_template_filename: StringProperty("New TemplateFileName")
diff --git a/src/blenderbim/blenderbim/bim/module/pset_template/ui.py b/src/blenderbim/blenderbim/bim/module/pset_template/ui.py
index 91f90f82d8..b15ca05bd4 100644
--- a/src/blenderbim/blenderbim/bim/module/pset_template/ui.py
+++ b/src/blenderbim/blenderbim/bim/module/pset_template/ui.py
@@ -19,6 +19,7 @@
import bpy
from bpy.types import Panel
from blenderbim.bim.ifc import IfcStore
+from blenderbim.bim.helper import prop_with_search
from blenderbim.bim.module.pset_template.prop import (
getPsetTemplates,
)
@@ -39,13 +40,15 @@ class BIM_PT_pset_template(Panel):
props = context.scene.BIMPsetTemplateProperties
row = layout.row(align=True)
- row.prop(props, "pset_template_files", text="")
+ prop_with_search(row, props, "pset_template_files", text="")
row.operator("bim.save_pset_template_file", text="", icon="EXPORT")
+ row.operator("bim.add_pset_file", icon="ADD", text="")
+ row.operator("bim.refresh_psettemplates", icon="FILE_REFRESH", text="")
row = layout.row(align=True)
if bool(getPsetTemplates(props, context)):
- row.prop(props, "pset_templates", text="", icon="COPY_ID")
+ prop_with_search(row, props, "pset_templates", text="", icon="COPY_ID")
else:
row.label(text="No Pset Templates", icon="COPY_ID")
@@ -69,8 +72,7 @@ class BIM_PT_pset_template(Panel):
row.prop(props.active_pset_template, "name")
row = layout.row()
row.prop(props.active_pset_template, "description")
- row = layout.row()
- row.prop(props.active_pset_template, "template_type")
+ prop_with_search(layout, props.active_pset_template, "template_type")
row = layout.row()
row.prop(props.active_pset_template, "applicable_entity")
else:
@@ -86,6 +88,9 @@ class BIM_PT_pset_template(Panel):
row.label(text="Property Templates", icon="COPY_ID")
row.operator("bim.add_prop_template", icon="ADD", text="")
+ row = layout.row()
+ row.label(text="Name | Description | PrimaryMeasureType | TemplateType")
+
for prop_template_id in pset_template["HasPropertyTemplates"]:
prop_template = Data.prop_templates[prop_template_id]
row = layout.row(align=True)
@@ -93,11 +98,34 @@ class BIM_PT_pset_template(Panel):
if props.active_prop_template_id and props.active_prop_template_id == prop_template_id:
row.prop(props.active_prop_template, "name", text="")
row.prop(props.active_prop_template, "description", text="")
- row.prop(props.active_prop_template, "primary_measure_type", text="")
+ prop_with_search(row, props.active_prop_template, "primary_measure_type", text="")
+ row.prop(props.active_prop_template, "template_type", text="")
+
+ if props.active_prop_template.template_type == "P_ENUMERATEDVALUE":
+ row = layout.row(align=True)
+ split = row.split(factor=0.2)
+ c = split.column()
+ c.label(
+ text="Enumerations:",
+ )
+
+ c = split.column()
+ box = c.box()
+ grid = box.column_flow(columns=4)
+ value_name = props.active_prop_template.get_value_name()
+ r = grid.row()
+ r.operator("bim.add_prop_enum", text="Add Enum")
+ for k, v in enumerate(props.active_prop_template.enum_values):
+ r = grid.row(align=True)
+ r.prop(v, value_name, text="")
+ op = r.operator("bim.delete_prop_enum", icon="X", text="")
+ op.index = k
+
else:
row.label(text=prop_template["Name"])
row.label(text=prop_template["Description"])
row.label(text=prop_template["PrimaryMeasureType"])
+ row.label(text=prop_template["TemplateType"])
if props.active_prop_template_id and props.active_prop_template_id == prop_template_id:
op = row.operator("bim.edit_prop_template", icon="CHECKMARK", text="")
diff --git a/src/blenderbim/blenderbim/bim/module/root/data.py b/src/blenderbim/blenderbim/bim/module/root/data.py
index 9d2ee77ae4..dda12cdac8 100644
--- a/src/blenderbim/blenderbim/bim/module/root/data.py
+++ b/src/blenderbim/blenderbim/bim/module/root/data.py
@@ -16,9 +16,11 @@
# You should have received a copy of the GNU General Public License
# along with BlenderBIM Add-on. If not, see .
+from collections import defaultdict
import bpy
import ifcopenshell.util.element
import blenderbim.tool as tool
+from blenderbim.bim.ifc import IfcStore
def refresh():
@@ -35,6 +37,7 @@ class IfcClassData:
cls.data = {}
cls.data["ifc_products"] = cls.ifc_products()
cls.data["ifc_classes"] = cls.ifc_classes()
+ cls.data["ifc_classes_suggestions"] = cls.ifc_classes_suggestions()
cls.data["contexts"] = cls.contexts()
cls.data["has_entity"] = cls.has_entity()
cls.data["name"] = cls.name()
@@ -74,6 +77,41 @@ class IfcClassData:
names.extend(("IfcDoorStyle", "IfcWindowStyle"))
return [(c, c, "") for c in sorted(names)]
+ @classmethod
+ def ifc_classes_suggestions(cls):
+ suggestions = defaultdict(list)
+ suggestions.update(
+ {
+ "IfcWall": ["Glazing", "Glass", "Pane"],
+ "IfcWindow": ["Glazing", "Glass", "Pane"],
+ "IfcPlate": ["Glazing", "Glass", "Pane"],
+ "IfcFurniture": ["Signage"],
+ "IfcSlab": ["Hob"],
+ "IfcCovering": ["Flashing", "Capping"],
+ "IfcCableSegment": ["Lighting Rod"],
+ "IfcSensor": ["Card Reader", "Fob Reader"],
+ "IfcSwitchingDevice": ["Reed Switch", "Electric Isolating Switch"],
+ "IfcActuator": ["Electric Strike"],
+ "IfcAirTerminalBox": ["VAV Box"],
+ "IfcUnitaryEquipment": ["Fan Coil Unit"],
+ }
+ )
+ file = IfcStore.get_file()
+ if file:
+ for ifc_class in cls.ifc_classes():
+ ifc_class = ifc_class[0]
+ declaration = IfcStore.get_schema().declaration_by_name(ifc_class)
+ for attribute in declaration.attributes():
+ if attribute.name() == "PredefinedType":
+ for e in attribute.type_of_attribute().declared_type().enumeration_items():
+ if e in (
+ "NOTDEFINED",
+ "USERDEFINED",
+ ):
+ continue
+ suggestions[ifc_class].append(e.title())
+ return suggestions
+
@classmethod
def contexts(cls):
results = []
diff --git a/src/blenderbim/blenderbim/bim/module/root/operator.py b/src/blenderbim/blenderbim/bim/module/root/operator.py
index e64b2e5920..c3d5170335 100644
--- a/src/blenderbim/blenderbim/bim/module/root/operator.py
+++ b/src/blenderbim/blenderbim/bim/module/root/operator.py
@@ -31,7 +31,7 @@ import blenderbim.core.root as core
import blenderbim.tool as tool
from ifcopenshell.api.void.data import Data as VoidData
from blenderbim.bim.ifc import IfcStore
-from blenderbim.bim.module.root.prop import get_contexts
+from blenderbim.bim.helper import get_enum_items
class Operator:
@@ -127,12 +127,13 @@ class AssignClass(bpy.types.Operator, Operator):
ifc_representation_class: bpy.props.StringProperty()
def _execute(self, context):
+ props = context.scene.BIMRootProperties
objects = [bpy.data.objects.get(self.obj)] if self.obj else context.selected_objects
- ifc_class = self.ifc_class or context.scene.BIMRootProperties.ifc_class
+ ifc_class = self.ifc_class or props.ifc_class
predefined_type = self.userdefined_type if self.predefined_type == "USERDEFINED" else self.predefined_type
ifc_context = self.context_id
- if not ifc_context and get_contexts(self, context):
- ifc_context = int(context.scene.BIMRootProperties.contexts or "0") or None
+ if not ifc_context and get_enum_items(props, "contexts", context):
+ ifc_context = int(props.contexts or "0") or None
if ifc_context:
ifc_context = tool.Ifc.get().by_id(ifc_context)
active_object = context.active_object
diff --git a/src/blenderbim/blenderbim/bim/module/root/prop.py b/src/blenderbim/blenderbim/bim/module/root/prop.py
index 8b598a2338..53548a7829 100644
--- a/src/blenderbim/blenderbim/bim/module/root/prop.py
+++ b/src/blenderbim/blenderbim/bim/module/root/prop.py
@@ -34,11 +34,14 @@ from bpy.props import (
)
types_enum = []
+classes_enum = []
def purge():
global types_enum
types_enum = []
+ global classes_enum
+ classes_enum = []
def getIfcPredefinedTypes(self, context):
@@ -69,6 +72,10 @@ def refreshPredefinedTypes(self, context):
context.scene.BIMRootProperties.ifc_predefined_type = enum[0][0]
+def update_class_enum(self, context):
+ self.ifc_class = self.ifc_class_filter_enum
+
+
def get_ifc_products(self, context):
if not IfcClassData.is_loaded:
IfcClassData.load()
@@ -81,6 +88,12 @@ def get_ifc_classes(self, context):
return IfcClassData.data["ifc_classes"]
+def get_ifc_classes_suggestions():
+ if not IfcClassData.is_loaded:
+ IfcClassData.load()
+ return IfcClassData.data["ifc_classes_suggestions"]
+
+
def get_contexts(self, context):
if not IfcClassData.is_loaded:
IfcClassData.load()
@@ -93,3 +106,7 @@ class BIMRootProperties(PropertyGroup):
ifc_class: EnumProperty(items=get_ifc_classes, name="Class", update=refreshPredefinedTypes)
ifc_predefined_type: EnumProperty(items=getIfcPredefinedTypes, name="Predefined Type", default=None)
ifc_userdefined_type: StringProperty(name="Userdefined Type")
+
+ getter_enum_suggestions = {
+ "ifc_class": get_ifc_classes_suggestions,
+ }
diff --git a/src/blenderbim/blenderbim/bim/module/root/ui.py b/src/blenderbim/blenderbim/bim/module/root/ui.py
index 369f0b50e8..18ca900cea 100644
--- a/src/blenderbim/blenderbim/bim/module/root/ui.py
+++ b/src/blenderbim/blenderbim/bim/module/root/ui.py
@@ -20,6 +20,7 @@ import bpy
import blenderbim.bim.module.root.prop as root_prop
from bpy.types import Panel
from blenderbim.bim.ifc import IfcStore
+from blenderbim.bim.helper import prop_with_search
from blenderbim.bim.module.root.data import IfcClassData
@@ -76,17 +77,14 @@ class BIM_PT_class(Panel):
def draw_class_dropdowns(self, context, ifc_predefined_types, is_reassigning_class=False):
props = context.scene.BIMRootProperties
+ layout = self.layout
if not is_reassigning_class:
- row = self.layout.row()
- row.prop(props, "ifc_product")
- row = self.layout.row()
- row.prop(props, "ifc_class")
+ prop_with_search(layout, props, "ifc_product")
+ prop_with_search(layout, props, "ifc_class")
if ifc_predefined_types:
- row = self.layout.row()
- row.prop(props, "ifc_predefined_type")
- if ifc_predefined_types == "USERDEFINED":
- row = self.layout.row()
- row.prop(props, "ifc_userdefined_type")
+ prop_with_search(layout, props, "ifc_predefined_type")
+ if props.ifc_predefined_type == "USERDEFINED":
+ row = layout.row()
+ row.prop(props, "ifc_userdefined_type")
if not is_reassigning_class:
- row = self.layout.row()
- row.prop(context.scene.BIMRootProperties, "contexts")
+ prop_with_search(layout, props, "contexts")
diff --git a/src/blenderbim/blenderbim/bim/module/search/__init__.py b/src/blenderbim/blenderbim/bim/module/search/__init__.py
index df128b9a9e..7fb8ce763f 100644
--- a/src/blenderbim/blenderbim/bim/module/search/__init__.py
+++ b/src/blenderbim/blenderbim/bim/module/search/__init__.py
@@ -31,18 +31,33 @@ classes = (
operator.SelectGlobalId,
operator.SelectIfcClass,
operator.SelectPset,
+ operator.UnhideAllElements,
+ operator.FilterModelElements,
+ operator.IfcSelector,
+ operator.SaveSelectorQuery,
+ operator.OpenQueryLibrary,
+ operator.LoadQuery,
+ operator.AddToIfcGroup,
prop.BIMFilterClasses,
prop.BIMFilterBuildingStoreys,
prop.BIMSearchProperties,
+ prop.SearchCollection,
+ prop.SearchQueryFilter,
+ prop.SearchQuery,
+ prop.SearchQueryGroup,
+ prop.IfcSelectorProperties,
ui.BIM_PT_search,
ui.BIM_UL_ifc_class_filter,
ui.BIM_UL_ifc_building_storey_filter,
+ ui.BIM_PT_IFCSelector,
)
def register():
bpy.types.Scene.BIMSearchProperties = bpy.props.PointerProperty(type=prop.BIMSearchProperties)
+ bpy.types.Scene.IfcSelectorProperties = bpy.props.PointerProperty(type=prop.IfcSelectorProperties)
def unregister():
del bpy.types.Scene.BIMSearchProperties
+ del bpy.types.Scene.IfcSelectorProperties
diff --git a/src/blenderbim/blenderbim/bim/module/search/operator.py b/src/blenderbim/blenderbim/bim/module/search/operator.py
index 5004f5c7fa..d331877768 100644
--- a/src/blenderbim/blenderbim/bim/module/search/operator.py
+++ b/src/blenderbim/blenderbim/bim/module/search/operator.py
@@ -20,9 +20,24 @@ import re
import bpy
import ifcopenshell
import ifcopenshell.util.element
+from ifcopenshell.api.group.data import Data
+from ifcopenshell.util.selector import Selector
import blenderbim.tool as tool
from blenderbim.bim.ifc import IfcStore
+from blenderbim.bim.helper import close_operator_panel
+from blenderbim.bim.module.group import ui
from itertools import cycle
+from bpy.types import PropertyGroup, Operator
+from bpy.props import (
+ PointerProperty,
+ StringProperty,
+ EnumProperty,
+ BoolProperty,
+ IntProperty,
+ FloatProperty,
+ FloatVectorProperty,
+ CollectionProperty,
+)
colour_list = [
@@ -54,13 +69,13 @@ def does_keyword_exist(pattern, string, context):
return True
-class SelectGlobalId(bpy.types.Operator):
+class SelectGlobalId(Operator):
"""Click to select the objects that match with the given Global ID"""
bl_idname = "bim.select_global_id"
bl_label = "Select GlobalId"
bl_options = {"REGISTER", "UNDO"}
- global_id: bpy.props.StringProperty()
+ global_id: StringProperty()
def execute(self, context):
ifc_file = tool.Ifc.get()
@@ -73,13 +88,13 @@ class SelectGlobalId(bpy.types.Operator):
return {"FINISHED"}
-class SelectIfcClass(bpy.types.Operator):
+class SelectIfcClass(Operator):
"""Click to select all objects that match with the given IFC class"""
bl_idname = "bim.select_ifc_class"
bl_label = "Select IFC Class"
bl_options = {"REGISTER", "UNDO"}
- ifc_class: bpy.props.StringProperty()
+ ifc_class: StringProperty()
def execute(self, context):
self.file = IfcStore.get_file()
@@ -92,7 +107,7 @@ class SelectIfcClass(bpy.types.Operator):
return {"FINISHED"}
-class SelectAttribute(bpy.types.Operator):
+class SelectAttribute(Operator):
"""Click to select all objects that match with the given Attribute Name and Value"""
bl_idname = "bim.select_attribute"
@@ -118,7 +133,7 @@ class SelectAttribute(bpy.types.Operator):
return {"FINISHED"}
-class SelectPset(bpy.types.Operator):
+class SelectPset(Operator):
"""Click to select all objects that match with the given Pset Name, Properties Name and Value"""
bl_idname = "bim.select_pset"
@@ -152,7 +167,7 @@ class SelectPset(bpy.types.Operator):
return {"FINISHED"}
-class ColourByAttribute(bpy.types.Operator):
+class ColourByAttribute(Operator):
"""Click to colour different objects according to given Attribute Name"""
bl_idname = "bim.colour_by_attribute"
@@ -203,7 +218,7 @@ class ColourByAttribute(bpy.types.Operator):
data["area"].spaces[0].shading.color_type = "OBJECT"
-class ColourByPset(bpy.types.Operator):
+class ColourByPset(Operator):
"""Click to colour different objects according to given Prop Name"""
bl_idname = "bim.colour_by_pset"
@@ -262,7 +277,7 @@ class ColourByPset(bpy.types.Operator):
data["area"].spaces[0].shading.color_type = "OBJECT"
-class ColourByClass(bpy.types.Operator):
+class ColourByClass(Operator):
"""Click to colour different objects according to their IFC Classes"""
bl_idname = "bim.colour_by_class"
@@ -308,7 +323,7 @@ class ColourByClass(bpy.types.Operator):
data["area"].spaces[0].shading.color_type = "OBJECT"
-class ResetObjectColours(bpy.types.Operator):
+class ResetObjectColours(Operator):
"""Reset the colour of selected objects"""
bl_idname = "bim.reset_object_colours"
@@ -320,11 +335,11 @@ class ResetObjectColours(bpy.types.Operator):
return {"FINISHED"}
-class ToggleFilterSelection(bpy.types.Operator):
+class ToggleFilterSelection(Operator):
"Click to select/deselect current selection"
bl_idname = "bim.toggle_filter_selection"
bl_label = "Toggle Filter Selection"
- action: bpy.props.EnumProperty(items=(("SELECT", "Select", ""), ("DESELECT", "Deselect", "")))
+ action: EnumProperty(items=(("SELECT", "Select", ""), ("DESELECT", "Deselect", "")))
def execute(self, context):
props = bpy.context.scene.BIMSearchProperties
@@ -341,7 +356,7 @@ class ToggleFilterSelection(bpy.types.Operator):
return {"FINISHED"}
-class ActivateIfcClassFilter(bpy.types.Operator):
+class ActivateIfcClassFilter(Operator):
"""Filter the current selection by IFC class"""
bl_idname = "bim.activate_ifc_class_filter"
@@ -387,7 +402,7 @@ class ActivateIfcClassFilter(bpy.types.Operator):
row.operator("bim.toggle_filter_selection", text="Deselect All").action = "DESELECT"
-class ActivateIfcBuildingStoreyFilter(bpy.types.Operator):
+class ActivateIfcBuildingStoreyFilter(Operator):
"""Filter the current selection by Building Storey"""
bl_idname = "bim.activate_ifc_building_storey_filter"
@@ -433,3 +448,236 @@ class ActivateIfcBuildingStoreyFilter(bpy.types.Operator):
row = self.layout.row(align=True)
row.operator("bim.toggle_filter_selection", text="Select All").action = "SELECT"
row.operator("bim.toggle_filter_selection", text="Deselect All").action = "DESELECT"
+
+
+class UnhideAllElements(Operator):
+ """Filter model elements based on selection"""
+
+ bl_idname = "bim.reset_3d_view"
+ bl_label = "Reset 3D View"
+ bl_idname = "bim.unhide_all_elements"
+ bl_label = "Unhide All Elements"
+
+ def execute(self, context):
+ for obj in bpy.data.scenes["Scene"].objects:
+ obj.hide_set(False)
+ return {"FINISHED"}
+
+
+class FilterModelElements(Operator):
+ """Filter model elements based on selection"""
+
+ bl_idname = "bim.filter_model_elements"
+ bl_label = "Filter Model Elements"
+ option: StringProperty("select|isolate|hide")
+
+ def execute(self, context):
+ selector = context.scene.IfcSelectorProperties
+ selection = selector.selector_query_syntax if selector.manual_override else self.add_groups(selector)
+ selector.selector_query_syntax = selection
+ self.update_model_view(context, selection)
+ return {"FINISHED"}
+
+ def add_groups(self, selector):
+ selection = ""
+ for group_index, group in enumerate(selector.groups):
+ if group_index != 0:
+ selection += " | "
+ selection += "(" if len(selector.groups) > 1 else ""
+ selection = self.add_queries(selection, group)
+
+ selection += ")" if len(selector.groups) > 1 else ""
+ return selection
+
+ def add_queries(self, selection, group):
+ for query_index, query in enumerate(group.queries):
+ if query_index != 0:
+ selection += " & " if query.and_or == "and" else " | "
+
+ if query.selector == "IFC Class":
+ active_option = query.active_option.split(": ")[1]
+ selection += f".{active_option}"
+ selection = self.add_filters(selection, query)
+
+ elif query.selector == "GlobalId":
+ selection += f"#{query.value}"
+
+ elif query.selector == "IfcElementType":
+ index = int(query.active_sub_option.split(":")[0])
+ selection += f"* #{query.sub_options[index].global_id}"
+
+ elif query.selector == "IfcSpatialElement":
+ index = int(query.active_sub_option.split(":")[0])
+ selection += f"@ #{query.sub_options[index].global_id}"
+ return selection
+
+ def add_filters(self, selection, query):
+ for f_index, f in enumerate(query.filters):
+
+ if f_index != 0:
+ selection += " & " if f.and_or == "and" else " | "
+ selection += f".{query.active_option}"
+
+ selection += "["
+
+ if f.selector == "IfcPropertySet":
+ selection += f'{f.active_option.split(": ")[1]}.{f.active_sub_option.split(": ")[1]} {"!" if f.negation else ""}="{f.value}"'
+ elif f.selector == "Attribute":
+ selection += f'{f.attribute} {"!" if f.negation else ""}= "{f.value}"'
+
+ selection += "]"
+ return selection
+
+ def update_model_view(self, context, selection):
+ query = Selector.parse(IfcStore.file, selection)
+ sel_element_ids = [e.id() for e in query]
+ bpy.ops.object.select_all(action="DESELECT")
+
+ for obj in bpy.data.scenes["Scene"].objects:
+ obj.hide_set(False) # reset 3d view
+
+ if self.option == "select":
+ if obj.BIMObjectProperties.ifc_definition_id in sel_element_ids:
+ obj.select_set(True)
+ elif self.option == "isolate":
+ if obj.BIMObjectProperties.ifc_definition_id not in sel_element_ids:
+ obj.hide_set(True)
+ elif self.option == "hide":
+ if obj.BIMObjectProperties.ifc_definition_id in sel_element_ids:
+ obj.hide_set(True)
+
+#This needs to be moved into ui code, I know ;) - vulevukusej
+class IfcSelector(Operator):
+ """Select elements in model with IFC Selector"""
+
+ bl_idname = "bim.ifc_selector"
+ bl_label = "Select elements with IFC Selector"
+
+ def invoke(self, context, event):
+ return context.window_manager.invoke_props_dialog(self, width=800)
+
+ @classmethod
+ def poll(cls, context):
+ return IfcStore.get_file()
+
+ def execute(self, context):
+ return {"FINISHED"}
+
+ def draw(self, context):
+ from . import ui
+ ui.IfcSelectorUI.draw(context, self.layout)
+
+
+class SaveSelectorQuery(Operator):
+ bl_idname = "bim.save_selector_query"
+ bl_label = "Save Selector Query"
+ save_name: StringProperty()
+
+ def invoke(self, context, event):
+ return context.window_manager.invoke_props_dialog(self, width=400)
+
+ def draw(self, context):
+ layout = self.layout
+ layout.prop(self, "save_name")
+
+ def execute(self, context):
+ ifc_selector = context.scene.IfcSelectorProperties
+ new = ifc_selector.query_library.add()
+ new.name = self.save_name
+ new.query = ifc_selector.selector_query_syntax
+ return {"FINISHED"}
+
+
+class OpenQueryLibrary(Operator):
+ """Open Query Library"""
+
+ bl_idname = "bim.open_query_library"
+ bl_label = "Open Query Library"
+
+ def invoke(self, context, event):
+ return context.window_manager.invoke_popup(self, width=400)
+
+ def draw(self, context):
+ layout = self.layout
+ ifc_selector = context.scene.IfcSelectorProperties
+
+ for index, query in enumerate(ifc_selector.query_library):
+ row = layout.row(align=True)
+ row.prop(query, "query", text=query.name)
+ op = row.operator("bim.load_query", icon="SORT_ASC", text="")
+ op.index = index
+
+ row.context_pointer_set(name="bim_prop_group", data=ifc_selector)
+ op = row.operator("bim.edit_blender_collection", icon="REMOVE", text="")
+ op.option = "remove"
+ op.collection = "query_library"
+ op.index = index
+
+ def execute(self, context):
+ return {"FINISHED"}
+
+
+class LoadQuery(Operator):
+ bl_idname = "bim.load_query"
+ bl_label = "Load Query"
+ index: IntProperty()
+
+ def invoke(self, context, event):
+ close_operator_panel(event)
+ return self.execute(context)
+
+ def execute(self, context):
+ ifc_selector = context.scene.IfcSelectorProperties
+ ifc_selector.selector_query_syntax = ifc_selector.query_library[self.index].query
+ return {"FINISHED"}
+
+
+class AddToIfcGroup(Operator):
+ bl_idname = "bim.add_to_ifc_group"
+ bl_label = "Add to IFC Group"
+ group_name: StringProperty(name="Group Name")
+
+ def invoke(self, context, event):
+ bpy.ops.bim.load_groups()
+ return context.window_manager.invoke_props_dialog(self, width=400)
+
+ def draw(self, context):
+ self.props = context.scene.BIMGroupProperties
+ row = self.layout.row()
+ row.operator("bim.add_group")
+
+ self.layout.template_list(
+ "BIM_UL_groups",
+ "",
+ self.props,
+ "groups",
+ self.props,
+ "active_group_index",
+ )
+
+ if self.props.active_group_id:
+ for attribute in self.props.group_attributes:
+ if attribute.name in ["Name", "Description"]:
+ row = self.layout.row(align=True)
+ row.prop(attribute, "string_value", text=attribute.name)
+
+ def execute(self, context):
+ active_group_index = self.props.active_group_index
+ ifc_definition_id = self.props.groups[active_group_index].ifc_definition_id
+
+ bpy.ops.bim.enable_editing_group(group=ifc_definition_id)
+
+ selector_query_syntax = context.scene.IfcSelectorProperties.selector_query_syntax
+
+ for attribute in self.props.group_attributes:
+ if attribute.name == "Description":
+ if "*selector*" not in attribute.string_value:
+ attribute.string_value += f" *selector*{selector_query_syntax}*selector*"
+ else:
+ new_description = attribute.string_value.split("*selector*")
+ new_description[1] = selector_query_syntax
+ attribute.string_value = "*selector*".join(new_description)
+
+ bpy.ops.bim.edit_group()
+ bpy.ops.bim.disable_group_editing_ui()
+ return {"FINISHED"}
diff --git a/src/blenderbim/blenderbim/bim/module/search/prop.py b/src/blenderbim/blenderbim/bim/module/search/prop.py
index cf97d4f01a..c1c7826ffe 100644
--- a/src/blenderbim/blenderbim/bim/module/search/prop.py
+++ b/src/blenderbim/blenderbim/bim/module/search/prop.py
@@ -17,9 +17,13 @@
# along with BlenderBIM Add-on. If not, see .
import bpy
+from ifcopenshell import util
+from ifcopenshell.util.selector import Selector
import blenderbim.tool as tool
-from blenderbim.bim.prop import ObjProperty
+from blenderbim.bim.prop import ObjProperty, StrProperty
+from blenderbim.bim.ifc import IfcStore
from bpy.types import PropertyGroup
+from blenderbim.tool.ifc import Ifc
from . import ui, prop, operator
from bpy.props import (
PointerProperty,
@@ -90,3 +94,147 @@ class BIMSearchProperties(PropertyGroup):
filter_classes_index: IntProperty(name="Filter Classes Index")
filter_building_storeys: CollectionProperty(type=BIMFilterBuildingStoreys, name="Filter Level")
filter_building_storeys_index: IntProperty(name="Filter Level Index")
+
+
+def get_classes(self, ifc_product):
+ declaration = tool.Ifc.schema().declaration_by_name(ifc_product)
+ declarations = util.schema.get_subtypes(declaration)
+ names = [d.name() for d in declarations]
+ return [(c, c, "") for c in sorted(names)]
+
+
+def load_sub_options(self, context):
+ if self.selector not in ["IfcClass"]:
+ self.load_option = "sub_options"
+ load_selection_options(self, context)
+
+
+def load_selection_options(self, context):
+ ifc = IfcStore.file
+ load_option = self.load_option
+ op = getattr(self, load_option)
+ op.clear()
+ options = []
+
+ if load_option == "options":
+ self.sub_options.clear()
+ if self.selector == "IFC Class":
+ options = get_classes(self, "IfcElement")
+ options.append(("IfcSpace", "IfcSpace", ""))
+ elif self.selector == "IfcSpatialElement":
+ options = get_classes(self, "IfcSpatialElement")
+ elif self.selector == "IfcElementType":
+ options = get_classes(self, "IfcElementType")
+ elif self.selector == "GlobalId":
+ return
+ elif self.selector == "IfcPropertySet":
+ psets = Selector.parse(ifc, ".IfcPropertySet")
+ options = set([o.Name for o in psets])
+
+ elif load_option == "sub_options":
+ if self.selector in ["IfcSpatialElement", "IfcElementType"]:
+ active_option = self.active_option.split(": ")[1]
+ options = Selector.parse(ifc, f".{active_option}")
+
+ elif self.selector == "IfcPropertySet":
+ options = set()
+ active_pset = self.active_option.split(": ")[1]
+ psets_in_file = Selector.parse(ifc, f'.IfcPropertySet[Name="{active_pset}"]')
+ for pset in psets_in_file:
+ for prop in pset.HasProperties:
+ options.add(prop.Name)
+
+ for index, option in enumerate(options):
+ new = op.add()
+ if self.selector in ["IfcSpatialElement", "IfcElementType"]:
+ if self.load_option == "sub_options":
+ new.name = f"{index}: {option.Name}"
+ new.global_id = option.GlobalId
+ else:
+ new.name = f"{index}: {option[0]}"
+ elif self.selector == "IfcPropertySet":
+ new.name = f"{index}: {option}"
+ else:
+ new.name = f"{index}: {option[0]}"
+ self.load_option = "options"
+
+
+def load_spatial_elements(self, context):
+ ifc = IfcStore.file
+ col_items = Selector.parse(ifc, f".{self.selected_spatial_element}")
+ collection = getattr(self, "sub_spatial_elements", None)
+ collection.clear()
+ for index, c in enumerate(col_items):
+ new = collection.add()
+ new.name = f"{index}-{c.Name}"
+
+
+class SearchCollection(PropertyGroup):
+ name: StringProperty()
+ long_name: StringProperty()
+ global_id: StringProperty()
+ query: StringProperty()
+
+
+class IfcSelector:
+ and_or: EnumProperty(
+ items=[(i, i, i) for i in ["and", "or"]],
+ )
+ negation: BoolProperty(name="not")
+ comparison: EnumProperty(
+ items=[
+ ("=", "equal to", ""),
+ ("*=", "contains", ""),
+ (">=", "greater than or equal to", ""),
+ ("<=", "lesser than or equal to", ""),
+ (">", "greater than", ""),
+ ("<", "less than", ""),
+ ],
+ )
+ load_option: StringProperty(
+ default="options", description="controls whether or not options or sub_options are loaded"
+ )
+ options: CollectionProperty(type=SearchCollection)
+ active_option: StringProperty(update=load_sub_options)
+ sub_options: CollectionProperty(type=SearchCollection)
+ active_sub_option: StringProperty()
+ value: StringProperty(description="generic 'value' that can be used in multiple scenarios")
+
+
+class SearchQueryFilter(PropertyGroup, IfcSelector):
+ selector: EnumProperty(
+ items=[(i, i, i) for i in ["-", "IfcPropertySet", "Attribute"]],
+ name="Filter selection by",
+ update=load_selection_options,
+ default="-",
+ )
+ attribute: EnumProperty(
+ items=[(i, i, i) for i in ["GlobalId", "Name", "Description", "ObjectType", "Tag", "PredefinedType"]],
+ name="Filter selection by",
+ update=load_selection_options,
+ )
+
+
+class SearchQuery(PropertyGroup, IfcSelector):
+ filters: CollectionProperty(type=SearchQueryFilter)
+ selector: EnumProperty(
+ items=[(i, i, i) for i in ["-", "IFC Class", "IfcSpatialElement", "IfcElementType", "GlobalId"]],
+ name="Selector type",
+ update=load_selection_options,
+ default="-",
+ )
+
+
+class SearchQueryGroup(PropertyGroup, IfcSelector):
+ queries: CollectionProperty(type=SearchQuery)
+
+
+class IfcSelectorProperties(PropertyGroup, IfcSelector):
+ groups: CollectionProperty(type=SearchQueryGroup)
+ selector_query_syntax: StringProperty()
+
+ query_library: CollectionProperty(type=SearchCollection)
+ active_query: StringProperty()
+
+ active_query: StringProperty()
+ manual_override: BoolProperty(default=False, description="Toggle to allow manual typing of query-syntax")
diff --git a/src/blenderbim/blenderbim/bim/module/search/ui.py b/src/blenderbim/blenderbim/bim/module/search/ui.py
index 44dce8431a..0d0b1be7ca 100644
--- a/src/blenderbim/blenderbim/bim/module/search/ui.py
+++ b/src/blenderbim/blenderbim/bim/module/search/ui.py
@@ -102,3 +102,153 @@ class BIM_UL_ifc_building_storey_filter(bpy.types.UIList):
split = split.column()
split.scale_x = 0.5
split.label(text=str(item.total))
+
+
+class BIM_PT_IFCSelector(Panel):
+ bl_label = "IFC Selector"
+ bl_idname = "BIM_PT_ifc_selector"
+ bl_options = {"DEFAULT_CLOSED"}
+ bl_space_type = "PROPERTIES"
+ bl_region_type = "WINDOW"
+ bl_context = "scene"
+ bl_parent_id = "BIM_PT_collaboration"
+
+ @classmethod
+ def poll(cls, context):
+ return IfcStore.get_file()
+
+ def draw(self, context):
+ layout = self.layout
+ layout.operator("bim.ifc_selector")
+
+
+# this doesn't inherit from Panel since it's just a class to abstract away UI code from the IfcSelector Operator
+class IfcSelectorUI:
+ @classmethod
+ def draw(self, context, layout):
+ ifc_selector = context.scene.IfcSelectorProperties
+ row = layout.row()
+
+ row.context_pointer_set(name="bim_prop_group", data=ifc_selector)
+ op = row.operator("bim.edit_blender_collection", text="Add selection group")
+ op.option = "add"
+ op.collection = "groups"
+ layout.separator()
+
+ self.draw_query_group_ui(self, ifc_selector, layout)
+
+ if len(ifc_selector.groups) != 0:
+ row = layout.row(align=True)
+ row.prop(ifc_selector, "selector_query_syntax", text="Query Syntax")
+ row.prop(ifc_selector, "manual_override", text="")
+
+ select = row.operator("bim.filter_model_elements", text="", icon="RESTRICT_SELECT_OFF")
+ select.option = "select"
+ isolate = row.operator("bim.filter_model_elements", text="", icon="ZOOM_SELECTED")
+ isolate.option = "isolate"
+ hide = row.operator("bim.filter_model_elements", text="", icon="HIDE_ON")
+ hide.option = "hide"
+ row.operator("bim.unhide_all_elements", text="", icon="HIDE_OFF")
+
+ row = layout.row(align=True)
+ row.alignment = "CENTER"
+ row.operator("bim.save_selector_query", text="Save Query")
+ op = row.operator("bim.open_query_library", text="Load Query")
+ row.operator("bim.add_to_ifc_group", text="Add to IFC Group")
+
+ def draw_query_group_ui(self, ifc_selector, layout):
+ for index, group in enumerate(ifc_selector.groups):
+ row = layout.row()
+ row.alignment = "CENTER"
+ row.label(text="or") if index != 0 else None
+
+ box = layout.box()
+ row = box.row(align=True)
+ row.alignment = "CENTER"
+ row.label(text=f"Group #{str(index+1)}")
+ row.context_pointer_set(name="bim_prop_group", data=group)
+ op = row.operator("bim.edit_blender_collection", text="Add query", icon="PLUS")
+ op.option = "add"
+ op.collection = "queries"
+
+ row.context_pointer_set(name="bim_prop_group", data=ifc_selector)
+ op = row.operator("bim.edit_blender_collection", text="Remove selection group")
+ op.option = "remove"
+ op.collection = "groups"
+ op.index = index
+
+ self.draw_query_ui(self, group, box)
+
+ def draw_query_ui(self, group, box):
+ for index, query in enumerate(group.queries):
+ row = box.row()
+ row.alignment = "LEFT"
+
+ row.prop(query, "and_or", text="") if index != 0 else None
+ if query.and_or == "or":
+ row = box.row()
+ row.alignment = "LEFT"
+ row.prop(query, "selector", text="")
+
+ if query.selector in ["IFC Class", "IfcSpatialElement", "IfcElementType"]:
+ row.label(text="Equals")
+ row.prop_search(query, "active_option", query, "options", text="")
+ row.prop_search(query, "active_sub_option", query, "sub_options", text="") if len(
+ query.sub_options
+ ) != 0 else None
+ self.draw_filter_ui(self, box, query)
+
+ elif query.selector in ["GlobalId", "Attribute"]:
+ row.prop(query, "negation", text="")
+ row.prop(query, "comparison", text="")
+ row.prop(query, "value", text="")
+
+ row.context_pointer_set(name="bim_prop_group", data=group)
+ op = row.operator("bim.edit_blender_collection", icon="REMOVE", text="")
+ op.option = "remove"
+ op.collection = "queries"
+ op.index = index
+
+ row.context_pointer_set(name="bim_prop_group", data=query)
+ op = (
+ row.operator("bim.edit_blender_collection", text="Add filter")
+ if query.selector == "IFC Class"
+ else None
+ )
+ if op:
+ op.option = "add"
+ op.collection = "filters"
+
+ def draw_filter_ui(self, box, query):
+ for filter_index, f in enumerate(query.filters):
+ row = box.row()
+ row.alignment = "LEFT"
+ row.label(text=" ↪")
+ row.prop(f, "and_or", text="") if filter_index != 0 else None
+ if f.and_or == "or":
+ row = box.row()
+ row.alignment = "LEFT"
+ row.label(text=" ↪")
+ row.prop(f, "selector", text="")
+
+ if f.selector == "Attribute":
+ row.prop(f, "attribute", text="")
+ row.prop(
+ f,
+ "negation",
+ )
+ row.prop(f, "comparison", text="")
+ row.prop(f, "value", text="")
+
+ elif f.selector == "IfcPropertySet":
+ row.prop_search(f, "active_option", f, "options", text="")
+ row.prop_search(f, "active_sub_option", f, "sub_options", text="")
+ row.prop(f, "negation")
+ row.prop(f, "comparison", text="")
+ row.prop(f, "value", text="")
+
+ row.context_pointer_set(name="bim_prop_group", data=query)
+ op = row.operator("bim.edit_blender_collection", icon="REMOVE", text="")
+ op.option = "remove"
+ op.collection = "filters"
+ op.index = filter_index
diff --git a/src/blenderbim/blenderbim/bim/module/sequence/data.py b/src/blenderbim/blenderbim/bim/module/sequence/data.py
new file mode 100644
index 0000000000..cc948bbe49
--- /dev/null
+++ b/src/blenderbim/blenderbim/bim/module/sequence/data.py
@@ -0,0 +1,44 @@
+# BlenderBIM Add-on - OpenBIM Blender Add-on
+# Copyright (C) 2021 Dion Moult , 2021-2022 Yassine Oualid
+#
+# This file is part of BlenderBIM Add-on.
+#
+# BlenderBIM Add-on is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# BlenderBIM Add-on is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with BlenderBIM Add-on. If not, see .
+
+import bpy
+import blenderbim.tool as tool
+
+
+def refresh():
+ SequenceData.is_loaded = False
+
+
+class SequenceData:
+ is_loaded = False
+ number_of_work_plans_loaded = 0
+ number_of_work_schedules_loaded = 0
+ number_of_tasks_loaded = 0
+ tasks = {}
+
+ @classmethod
+ def load(cls):
+ cls.load_work_plans()
+ cls.is_loaded = True
+
+ @classmethod
+ def load_work_plans(cls):
+ cls.work_plans = {}
+ cls.number_of_work_plans_loaded = len(tool.Ifc.get().by_type("IfcWorkPlan"))
+ for work_plan in tool.Ifc.get().by_type("IfcWorkPlan"):
+ cls.work_plans[work_plan.id()] = {"Name": work_plan.Name}
diff --git a/src/blenderbim/blenderbim/bim/module/sequence/operator.py b/src/blenderbim/blenderbim/bim/module/sequence/operator.py
index d7082cfa9e..67dcff7381 100644
--- a/src/blenderbim/blenderbim/bim/module/sequence/operator.py
+++ b/src/blenderbim/blenderbim/bim/module/sequence/operator.py
@@ -1,5 +1,5 @@
# BlenderBIM Add-on - OpenBIM Blender Add-on
-# Copyright (C) 2020, 2021 Dion Moult
+# Copyright (C) 2020, 2021 Dion Moult , 2022 Yassine Oualid
#
# This file is part of BlenderBIM Add-on.
#
@@ -28,6 +28,8 @@ import webbrowser
import ifcopenshell.api
import ifcopenshell.util.date
import ifcopenshell.util.sequence
+import blenderbim.core.sequence as core
+import blenderbim.tool as tool
import blenderbim.bim.helper
import blenderbim.bim.module.sequence.helper as helper
from datetime import datetime
@@ -52,7 +54,7 @@ def animate_text(scene, context):
data.body = frame_date.date().isoformat()
-class AddWorkPlan(bpy.types.Operator):
+class AddWorkPlan(bpy.types.Operator, tool.Ifc.Operator):
bl_idname = "bim.add_work_plan"
bl_label = "Add Work Plan"
bl_options = {"REGISTER", "UNDO"}
@@ -61,12 +63,11 @@ class AddWorkPlan(bpy.types.Operator):
return IfcStore.execute_ifc_operator(self, context)
def _execute(self, context):
- ifcopenshell.api.run("sequence.add_work_plan", IfcStore.get_file())
- Data.load(IfcStore.get_file())
+ core.add_work_plan(tool.Ifc, tool.Sequence)
return {"FINISHED"}
-class EditWorkPlan(bpy.types.Operator):
+class EditWorkPlan(bpy.types.Operator, tool.Ifc.Operator):
bl_idname = "bim.edit_work_plan"
bl_options = {"REGISTER", "UNDO"}
bl_label = "Edit Work Plan"
@@ -75,34 +76,11 @@ class EditWorkPlan(bpy.types.Operator):
return IfcStore.execute_ifc_operator(self, context)
def _execute(self, context):
- props = context.scene.BIMWorkPlanProperties
- attributes = blenderbim.bim.helper.export_attributes(props.work_plan_attributes, self.export_attributes)
- self.file = IfcStore.get_file()
- ifcopenshell.api.run(
- "sequence.edit_work_plan",
- self.file,
- **{"work_plan": self.file.by_id(props.active_work_plan_id), "attributes": attributes},
- )
- Data.load(IfcStore.get_file())
- bpy.ops.bim.disable_editing_work_plan()
+ core.edit_work_plan(tool.Ifc, tool.Sequence)
return {"FINISHED"}
- def export_attributes(self, attributes, prop):
- if "Date" in prop.name or "Time" in prop.name:
- if prop.is_null:
- attributes[prop.name] = None
- return True
- attributes[prop.name] = helper.parse_datetime(prop.string_value)
- return True
- elif prop.name == "Duration" or prop.name == "TotalFloat":
- if prop.is_null:
- attributes[prop.name] = None
- return True
- attributes[prop.name] = helper.parse_duration(prop.string_value)
- return True
-
-class RemoveWorkPlan(bpy.types.Operator):
+class RemoveWorkPlan(bpy.types.Operator, tool.Ifc.Operator):
bl_idname = "bim.remove_work_plan"
bl_label = "Remove Work Plan"
bl_options = {"REGISTER", "UNDO"}
@@ -112,9 +90,7 @@ class RemoveWorkPlan(bpy.types.Operator):
return IfcStore.execute_ifc_operator(self, context)
def _execute(self, context):
- self.file = IfcStore.get_file()
- ifcopenshell.api.run("sequence.remove_work_plan", self.file, **{"work_plan": self.file.by_id(self.work_plan)})
- Data.load(self.file)
+ core.remove_work_plan(tool.Ifc, tool.Sequence, work_plan=self.work_plan)
return {"FINISHED"}
@@ -125,22 +101,9 @@ class EnableEditingWorkPlan(bpy.types.Operator):
work_plan: bpy.props.IntProperty()
def execute(self, context):
- props = context.scene.BIMWorkPlanProperties
- props.work_plan_attributes.clear()
-
- data = Data.work_plans[self.work_plan]
-
- blenderbim.bim.helper.import_attributes("IfcWorkPlan", props.work_plan_attributes, data, self.import_attributes)
-
- props.active_work_plan_id = self.work_plan
- props.editing_type = "ATTRIBUTES"
+ core.enable_editing_work_plan(tool.Sequence, work_plan=self.work_plan)
return {"FINISHED"}
- def import_attributes(self, name, prop, data):
- if name in ["CreationDate", "StartTime", "FinishTime"]:
- prop.string_value = "" if prop.is_null else data[name].isoformat()
- return True
-
class DisableEditingWorkPlan(bpy.types.Operator):
bl_idname = "bim.disable_editing_work_plan"
@@ -148,7 +111,7 @@ class DisableEditingWorkPlan(bpy.types.Operator):
bl_label = "Disable Editing Work Plan"
def execute(self, context):
- context.scene.BIMWorkPlanProperties.active_work_plan_id = 0
+ core.disable_editing_work_plan(tool.Sequence)
return {"FINISHED"}
@@ -624,6 +587,7 @@ class EditTaskTime(bpy.types.Operator):
if prop.is_null:
attributes[prop.name] = None
return True
+ # TODO make this parse PT32 as P4D
attributes[prop.name] = helper.parse_duration(prop.string_value)
return True
@@ -1885,6 +1849,7 @@ class VisualiseWorkScheduleDateRange(bpy.types.Operator):
self.start_frame = 1
self.total_frames = self.calculate_total_frames(context)
self.preprocess_tasks()
+
for obj in bpy.data.objects:
if not obj.BIMObjectProperties.ifc_definition_id:
continue
@@ -1931,7 +1896,7 @@ class VisualiseWorkScheduleDateRange(bpy.types.Operator):
self.animate_consumption(obj, product_frame)
def animate_output(self, obj, product_frame):
- if product_frame["type"] in ["CONSTRUCTION", "INSTALLATION"]:
+ if product_frame["type"] in ["CONSTRUCTION", "INSTALLATION", "NOTDEFINED"]:
self.animate_creation(obj, product_frame)
elif product_frame["type"] in ["DEMOLITION", "DISMANTLE", "DISPOSAL", "REMOVAL"]:
self.animate_destruction(obj, product_frame)
diff --git a/src/blenderbim/blenderbim/bim/module/sequence/ui.py b/src/blenderbim/blenderbim/bim/module/sequence/ui.py
index 0368f7debc..71aa6a24cb 100644
--- a/src/blenderbim/blenderbim/bim/module/sequence/ui.py
+++ b/src/blenderbim/blenderbim/bim/module/sequence/ui.py
@@ -24,6 +24,7 @@ from blenderbim.bim.helper import draw_attributes
from ifcopenshell.api.sequence.data import Data
from ifcopenshell.api.resource.data import Data as ResourceData
import blenderbim.bim.module.sequence.helper as helper
+from blenderbim.bim.module.sequence.data import SequenceData
from datetime import datetime
@@ -42,14 +43,18 @@ class BIM_PT_work_plans(Panel):
return file and file.schema != "IFC2X3"
def draw(self, context):
- if not Data.is_loaded:
- Data.load(IfcStore.get_file())
+ if not SequenceData.is_loaded:
+ SequenceData.load()
self.props = context.scene.BIMWorkPlanProperties
row = self.layout.row()
+ row.label(
+ text="{} Work Plans Found".format(SequenceData.number_of_work_plans_loaded),
+ icon="TEXT",
+ )
row.operator("bim.add_work_plan", icon="ADD")
- for work_plan_id, work_plan in Data.work_plans.items():
+ for work_plan_id, work_plan in SequenceData.work_plans.items():
self.draw_work_plan_ui(work_plan_id, work_plan)
def draw_work_plan_ui(self, work_plan_id, work_plan):
diff --git a/src/blenderbim/blenderbim/bim/module/structural/operator.py b/src/blenderbim/blenderbim/bim/module/structural/operator.py
index f9ca9d17a8..afcdf04072 100644
--- a/src/blenderbim/blenderbim/bim/module/structural/operator.py
+++ b/src/blenderbim/blenderbim/bim/module/structural/operator.py
@@ -662,7 +662,9 @@ class AddStructuralLoadGroup(bpy.types.Operator):
def _execute(self, context):
self.file = IfcStore.get_file()
load_group = ifcopenshell.api.run("structural.add_structural_load_group", self.file)
- ifcopenshell.api.run("group.assign_group", self.file, product=load_group, group=self.file.by_id(self.load_case))
+ ifcopenshell.api.run(
+ "group.assign_group", self.file, product=[load_group], group=self.file.by_id(self.load_case)
+ )
Data.load(IfcStore.get_file())
return {"FINISHED"}
@@ -754,7 +756,7 @@ class AddStructuralActivity(bpy.types.Operator):
structural_member=element,
)
ifcopenshell.api.run(
- "group.assign_group", self.file, product=activity, group=self.file.by_id(self.load_group)
+ "group.assign_group", self.file, product=[activity], group=self.file.by_id(self.load_group)
)
Data.load(IfcStore.get_file())
bpy.ops.bim.enable_editing_structural_load_group_activities(load_group=self.load_group)
diff --git a/src/blenderbim/blenderbim/bim/module/structural/ui.py b/src/blenderbim/blenderbim/bim/module/structural/ui.py
index c5b226a58e..5ebad12343 100644
--- a/src/blenderbim/blenderbim/bim/module/structural/ui.py
+++ b/src/blenderbim/blenderbim/bim/module/structural/ui.py
@@ -20,7 +20,7 @@ import bpy
import blenderbim.bim.helper
from bpy.types import Panel, UIList
from blenderbim.bim.ifc import IfcStore
-from blenderbim.bim.helper import draw_attributes
+from blenderbim.bim.helper import draw_attributes, prop_with_search
from ifcopenshell.api.structural.data import Data
from blenderbim.bim.module.structural.data import StructuralData
@@ -482,7 +482,7 @@ class BIM_PT_structural_loads(Panel):
row.operator("bim.disable_structural_load_editing_ui", text="", icon="SCREEN_BACK")
row = self.layout.row(align=True)
- row.prop(self.props, "structural_load_types", text="")
+ prop_with_search(row, self.props, "structural_load_types", text="")
row.operator("bim.add_structural_load", text="", icon="ADD").ifc_class = self.props.structural_load_types
else:
row.operator("bim.load_structural_loads", text="", icon="GREASEPENCIL")
@@ -551,7 +551,7 @@ class BIM_PT_boundary_conditions(Panel):
row.operator("bim.disable_boundary_condition_editing_ui", text="", icon="SCREEN_BACK")
row = self.layout.row(align=True)
- row.prop(self.props, "boundary_condition_types", text="")
+ prop_with_search(row, self.props, "boundary_condition_types", text="")
row.operator(
"bim.add_boundary_condition", text="", icon="ADD"
).ifc_class = self.props.boundary_condition_types
diff --git a/src/blenderbim/blenderbim/bim/module/style/ui.py b/src/blenderbim/blenderbim/bim/module/style/ui.py
index 86f4261866..b4e573d101 100644
--- a/src/blenderbim/blenderbim/bim/module/style/ui.py
+++ b/src/blenderbim/blenderbim/bim/module/style/ui.py
@@ -47,14 +47,14 @@ class BIM_PT_styles(Panel):
if self.props.is_editing:
row.operator("bim.disable_editing_styles", text="", icon="CANCEL")
else:
- row.prop(self.props, "style_type", text="")
+ blenderbim.bim.helper.prop_with_search(row, self.props, "style_type", text="")
row.operator("bim.load_styles", text="", icon="IMPORT").style_type = self.props.style_type
return
row = self.layout.row(align=True)
row.alignment = "RIGHT"
- #row.operator("bim.add_presentation_style", text="", icon="ADD")
+ # row.operator("bim.add_presentation_style", text="", icon="ADD")
if self.props.styles and self.props.active_style_index < len(self.props.styles):
style = self.props.styles[self.props.active_style_index]
op = row.operator("bim.select_by_style", text="", icon="RESTRICT_SELECT_OFF")
diff --git a/src/blenderbim/blenderbim/bim/module/system/ui.py b/src/blenderbim/blenderbim/bim/module/system/ui.py
index e65e90f87f..7a4be0b16a 100644
--- a/src/blenderbim/blenderbim/bim/module/system/ui.py
+++ b/src/blenderbim/blenderbim/bim/module/system/ui.py
@@ -16,6 +16,7 @@
# You should have received a copy of the GNU General Public License
# along with BlenderBIM Add-on. If not, see .
+from blenderbim.bim.helper import prop_with_search
import blenderbim.tool as tool
from bpy.types import Panel, UIList
from blenderbim.bim.ifc import IfcStore
@@ -46,7 +47,7 @@ class BIM_PT_systems(Panel):
row.operator("bim.disable_system_editing_ui", text="", icon="CANCEL")
row = self.layout.row(align=True)
- row.prop(self.props, "system_class", text="")
+ prop_with_search(row, self.props, "system_class", text="")
row.operator("bim.add_system", text="", icon="ADD")
else:
row.operator("bim.load_systems", text="", icon="GREASEPENCIL")
diff --git a/src/blenderbim/blenderbim/bim/module/type/ui.py b/src/blenderbim/blenderbim/bim/module/type/ui.py
index 95256e99c7..58cebe2c14 100644
--- a/src/blenderbim/blenderbim/bim/module/type/ui.py
+++ b/src/blenderbim/blenderbim/bim/module/type/ui.py
@@ -88,4 +88,4 @@ class BIM_PT_type(Panel):
def add_object_button(self, context):
- self.layout.operator("bim.add_type_instance", icon="PLUGIN")
+ self.layout.operator("bim.add_constr_type_instance", icon="PLUGIN")
diff --git a/src/blenderbim/blenderbim/bim/module/unit/data.py b/src/blenderbim/blenderbim/bim/module/unit/data.py
index 971e57b03a..9fa647e08c 100644
--- a/src/blenderbim/blenderbim/bim/module/unit/data.py
+++ b/src/blenderbim/blenderbim/bim/module/unit/data.py
@@ -37,7 +37,7 @@ class UnitsData:
"unit_classes": cls.unit_classes(),
"named_unit_types": cls.named_unit_types(),
"conversion_unit_types": cls.conversion_unit_types(),
- "total_units": cls.get_total_units()
+ "total_units": cls.get_total_units(),
}
cls.is_loaded = True
diff --git a/src/blenderbim/blenderbim/bim/module/unit/ui.py b/src/blenderbim/blenderbim/bim/module/unit/ui.py
index a6d13447f5..10a3682296 100644
--- a/src/blenderbim/blenderbim/bim/module/unit/ui.py
+++ b/src/blenderbim/blenderbim/bim/module/unit/ui.py
@@ -19,6 +19,7 @@
import blenderbim.bim.helper
from bpy.types import Panel, UIList
from blenderbim.bim.ifc import IfcStore
+from blenderbim.bim.helper import prop_with_search
from blenderbim.bim.module.unit.data import UnitsData
@@ -53,22 +54,22 @@ class BIM_PT_units(Panel):
return
row = self.layout.row(align=True)
- row.prop(self.props, "unit_classes", text="")
+ prop_with_search(row, self.props, "unit_classes", text="")
if self.props.unit_classes == "IfcMonetaryUnit":
row.operator("bim.add_monetary_unit", text="", icon="ADD")
elif self.props.unit_classes in ("IfcConversionBasedUnit", "IfcConversionBasedUnitWithOffset"):
- row.prop(self.props, "conversion_unit_types", text="")
+ prop_with_search(row, self.props, "conversion_unit_types", text="")
op = row.operator("bim.add_conversion_based_unit", text="", icon="ADD")
op.name = self.props.conversion_unit_types
elif self.props.unit_classes == "IfcDerivedUnit":
pass # TODO
elif self.props.unit_classes == "IfcSIUnit":
- row.prop(self.props, "named_unit_types", text="")
+ prop_with_search(row, self.props, "named_unit_types", text="")
op = row.operator("bim.add_si_unit", text="", icon="ADD")
op.unit_type = self.props.named_unit_types
elif self.props.unit_classes == "IfcContextDependentUnit":
- row.prop(self.props, "named_unit_types", text="")
+ prop_with_search(row, self.props, "named_unit_types", text="")
op = row.operator("bim.add_context_dependent_unit", text="", icon="ADD")
op.name = "THINGAMAJIG"
op.unit_type = self.props.named_unit_types
diff --git a/src/blenderbim/blenderbim/bim/operator.py b/src/blenderbim/blenderbim/bim/operator.py
index 7b171961e0..7958271be8 100644
--- a/src/blenderbim/blenderbim/bim/operator.py
+++ b/src/blenderbim/blenderbim/bim/operator.py
@@ -25,7 +25,9 @@ import blenderbim.bim.handler
import blenderbim.tool as tool
from . import schema
from blenderbim.bim.ifc import IfcStore
+from blenderbim.bim.prop import StrProperty
from blenderbim.bim.ui import IFCFileSelector
+from blenderbim.bim.helper import get_enum_items, close_operator_panel
from mathutils import Vector, Matrix, Euler
from math import radians
@@ -523,3 +525,88 @@ class ConfigureVisibility(bpy.types.Operator):
def execute(self, context):
return {"FINISHED"}
+
+
+def update_enum_property_search_prop(self, context):
+ for i, prop in enumerate(self.collection_names):
+ if prop.name == self.dummy_name:
+ setattr(context.data, self.prop_name, self.collection_identifiers[i].name)
+ close_operator_panel(self)
+ break
+
+
+class BIM_OT_enum_property_search(bpy.types.Operator):
+ bl_idname = "bim.enum_property_search"
+ bl_label = "Search For Property"
+ bl_options = {"REGISTER", "UNDO"}
+ dummy_name: bpy.props.StringProperty(name="Property", update=update_enum_property_search_prop)
+ collection_names: bpy.props.CollectionProperty(type=StrProperty)
+ collection_identifiers: bpy.props.CollectionProperty(type=StrProperty)
+ prop_name: bpy.props.StringProperty()
+ mouse_x: bpy.props.IntProperty()
+ mouse_y: bpy.props.IntProperty()
+
+ def invoke(self, context, event):
+ self.mouse_x, self.mouse_y = event.mouse_x, event.mouse_y
+ self.clear_collections()
+ self.data = context.data
+ items = get_enum_items(self.data, self.prop_name, context)
+ if items is None:
+ return {"FINISHED"}
+ self.add_items_regular(items)
+ self.add_items_suggestions()
+ # Cursor is moved when we update dummy_name, set it back
+ context.window.cursor_warp(self.mouse_x, self.mouse_y)
+ return context.window_manager.invoke_props_popup(self, event)
+
+ def draw(self, context):
+ # Mandatory to access context.data in update :
+ self.layout.context_pointer_set(name="data", data=self.data)
+ self.layout.prop_search(self, "dummy_name", self, "collection_names")
+
+ def execute(self, context):
+ return {"FINISHED"}
+
+ def clear_collections(self):
+ self.collection_names.clear()
+ self.collection_identifiers.clear()
+
+ def add_item(self, identifier: str, name: str):
+ self.collection_identifiers.add().name = identifier
+ self.collection_names.add().name = name
+
+ def add_items_regular(self, items):
+ self.identifiers = []
+ for item in items:
+ self.identifiers.append(item[0])
+ self.add_item(identifier=item[0], name=item[1])
+ if item[0] == getattr(self.data, self.prop_name):
+ self.dummy_name = item[1] # We found the current enum name
+
+ def add_items_suggestions(self):
+ getter_suggestions = getattr(self.data, "getter_enum_suggestions", None)
+ if getter_suggestions is not None:
+ mapping = getter_suggestions.get(self.prop_name)
+ if mapping is None:
+ return
+ for key, values in mapping().items():
+ if key in self.identifiers:
+ if not isinstance(values, (tuple, list)):
+ values = [values]
+ for value in values:
+ self.add_item(identifier=key, name=key + " (" + value + ")")
+
+class EditBlenderCollection(bpy.types.Operator):
+ bl_idname = "bim.edit_blender_collection"
+ bl_label = "Add or Remove blender collection item"
+ bl_options = {"REGISTER", "UNDO"}
+ option: bpy.props.StringProperty(description="add or remove item from collection")
+ collection: bpy.props.StringProperty(description="collection to be edited")
+ index: bpy.props.IntProperty(description="index of item to be removed")
+
+ def execute(self, context):
+ if self.option == "add":
+ getattr(context.bim_prop_group, self.collection).add()
+ else:
+ getattr(context.bim_prop_group, self.collection).remove(self.index)
+ return {"FINISHED"}
diff --git a/src/blenderbim/blenderbim/bim/prop.py b/src/blenderbim/blenderbim/bim/prop.py
index 50817c4487..ffdfc8bb27 100644
--- a/src/blenderbim/blenderbim/bim/prop.py
+++ b/src/blenderbim/blenderbim/bim/prop.py
@@ -195,6 +195,7 @@ class Attribute(PropertyGroup):
is_null: BoolProperty(name="Is Null")
is_optional: BoolProperty(name="Is Optional")
is_uri: BoolProperty(name="Is Uri", default=False)
+ is_selected: BoolProperty(name="Is Selected", default=False)
def get_value(self):
if self.is_null:
diff --git a/src/blenderbim/blenderbim/core/drawing.py b/src/blenderbim/blenderbim/core/drawing.py
index 6bad766d63..ab58f5407a 100644
--- a/src/blenderbim/blenderbim/core/drawing.py
+++ b/src/blenderbim/blenderbim/core/drawing.py
@@ -148,7 +148,7 @@ def add_drawing(ifc, collector, drawing, target_view=None, location_hint=None):
)
group = ifc.run("group.add_group")
ifc.run("group.edit_group", group=group, attributes={"Name": drawing_name, "ObjectType": "DRAWING"})
- ifc.run("group.assign_group", group=group, product=element)
+ ifc.run("group.assign_group", group=group, product=[element])
collector.assign(camera)
pset = ifc.run("pset.add_pset", product=element, name="EPset_Drawing")
ifc.run(
@@ -190,7 +190,7 @@ def update_drawing_name(ifc, drawing_tool, drawing=None, name=None):
def add_annotation(ifc, collector, drawing_tool, drawing=None, object_type=None):
context = drawing_tool.get_annotation_context(drawing_tool.get_drawing_target_view(drawing))
if not context:
- return
+ return "No annotation context for drawing"
drawing_tool.show_decorations()
obj = drawing_tool.create_annotation_object(drawing, object_type)
element = ifc.get_entity(obj)
@@ -203,7 +203,7 @@ def add_annotation(ifc, collector, drawing_tool, drawing=None, object_type=None)
context=context,
ifc_representation_class=drawing_tool.get_ifc_representation_class(object_type),
)
- ifc.run("group.assign_group", group=drawing_tool.get_drawing_group(drawing), product=element)
+ ifc.run("group.assign_group", group=drawing_tool.get_drawing_group(drawing), product=[element])
collector.assign(obj)
drawing_tool.enable_editing(obj)
@@ -251,7 +251,7 @@ def sync_references(ifc, collector, drawing_tool, drawing=None):
annotation = drawing_tool.generate_reference_annotation(drawing, reference_element, context)
if annotation:
ifc.run("drawing.assign_product", relating_product=reference_element, related_object=annotation)
- ifc.run("group.assign_group", group=group, product=annotation)
+ ifc.run("group.assign_group", group=group, product=[annotation])
collector.assign(ifc.get_object(annotation))
if reference_obj and ifc.is_moved(reference_obj):
diff --git a/src/blenderbim/blenderbim/core/geometry.py b/src/blenderbim/blenderbim/core/geometry.py
index 65742a684e..e4ac978016 100644
--- a/src/blenderbim/blenderbim/core/geometry.py
+++ b/src/blenderbim/blenderbim/core/geometry.py
@@ -120,8 +120,8 @@ def get_representation_ifc_parameters(geometry, obj=None, should_sync_changes_fi
def remove_representation(ifc, geometry, obj=None, representation=None):
element = ifc.get_entity(obj)
- if geometry.is_mapped_representation(representation) or geometry.is_type_product(element):
- type = geometry.get_element_type(element)
+ type = geometry.get_element_type(element)
+ if type and (geometry.is_mapped_representation(representation) or geometry.is_type_product(element)):
representation = geometry.resolve_mapped_representation(representation)
data = geometry.get_representation_data(representation)
if data and geometry.has_data_users(data):
diff --git a/src/blenderbim/blenderbim/core/sequence.py b/src/blenderbim/blenderbim/core/sequence.py
new file mode 100644
index 0000000000..eedc0965ce
--- /dev/null
+++ b/src/blenderbim/blenderbim/core/sequence.py
@@ -0,0 +1,49 @@
+# BlenderBIM Add-on - OpenBIM Blender Add-on
+# Copyright (C) 2021 Dion Moult , 2022 Yassine Oualid
+#
+# This file is part of BlenderBIM Add-on.
+#
+# BlenderBIM Add-on is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# BlenderBIM Add-on is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with BlenderBIM Add-on. If not, see .
+
+
+def add_work_plan(ifc, sequence):
+ ifc.run("sequence.add_work_plan")
+ sequence.load_work_plans()
+
+
+def remove_work_plan(ifc, sequence, work_plan=None):
+ ifc.run("sequence.remove_work_plan", **{"work_plan": ifc.get().by_id(work_plan)})
+ sequence.load_work_plans()
+
+
+def load_work_plan_attributes(sequence, work_plan=None):
+ data = sequence.get_ifc_work_plan_attributes(work_plan)
+ sequence.load_work_plan_attributes(data)
+
+
+def enable_editing_work_plan(sequence, work_plan=None):
+ load_work_plan_attributes(sequence, work_plan)
+ sequence.enable_editing_work_plan(work_plan)
+
+
+def disable_editing_work_plan(sequence):
+ sequence.disable_editing_work_plan()
+
+
+def edit_work_plan(ifc, sequence):
+ work_plan = sequence.get_current_ifc_work_plan()
+ attributes = sequence.get_work_plan_attributes()
+ ifc.run("sequence.edit_work_plan", **{"work_plan": work_plan, "attributes": attributes})
+ sequence.disable_editing_work_plan()
+ sequence.load_work_plans()
diff --git a/src/blenderbim/blenderbim/core/tool.py b/src/blenderbim/blenderbim/core/tool.py
index 3fa9c6808b..9e16e593cd 100644
--- a/src/blenderbim/blenderbim/core/tool.py
+++ b/src/blenderbim/blenderbim/core/tool.py
@@ -421,6 +421,19 @@ class Selector:
def set_active(cls, obj): pass
+@interface
+class Sequence:
+ def get_work_plans(cls): pass
+ def load_work_plans(cls): pass
+ def enable_editing_work_plan(cls, work_plan): pass
+ def disable_editing_work_plan(cls): pass
+ def get_current_ifc_work_plan(cls): pass
+ def get_ifc_work_plan_attributes(cls): pass
+ def load_work_plan_attributes(cls): pass
+ def import_attributes(cls): pass
+ def export_attributes(cls): pass
+
+
@interface
class Spatial:
def can_contain(cls, structure_obj, element_obj): pass
diff --git a/src/blenderbim/blenderbim/tool/__init__.py b/src/blenderbim/blenderbim/tool/__init__.py
index 705120b4b6..261812284d 100644
--- a/src/blenderbim/blenderbim/tool/__init__.py
+++ b/src/blenderbim/blenderbim/tool/__init__.py
@@ -42,6 +42,7 @@ from blenderbim.tool.qto import Qto
from blenderbim.tool.root import Root
from blenderbim.tool.spatial import Spatial
from blenderbim.tool.structural import Structural
+from blenderbim.tool.sequence import Sequence
from blenderbim.tool.style import Style
from blenderbim.tool.surveyor import Surveyor
from blenderbim.tool.system import System
diff --git a/src/blenderbim/blenderbim/tool/collector.py b/src/blenderbim/blenderbim/tool/collector.py
index e202ab50cb..8b08e14f0b 100644
--- a/src/blenderbim/blenderbim/tool/collector.py
+++ b/src/blenderbim/blenderbim/tool/collector.py
@@ -82,7 +82,8 @@ class Collector(blenderbim.core.tool.Collector):
if obj.users_collection != (object_collection,):
for collection in obj.users_collection:
collection.objects.unlink(obj)
- object_collection.objects.link(obj)
+ if object_collection is not None:
+ object_collection.objects.link(obj)
if collection_collection and collection_collection.children.find(object_collection.name) == -1:
if bpy.context.scene.collection.children.find(object_collection.name) != -1:
diff --git a/src/blenderbim/blenderbim/tool/drawing.py b/src/blenderbim/blenderbim/tool/drawing.py
index 34d9a153bf..62388b23b7 100644
--- a/src/blenderbim/blenderbim/tool/drawing.py
+++ b/src/blenderbim/blenderbim/tool/drawing.py
@@ -375,15 +375,11 @@ class Drawing(blenderbim.core.tool.Drawing):
@classmethod
def open_spreadsheet(cls, uri):
- cls.open_with_user_command(
- bpy.context.preferences.addons["blenderbim"].preferences.spreadsheet_command, uri
- )
+ cls.open_with_user_command(bpy.context.preferences.addons["blenderbim"].preferences.spreadsheet_command, uri)
@classmethod
def open_svg(cls, uri):
- cls.open_with_user_command(
- bpy.context.preferences.addons["blenderbim"].preferences.svg_command, uri
- )
+ cls.open_with_user_command(bpy.context.preferences.addons["blenderbim"].preferences.svg_command, uri)
@classmethod
def run_root_assign_class(
diff --git a/src/blenderbim/blenderbim/tool/material.py b/src/blenderbim/blenderbim/tool/material.py
index 0b3832ca24..617a8592d6 100644
--- a/src/blenderbim/blenderbim/tool/material.py
+++ b/src/blenderbim/blenderbim/tool/material.py
@@ -65,7 +65,7 @@ class Material(blenderbim.core.tool.Material):
materials = sorted(tool.Ifc.get().by_type(material_type), key=get_name)
categories = {}
if material_type == "IfcMaterial":
- [categories.setdefault(m.Category, []).append(m) for m in materials]
+ [categories.setdefault(getattr(m, "Category", "Uncategorised"), []).append(m) for m in materials]
for category, mats in categories.items():
cat = props.materials.add()
cat.name = category or ""
@@ -75,7 +75,9 @@ class Material(blenderbim.core.tool.Material):
new = props.materials.add()
new.ifc_definition_id = material.id()
new.name = get_name(material)
- new.total_elements = len(ifcopenshell.util.element.get_elements_by_material(tool.Ifc.get(), material))
+ new.total_elements = len(
+ ifcopenshell.util.element.get_elements_by_material(tool.Ifc.get(), material)
+ )
return
for material in materials:
new = props.materials.add()
diff --git a/src/blenderbim/blenderbim/tool/sequence.py b/src/blenderbim/blenderbim/tool/sequence.py
new file mode 100644
index 0000000000..55e2bd7867
--- /dev/null
+++ b/src/blenderbim/blenderbim/tool/sequence.py
@@ -0,0 +1,114 @@
+# BlenderBIM Add-on - OpenBIM Blender Add-on
+# Copyright (C) 2021 Dion Moult , 2022 Yassine Oualid
+#
+# This file is part of BlenderBIM Add-on.
+#
+# BlenderBIM Add-on is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# BlenderBIM Add-on is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with BlenderBIM Add-on. If not, see .
+
+import bpy
+import ifcopenshell
+import json
+import blenderbim.core.tool
+import blenderbim.tool as tool
+import blenderbim.bim.helper
+import blenderbim.bim.module.sequence.helper as helper
+
+
+class Sequence(blenderbim.core.tool.Sequence):
+ @classmethod
+ def get_work_plans(cls):
+ work_plans = {}
+ for work_plan in tool.Ifc.get().by_type("IfcWorkPlan"):
+ work_plans[work_plan.id()] = {"Name": work_plan.Name}
+ return work_plans
+
+ @classmethod
+ def load_work_plans(cls):
+ work_plans = tool.Sequence.get_work_plans()
+ props = bpy.context.scene.BIMWorkPlanProperties
+ props.work_plans.clear()
+ for ifc_definition_id, work_plan in work_plans.items():
+ new = props.work_plans.add()
+ new.ifc_definition_id = ifc_definition_id
+ new.name = work_plan["Name"] or "Unnamed"
+
+ @classmethod
+ def enable_editing_work_plan(cls, work_plan):
+ if work_plan:
+ bpy.context.scene.BIMWorkPlanProperties.active_work_plan_id = work_plan
+ bpy.context.scene.BIMWorkPlanProperties.editing_type = "ATTRIBUTES"
+
+ @classmethod
+ def disable_editing_work_plan(cls):
+ bpy.context.scene.BIMWorkPlanProperties.active_work_plan_id = 0
+
+ @classmethod
+ def get_current_ifc_work_plan(cls):
+ active_work_plan = bpy.context.scene.BIMWorkPlanProperties.active_work_plan_id
+ ifc_work_plan = tool.Ifc.get().by_id(active_work_plan)
+ return ifc_work_plan
+
+ @classmethod
+ def get_ifc_work_plan_attributes(cls, work_plan):
+ if work_plan:
+ ifc_work_plan = tool.Ifc.get().by_id(work_plan)
+ data = ifc_work_plan.get_info()
+ del data["OwnerHistory"]
+ if data["Creators"]:
+ data["Creators"] = [p.id() for p in data["Creators"]]
+ data["CreationDate"] = ifcopenshell.util.date.ifc2datetime(data["CreationDate"])
+ data["StartTime"] = ifcopenshell.util.date.ifc2datetime(data["StartTime"])
+ if data["FinishTime"]:
+ data["FinishTime"] = ifcopenshell.util.date.ifc2datetime(data["FinishTime"])
+ data["IsDecomposedBy"] = []
+ for rel in ifc_work_plan.IsDecomposedBy:
+ data["IsDecomposedBy"].extend([o.id() for o in rel.RelatedObjects])
+ return data
+
+ @classmethod
+ def load_work_plan_attributes(cls, data):
+ props = bpy.context.scene.BIMWorkPlanProperties
+ props.work_plan_attributes.clear()
+ blenderbim.bim.helper.import_attributes(
+ "IfcWorkPlan", props.work_plan_attributes, data, tool.Sequence.import_attributes
+ )
+
+ @classmethod
+ def import_attributes(name, prop, data):
+ if name in ["CreationDate", "StartTime", "FinishTime"]:
+ prop.string_value = "" if prop.is_null else data[name].isoformat()
+ return True
+
+ @classmethod
+ def get_work_plan_attributes(cls):
+ props = bpy.context.scene.BIMWorkPlanProperties
+ attributes = blenderbim.bim.helper.export_attributes(
+ props.work_plan_attributes, tool.Sequence.export_attributes
+ )
+ return attributes
+
+ @classmethod
+ def export_attributes(attributes, prop):
+ if "Date" in prop.name or "Time" in prop.name:
+ if prop.is_null:
+ attributes[prop.name] = None
+ return True
+ attributes[prop.name] = helper.parse_datetime(prop.string_value)
+ return True
+ elif prop.name == "Duration" or prop.name == "TotalFloat":
+ if prop.is_null:
+ attributes[prop.name] = None
+ return True
+ attributes[prop.name] = helper.parse_duration(prop.string_value)
+ return True
diff --git a/src/blenderbim/docs/devs/hello_world.rst b/src/blenderbim/docs/devs/hello_world.rst
index 8e88985edc..cba68bf5a9 100644
--- a/src/blenderbim/docs/devs/hello_world.rst
+++ b/src/blenderbim/docs/devs/hello_world.rst
@@ -63,7 +63,7 @@ architecture flow charts and diagrams. The code and its comments will guide you
through the process.
Before playing with the demo module, you may want to switch to using a source
-installation. See `blenderbim/installation <./installation.rst>`_ for details.
+installation. See `blenderbim/installation <./installation.html>`_ for details.
To see the demo module in action, you'll need to enable it. In
``src/blenderbim/blenderbim/bim/__init__.py``, uncomment the line for the demo
@@ -95,7 +95,7 @@ and how to test and structure it so that you can build incredibly complex
features in a maintainable way.
Tests for quality checking also exist. The system is designed so that you can
-do "Test Driven Development". For reference on how to run these tests, see `blenderbim/running_tests <./running_tests.rst>`_
+do "Test Driven Development". For reference on how to run these tests, see `blenderbim/running_tests <./running_tests.html>`_
for details. You can find the tests here:
::
diff --git a/src/blenderbim/docs/devs/installation.rst b/src/blenderbim/docs/devs/installation.rst
index 1f0979fb4c..dfa3eec3f3 100644
--- a/src/blenderbim/docs/devs/installation.rst
+++ b/src/blenderbim/docs/devs/installation.rst
@@ -108,12 +108,12 @@ On Windows:
$ mklink /D "\path\to\blender\X.XX\scripts\addons\blenderbim\bim" "src\blenderbim\blenderbim\bim"
# Remove the IfcOpenShell dependency Python code
- $ rd \S \Q "\path\to\blender\X.XX\scripts\addons\blenderbim\libs\site\packages\ifcopenshell\api"
- $ rd \S \Q "\path\to\blender\X.XX\scripts\addons\blenderbim\libs\site\packages\ifcopenshell\util"
+ $ rd /S /Q "\path\to\blender\X.XX\scripts\addons\blenderbim\libs\site\packages\ifcopenshell\api"
+ $ rd /S /Q "\path\to\blender\X.XX\scripts\addons\blenderbim\libs\site\packages\ifcopenshell\util"
# Replace them with links to the Git repository
- $ mklink \D "\path\to\blender\X.XX\scripts\addons\blenderbim\libs\site\packages\ifcopenshell\api" "src\ifcopenshell-python\ifcopenshell\api"
- $ mklink \D "\path\to\blender\X.XX\scripts\addons\blenderbim\libs\site\packages\ifcopenshell\util" "src\ifcopenshell-python\ifcopenshell\util"
+ $ mklink /D "\path\to\blender\X.XX\scripts\addons\blenderbim\libs\site\packages\ifcopenshell\api" "src\ifcopenshell-python\ifcopenshell\api"
+ $ mklink /D "\path\to\blender\X.XX\scripts\addons\blenderbim\libs\site\packages\ifcopenshell\util" "src\ifcopenshell-python\ifcopenshell\util"
After you modify your code in the Git repository, you will need to restart
diff --git a/src/blenderbim/docs/devs/running_tests.rst b/src/blenderbim/docs/devs/running_tests.rst
index 165ddd1027..e2559750c5 100644
--- a/src/blenderbim/docs/devs/running_tests.rst
+++ b/src/blenderbim/docs/devs/running_tests.rst
@@ -6,7 +6,8 @@ Running tests
The BlenderBIM Add-on has three layers of tests for each of its three technology
layers. These roughly form a test pyramid, moving from many abstract domain
logic tests, to low-level concrete unit tests, to a minimal number of UI and
-smoke tests. These tests use ``pytest`` as the test framework and runner.
+smoke tests. These tests use ``pytest`` as the test framework and runner, so you
+will need to install ``pytest``.
All development is expected to use test driven development, and so we expect
test coverage to be 100% where it is technically possible to test.
@@ -39,8 +40,8 @@ similar.
Tool tests
----------
-The tool layer tests actual concrete functions. These have the following
-dependencies:
+The tool layer tests actual concrete functions. You will need to install the
+following dependencies:
* pytest-blender, accessible to your system's Python
* Blender executable, accessible to pytest-blender on your system's Python
@@ -51,6 +52,16 @@ dependencies:
You can install the dependencies by running the ``scripts/setup_pytest.py``
script in Blender.
+.. warning::
+
+ The ``scripts/setup_pytest.py`` may not work for all operating systems and
+ installation environments. In this case, you may be required to install the
+ dependencies manually.
+
+ Please be aware that some Blender may come packaged with its own Python,
+ which may be separate to the Python installation on your system. Be sure to
+ install the dependencies to the correct Python environment.
+
Then, run the tests. This will launch Blender headlessly and check the behaviour
of all concrete functions.
diff --git a/src/blenderbim/pytest.ini b/src/blenderbim/pytest.ini
index 4ad6fa92de..e23cab44d1 100644
--- a/src/blenderbim/pytest.ini
+++ b/src/blenderbim/pytest.ini
@@ -22,6 +22,7 @@ markers =
pset_template
qto
root
+ search
sequence
spatial
structural
diff --git a/src/blenderbim/scripts/setup_pytest.py b/src/blenderbim/scripts/setup_pytest.py
index 552dbf55b0..2e2f6eea51 100644
--- a/src/blenderbim/scripts/setup_pytest.py
+++ b/src/blenderbim/scripts/setup_pytest.py
@@ -16,13 +16,40 @@
# You should have received a copy of the GNU General Public License
# along with BlenderBIM Add-on. If not, see .
-import subprocess
import sys
+import subprocess
+
+print("Here are the detected system paths:")
+print(sys.path)
py_exec = str(sys.executable)
+
+print("Detected executable:", py_exec)
+
subprocess.call([py_exec, "-m", "ensurepip", "--user"])
subprocess.call([py_exec, "-m", "pip", "install", "--upgrade", "pip"])
-subprocess.call([py_exec, "-m", "pip", "install", "pytest"])
-subprocess.call([py_exec, "-m", "pip", "install", "pytest-blender"])
-subprocess.call([py_exec, "-m", "pip", "install", "pytest-bdd"])
-subprocess.call([py_exec, "-m", "pip", "install", "pygments"])
+
+sys_paths = [p for p in sys.path if "site-packages" in p]
+if sys_paths:
+ print("Detected installation directory:", sys_paths[-1])
+ subprocess.call([py_exec, "-m", "pip", "install", f"--target={sys_paths[-1]}", "pytest"])
+ subprocess.call([py_exec, "-m", "pip", "install", f"--target={sys_paths[-1]}", "pytest-bdd"])
+ subprocess.call([py_exec, "-m", "pip", "install", f"--target={sys_paths[-1]}", "pytest-blender"])
+ subprocess.call([py_exec, "-m", "pip", "install", f"--target={sys_paths[-1]}", "pygments"])
+else:
+ print("Could not detect installation directory. Good luck.")
+ subprocess.call([py_exec, "-m", "pip", "install", "pytest"])
+ subprocess.call([py_exec, "-m", "pip", "install", "pytest-bdd"])
+ subprocess.call([py_exec, "-m", "pip", "install", "pytest-blender"])
+ subprocess.call([py_exec, "-m", "pip", "install", "pygments"])
+
+try:
+ import pytest
+ import pytest_bdd
+ import pytest_blender
+ import pygments
+
+ print("Test dependency installation was successful!")
+except Exception as e:
+ print("Installation failed :(")
+ print(e)
diff --git a/src/blenderbim/test/bim/feature/geometry.feature b/src/blenderbim/test/bim/feature/geometry.feature
index dae44cff62..ee0cdedc39 100644
--- a/src/blenderbim/test/bim/feature/geometry.feature
+++ b/src/blenderbim/test/bim/feature/geometry.feature
@@ -31,8 +31,8 @@ Scenario: Add representation - add a new representation to a typed instance
And I set "scene.BIMRootProperties.ifc_product" to "IfcElementType"
And I set "scene.BIMRootProperties.ifc_class" to "IfcWallType"
And I press "bim.assign_class"
- And I press "bim.add_type_instance"
- And I press "bim.add_type_instance"
+ And I press "bim.add_constr_type_instance"
+ And I press "bim.add_constr_type_instance"
Then the object "IfcWall/Wall" data is a "Tessellation" representation of "Model/Body/MODEL_VIEW"
And the object "IfcWall/Wall.001" data is a "Tessellation" representation of "Model/Body/MODEL_VIEW"
When the object "IfcWall/Wall" is selected
@@ -146,9 +146,9 @@ Scenario: Remove representation - remove an instanced representation from an act
And I press "bim.assign_class"
And I set "scene.BIMModelProperties.ifc_class" to "IfcWallType"
And the variable "cube" is "{ifc}.by_type('IfcWallType')[0].id()"
- And I set "scene.BIMModelProperties.relating_type" to "{cube}"
- And I press "bim.add_type_instance"
- And I press "bim.add_type_instance"
+ And I set "scene.BIMModelProperties.relating_type_id" to "{cube}"
+ And I press "bim.add_constr_type_instance"
+ And I press "bim.add_constr_type_instance"
And the object "IfcWallType/Cube" is selected
When the variable "representation" is "{ifc}.by_type('IfcWallType')[0].RepresentationMaps[1].MappedRepresentation.id()"
And I press "bim.remove_representation(representation_id={representation})"
@@ -165,9 +165,9 @@ Scenario: Remove representation - remove an instanced representation from an act
And I press "bim.assign_class"
And I set "scene.BIMModelProperties.ifc_class" to "IfcWallType"
And the variable "cube" is "{ifc}.by_type('IfcWallType')[0].id()"
- And I set "scene.BIMModelProperties.relating_type" to "{cube}"
- And I press "bim.add_type_instance"
- And I press "bim.add_type_instance"
+ And I set "scene.BIMModelProperties.relating_type_id" to "{cube}"
+ And I press "bim.add_constr_type_instance"
+ And I press "bim.add_constr_type_instance"
And the object "IfcWall/Wall" is selected
When the variable "representation" is "{ifc}.by_type('IfcWall')[0].Representation.Representations[1].id()"
And I press "bim.remove_representation(representation_id={representation})"
@@ -339,8 +339,8 @@ Scenario: Override duplicate move - copying a type instance with a representatio
And I press "bim.assign_class"
And I set "scene.BIMModelProperties.ifc_class" to "IfcWallType"
And the variable "cube" is "{ifc}.by_type('IfcWallType')[0].id()"
- And I set "scene.BIMModelProperties.relating_type" to "{cube}"
- And I press "bim.add_type_instance"
+ And I set "scene.BIMModelProperties.relating_type_id" to "{cube}"
+ And I press "bim.add_constr_type_instance"
And the object "IfcWall/Wall" is selected
When I press "object.duplicate_move"
Then the object "IfcWall/Wall.001" exists
diff --git a/src/blenderbim/test/bim/feature/material.feature b/src/blenderbim/test/bim/feature/material.feature
index c3d89dbbb1..35b853c96b 100644
--- a/src/blenderbim/test/bim/feature/material.feature
+++ b/src/blenderbim/test/bim/feature/material.feature
@@ -111,6 +111,17 @@ Scenario: Assign material - Assign a material profile set
And I press "bim.assign_material"
Then nothing happens
+Scenario: Assign material - Assign a material constituent set
+ Given an empty IFC project
+ And I add a cube
+ And the object "Cube" is selected
+ And I set "scene.BIMRootProperties.ifc_class" to "IfcWall"
+ And I press "bim.assign_class"
+ And I press "bim.add_material(obj='')"
+ When I set "active_object.BIMObjectMaterialProperties.material_type" to "IfcMaterialConstituentSet"
+ And I press "bim.assign_material"
+ Then nothing happens
+
Scenario: Select by material
Given an empty IFC project
And I press "bim.load_materials"
diff --git a/src/blenderbim/test/bim/feature/model.feature b/src/blenderbim/test/bim/feature/model.feature
index 49b85e9641..0db26c92c5 100644
--- a/src/blenderbim/test/bim/feature/model.feature
+++ b/src/blenderbim/test/bim/feature/model.feature
@@ -10,8 +10,8 @@ Scenario: Add type instance - add from a mesh
And I press "bim.assign_class"
And I set "scene.BIMModelProperties.ifc_class" to "IfcWallType"
And the variable "cube" is "{ifc}.by_type('IfcWallType')[0].id()"
- And I set "scene.BIMModelProperties.relating_type" to "{cube}"
- When I press "bim.add_type_instance"
+ And I set "scene.BIMModelProperties.relating_type_id" to "{cube}"
+ When I press "bim.add_constr_type_instance"
Then the object "IfcWall/Wall" exists
Scenario: Add type instance - add from an empty
@@ -23,8 +23,8 @@ Scenario: Add type instance - add from an empty
And I press "bim.assign_class"
And I set "scene.BIMModelProperties.ifc_class" to "IfcWallType"
And the variable "empty" is "{ifc}.by_type('IfcWallType')[0].id()"
- And I set "scene.BIMModelProperties.relating_type" to "{empty}"
- When I press "bim.add_type_instance"
+ And I set "scene.BIMModelProperties.relating_type_id" to "{empty}"
+ When I press "bim.add_constr_type_instance"
Then the object "IfcWall/Wall" exists
Scenario: Add type instance - add a mesh where existing instances have changed context
@@ -36,18 +36,49 @@ Scenario: Add type instance - add a mesh where existing instances have changed c
And I press "bim.assign_class"
And I set "scene.BIMModelProperties.ifc_class" to "IfcWallType"
And the variable "cube" is "{ifc}.by_type('IfcWallType')[0].id()"
- And I set "scene.BIMModelProperties.relating_type" to "{cube}"
- And I press "bim.add_type_instance"
+ And I set "scene.BIMModelProperties.relating_type_id" to "{cube}"
+ And I press "bim.add_constr_type_instance"
And the object "IfcWall/Wall" data is a "Tessellation" representation of "Model/Body/MODEL_VIEW"
And the object "IfcWall/Wall" is selected
And the variable "context" is "[c for c in {ifc}.by_type('IfcGeometricRepresentationSubContext') if c.TargetView == 'PLAN_VIEW'][0].id()"
And I set "scene.BIMRootProperties.contexts" to "{context}"
And I press "bim.add_representation"
And the object "IfcWall/Wall" data is a "Annotation2D" representation of "Plan/Annotation/PLAN_VIEW"
- When I press "bim.add_type_instance"
+ When I press "bim.add_constr_type_instance"
Then the object "IfcWall/Wall" data is a "Annotation2D" representation of "Plan/Annotation/PLAN_VIEW"
And the object "IfcWall/Wall.001" data is a "Annotation2D" representation of "Plan/Annotation/PLAN_VIEW"
+Scenario: Preview one type on the Construction Type Browser
+ Given an empty IFC project
+ And I load the demo construction library
+ When I display the construction type browser
+ And I preview only one asset on the construction type browser
+ And I set "scene.BIMModelProperties.ifc_class" to "IfcColumnType"
+ And I set "scene.BIMModelProperties.relating_type" to "DEMO2"
+ Then construction type is DEMO2
+ And objects starting with "IfcColumn/" do not exist
+ And the construction type "IfcColumnType"/"DEMO2" has a preview
+
+Scenario: Preview one class on the construction type browser
+ Given an empty IFC project
+ And I load the demo construction library
+ When I display the construction type browser
+ And I preview all available assets on the construction type browser
+ And I set "scene.BIMModelProperties.ifc_class" to "IfcWallType"
+ Then "scene.BIMModelProperties.ifc_class" is "IfcWallType"
+ And objects starting with "IfcWall/" do not exist
+ And all construction types for "IfcWallType" have a preview
+
+Scenario: Add one type from the Construction Type Browser
+ Given an empty IFC project
+ And I load the demo construction library
+ When I display the construction type browser
+ And I preview only one asset on the construction type browser
+ And I set "scene.BIMModelProperties.ifc_class" to "IfcColumnType"
+ And I set "scene.BIMModelProperties.relating_type" to "DEMO2"
+ And I add the construction type
+ Then the object "IfcColumn/Column" exists
+
Scenario: Add grid
Given an empty IFC project
When I press "mesh.add_grid"
diff --git a/src/blenderbim/test/bim/feature/project.feature b/src/blenderbim/test/bim/feature/project.feature
index 1fbddce925..c5c05672af 100644
--- a/src/blenderbim/test/bim/feature/project.feature
+++ b/src/blenderbim/test/bim/feature/project.feature
@@ -308,6 +308,18 @@ Scenario: Link IFC
And the object "IfcBuildingStorey/Ground Floor" exists
And the object "IfcBuildingStorey/Level 1" exists
+Scenario: Toggle link visibility - wireframe mode
+ Given an empty IFC project
+ And I press "bim.link_ifc(filepath='{cwd}/test/files/basic.blend')"
+ When I press "bim.toggle_link_visibility(link='{cwd}/test/files/basic.blend', mode='WIREFRAME')"
+ Then nothing happens
+
+Scenario: Toggle link visibility - visible mode
+ Given an empty IFC project
+ And I press "bim.link_ifc(filepath='{cwd}/test/files/basic.blend')"
+ When I press "bim.toggle_link_visibility(link='{cwd}/test/files/basic.blend', mode='VISIBLE')"
+ Then nothing happens
+
Scenario: Unload link
Given an empty Blender session
And I press "bim.link_ifc(filepath='{cwd}/test/files/basic.blend')"
diff --git a/src/blenderbim/test/bim/feature/pset.feature b/src/blenderbim/test/bim/feature/pset.feature
index 7a14662c2e..48bdc9ac88 100644
--- a/src/blenderbim/test/bim/feature/pset.feature
+++ b/src/blenderbim/test/bim/feature/pset.feature
@@ -1,6 +1,78 @@
@pset
Feature: Pset
+Scenario: Enable pset editing - object
+ Given an empty IFC project
+ And I add a cube
+ And the object "Cube" is selected
+ And I set "scene.BIMRootProperties.ifc_class" to "IfcWall"
+ And I press "bim.assign_class"
+ And the object "IfcWall/Cube" is selected
+ And I set "active_object.PsetProperties.pset_name" to "Pset_WallCommon"
+ And I press "bim.add_pset(obj='IfcWall/Cube', obj_type='Object')"
+ And the variable "pset" is "{ifc}.by_type('IfcPropertySet')[-1].id()"
+ When I press "bim.enable_pset_editing(pset_id={pset}, obj='IfcWall/Cube', obj_type='Object')"
+ Then nothing happens
+
+Scenario: Enable pset editing - material
+ Given an empty IFC project
+ And I add a cube
+ And the object "Cube" is selected
+ And I set "scene.BIMRootProperties.ifc_class" to "IfcWall"
+ And I press "bim.assign_class"
+ And I press "bim.add_material(obj='')"
+ And I set "active_object.BIMObjectMaterialProperties.material_type" to "IfcMaterial"
+ And I press "bim.assign_material"
+ And the object "IfcWall/Cube" is selected
+ And I press "bim.add_pset(obj='Default', obj_type='Material')"
+ And the variable "pset" is "{ifc}.by_type('IfcMaterialProperties')[-1].id()"
+ When I press "bim.enable_pset_editing(pset_id={pset}, obj='Default', obj_type='Material')"
+ Then nothing happens
+
+Scenario: Enable pset editing - profile
+ Given an empty IFC project
+ And I add an empty
+ And the object "Empty" is selected
+ And I set "scene.BIMRootProperties.ifc_product" to "IfcElementType"
+ And I set "scene.BIMRootProperties.ifc_class" to "IfcWallType"
+ And I press "bim.assign_class"
+ And I press "bim.add_material(obj='')"
+ And I set "active_object.BIMObjectMaterialProperties.material_type" to "IfcMaterialProfileSet"
+ And I press "bim.assign_material"
+ And I press "bim.enable_editing_assigned_material()"
+ And the variable "profile_set" is "{ifc}.by_type('IfcMaterialProfileSet')[-1].id()"
+ And I press "bim.add_profile(profile_set={profile_set})"
+ And the variable "material_profile" is "{ifc}.by_type('IfcMaterialProfile')[-1].id()"
+ And I press "bim.enable_editing_material_set_item(material_set_item={material_profile})"
+ And I set "active_object.BIMObjectMaterialProperties.profile_classes" to "IfcParameterizedProfileDef"
+ And I press "bim.assign_parameterized_profile(ifc_class="IfcIShapeProfileDef", material_profile={material_profile})"
+ And I press "bim.load_profiles"
+ And I set "scene.ProfilePsetProperties.pset_name" to "Pset_ProfileMechanical"
+ And I press "bim.add_pset(obj_type='Profile')"
+ And the variable "pset" is "{ifc}.by_type('IfcProfileProperties')[-1].id()"
+ When I press "bim.enable_pset_editing(pset_id={pset}, obj='', obj_type='Profile')"
+ Then nothing happens
+
+Scenario: Enable pset editing - work schedule
+ Given an empty IFC project
+ And I press "bim.add_work_schedule"
+ And the variable "work_schedule" is "{ifc}.by_type('IfcWorkSchedule')[0].id()"
+ And I press "bim.enable_editing_tasks(work_schedule={work_schedule})"
+ And I set "scene.WorkSchedulePsetProperties.pset_name" to "Pset_WorkControlCommon"
+ And I press "bim.add_pset(obj_type='WorkSchedule')"
+ And the variable "pset" is "{ifc}.by_type('IfcPropertySet')[-1].id()"
+ When I press "bim.enable_pset_editing(pset_id={pset}, obj='', obj_type='WorkSchedule')"
+
+Scenario: Enable pset editing - resource
+ Given an empty IFC project
+ And I press "bim.load_resources"
+ And I press "bim.add_resource(ifc_class='IfcSubContractResource', resource=0)"
+ And I set "scene.ResourcePsetProperties.pset_name" to "Pset_ConstructionResource"
+ And I press "bim.add_pset(obj_type='Resource')"
+ And the variable "pset" is "{ifc}.by_type('IfcPropertySet')[-1].id()"
+ When I press "bim.enable_pset_editing(pset_id={pset}, obj='', obj_type='Resource')"
+ Then nothing happens
+
Scenario: Copy property to selected - copy property
Given an empty IFC project
And I add a cube
@@ -13,30 +85,10 @@ Scenario: Copy property to selected - copy property
And I press "bim.assign_class"
And the object "IfcWall/Cube" is selected
And additionally the object "IfcWall/Cube.001" is selected
- And I set "active_object.PsetProperties.pset_name" to "Pset_BuildingElementCommon"
+ And I set "active_object.PsetProperties.pset_name" to "Pset_WallCommon"
And I press "bim.add_pset(obj='IfcWall/Cube.001', obj_type='Object')"
And the variable "pset" is "{ifc}.by_type('IfcPropertySet')[-1].id()"
And I press "bim.enable_pset_editing(obj='IfcWall/Cube.001', obj_type='Object', pset_id={pset})"
- And I set "active_object.PsetProperties.properties[2].string_value" to "Foo"
+ And I set "active_object.PsetProperties.properties[2].metadata.string_value" to "Foo"
When I press "bim.copy_property_to_selection(name='FireRating')"
Then nothing happens
-
-Scenario: Copy property to selected - copy quantity
- Given an empty IFC project
- And I add a cube
- And the object "Cube" is selected
- And I set "scene.BIMRootProperties.ifc_class" to "IfcWall"
- And I press "bim.assign_class"
- And I add a cube
- And the object "Cube" is selected
- And I set "scene.BIMRootProperties.ifc_class" to "IfcWall"
- And I press "bim.assign_class"
- And the object "IfcWall/Cube" is selected
- And additionally the object "IfcWall/Cube.001" is selected
- And I set "active_object.PsetProperties.pset_name" to "Pset_BuildingElementCommon"
- And I press "bim.add_qto(obj='IfcWall/Cube.001', obj_type='Object')"
- And the variable "qto" is "{ifc}.by_type('IfcQuantitySet')[-1].id()"
- And I press "bim.enable_pset_editing(obj='IfcWall/Cube.001', obj_type='Object', pset_id={qto})"
- And I set "active_object.PsetProperties.properties[0].float_value" to "1"
- When I press "bim.copy_property_to_selection(name='Length')"
- Then nothing happens
diff --git a/src/blenderbim/test/bim/feature/search.feature b/src/blenderbim/test/bim/feature/search.feature
new file mode 100644
index 0000000000..7e1614b01a
--- /dev/null
+++ b/src/blenderbim/test/bim/feature/search.feature
@@ -0,0 +1,15 @@
+@search
+Feature: Search
+
+Scenario: Select all walls
+ Given an empty IFC project
+ And I add a cube
+ And the object "Cube" is selected
+ And I set "scene.BIMRootProperties.ifc_class" to "IfcWall"
+ And I press "bim.assign_class"
+ And I add a new item to "scene.IfcSelectorProperties.groups"
+ And I add a new item to "scene.IfcSelectorProperties.groups[0].queries"
+ And I set "scene.IfcSelectorProperties.groups[0].queries[0].selector" to "IFC Class"
+ And I set "scene.IfcSelectorProperties.groups[0].queries[0].active_option" to "124: IfcWall"
+ When I press "bim.filter_model_elements(option='select')"
+ Then the object "IfcWall/Cube" is selected
diff --git a/src/blenderbim/test/bim/test_feature.py b/src/blenderbim/test/bim/test_feature.py
index 4cd6dbcd5a..87409c5798 100644
--- a/src/blenderbim/test/bim/test_feature.py
+++ b/src/blenderbim/test/bim/test_feature.py
@@ -23,6 +23,7 @@ import ifcopenshell
import blenderbim.tool as tool
import blenderbim.bim
from blenderbim.bim.ifc import IfcStore
+from blenderbim.bim.module.model.data import AuthoringData
from pytest_bdd import scenarios, given, when, then, parsers
from mathutils import Vector
@@ -88,7 +89,7 @@ def i_add_an_empty():
@given("I add a sun")
-@when("I add an sun")
+@when("I add a sun")
def i_add_a_sun():
bpy.ops.object.light_add(type="SUN")
@@ -99,6 +100,15 @@ def i_add_a_material():
bpy.context.active_object.active_material = bpy.data.materials.new("Material")
+@given(parsers.parse('I add a new item to "{collection}"'))
+@when(parsers.parse('I add a new item to "{collection}"'))
+def i_add_a_new_collection_item(collection):
+ try:
+ eval(f"bpy.context.{collection}.add()")
+ except:
+ assert False, "Collection does not exist"
+
+
@given(parsers.parse('the material "{name}" colour is set to "{colour}"'))
@when(parsers.parse('the material "{name}" colour is set to "{colour}"'))
def the_material_name_colour_is_set_to_colour(name, colour):
@@ -476,6 +486,7 @@ def prop_is_value(prop, value):
except:
pass
if not is_value:
+ print(f"bpy.context.{prop}")
actual_value = eval(f"bpy.context.{prop}")
assert False, f"Value is {actual_value}"
@@ -497,7 +508,16 @@ def the_collection_name1_is_in_the_collection_name2(name1, name2):
@then(parsers.parse('the object "{name}" does not exist'))
def the_object_name_does_not_exist(name):
- assert bpy.data.objects.get(name) is None, "Object exists"
+ obj = bpy.data.objects.get(name)
+ assert obj is None or len(obj.users_collection) == 0, "Object exists"
+
+
+@then(parsers.parse('objects starting with "{name}" do not exist'))
+def objects_not_exist_starting_with(name):
+ objs = [obj for obj in bpy.data.objects if obj.name.startswith(name) and len(obj.users_collection) > 0]
+ if len(objs) > 0:
+ assert False, f'{len(objs)} objects starting with "{name}" exist'
+ assert True
@then(parsers.parse('the object "{name}" is at "{location}"'))
@@ -552,3 +572,91 @@ def the_file_name_should_contain_value(name, value):
@then(parsers.parse('the object "{name}" has no modifiers'))
def the_object_name_has_no_modifiers(name):
assert len(the_object_name_exists(name).modifiers) == 0
+
+
+@then(parsers.parse('the construction type "{ifc_class}"/"{relating_type}" has a preview'))
+def the_construction_type_has_a_preview(ifc_class, relating_type):
+ if "preview_constr_types" not in AuthoringData.data:
+ assert False, "There are no previews loaded"
+ preview_constr_types = AuthoringData.data["preview_constr_types"]
+ if ifc_class not in preview_constr_types:
+ assert False, f"Construction class {ifc_class} has no available previews"
+ relating_type_id = AuthoringData.relating_type_id_by_name(ifc_class, relating_type)
+ if relating_type_id is None:
+ assert False, f"No construction type {ifc_class}/{relating_type} was found"
+ if relating_type_id not in preview_constr_types[ifc_class]:
+ assert False, f"Construction type {ifc_class}/{relating_type} has no available previews"
+ preview_data = preview_constr_types[ifc_class][relating_type_id]
+ if "icon_id" not in preview_data:
+ assert False, f"Construction type {ifc_class}/{relating_type} has a preview, but no assigned icon_id"
+ icon_id = preview_data["icon_id"]
+ if not isinstance(icon_id, int):
+ assert False, f"Construction type {ifc_class}/{relating_type} has an invalid icon_id {icon_id}"
+ # Note: icon_id must be > 0 in UI mode, but asset_generate_preview() doesn't work headlessly -> skipping for now
+ # if icon_id == 0:
+ # assert False, f'Construction type {ifc_class}/{relating_type} has the default null value for icon_id'
+ assert True
+
+
+@then("there is a Construction Type preview")
+def there_is_a_construction_type_preview():
+ props = bpy.context.scene.BIMModelProperties
+ assert props.icon_id > 0, f"There isn't a Construction Type preview"
+
+
+@then(parsers.parse('all construction types for "{ifc_class}" have a preview'))
+def all_construction_types_have_a_preview(ifc_class):
+ if "preview_constr_types" not in AuthoringData.data:
+ assert False, "There are no previews loaded"
+ preview_constr_types = AuthoringData.data["preview_constr_types"]
+ if ifc_class not in preview_constr_types:
+ assert False, f"Construction class {ifc_class} has no available previews"
+ constr_class_occurrences = AuthoringData.constr_class_entities(ifc_class)
+ for constr_class_entity in constr_class_occurrences:
+ the_construction_type_has_a_preview(ifc_class, constr_class_entity.Name)
+
+
+@given("I load the demo construction library")
+@when("I load the demo construction library")
+def i_add_a_construction_library():
+ lib_path = "./blenderbim/bim/data/libraries/IFC4 Demo Library.ifc"
+ bpy.ops.bim.select_library_file(filepath=lib_path, append_all=True)
+
+
+@given("I display the construction type browser")
+@when("I display the construction type browser")
+def i_display_the_construction_type_browser():
+ bpy.ops.bim.display_constr_types("INVOKE_DEFAULT")
+
+
+@given("I preview only one asset on the construction type browser")
+@when("I preview only one asset on the construction type browser")
+def i_preview_one_construction_type():
+ bpy.context.scene.BIMModelProperties.unfold_relating_types = False
+
+
+@given("I preview all available assets on the construction type browser")
+@when("I preview all available assets on the construction type browser")
+def i_preview_all_construction_types():
+ bpy.context.scene.BIMModelProperties.unfold_relating_types = True
+
+
+@given("I add the construction type")
+@when("I add the construction type")
+def i_add_the_active_construction_type():
+ props = bpy.context.scene.BIMModelProperties
+ bpy.ops.bim.add_constr_type_instance(
+ ifc_class=props.ifc_class, relating_type_id=int(props.relating_type_id)
+ )
+
+
+@then(parsers.parse("construction type is {relating_type_name}"))
+def construction_type(relating_type_name):
+ props = bpy.context.scene.BIMModelProperties
+ relating_type = AuthoringData.relating_type_name_by_id(props.ifc_class, props.relating_type_id)
+ assert relating_type == relating_type_name, f"Construction Type is a {relating_type}, not a {relating_type_name}"
+
+
+@when("I move the cursor to the bottom left corner")
+def move_cursor_bottom_left():
+ bpy.context.window.cursor_warp(10, 10)
diff --git a/src/blenderbim/test/core/test_drawing.py b/src/blenderbim/test/core/test_drawing.py
index 3746379740..d6cd58d45e 100644
--- a/src/blenderbim/test/core/test_drawing.py
+++ b/src/blenderbim/test/core/test_drawing.py
@@ -223,7 +223,7 @@ class TestAddDrawing:
ifc.run(
"group.edit_group", group="group", attributes={"Name": "name", "ObjectType": "DRAWING"}
).should_be_called()
- ifc.run("group.assign_group", group="group", product="element").should_be_called()
+ ifc.run("group.assign_group", group="group", product=["element"]).should_be_called()
collector.assign("obj").should_be_called()
ifc.run("pset.add_pset", product="element", name="EPset_Drawing").should_be_called().will_return("pset")
ifc.run(
@@ -293,7 +293,7 @@ class TestAddAnnotation:
ifc_representation_class="ifc_representation_class",
).should_be_called().will_return("element")
drawing.get_drawing_group("drawing").should_be_called().will_return("group")
- ifc.run("group.assign_group", group="group", product="element").should_be_called()
+ ifc.run("group.assign_group", group="group", product=["element"]).should_be_called()
collector.assign("obj").should_be_called()
drawing.enable_editing("obj").should_be_called()
subject.add_annotation(ifc, collector, drawing, drawing="drawing", object_type="object_type")
diff --git a/src/blenderbim/test/core/test_geometry.py b/src/blenderbim/test/core/test_geometry.py
index a22267cf8f..4eee95cc11 100644
--- a/src/blenderbim/test/core/test_geometry.py
+++ b/src/blenderbim/test/core/test_geometry.py
@@ -320,9 +320,9 @@ class TestGetRepresentationIfcParameters:
class TestRemoveRepresentation:
def test_removing_an_actively_used_mapped_representation_by_remapping_usages_to_an_empty(self, ifc, geometry):
ifc.get_entity("obj").should_be_called().will_return("element")
+ geometry.get_element_type("element").should_be_called().will_return("type")
geometry.is_mapped_representation("mapped_rep").should_be_called().will_return(False)
geometry.is_type_product("element").should_be_called().will_return(True)
- geometry.get_element_type("element").should_be_called().will_return("type")
geometry.resolve_mapped_representation("mapped_rep").should_be_called().will_return("representation")
geometry.get_representation_data("representation").should_be_called().will_return("data")
geometry.has_data_users("data").should_be_called().will_return(True)
@@ -337,16 +337,29 @@ class TestRemoveRepresentation:
def test_removing_an_unused_mapped_representation(self, ifc, geometry):
ifc.get_entity("obj").should_be_called().will_return("element")
- geometry.is_mapped_representation("mapped_rep").should_be_called().will_return(True)
geometry.get_element_type("element").should_be_called().will_return("type")
+ geometry.is_mapped_representation("mapped_rep").should_be_called().will_return(True)
geometry.resolve_mapped_representation("mapped_rep").should_be_called().will_return("representation")
geometry.get_representation_data("representation").should_be_called().will_return(None)
ifc.run("geometry.unassign_representation", product="type", representation="representation").should_be_called()
ifc.run("geometry.remove_representation", representation="representation").should_be_called()
subject.remove_representation(ifc, geometry, obj="obj", representation="mapped_rep")
+ def test_remove_a_mapped_representation_by_an_element_with_no_type(self, ifc, geometry):
+ ifc.get_entity("obj").should_be_called().will_return("element")
+ geometry.get_element_type("element").should_be_called().will_return(None)
+ geometry.get_representation_data("representation").should_be_called().will_return("data")
+ geometry.has_data_users("data").should_be_called().will_return(True)
+ geometry.replace_object_with_empty("obj").should_be_called()
+ ifc.run(
+ "geometry.unassign_representation", product="element", representation="representation"
+ ).should_be_called()
+ ifc.run("geometry.remove_representation", representation="representation").should_be_called()
+ subject.remove_representation(ifc, geometry, obj="obj", representation="representation")
+
def test_removing_an_actively_used_representation(self, ifc, geometry):
ifc.get_entity("obj").should_be_called().will_return("element")
+ geometry.get_element_type("element").should_be_called().will_return("type")
geometry.is_mapped_representation("representation").should_be_called().will_return(False)
geometry.is_type_product("element").should_be_called().will_return(False)
geometry.get_representation_data("representation").should_be_called().will_return("data")
@@ -360,6 +373,7 @@ class TestRemoveRepresentation:
def test_removing_an_unused_representation(self, ifc, geometry):
ifc.get_entity("obj").should_be_called().will_return("element")
+ geometry.get_element_type("element").should_be_called().will_return("type")
geometry.is_mapped_representation("representation").should_be_called().will_return(False)
geometry.is_type_product("element").should_be_called().will_return(False)
geometry.get_representation_data("representation").should_be_called().will_return(None)
diff --git a/src/blenderbim/test/core/test_system.py b/src/blenderbim/test/core/test_system.py
index 01c4171def..a27d0f90e5 100644
--- a/src/blenderbim/test/core/test_system.py
+++ b/src/blenderbim/test/core/test_system.py
@@ -125,7 +125,6 @@ class TestHidePorts:
system.delete_element_objects(["port"]).should_be_called()
subject.hide_ports(ifc, system, element="element")
-
def test_syncing_locations_if_objects_moved_prior_to_hiding_ports(self, ifc, system):
ifc.get_object("element").should_be_called().will_return("obj")
ifc.is_moved("obj").should_be_called().will_return(True)
diff --git a/src/blenderbim/test/tool/test_collector.py b/src/blenderbim/test/tool/test_collector.py
index 496d3fc929..f9b7c76b08 100644
--- a/src/blenderbim/test/tool/test_collector.py
+++ b/src/blenderbim/test/tool/test_collector.py
@@ -222,7 +222,7 @@ class TestAssign(NewFile):
tool.Ifc.link(element, element_obj)
group = ifcopenshell.api.run("group.add_group", tool.Ifc.get())
group.ObjectType = "DRAWING"
- ifcopenshell.api.run("group.assign_group", tool.Ifc.get(), product=element, group=group)
+ ifcopenshell.api.run("group.assign_group", tool.Ifc.get(), product=[element], group=group)
subject.assign(element_obj)
assert element_obj.users_collection[0].name == "IfcGroup/Unnamed"
assert bpy.data.collections.get("Views").children.get("IfcGroup/Unnamed")
@@ -235,7 +235,7 @@ class TestAssign(NewFile):
tool.Ifc.link(element, element_obj)
group = ifcopenshell.api.run("group.add_group", tool.Ifc.get())
group.ObjectType = "DRAWING"
- ifcopenshell.api.run("group.assign_group", tool.Ifc.get(), product=element, group=group)
+ ifcopenshell.api.run("group.assign_group", tool.Ifc.get(), product=[element], group=group)
subject.assign(element_obj)
assert element_obj.users_collection[0].name == "IfcGroup/Unnamed"
assert bpy.data.collections.get("Views").children.get("IfcGroup/Unnamed")
diff --git a/src/blenderbim/test/tool/test_drawing.py b/src/blenderbim/test/tool/test_drawing.py
index 64048c8192..b55459df99 100644
--- a/src/blenderbim/test/tool/test_drawing.py
+++ b/src/blenderbim/test/tool/test_drawing.py
@@ -260,7 +260,7 @@ class TestGetDrawingGroup(NewFile):
tool.Ifc.set(ifc)
element = ifc.createIfcAnnotation()
group = ifcopenshell.api.run("group.add_group", ifc)
- ifcopenshell.api.run("group.assign_group", ifc, product=element, group=group)
+ ifcopenshell.api.run("group.assign_group", ifc, product=[element], group=group)
assert subject.get_drawing_group(element) == group
@@ -280,7 +280,7 @@ class TestGetGroupElements(NewFile):
tool.Ifc.set(ifc)
element = ifc.createIfcAnnotation()
group = ifcopenshell.api.run("group.add_group", ifc)
- ifcopenshell.api.run("group.assign_group", ifc, product=element, group=group)
+ ifcopenshell.api.run("group.assign_group", ifc, product=[element], group=group)
assert subject.get_group_elements(group) == (element,)
diff --git a/src/blenderbim/test/tool/test_georeference.py b/src/blenderbim/test/tool/test_georeference.py
index 4dd8661e25..bddb670fbb 100644
--- a/src/blenderbim/test/tool/test_georeference.py
+++ b/src/blenderbim/test/tool/test_georeference.py
@@ -163,6 +163,7 @@ class TestGetMapConversionAttributes(NewFile):
"Scale": 6.0,
}
+
class TestGetTrueNorthAttributes(NewFile):
def test_run(self):
TestImportTrueNorth().test_run()
@@ -185,18 +186,18 @@ class TestDisableEditing(NewFile):
class TestSetCoordinates(NewFile):
def test_run(self):
- subject.set_coordinates("input", [1., 2., 3.])
+ subject.set_coordinates("input", [1.0, 2.0, 3.0])
assert bpy.context.scene.BIMGeoreferenceProperties.coordinate_input == "1.0,2.0,3.0"
- subject.set_coordinates("output", [4., 5., 6.])
+ subject.set_coordinates("output", [4.0, 5.0, 6.0])
assert bpy.context.scene.BIMGeoreferenceProperties.coordinate_output == "4.0,5.0,6.0"
class TestGetCoordinates(NewFile):
def test_run(self):
bpy.context.scene.BIMGeoreferenceProperties.coordinate_input = "1.0,2.0,3.0"
- assert subject.get_coordinates("input") == [1., 2., 3.]
+ assert subject.get_coordinates("input") == [1.0, 2.0, 3.0]
bpy.context.scene.BIMGeoreferenceProperties.coordinate_output = "4.0,5.0,6.0"
- assert subject.get_coordinates("output") == [4., 5., 6.]
+ assert subject.get_coordinates("output") == [4.0, 5.0, 6.0]
class TestGetCursorLocation(NewFile):
@@ -207,8 +208,8 @@ class TestGetCursorLocation(NewFile):
ifcopenshell.api.run("context.add_context", ifc, context_type="Model")
unit = ifcopenshell.api.run("unit.add_si_unit", ifc, unit_type="LENGTHUNIT", prefix="MILLI", name="METRE")
ifcopenshell.api.run("unit.assign_unit", ifc, units=[unit])
- bpy.context.scene.cursor.location = (1., 2., 3.)
- assert subject.get_cursor_location() == [1000., 2000., 3000.]
+ bpy.context.scene.cursor.location = (1.0, 2.0, 3.0)
+ assert subject.get_cursor_location() == [1000.0, 2000.0, 3000.0]
class TestSetCursorLocation(NewFile):
@@ -219,8 +220,8 @@ class TestSetCursorLocation(NewFile):
ifcopenshell.api.run("context.add_context", ifc, context_type="Model")
unit = ifcopenshell.api.run("unit.add_si_unit", ifc, unit_type="LENGTHUNIT", prefix="MILLI", name="METRE")
ifcopenshell.api.run("unit.assign_unit", ifc, units=[unit])
- subject.set_cursor_location([1000., 2000., 3000.])
- assert list(bpy.context.scene.cursor.location) == [1., 2., 3.]
+ subject.set_cursor_location([1000.0, 2000.0, 3000.0])
+ assert list(bpy.context.scene.cursor.location) == [1.0, 2.0, 3.0]
class TestSetIfcTrueNorth(NewFile):
@@ -258,13 +259,13 @@ class TestGetMapConversion(NewFile):
class TestXyz2Enh(NewFile):
def test_run(self):
- assert subject.xyz2enh([0., 0., 0.], None) == [0., 0., 0.]
+ assert subject.xyz2enh([0.0, 0.0, 0.0], None) == [0.0, 0.0, 0.0]
def test_using_the_blender_offset(self):
props = bpy.context.scene.BIMGeoreferenceProperties
props.has_blender_offset = True
props.blender_eastings = "1.0"
- assert subject.xyz2enh([0., 0., 0.], None) == (1., 0., 0.)
+ assert subject.xyz2enh([0.0, 0.0, 0.0], None) == (1.0, 0.0, 0.0)
def test_using_the_map_conversion(self):
ifc = ifcopenshell.file()
@@ -274,7 +275,7 @@ class TestXyz2Enh(NewFile):
ifcopenshell.api.run("georeference.add_georeferencing", ifc)
map_conversion = ifc.by_type("IfcMapConversion")[0]
map_conversion.Eastings = 1.0
- assert subject.xyz2enh([0., 0., 0.], map_conversion) == (1., 0., 0.)
+ assert subject.xyz2enh([0.0, 0.0, 0.0], map_conversion) == (1.0, 0.0, 0.0)
def test_applying_both_blender_offset_and_map_conversion(self):
props = bpy.context.scene.BIMGeoreferenceProperties
@@ -287,18 +288,18 @@ class TestXyz2Enh(NewFile):
ifcopenshell.api.run("georeference.add_georeferencing", ifc)
map_conversion = ifc.by_type("IfcMapConversion")[0]
map_conversion.Northings = 1.0
- assert subject.xyz2enh([0., 0., 0.], map_conversion) == (1., 1., 0.)
+ assert subject.xyz2enh([0.0, 0.0, 0.0], map_conversion) == (1.0, 1.0, 0.0)
class TestEnh2Xyz(NewFile):
def test_run(self):
- assert subject.enh2xyz([0., 0., 0.], None) == [0., 0., 0.]
+ assert subject.enh2xyz([0.0, 0.0, 0.0], None) == [0.0, 0.0, 0.0]
def test_using_the_blender_offset(self):
props = bpy.context.scene.BIMGeoreferenceProperties
props.has_blender_offset = True
props.blender_eastings = "1.0"
- assert subject.enh2xyz([0., 0., 0.], None) == (-1., 0., 0.)
+ assert subject.enh2xyz([0.0, 0.0, 0.0], None) == (-1.0, 0.0, 0.0)
def test_using_the_map_conversion(self):
ifc = ifcopenshell.file()
@@ -308,7 +309,7 @@ class TestEnh2Xyz(NewFile):
ifcopenshell.api.run("georeference.add_georeferencing", ifc)
map_conversion = ifc.by_type("IfcMapConversion")[0]
map_conversion.Eastings = 1.0
- assert subject.enh2xyz([0., 0., 0.], map_conversion) == (-1., 0., 0.)
+ assert subject.enh2xyz([0.0, 0.0, 0.0], map_conversion) == (-1.0, 0.0, 0.0)
def test_applying_both_blender_offset_and_map_conversion(self):
props = bpy.context.scene.BIMGeoreferenceProperties
@@ -321,7 +322,7 @@ class TestEnh2Xyz(NewFile):
ifcopenshell.api.run("georeference.add_georeferencing", ifc)
map_conversion = ifc.by_type("IfcMapConversion")[0]
map_conversion.Northings = 1.0
- assert subject.enh2xyz([0., 0., 0.], map_conversion) == (-1., -1., 0.)
+ assert subject.enh2xyz([0.0, 0.0, 0.0], map_conversion) == (-1.0, -1.0, 0.0)
class TestSetIfcGridNorth(NewFile):
diff --git a/src/ifcdiff/ifcdiff.py b/src/ifcdiff/ifcdiff.py
index 294b32d179..ea5d6b2ffe 100755
--- a/src/ifcdiff/ifcdiff.py
+++ b/src/ifcdiff/ifcdiff.py
@@ -20,32 +20,45 @@
# This can be packaged with `pyinstaller --onefile --clean --icon=icon.ico ifcdiff.py`
-import ifcopenshell
-from deepdiff import DeepDiff
import time
import json
+import logging
import argparse
-import decimal
+import numpy as np
+import ifcopenshell
+import ifcopenshell.util.element
+import ifcopenshell.util.placement
+import ifcopenshell.util.classification
+import ifcopenshell.util.selector
+from deepdiff import DeepDiff
class IfcDiff:
- def __init__(self, old_file, new_file, output_file, inverse_classes=None):
+ def __init__(self, old_file, new_file, output_file, relationships=None, is_shallow=True, filter_elements=None):
self.old_file = old_file
self.new_file = new_file
self.output_file = output_file
self.change_register = {}
- self.representation_ids = []
- self.inverse_classes = inverse_classes
- self.precision = 2
+ self.representation_ids = {}
+ self.relationships = relationships
+ self.precision = 1e-4
+ self.is_shallow = is_shallow
+ self.filter_elements = filter_elements
def diff(self):
print("# IFC Diff")
+ logging.disable(logging.CRITICAL)
self.load()
self.precision = self.get_precision()
- old_elements = set(e.GlobalId for e in self.old.by_type("IfcProduct"))
- new_elements = set(e.GlobalId for e in self.new.by_type("IfcProduct"))
+ if self.filter_elements:
+ selector = ifcopenshell.util.selector.Selector()
+ old_elements = set(e.GlobalId for e in selector.parse(self.old, self.filter_elements))
+ new_elements = set(e.GlobalId for e in selector.parse(self.new, self.filter_elements))
+ else:
+ old_elements = set(e.GlobalId for e in self.old.by_type("IfcProduct"))
+ new_elements = set(e.GlobalId for e in self.new.by_type("IfcProduct"))
self.deleted_elements = old_elements - new_elements
self.added_elements = new_elements - old_elements
@@ -61,20 +74,22 @@ class IfcDiff:
for global_id in same_elements:
total_diffed += 1
- print("{}/{} diffed ...".format(total_diffed, total_same_elements), end="\r", flush=True)
- old_element = self.old.by_id(global_id)
- new_element = self.new.by_id(global_id)
- self.diff_element(old_element, new_element)
- self.diff_element_inverse_relationships(old_element, new_element)
-
- representation_id = self.get_representation_id(new_element)
- if representation_id in self.representation_ids:
+ if total_diffed % 250 == 0:
+ print("{}/{} diffed ...".format(total_diffed, total_same_elements), end="\r", flush=True)
+ old = self.old.by_id(global_id)
+ new = self.new.by_id(global_id)
+ if self.diff_element(old, new) and self.is_shallow:
continue
- self.representation_ids.append(representation_id)
- self.diff_element_geometry(old_element, new_element)
+ if self.diff_element_relationships(old, new) and self.is_shallow:
+ continue
+ diff = self.diff_element_geometry(old, new)
+ if diff:
+ self.change_register.setdefault(new.GlobalId, {}).update({"geometry_changed": True})
print(" - {} item(s) were changed either geometrically or with data".format(len(self.change_register.keys())))
print("# Diff finished in {:.2f} seconds".format(time.time() - start))
+ logging.disable(logging.NOTSET)
+ return f"# Diff finished in {time.time() - start:.2f} seconds"
def export(self):
with open(self.output_file, "w", encoding="utf-8") as diff_file:
@@ -96,111 +111,123 @@ class IfcDiff:
self.new = ifcopenshell.open(self.new_file)
def get_precision(self):
- try:
- precision = [c for c in self.new.by_type("IfcGeometricRepresentationContext") if c.ContextType == "Model"][
- 0
- ].Precision
- exponent = decimal.Decimal(str(precision)).as_tuple().exponent
- if exponent < 0:
- return abs(exponent)
- return 0
- except:
- return 2
+ contexts = [c for c in self.new.by_type("IfcGeometricRepresentationContext") if c.ContextType == "Model"]
+ if contexts:
+ return contexts[0].Precision or 1e-4
+ return 1e-4
- def diff_element(self, old_element, new_element):
+ def diff_element(self, old, new):
diff = DeepDiff(
- old_element,
- new_element,
- significant_digits=self.precision,
+ [a for a in old if not isinstance(a, (ifcopenshell.entity_instance, tuple))],
+ [a for a in new if not isinstance(a, (ifcopenshell.entity_instance, tuple))],
+ math_epsilon=self.precision,
ignore_string_type_changes=True,
ignore_numeric_type_changes=True,
- exclude_regex_paths=[
- r"root.*id$",
- r".*Representation.*",
- r".*OwnerHistory.*",
- r".*ObjectPlacement.*",
- ],
)
- if diff and new_element.GlobalId:
- self.change_register.setdefault(new_element.GlobalId, {}).update(diff)
+ if diff and new.GlobalId:
+ self.change_register.setdefault(new.GlobalId, {}).update({"attributes_changed": True})
+ return True
- def diff_element_inverse_relationships(self, old_element, new_element):
- if not self.inverse_classes:
+ def diff_element_relationships(self, old, new):
+ if not self.relationships:
return
- old_relationships_all = self.old.get_inverse(old_element)
- new_relationships_all = self.new.get_inverse(new_element)
- if self.inverse_classes[0] == "all":
- old_relationships = old_relationships_all
- new_relationships = new_relationships_all
- else:
- old_relationships = [x for x in old_relationships_all if x.is_a() in self.inverse_classes]
- new_relationships = [x for x in new_relationships_all if x.is_a() in self.inverse_classes]
+ for relationship in self.relationships:
+ if relationship == "type":
+ if ifcopenshell.util.element.get_type(old) != ifcopenshell.util.element.get_type(new):
+ self.change_register.setdefault(new.GlobalId, {}).update({"type_changed": True})
+ return True
+ elif relationship == "property":
+ old_psets = ifcopenshell.util.element.get_psets(old)
+ new_psets = ifcopenshell.util.element.get_psets(new)
+ try:
+ diff = DeepDiff(
+ old_psets,
+ new_psets,
+ math_epsilon=self.precision,
+ ignore_string_type_changes=True,
+ ignore_numeric_type_changes=True,
+ exclude_regex_paths=[r".*id$"],
+ )
+ except:
+ diff = True
+ if diff and new.GlobalId:
+ self.change_register.setdefault(new.GlobalId, {}).update({"properties_changed": diff})
+ return True
+ elif relationship == "container":
+ if ifcopenshell.util.element.get_container(old) != ifcopenshell.util.element.get_container(new):
+ self.change_register.setdefault(new.GlobalId, {}).update({"container_changed": True})
+ return True
+ elif relationship == "aggregate":
+ if ifcopenshell.util.element.get_aggregate(old) != ifcopenshell.util.element.get_aggregate(new):
+ self.change_register.setdefault(new.GlobalId, {}).update({"aggregate_changed": True})
+ return True
+ elif relationship == "classification":
+ old_id = "ItemReference" if self.old.schema == "IFC2X3" else "Identification"
+ new_id = "ItemReference" if self.new.schema == "IFC2X3" else "Identification"
+ old_refs = [getattr(r, old_id) for r in ifcopenshell.util.classification.get_references(old)]
+ new_refs = [getattr(r, new_id) for r in ifcopenshell.util.classification.get_references(new)]
+ if old_refs != new_refs:
+ self.change_register.setdefault(new.GlobalId, {}).update({"classification_changed": True})
+ return True
- diff = DeepDiff(
- old_relationships,
- new_relationships,
- significant_digits=self.precision,
- ignore_string_type_changes=True,
- ignore_numeric_type_changes=True,
- exclude_regex_paths=[
- r"root.*id$",
- r".*GlobalId.*",
- r".*OwnerHistory.*",
- r".*RelatedObjects.*",
- r".*RelatingObject.*",
- r".*RelatingDefinitions.*",
- r".*RelatedObjectsType.*", # Deprecated in IFC4 anyway
- ],
- )
- if diff and new_element.GlobalId:
- self.change_register.setdefault(new_element.GlobalId, {}).update(diff)
+ def diff_element_geometry(self, old, new):
+ old_placement = ifcopenshell.util.placement.get_local_placement(old.ObjectPlacement)
+ new_placement = ifcopenshell.util.placement.get_local_placement(new.ObjectPlacement)
+ if not np.allclose(old_placement[:,3], new_placement[:,3], atol=self.precision):
+ return True
+ if not np.allclose(old_placement[0:3,0:3], new_placement[0:3,0:3], atol=1e-2):
+ return True
+ old_openings = [o.RelatedOpeningElement.GlobalId for o in getattr(old, "HasOpenings", []) or []]
+ new_openings = [o.RelatedOpeningElement.GlobalId for o in getattr(new, "HasOpenings", []) or []]
+ if old_openings != new_openings:
+ return True
+ old_projections = [o.RelatedFeatureElement.GlobalId for o in getattr(old, "HasProjections", []) or []]
+ new_projections = [o.RelatedFeatureElement.GlobalId for o in getattr(new, "HasProjections", []) or []]
+ if old_projections != new_projections:
+ return True
+ old_rep_id = self.get_representation_id(old)
+ new_rep_id = self.get_representation_id(new)
+ rep_result = self.representation_ids.get(new_rep_id, None)
+ if rep_result is not None:
+ return rep_result
+ if type(old_rep_id) != type(new_rep_id):
+ self.representation_ids[new_rep_id] = True
+ return True
+ if new_rep_id is None:
+ return
+ result = self.diff_representation(old_rep_id, new_rep_id) or False
+ self.representation_ids[new_rep_id] = result
+ return result
- def diff_element_geometry(self, old_element, new_element):
+ def diff_representation(self, old_rep_id, new_rep_id):
+ old_rep = self.old.by_id(old_rep_id)
+ new_rep = self.new.by_id(new_rep_id)
+ if len(old_rep.Items) != len(new_rep.Items):
+ return True
+ for i, old_item in enumerate(old_rep.Items):
+ result = self.diff_representation_item(old_item, new_rep.Items[i])
+ if result is True:
+ return True
+
+ def diff_representation_item(self, old_item, new_item):
+ if old_item.is_a() != new_item.is_a():
+ return True
try:
- DeepDiff(
- old_element.ObjectPlacement,
- new_element.ObjectPlacement,
- terminate_on_first=True,
- significant_digits=self.precision,
- ignore_string_type_changes=True,
- ignore_numeric_type_changes=True,
- exclude_regex_paths=r"root.*id$",
- )
- DeepDiff(
- old_element.Representation,
- new_element.Representation,
- terminate_on_first=True,
- skip_after_n=1000, # Arbitrary value to "skim" check
- significant_digits=self.precision,
- ignore_string_type_changes=True,
- ignore_numeric_type_changes=True,
- exclude_regex_paths=r"root.*id$",
- )
- DeepDiff(
- old_element.HasOpenings,
- new_element.HasOpenings,
- terminate_on_first=True,
- significant_digits=self.precision,
- ignore_string_type_changes=True,
- ignore_numeric_type_changes=True,
- exclude_regex_paths=r"root.*id$",
- )
- DeepDiff(
- old_element.HasProjections,
- new_element.HasProjections,
- terminate_on_first=True,
- significant_digits=self.precision,
- ignore_string_type_changes=True,
- ignore_numeric_type_changes=True,
- exclude_regex_paths=r"root.*id$",
+ diff = DeepDiff(
+ old_item.get_info_2(recursive=True),
+ new_item.get_info_2(recursive=True),
+ custom_operators=[DiffTerminator()] if self.is_shallow else [],
+ math_epsilon=self.precision,
+ exclude_regex_paths=[r".*id']$"]
)
except:
- if new_element.GlobalId:
- return self.change_register.setdefault(new_element.GlobalId, {}).update({"has_geometry_change": True})
+ return True
+ if diff:
+ return True
def get_representation_id(self, element):
if not element.Representation:
- return None
+ return
for representation in element.Representation.Representations:
if not representation.is_a("IfcShapeRepresentation"):
continue
@@ -213,6 +240,15 @@ class IfcDiff:
return representation.Items[0].MappingSource.MappedRepresentation.id()
+class DiffTerminator:
+ def match(self, level) -> bool:
+ return True
+
+ def give_up_diffing(self, level, diff_instance) -> bool:
+ if any(diff_instance.tree.values()):
+ raise Exception("Terminated")
+
+
class DiffEncoder(json.JSONEncoder):
def default(self, obj):
try:
@@ -232,7 +268,7 @@ if __name__ == "__main__":
"-r",
"--relationships",
type=str,
- help='A list of IFC classes to check in inverse relationships, like "IfcRelDefinesByProperties", or "all".',
+ help='A list of space-separated relationships, chosen from "type", "property", "container", "aggregate", "classification"',
default="",
)
args = parser.parse_args()
diff --git a/src/ifcgeom_schema_agnostic/IteratorImplementation.cpp b/src/ifcgeom_schema_agnostic/IteratorImplementation.cpp
index 1bea4fc73d..07c7819635 100644
--- a/src/ifcgeom_schema_agnostic/IteratorImplementation.cpp
+++ b/src/ifcgeom_schema_agnostic/IteratorImplementation.cpp
@@ -1,55 +1,30 @@
#include "IteratorImplementation.h"
+#include
+#include
#include
+// Declares the schema-based external iterator initialization routines:
+// - extern void init_IteratorImplementation_Ifc2x3(IteratorFactoryImplementation*);
+// - ...
+#define EXTERNAL_DEFS(r, data, elem) \
+ extern void BOOST_PP_CAT(init_IteratorImplementation_Ifc, elem)(IteratorFactoryImplementation*);
+
+// Declares the schema-based external iterator initialization routines:
+// - init_IteratorImplementation_Ifc2x3(this);
+// - ...
+#define CALL_DEFS(r, data, elem) \
+ BOOST_PP_CAT(init_IteratorImplementation_Ifc, elem)(this);
+
IFC_GEOM_API IteratorFactoryImplementation& iterator_implementations() {
static IteratorFactoryImplementation impl;
return impl;
}
-#ifdef HAS_SCHEMA_2x3
-extern void init_IteratorImplementation_Ifc2x3(IteratorFactoryImplementation*);
-#endif
-
-#ifdef HAS_SCHEMA_4
-extern void init_IteratorImplementation_Ifc4(IteratorFactoryImplementation*);
-#endif
-
-#ifdef HAS_SCHEMA_4x1
-extern void init_IteratorImplementation_Ifc4x1(IteratorFactoryImplementation*);
-#endif
-
-#ifdef HAS_SCHEMA_4x2
-extern void init_IteratorImplementation_Ifc4x2(IteratorFactoryImplementation*);
-#endif
-
-#ifdef HAS_SCHEMA_4x3_rc1
-extern void init_IteratorImplementation_Ifc4x3_rc1(IteratorFactoryImplementation*);
-#endif
-
-#ifdef HAS_SCHEMA_4x3_rc2
-extern void init_IteratorImplementation_Ifc4x3_rc2(IteratorFactoryImplementation*);
-#endif
+BOOST_PP_SEQ_FOR_EACH(EXTERNAL_DEFS, , SCHEMA_SEQ)
IteratorFactoryImplementation::IteratorFactoryImplementation() {
-#ifdef HAS_SCHEMA_2x3
- init_IteratorImplementation_Ifc2x3(this);
-#endif
-#ifdef HAS_SCHEMA_4
- init_IteratorImplementation_Ifc4(this);
-#endif
-#ifdef HAS_SCHEMA_4x1
- init_IteratorImplementation_Ifc4x1(this);
-#endif
-#ifdef HAS_SCHEMA_4x2
- init_IteratorImplementation_Ifc4x2(this);
-#endif
-#ifdef HAS_SCHEMA_4x3_rc1
- init_IteratorImplementation_Ifc4x3_rc1(this);
-#endif
-#ifdef HAS_SCHEMA_4x3_rc2
- init_IteratorImplementation_Ifc4x3_rc2(this);
-#endif
+ BOOST_PP_SEQ_FOR_EACH(CALL_DEFS, , SCHEMA_SEQ)
}
void IteratorFactoryImplementation::bind(const std::string& schema_name, iterator_fn fn) {
diff --git a/src/ifcgeom_schema_agnostic/Kernel.cpp b/src/ifcgeom_schema_agnostic/Kernel.cpp
index 385979c555..50c9689ada 100644
--- a/src/ifcgeom_schema_agnostic/Kernel.cpp
+++ b/src/ifcgeom_schema_agnostic/Kernel.cpp
@@ -5,6 +5,9 @@
#include
#include
+#include
+#include
+
IfcGeom::Kernel::Kernel(IfcParse::IfcFile* file) {
if (file != 0) {
if (file->schema() == 0) {
@@ -48,44 +51,22 @@ IfcGeom::impl::KernelFactoryImplementation& IfcGeom::impl::kernel_implementation
return impl;
}
-#ifdef HAS_SCHEMA_2x3
-extern void init_KernelImplementation_Ifc2x3(IfcGeom::impl::KernelFactoryImplementation*);
-#endif
-#ifdef HAS_SCHEMA_4
-extern void init_KernelImplementation_Ifc4(IfcGeom::impl::KernelFactoryImplementation*);
-#endif
-#ifdef HAS_SCHEMA_4x1
-extern void init_KernelImplementation_Ifc4x1(IfcGeom::impl::KernelFactoryImplementation*);
-#endif
-#ifdef HAS_SCHEMA_4x2
-extern void init_KernelImplementation_Ifc4x2(IfcGeom::impl::KernelFactoryImplementation*);
-#endif
-#ifdef HAS_SCHEMA_4x3_rc1
-extern void init_KernelImplementation_Ifc4x3_rc1(IfcGeom::impl::KernelFactoryImplementation*);
-#endif
-#ifdef HAS_SCHEMA_4x3_rc2
-extern void init_KernelImplementation_Ifc4x3_rc2(IfcGeom::impl::KernelFactoryImplementation*);
-#endif
+// Declares the schema-based external kernel initialization routines:
+// - extern void init_KernelImplementation_Ifc2x3(IfcGeom::impl::KernelFactoryImplementation*);
+// - ...
+#define EXTERNAL_DEFS(r, data, elem) \
+ extern void BOOST_PP_CAT(init_KernelImplementation_Ifc, elem)(IfcGeom::impl::KernelFactoryImplementation*);
+
+// Declares the schema-based external iterator initialization routines:
+// - init_IteratorImplementation_Ifc2x3(this);
+// - ...
+#define CALL_DEFS(r, data, elem) \
+ BOOST_PP_CAT(init_KernelImplementation_Ifc, elem)(this);
+
+BOOST_PP_SEQ_FOR_EACH(EXTERNAL_DEFS, , SCHEMA_SEQ)
IfcGeom::impl::KernelFactoryImplementation::KernelFactoryImplementation() {
-#ifdef HAS_SCHEMA_2x3
- init_KernelImplementation_Ifc2x3(this);
-#endif
-#ifdef HAS_SCHEMA_4
- init_KernelImplementation_Ifc4(this);
-#endif
-#ifdef HAS_SCHEMA_4x1
- init_KernelImplementation_Ifc4x1(this);
-#endif
-#ifdef HAS_SCHEMA_4x2
- init_KernelImplementation_Ifc4x2(this);
-#endif
-#ifdef HAS_SCHEMA_4x3_rc1
- init_KernelImplementation_Ifc4x3_rc1(this);
-#endif
-#ifdef HAS_SCHEMA_4x3_rc2
- init_KernelImplementation_Ifc4x3_rc2(this);
-#endif
+ BOOST_PP_SEQ_FOR_EACH(CALL_DEFS, , SCHEMA_SEQ)
}
void IfcGeom::impl::KernelFactoryImplementation::bind(const std::string& schema_name, IfcGeom::impl::kernel_fn fn) {
@@ -155,6 +136,20 @@ IfcSchema::IfcObjectDefinition* get_decomposing_entity_impl(IfcSchema::IfcProduc
return parent; \
}
+#define GET_RELATINGOBJECT_IFC4_VARIANT(IfcSchema) \
+ \
+IfcUtil::IfcBaseEntity* get_RelatingObject(IfcSchema::IfcRelDecomposes* decompose) { \
+ IfcSchema::IfcRelAggregates* aggr = decompose->as(); \
+ if (aggr != nullptr) { \
+ return aggr->RelatingObject(); \
+ } \
+ IfcSchema::IfcRelNests* nest = decompose->as(); \
+ if (nest != nullptr) { \
+ return nest->RelatingObject(); \
+ } \
+ return nullptr; \
+}
+
namespace {
#ifdef HAS_SCHEMA_2x3
@@ -165,113 +160,59 @@ namespace {
#endif
#ifdef HAS_SCHEMA_4
- IfcUtil::IfcBaseEntity* get_RelatingObject(Ifc4::IfcRelDecomposes* decompose) {
- Ifc4::IfcRelAggregates* aggr = decompose->as();
- if (aggr != nullptr) {
- return aggr->RelatingObject();
- }
- Ifc4::IfcRelNests* nest = decompose->as();
- if (nest != nullptr) {
- return nest->RelatingObject();
- }
- return nullptr;
- }
+ GET_RELATINGOBJECT_IFC4_VARIANT(Ifc4);
CREATE_GET_DECOMPOSING_ENTITY(Ifc4);
#endif
#ifdef HAS_SCHEMA_4x1
- IfcUtil::IfcBaseEntity* get_RelatingObject(Ifc4x1::IfcRelDecomposes* decompose) {
- Ifc4x1::IfcRelAggregates* aggr = decompose->as();
- if (aggr != nullptr) {
- return aggr->RelatingObject();
- }
- Ifc4x1::IfcRelNests* nest = decompose->as();
- if (nest != nullptr) {
- return nest->RelatingObject();
- }
- return nullptr;
- }
+ GET_RELATINGOBJECT_IFC4_VARIANT(Ifc4x1);
CREATE_GET_DECOMPOSING_ENTITY(Ifc4x1);
#endif
#ifdef HAS_SCHEMA_4x2
- IfcUtil::IfcBaseEntity* get_RelatingObject(Ifc4x2::IfcRelDecomposes* decompose) {
- Ifc4x2::IfcRelAggregates* aggr = decompose->as();
- if (aggr != nullptr) {
- return aggr->RelatingObject();
- }
- Ifc4x2::IfcRelNests* nest = decompose->as();
- if (nest != nullptr) {
- return nest->RelatingObject();
- }
- return nullptr;
- }
+ GET_RELATINGOBJECT_IFC4_VARIANT(Ifc4x2);
CREATE_GET_DECOMPOSING_ENTITY(Ifc4x2);
#endif
#ifdef HAS_SCHEMA_4x3_rc1
- IfcUtil::IfcBaseEntity* get_RelatingObject(Ifc4x3_rc1::IfcRelDecomposes* decompose) {
- Ifc4x3_rc1::IfcRelAggregates* aggr = decompose->as();
- if (aggr != nullptr) {
- return aggr->RelatingObject();
- }
- Ifc4x3_rc1::IfcRelNests* nest = decompose->as();
- if (nest != nullptr) {
- return nest->RelatingObject();
- }
- return nullptr;
- }
+ GET_RELATINGOBJECT_IFC4_VARIANT(Ifc4x3_rc1);
CREATE_GET_DECOMPOSING_ENTITY(Ifc4x3_rc1);
#endif
#ifdef HAS_SCHEMA_4x3_rc2
- IfcUtil::IfcBaseEntity* get_RelatingObject(Ifc4x3_rc2::IfcRelDecomposes* decompose) {
- Ifc4x3_rc2::IfcRelAggregates* aggr = decompose->as();
- if (aggr != nullptr) {
- return aggr->RelatingObject();
- }
- Ifc4x3_rc2::IfcRelNests* nest = decompose->as();
- if (nest != nullptr) {
- return nest->RelatingObject();
- }
- return nullptr;
- }
+ GET_RELATINGOBJECT_IFC4_VARIANT(Ifc4x3_rc2);
CREATE_GET_DECOMPOSING_ENTITY(Ifc4x3_rc2);
#endif
+#ifdef HAS_SCHEMA_4x3_rc3
+ GET_RELATINGOBJECT_IFC4_VARIANT(Ifc4x3_rc3);
+ CREATE_GET_DECOMPOSING_ENTITY(Ifc4x3_rc3);
+#endif
+
+#ifdef HAS_SCHEMA_4x3_rc4
+ GET_RELATINGOBJECT_IFC4_VARIANT(Ifc4x3_rc4);
+ CREATE_GET_DECOMPOSING_ENTITY(Ifc4x3_rc4);
+#endif
+
+#ifdef HAS_SCHEMA_4x3
+ GET_RELATINGOBJECT_IFC4_VARIANT(Ifc4x3);
+ CREATE_GET_DECOMPOSING_ENTITY(Ifc4x3);
+#endif
}
+// Declares the schema-based IfcProduct check:
+// - if (inst->as()) { ... }
+// - ...
+#define IFCPROCUCT_CHECK(r, data, elem) \
+ if (inst->as()) { return get_decomposing_entity_impl(inst->as(), include_openings); }
+
+#define GET_LAYERS(r, data, elem) \
+ if (inst->as()) { return get_layers_impl(inst->as()); }
+
+
IfcUtil::IfcBaseEntity* IfcGeom::Kernel::get_decomposing_entity(IfcUtil::IfcBaseEntity* inst, bool include_openings) {
-#ifdef HAS_SCHEMA_2x3
- if (inst->as()) {
- return get_decomposing_entity_impl(inst->as(), include_openings);
- }
-#endif
-#ifdef HAS_SCHEMA_4
- if (inst->as()) {
- return get_decomposing_entity_impl(inst->as(), include_openings);
- }
-#endif
-#ifdef HAS_SCHEMA_4x1
- if (inst->as()) {
- return get_decomposing_entity_impl(inst->as(), include_openings);
- }
-#endif
-#ifdef HAS_SCHEMA_4x2
- if (inst->as()) {
- return get_decomposing_entity_impl(inst->as(), include_openings);
- }
-#endif
-#ifdef HAS_SCHEMA_4x3_rc1
- if (inst->as()) {
- return get_decomposing_entity_impl(inst->as(), include_openings);
- }
-#endif
-#ifdef HAS_SCHEMA_4x3_rc2
- if (inst->as()) {
- return get_decomposing_entity_impl(inst->as(), include_openings);
- }
-#endif
+ BOOST_PP_SEQ_FOR_EACH(IFCPROCUCT_CHECK, , SCHEMA_SEQ)
+
if (inst->declaration().name() == "IfcProject") {
return nullptr;
}
@@ -298,36 +239,7 @@ namespace {
}
std::map IfcGeom::Kernel::get_layers(IfcUtil::IfcBaseEntity* inst) {
-#ifdef HAS_SCHEMA_2x3
- if (inst->as()) {
- return get_layers_impl(inst->as());
- }
-#endif
-#ifdef HAS_SCHEMA_4
- if (inst->as()) {
- return get_layers_impl(inst->as());
- }
-#endif
-#ifdef HAS_SCHEMA_4x1
- if (inst->as()) {
- return get_layers_impl(inst->as());
- }
-#endif
-#ifdef HAS_SCHEMA_4x2
- if (inst->as()) {
- return get_layers_impl(inst->as());
- }
-#endif
-#ifdef HAS_SCHEMA_4x3_rc1
- if (inst->as()) {
- return get_layers_impl(inst->as());
- }
-#endif
-#ifdef HAS_SCHEMA_4x3_rc2
- if (inst->as()) {
- return get_layers_impl(inst->as());
- }
-#endif
+ BOOST_PP_SEQ_FOR_EACH(GET_LAYERS, , SCHEMA_SEQ)
throw IfcParse::IfcException("Unexpected entity " + inst->declaration().name());
}
diff --git a/src/ifcgeom_schema_agnostic/Kernel.h b/src/ifcgeom_schema_agnostic/Kernel.h
index 4d961cded0..efbbcec73f 100644
--- a/src/ifcgeom_schema_agnostic/Kernel.h
+++ b/src/ifcgeom_schema_agnostic/Kernel.h
@@ -5,30 +5,31 @@
#include "../ifcgeom_schema_agnostic/IfcGeomIteratorSettings.h"
#include "../ifcgeom_schema_agnostic/IfcRepresentationShapeItem.h"
-#ifdef HAS_SCHEMA_2x3
-#include "../ifcparse/Ifc2x3.h"
-#endif
-#ifdef HAS_SCHEMA_4
-#include "../ifcparse/Ifc4.h"
-#endif
-#ifdef HAS_SCHEMA_4x1
-#include "../ifcparse/Ifc4x1.h"
-#endif
-#ifdef HAS_SCHEMA_4x2
-#include "../ifcparse/Ifc4x2.h"
-#endif
-#ifdef HAS_SCHEMA_4x3_rc1
-#include "../ifcparse/Ifc4x3_rc1.h"
-#endif
-#ifdef HAS_SCHEMA_4x3_rc2
-#include "../ifcparse/Ifc4x3_rc2.h"
-#endif
-#ifdef HAS_SCHEMA_4x3_rc3
-#include "../ifcparse/Ifc4x3_rc3.h"
-#endif
-#ifdef HAS_SCHEMA_4x3_rc4
-#include "../ifcparse/Ifc4x3_rc4.h"
-#endif
+#include
+#include
+#include
+#include
+#include
+
+
+// @tfk A macro cannot define an include (I think), so here we can't
+// loop over the sequence of schema identifiers, but rather we have
+// unroll the loop with at least the amount of schemas we'd like support
+// for and then overflow into an existing empty include file.
+
+#define INCLUDE_SCHEMA(n) \
+ BOOST_PP_IIF(BOOST_PP_GREATER(BOOST_PP_SEQ_SIZE(SCHEMA_SEQ), n), BOOST_PP_STRINGIZE(../ifcparse/BOOST_PP_CAT(Ifc,BOOST_PP_SEQ_ELEM(BOOST_PP_MIN(n, BOOST_PP_SEQ_SIZE(BOOST_PP_SEQ_POP_BACK(SCHEMA_SEQ))),SCHEMA_SEQ)).h), "empty.h")
+
+#include INCLUDE_SCHEMA(0)
+#include INCLUDE_SCHEMA(1)
+#include INCLUDE_SCHEMA(2)
+#include INCLUDE_SCHEMA(3)
+#include INCLUDE_SCHEMA(4)
+#include INCLUDE_SCHEMA(5)
+#include INCLUDE_SCHEMA(6)
+#include INCLUDE_SCHEMA(7)
+#include INCLUDE_SCHEMA(8)
+#include INCLUDE_SCHEMA(9)
#include
diff --git a/src/ifcgeom_schema_agnostic/Serialization.cpp b/src/ifcgeom_schema_agnostic/Serialization.cpp
index 11efb997f1..089e9b24d7 100644
--- a/src/ifcgeom_schema_agnostic/Serialization.cpp
+++ b/src/ifcgeom_schema_agnostic/Serialization.cpp
@@ -2,143 +2,53 @@
#include
+#include
+#include
+#include
+
+#define EXTERNAL_DEFS_1(r, data, elem) \
+ IfcUtil::IfcBaseClass* BOOST_PP_CAT(tesselate_Ifc, elem)(const TopoDS_Shape& shape, double deflection);
+
+#define EXTERNAL_DEFS_2(r, data, elem) \
+ IfcUtil::IfcBaseClass* BOOST_PP_CAT(serialise_Ifc, elem)(const TopoDS_Shape& shape, bool advanced);
+
+#define CONDITIONAL_CALL(r, data, elem) \
+ if (schema_name_lower == BOOST_PP_STRINGIZE(BOOST_PP_CAT(elem,))) { \
+ return BOOST_PP_CAT(METHOD_NAME, elem)(shape, arg_2); \
+ }
+
namespace IfcGeom {
-#ifdef HAS_SCHEMA_2x3
- extern IfcUtil::IfcBaseClass* tesselate_Ifc2x3(const TopoDS_Shape& shape, double deflection);
- extern IfcUtil::IfcBaseClass* serialise_Ifc2x3(const TopoDS_Shape& shape, bool advanced);
-#endif
-
-#ifdef HAS_SCHEMA_4
- extern IfcUtil::IfcBaseClass* tesselate_Ifc4(const TopoDS_Shape& shape, double deflection);
- extern IfcUtil::IfcBaseClass* serialise_Ifc4(const TopoDS_Shape& shape, bool advanced);
-#endif
-
-#ifdef HAS_SCHEMA_4x1
- extern IfcUtil::IfcBaseClass* tesselate_Ifc4x1(const TopoDS_Shape& shape, double deflection);
- extern IfcUtil::IfcBaseClass* serialise_Ifc4x1(const TopoDS_Shape& shape, bool advanced);
-#endif
-
-#ifdef HAS_SCHEMA_4x2
- extern IfcUtil::IfcBaseClass* tesselate_Ifc4x2(const TopoDS_Shape& shape, double deflection);
- extern IfcUtil::IfcBaseClass* serialise_Ifc4x2(const TopoDS_Shape& shape, bool advanced);
-#endif
-
-#ifdef HAS_SCHEMA_4x3_rc1
- extern IfcUtil::IfcBaseClass* tesselate_Ifc4x3_rc1(const TopoDS_Shape& shape, double deflection);
- extern IfcUtil::IfcBaseClass* serialise_Ifc4x3_rc1(const TopoDS_Shape& shape, bool advanced);
-#endif
-
-#ifdef HAS_SCHEMA_4x3_rc2
- extern IfcUtil::IfcBaseClass* tesselate_Ifc4x3_rc2(const TopoDS_Shape& shape, double deflection);
- extern IfcUtil::IfcBaseClass* serialise_Ifc4x3_rc2(const TopoDS_Shape& shape, bool advanced);
-#endif
+ BOOST_PP_SEQ_FOR_EACH(EXTERNAL_DEFS_1, , SCHEMA_SEQ);
+ BOOST_PP_SEQ_FOR_EACH(EXTERNAL_DEFS_2, , SCHEMA_SEQ);
}
-template
-IfcUtil::IfcBaseClass* execute_based_on_schema(
-#ifdef HAS_SCHEMA_2x3
- Fn fn_2x3,
-#endif
-#ifdef HAS_SCHEMA_4
- Fn fn_4,
-#endif
-#ifdef HAS_SCHEMA_4x1
- Fn fn_4x1,
-#endif
-#ifdef HAS_SCHEMA_4x2
- Fn fn_4x2,
-#endif
-#ifdef HAS_SCHEMA_4x3_rc1
- Fn fn_4x3_rc1,
-#endif
-#ifdef HAS_SCHEMA_4x3_rc2
- Fn fn_4x3_rc2,
-#endif
- const std::string& schema_name, const TopoDS_Shape& shape, T t)
-{
+#define METHOD_NAME tesselate_Ifc
+
+IfcUtil::IfcBaseClass* IfcGeom::tesselate(const std::string& schema_name, const TopoDS_Shape& shape, double arg_2) {
// @todo an ugly hack to guarantee schemas are initialised.
try {
IfcParse::schema_by_name("IFC2X3");
} catch (IfcParse::IfcException&) {}
- const std::string schema_name_lower = boost::to_lower_copy(schema_name);
+ const std::string schema_name_lower = boost::to_lower_copy(schema_name.substr(3));
-#ifdef HAS_SCHEMA_2x3
- if (schema_name_lower == "ifc2x3") {
- return fn_2x3(shape, t);
- }
-#endif
-#ifdef HAS_SCHEMA_4
- if (schema_name_lower == "ifc4") {
- return fn_4(shape, t);
- }
-#endif
-#ifdef HAS_SCHEMA_4x1
- if (schema_name_lower == "ifc4x1") {
- return fn_4x1(shape, t);
- }
-#endif
-#ifdef HAS_SCHEMA_4x2
- if (schema_name_lower == "ifc4x2") {
- return fn_4x2(shape, t);
- }
-#endif
-#ifdef HAS_SCHEMA_4x3_rc1
- if (schema_name_lower == "ifc4x3_rc1") {
- return fn_4x3_rc1(shape, t);
- }
-#endif
-#ifdef HAS_SCHEMA_4x3_rc2
- if (schema_name_lower == "ifc4x3_rc2") {
- return fn_4x3_rc2(shape, t);
- }
-#endif
+ BOOST_PP_SEQ_FOR_EACH(CONDITIONAL_CALL, , SCHEMA_SEQ);
throw IfcParse::IfcException("No geometry serialization available for " + schema_name);
}
-IfcUtil::IfcBaseClass* IfcGeom::tesselate(const std::string& schema_name, const TopoDS_Shape& shape, double deflection) {
- return execute_based_on_schema(
-#ifdef HAS_SCHEMA_2x3
- IfcGeom::tesselate_Ifc2x3,
-#endif
-#ifdef HAS_SCHEMA_4
- IfcGeom::tesselate_Ifc4,
-#endif
-#ifdef HAS_SCHEMA_4x1
- IfcGeom::tesselate_Ifc4x1,
-#endif
-#ifdef HAS_SCHEMA_4x2
- IfcGeom::tesselate_Ifc4x2,
-#endif
-#ifdef HAS_SCHEMA_4x3_rc1
- IfcGeom::tesselate_Ifc4x3_rc1,
-#endif
-#ifdef HAS_SCHEMA_4x3_rc2
- IfcGeom::tesselate_Ifc4x3_rc2,
-#endif
- schema_name, shape, deflection);
-}
+#undef METHOD_NAME
+#define METHOD_NAME serialise_Ifc
-IfcUtil::IfcBaseClass* IfcGeom::serialise(const std::string& schema_name, const TopoDS_Shape& shape, bool advanced) {
- return execute_based_on_schema(
-#ifdef HAS_SCHEMA_2x3
- IfcGeom::serialise_Ifc2x3,
-#endif
-#ifdef HAS_SCHEMA_4
- IfcGeom::serialise_Ifc4,
-#endif
-#ifdef HAS_SCHEMA_4x1
- IfcGeom::serialise_Ifc4x1,
-#endif
-#ifdef HAS_SCHEMA_4x2
- IfcGeom::serialise_Ifc4x2,
-#endif
-#ifdef HAS_SCHEMA_4x3_rc1
- IfcGeom::serialise_Ifc4x3_rc1,
-#endif
-#ifdef HAS_SCHEMA_4x3_rc2
- IfcGeom::serialise_Ifc4x3_rc2,
-#endif
- schema_name, shape, advanced);
+IfcUtil::IfcBaseClass* IfcGeom::serialise(const std::string& schema_name, const TopoDS_Shape& shape, bool arg_2) {
+ // @todo an ugly hack to guarantee schemas are initialised.
+ try {
+ IfcParse::schema_by_name("IFC2X3");
+ } catch (IfcParse::IfcException&) {}
+
+ const std::string schema_name_lower = boost::to_lower_copy(schema_name.substr(3));
+
+ BOOST_PP_SEQ_FOR_EACH(CONDITIONAL_CALL, , SCHEMA_SEQ);
+
+ throw IfcParse::IfcException("No geometry serialization available for " + schema_name);
}
\ No newline at end of file
diff --git a/src/ifcgeom_schema_agnostic/empty.h b/src/ifcgeom_schema_agnostic/empty.h
new file mode 100644
index 0000000000..85b3761c34
--- /dev/null
+++ b/src/ifcgeom_schema_agnostic/empty.h
@@ -0,0 +1,2 @@
+// A purposely empty file so that the unrolled loop
+// can overflow into an existing empty include file.
\ No newline at end of file
diff --git a/src/ifcopenshell-python/ifcopenshell/api/classification/add_classification.py b/src/ifcopenshell-python/ifcopenshell/api/classification/add_classification.py
index 195d09e614..57e8fe5c4a 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/classification/add_classification.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/classification/add_classification.py
@@ -1,5 +1,5 @@
# IfcOpenShell - IFC toolkit and geometry engine
-# Copyright (C) 2021 Dion Moult
+# Copyright (C) 2021, 2022 Dion Moult
#
# This file is part of IfcOpenShell.
#
@@ -31,6 +31,13 @@ class Usecase:
self.settings[key] = value
def execute(self):
+ if isinstance(self.settings["classification"], str):
+ classification = self.file.createIfcClassification(Name=self.settings["classification"])
+ self.relate_to_project(classification)
+ return classification
+ return self.add_from_library()
+
+ def add_from_library(self):
edition_date = None
if self.settings["classification"].EditionDate:
edition_date = ifcopenshell.util.date.ifc2datetime(self.settings["classification"].EditionDate)
@@ -47,17 +54,20 @@ class Usecase:
else:
result.EditionDate = ifcopenshell.util.date.datetime2ifc(edition_date, "IfcDate")
- self.file.create_entity(
- "IfcRelAssociatesClassification",
- **{
- "GlobalId": ifcopenshell.guid.new(),
- "RelatedObjects": [self.file.by_type("IfcProject")[0]],
- "RelatingClassification": result,
- }
- )
+ self.relate_to_project(result)
+
return result # See bug #1272
+
try:
result = self.file.add(self.settings["classification"])
except:
migrator = ifcopenshell.util.schema.Migrator()
result = migrator.migrate(self.settings["classification"], self.file)
+
+ def relate_to_project(self, classification):
+ self.file.create_entity(
+ "IfcRelAssociatesClassification",
+ GlobalId=ifcopenshell.guid.new(),
+ RelatedObjects=[self.file.by_type("IfcProject")[0]],
+ RelatingClassification=classification,
+ )
diff --git a/src/ifcopenshell-python/ifcopenshell/api/classification/add_reference.py b/src/ifcopenshell-python/ifcopenshell/api/classification/add_reference.py
index 0d271ec135..bd73c4b39d 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/classification/add_reference.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/classification/add_reference.py
@@ -26,6 +26,8 @@ class Usecase:
self.settings = {
"product": None,
"reference": None,
+ "identification": None,
+ "name": None,
"classification": None,
"is_lightweight": True,
}
@@ -33,29 +35,36 @@ class Usecase:
self.settings[key] = value
def execute(self):
- relating_classification = None
+ if self.settings["reference"]:
+ return self.add_from_library()
+ return self.add_from_identification()
+ def add_from_identification(self):
+ reference = self.get_existing_reference(self.settings["identification"])
+ if reference:
+ self.add_to_existing_relationship(reference)
+ else:
+ reference = self.file.createIfcClassificationReference(
+ Name=self.settings["name"], ReferencedSource=self.settings["classification"]
+ )
+ if self.file.schema == "IFC2X3":
+ reference.ItemReference = self.settings["identification"]
+ else:
+ reference.Identification = self.settings["identification"]
+ self.add_new_relationship(reference)
+ return reference
+
+ def add_from_library(self):
if hasattr(self.settings["reference"], "ItemReference"):
identification = self.settings["reference"].ItemReference # IFC2X3
else:
identification = self.settings["reference"].Identification
- for reference in self.file.by_type("IfcClassificationReference"):
- if self.file.schema == "IFC2X3":
- if reference.ItemReference == identification:
- relating_classification = reference
- break
- else:
- if reference.Identification == identification:
- relating_classification = reference
- break
+ reference = self.get_existing_reference(identification)
- if relating_classification:
- association = self.get_association(relating_classification)
- related_objects = set(association.RelatedObjects)
- related_objects.add(self.settings["product"])
- association.RelatedObjects = list(related_objects)
- return
+ if reference:
+ self.add_to_existing_relationship(reference)
+ return reference
migrator = ifcopenshell.util.schema.Migrator()
@@ -67,31 +76,46 @@ class Usecase:
c for c in self.file.by_type("IfcClassification") if c.Name == self.settings["classification"].Name
]
- relating_classification = migrator.migrate(self.settings["reference"], self.file)
+ reference = migrator.migrate(self.settings["reference"], self.file)
if self.settings["is_lightweight"]:
- relating_classification.ReferencedSource = self.settings["classification"]
+ reference.ReferencedSource = self.settings["classification"]
self.settings["reference"].ReferencedSource = old_referenced_source
elif existing_classification:
to_delete = set()
- for traversed_reference in self.file.traverse(relating_classification):
+ for traversed_reference in self.file.traverse(reference):
if traversed_reference.ReferencedSource.is_a("IfcClassification"):
to_delete.add(traversed_reference.ReferencedSource)
traversed_reference.ReferencedSource = existing_classification[0]
break
for element in to_delete:
self.file.remove(element)
+ self.add_new_relationship(reference)
+ def get_existing_reference(self, identification):
+ for reference in self.file.by_type("IfcClassificationReference"):
+ if self.file.schema == "IFC2X3":
+ if reference.ItemReference == identification:
+ return reference
+ else:
+ if reference.Identification == identification:
+ return reference
+
+ def add_new_relationship(self, reference):
self.file.create_entity(
"IfcRelAssociatesClassification",
- **{
- "GlobalId": ifcopenshell.guid.new(),
- "RelatedObjects": [self.settings["product"]],
- "RelatingClassification": relating_classification,
- }
+ GlobalId=ifcopenshell.guid.new(),
+ RelatedObjects=[self.settings["product"]],
+ RelatingClassification=reference,
)
- def get_association(self, reference):
+ def add_to_existing_relationship(self, reference):
+ rel = self.get_rel_associates_classification(reference)
+ related_objects = set(rel.RelatedObjects)
+ related_objects.add(self.settings["product"])
+ rel.RelatedObjects = list(related_objects)
+
+ def get_rel_associates_classification(self, reference):
if self.file.schema == "IFC2X3":
for association in self.file.by_type("IfcRelAssociatesClassification"):
if association.RelatingClassification == reference:
diff --git a/src/ifcopenshell-python/ifcopenshell/api/classification/remove_reference.py b/src/ifcopenshell-python/ifcopenshell/api/classification/remove_reference.py
index 860ad34383..86f2995938 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/classification/remove_reference.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/classification/remove_reference.py
@@ -16,8 +16,6 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import ifcopenshell.util.schema
-
class Usecase:
def __init__(self, file, **settings):
diff --git a/src/ifcopenshell-python/ifcopenshell/api/group/add_group.py b/src/ifcopenshell-python/ifcopenshell/api/group/add_group.py
index 6a4ebfc2f5..4014fbae97 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/group/add_group.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/group/add_group.py
@@ -23,7 +23,10 @@ import ifcopenshell.api
class Usecase:
def __init__(self, file, **settings):
self.file = file
- self.settings = {}
+ self.settings = {
+ "Name": "Unnamed",
+ "Description": "",
+ }
for key, value in settings.items():
self.settings[key] = value
@@ -33,6 +36,7 @@ class Usecase:
**{
"GlobalId": ifcopenshell.guid.new(),
"OwnerHistory": ifcopenshell.api.run("owner.create_owner_history", self.file),
- "Name": "Unnamed",
+ "Name": self.settings["Name"],
+ "Description": self.settings["Description"],
}
)
diff --git a/src/ifcopenshell-python/ifcopenshell/api/group/assign_group.py b/src/ifcopenshell-python/ifcopenshell/api/group/assign_group.py
index b8cdea2d9f..0318caba09 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/group/assign_group.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/group/assign_group.py
@@ -37,12 +37,13 @@ class Usecase:
**{
"GlobalId": ifcopenshell.guid.new(),
"OwnerHistory": ifcopenshell.api.run("owner.create_owner_history", self.file),
- "RelatedObjects": [self.settings["product"]],
+ "RelatedObjects": self.settings["product"],
"RelatingGroup": self.settings["group"],
}
)
rel = self.settings["group"].IsGroupedBy[0]
related_objects = set(rel.RelatedObjects) or set()
- related_objects.add(self.settings["product"])
+ for obj in self.settings["product"]:
+ related_objects.add(obj)
rel.RelatedObjects = list(related_objects)
ifcopenshell.api.run("owner.update_owner_history", self.file, **{"element": rel})
diff --git a/src/ifcopenshell-python/ifcopenshell/api/group/data.py b/src/ifcopenshell-python/ifcopenshell/api/group/data.py
index bce76c6a59..ccf548b0ad 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/group/data.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/group/data.py
@@ -38,6 +38,8 @@ class Data:
for product in rel.RelatedObjects:
cls.products.setdefault(product.id(), []).append(group.id())
data = group.get_info()
+ data["HasAssignments"] = group.HasAssignments
+ data["IsGroupedBy"] = group.IsGroupedBy
del data["OwnerHistory"]
cls.groups[group.id()] = data
cls.is_loaded = True
diff --git a/src/ifcopenshell-python/ifcopenshell/api/group/edit_group.py b/src/ifcopenshell-python/ifcopenshell/api/group/edit_group.py
index a47d571ca6..2851b85029 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/group/edit_group.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/group/edit_group.py
@@ -20,7 +20,8 @@
class Usecase:
def __init__(self, file, **settings):
self.file = file
- self.settings = {"group": None, "attributes": {}}
+ self.settings = {
+ "group": None, "attributes": {}}
for key, value in settings.items():
self.settings[key] = value
diff --git a/src/ifcopenshell-python/ifcopenshell/api/group/update_group_products.py b/src/ifcopenshell-python/ifcopenshell/api/group/update_group_products.py
new file mode 100644
index 0000000000..e8133a28b7
--- /dev/null
+++ b/src/ifcopenshell-python/ifcopenshell/api/group/update_group_products.py
@@ -0,0 +1,52 @@
+# IfcOpenShell - IFC toolkit and geometry engine
+# Copyright (C) 2021 Dion Moult
+#
+# This file is part of IfcOpenShell.
+#
+# IfcOpenShell is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# IfcOpenShell is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with IfcOpenShell. If not, see .
+
+import ifcopenshell
+import ifcopenshell.api
+
+
+class Usecase:
+ def __init__(self, file, **settings):
+ self.file = file
+ self.settings = {
+ "group": None,
+ "products": None,
+ }
+ for key, value in settings.items():
+ self.settings[key] = value
+
+ def execute(self):
+ if not self.settings["group"].IsGroupedBy:
+ return self.file.create_entity(
+ "IfcRelAssignsToGroup",
+ **{
+ "GlobalId": ifcopenshell.guid.new(),
+ "OwnerHistory": ifcopenshell.api.run("owner.create_owner_history", self.file),
+ "RelatedObjects": self.settings["products"],
+ "RelatingGroup": self.settings["group"],
+ }
+ )
+ else:
+ # assumes 1:1 cardinality, will need to be updated to reflect IFC4 changes
+ # where the cardinality is 0:? - vulevukusej
+ rel = self.settings["group"].IsGroupedBy[0]
+ existing_sub_groups = [g for g in rel.RelatedObjects if g.is_a("IfcGroup")]
+
+ rel.RelatedObjects = self.settings["products"]
+ for g in existing_sub_groups:
+ rel.RelatedObjects.add(g)
diff --git a/src/ifcopenshell-python/ifcopenshell/api/project/append_asset.py b/src/ifcopenshell-python/ifcopenshell/api/project/append_asset.py
index 828335c0d6..cf1b3d4cf4 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/project/append_asset.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/project/append_asset.py
@@ -51,7 +51,25 @@ class Usecase:
def append_material(self):
if [e for e in self.file.by_type("IfcMaterial") if e.Name == self.settings["element"].Name]:
return
- return self.file.add(self.settings["element"])
+ self.whitelisted_inverse_attributes = {"IfcMaterial": ["HasProperties", "HasRepresentation"]}
+ element = self.add_element(self.settings["element"])
+ if not element.HasRepresentation:
+ return element
+ self.existing_contexts = self.file.by_type("IfcGeometricRepresentationContext")
+ added_contexts = [
+ e
+ for e in self.file.traverse(element.HasRepresentation[0])
+ if e.is_a() == "IfcGeometricRepresentationSubContext"
+ ]
+ for added_context in added_contexts:
+ equivalent_existing_context = self.get_equivalent_existing_context(added_context)
+ if not equivalent_existing_context:
+ equivalent_existing_context = self.create_equivalent_context(added_context)
+ for inverse in self.file.get_inverse(added_context):
+ ifcopenshell.util.element.replace_attribute(inverse, added_context, equivalent_existing_context)
+ for added_context in added_contexts:
+ ifcopenshell.util.element.remove_deep(self.file, added_context)
+ return element
def append_cost_schedule(self):
element = self.get_existing_element()
diff --git a/src/ifcopenshell-python/ifcopenshell/api/pset/data.py b/src/ifcopenshell-python/ifcopenshell/api/pset/data.py
index 76a2d610e2..1bb3a2d73b 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/pset/data.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/pset/data.py
@@ -94,13 +94,15 @@ class Data:
elif hasattr(pset, "Properties"):
props = pset.Properties or []
# TODO: support more than single values
- data["Properties"] = [p.id() for p in props if p.is_a("IfcPropertySingleValue")]
+ data["Properties"] = [p.id() for p in props if p.is_a("IfcPropertyEnumeratedValue") or p.is_a("IfcPropertySingleValue")]
cls.psets[pset.id()] = data
cls.products[product_id]["psets"].add(pset.id())
for prop in props:
# TODO: support more than single values
if prop.is_a("IfcPropertySingleValue"):
cls.load_prop(prop)
+ elif prop.is_a("IfcPropertyEnumeratedValue"):
+ cls.load_prop_enum(prop)
@classmethod
def load_prop(cls, prop):
@@ -116,7 +118,14 @@ class Data:
# For convenience, which trumps correctness in this case
data["NominalValue"] = prop[3]
cls.properties[prop.id()] = data
-
+
+ @classmethod
+ def load_prop_enum(cls, prop):
+ data = prop.get_info()
+ enumerations = [enum.wrappedValue for enum in data["EnumerationValues"]]
+ data["NominalValue"] = str(enumerations)
+ cls.properties[prop.id()] = data
+
@classmethod
def add_qto(cls, qto, product_id):
data = qto.get_info()
diff --git a/src/ifcopenshell-python/ifcopenshell/api/pset/edit_pset.py b/src/ifcopenshell-python/ifcopenshell/api/pset/edit_pset.py
index 06a8aec31e..af30b7ae75 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/pset/edit_pset.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/pset/edit_pset.py
@@ -46,11 +46,40 @@ class Usecase:
self.psetqto = ifcopenshell.util.pset.get_template("IFC4")
self.pset_template = self.psetqto.get_by_name(self.settings["pset"].Name)
+ #TODO - Add support for changing property types?
+ # For example - IfcPropertyEnumeratedValue to
+ # IfcPropertySingleValue. Or maybe the user should
+ # just delete the property first? - vulevukusej
def update_existing_properties(self):
for prop in self.get_properties():
- self.update_existing_property(prop)
+ if prop.is_a("IfcPropertyEnumeratedValue"):
+ self.update_existing_enum(prop)
+ else:
+ self.update_existing_property(prop)
+
+ def update_existing_enum(self, prop):
+ if prop.Name not in self.settings["properties"]:
+ return
+ value = self.settings["properties"][prop.Name]
+ if isinstance(value, list):
+ sel_vals = []
+ for val in value:
+ primary_measure_type = prop.EnumerationReference.EnumerationValues[0].is_a() #Only need the first enum type since all enums are of the same type
+ ifc_val = self.file.create_entity(primary_measure_type, val)
+ sel_vals.append(ifc_val)
+ prop.EnumerationValues = tuple(sel_vals)
- def update_existing_property(self, prop):
+ else:
+ if value.EnumerationReference.EnumerationValues == ():
+ prop.EnumerationReference.EnumerationValues = ()
+ prop.EnumerationValues = ()
+
+ elif isinstance(value, ifcopenshell.entity_instance):
+ prop.EnumerationReference.EnumerationValues = value.EnumerationReference.EnumerationValues
+ prop.EnumerationValues = value.EnumerationValues
+ del self.settings["properties"][prop.Name]
+
+ def update_existing_property(self, prop):
if prop.Name not in self.settings["properties"]:
return
value = self.settings["properties"][prop.Name]
@@ -72,17 +101,45 @@ class Usecase:
if value is None:
continue
if isinstance(value, ifcopenshell.entity_instance):
- nominal_value = value
+ if value.is_a(True) == "IFC4.IfcPropertyEnumeratedValue":
+ properties.append(value)
+ continue
+ else:
+ properties.append(
+ self.file.create_entity(
+ "IfcPropertySingleValue",
+ **{"Name": name, "NominalValue": value},
+ )
+ )
+ #TODO-The following "elif" is temporary code, will need to refactor at some point - vulevukusej
+ elif isinstance(value, list):
+ for pset_template in self.settings["pset_template"].HasPropertyTemplates:
+ if pset_template.Name == name:
+ prop_enum = self.file.create_entity(
+ "IFCPROPERTYENUMERATION",
+ Name=name,
+ EnumerationValues=pset_template.Enumerators.EnumerationValues
+ )
+ prop_enum_value = self.file.create_entity(
+ "IFCPROPERTYENUMERATEDVALUE",
+ Name=name,
+ EnumerationValues=tuple(self.file.create_entity(
+ pset_template.PrimaryMeasureType, v) for v in value),
+ EnumerationReference=prop_enum
+ )
+ properties.append(prop_enum_value)
+ continue
else:
primary_measure_type = self.get_primary_measure_type(name, new_value=value)
value = self.cast_value_to_primary_measure_type(value, primary_measure_type)
nominal_value = self.file.create_entity(primary_measure_type, value)
- properties.append(
- self.file.create_entity(
- "IfcPropertySingleValue",
- **{"Name": name, "NominalValue": nominal_value},
+
+ properties.append(
+ self.file.create_entity(
+ "IfcPropertySingleValue",
+ **{"Name": name, "NominalValue": nominal_value},
+ )
)
- )
return properties
def extend_pset_with_new_properties(self, new_properties):
diff --git a/src/ifcopenshell-python/ifcopenshell/api/pset/remove_pset.py b/src/ifcopenshell-python/ifcopenshell/api/pset/remove_pset.py
index e2d663cf8f..6f2cdfec05 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/pset/remove_pset.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/pset/remove_pset.py
@@ -41,6 +41,8 @@ class Usecase:
properties = self.settings["pset"].HasProperties or []
elif self.settings["pset"].is_a("IfcQuantitySet"):
properties = self.settings["pset"].Quantities or []
+ elif self.settings["pset"].is_a() in ("IfcMaterialProperties", "IfcProfileProperties"):
+ properties = self.settings["pset"].Properties or []
for prop in properties:
self.file.remove(prop)
self.file.remove(self.settings["pset"])
diff --git a/src/ifcopenshell-python/ifcopenshell/api/pset_template/add_prop_template.py b/src/ifcopenshell-python/ifcopenshell/api/pset_template/add_prop_template.py
index 3c3d9cc334..10061e2ec3 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/pset_template/add_prop_template.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/pset_template/add_prop_template.py
@@ -35,6 +35,7 @@ class Usecase:
"PrimaryMeasureType": "IfcLabel",
"TemplateType": "P_SINGLEVALUE",
"AccessState": "READWRITE",
+ "Enumerators": None
}
)
has_property_templates = list(self.settings["pset_template"].HasPropertyTemplates or [])
diff --git a/src/ifcopenshell-python/ifcopenshell/api/pset_template/data.py b/src/ifcopenshell-python/ifcopenshell/api/pset_template/data.py
index 2a1adda379..71b255cc41 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/pset_template/data.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/pset_template/data.py
@@ -49,5 +49,7 @@ class Data:
"Name": data["Name"],
"Description": data["Description"],
"PrimaryMeasureType": data["PrimaryMeasureType"],
+ "TemplateType": data["TemplateType"],
+ "Enumerators": data["Enumerators"]
}
cls.is_loaded = True
diff --git a/src/ifcopenshell-python/ifcopenshell/api/sequence/cascade_schedule.py b/src/ifcopenshell-python/ifcopenshell/api/sequence/cascade_schedule.py
index 99fc616e33..834a32661d 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/sequence/cascade_schedule.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/sequence/cascade_schedule.py
@@ -32,7 +32,20 @@ class Usecase:
self.calendar_cache = {}
self.cascade_task(self.settings["task"], is_first_task=True)
- def cascade_task(self, task, is_first_task=False):
+ def cascade_task(self, task, is_first_task=False, task_sequence=None):
+ if task_sequence is None:
+ task_sequence = []
+
+ if task in task_sequence:
+ print("Warning! Recursive sequence is as follows:")
+ for i, debug_task in enumerate(task_sequence):
+ if i == 0:
+ print("Starting at", debug_task)
+ else:
+ print("... is a predecessor to ...", debug_task)
+ print("... which is cyclically a predecessor to ...", task)
+ raise RecursionError("Recursive tasks found. Could not cascade schedule.")
+
if not task.TaskTime:
return
@@ -170,7 +183,7 @@ class Usecase:
)
for rel in task.IsPredecessorTo:
- self.cascade_task(rel.RelatedProcess)
+ self.cascade_task(rel.RelatedProcess, task_sequence=task_sequence + [task])
def get_lag_time_days(self, lag_time):
return ifcopenshell.util.date.ifc2datetime(lag_time.LagValue.wrappedValue).days
diff --git a/src/ifcopenshell-python/ifcopenshell/api/sequence/recalculate_schedule.py b/src/ifcopenshell-python/ifcopenshell/api/sequence/recalculate_schedule.py
index 93082a39f8..257b94668c 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/sequence/recalculate_schedule.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/sequence/recalculate_schedule.py
@@ -39,14 +39,32 @@ class Usecase:
if not self.start_dates:
return
+ is_cyclic = False
+ attempts = 0
self.pending_nodes = set(self.g.nodes)
+ max_worst_case_attempts = pow(len(self.pending_nodes), 2)
while self.pending_nodes:
+ attempts += 1
remaining_nodes = set()
for pending_node in self.pending_nodes:
if not self.forward_pass(pending_node):
remaining_nodes.add(pending_node)
self.pending_nodes = remaining_nodes
+ # As we parse nodes, the remaining attempts can drop dramatically, so we recalculate the upper limit
+ max_remaining_attempts = pow(len(self.pending_nodes), 2)
+ if max_remaining_attempts < max_worst_case_attempts:
+ max_worst_case_attempts = max_remaining_attempts
+ attempts = 0
+
+ if attempts > max_worst_case_attempts:
+ is_cyclic = True
+ break # We have an infinite loop due to a cyclic graph
+
+ if is_cyclic:
+ raise RecursionError("Task graph is cyclic and so critical path method cannot be performed.")
+ return
+
self.pending_nodes = set(self.g.nodes)
while self.pending_nodes:
remaining_nodes = set()
diff --git a/src/ifcopenshell-python/ifcopenshell/express/bootstrap.py b/src/ifcopenshell-python/ifcopenshell/express/bootstrap.py
index a109f7a6bf..444033fda0 100644
--- a/src/ifcopenshell-python/ifcopenshell/express/bootstrap.py
+++ b/src/ifcopenshell-python/ifcopenshell/express/bootstrap.py
@@ -161,7 +161,7 @@ statements = []
terminals = reduce(lambda x, y: x | y, (find_bytype(e, Terminal) for id, e in express))
keywords = list(filter(operator.attrgetter("is_keyword"), terminals))
negated_keywords = map(lambda s: "~%s" % s, keywords)
-no_action = {"letter", "digit", "digits", "real_literal", "integer_literal"}
+no_action = {"letter", "digit", "digits", "real_literal", "integer_literal", "string_literal", "simple_string_literal", "letter", "not_quote", "not_paren_star_quote_special"}
while True:
emitted_in_loop = set()
@@ -199,8 +199,8 @@ for id in to_emit:
stmt = "(%s)%s" % (stmt, action)
statements.append("%s << %s" % (id, stmt))
-print(
- """
+if __name__ == "__main__":
+ print("""
# This file is generated by IfcOpenShell ifcexpressparser bootstrap.py
import os
@@ -238,6 +238,5 @@ if __name__ == "__main__":
mdl = importlib.import_module(output)
mdl.Generator(m).emit()
sys.stdout.write(m.schema.name)
-"""
- % ("\n ".join(statements))
-)
+""" % ("\n ".join(statements))
+ )
diff --git a/src/ifcopenshell-python/ifcopenshell/express/express_parser.py b/src/ifcopenshell-python/ifcopenshell/express/express_parser.py
index f2638a639a..a41bf11c07 100644
--- a/src/ifcopenshell-python/ifcopenshell/express/express_parser.py
+++ b/src/ifcopenshell-python/ifcopenshell/express/express_parser.py
@@ -1,20 +1,3 @@
-# IfcOpenShell - IFC toolkit and geometry engine
-# Copyright (C) 2021 Thomas Krijnen
-#
-# This file is part of IfcOpenShell.
-#
-# IfcOpenShell is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# IfcOpenShell is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public License
-# along with IfcOpenShell. If not, see .
# This file is generated by IfcOpenShell ifcexpressparser bootstrap.py
@@ -28,21 +11,16 @@ import mapping
from pyparsing import *
from nodes import *
-
def parse(fn):
cache_file = fn + ".cache.dat"
if os.path.exists(cache_file) and os.path.getmtime(cache_file) >= os.path.getmtime(fn):
with open(cache_file, "rb") as f:
m = pickle.load(f)
- else:
+ else:
ABS = (CaselessKeyword("abs")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="ABS"))("ABS")
- ABSTRACT = (CaselessKeyword("abstract")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="ABSTRACT"))(
- "ABSTRACT"
- )
+ ABSTRACT = (CaselessKeyword("abstract")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="ABSTRACT"))("ABSTRACT")
ACOS = (CaselessKeyword("acos")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="ACOS"))("ACOS")
- AGGREGATE = (CaselessKeyword("aggregate")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="AGGREGATE"))(
- "AGGREGATE"
- )
+ AGGREGATE = (CaselessKeyword("aggregate")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="AGGREGATE"))("AGGREGATE")
ALIAS = (CaselessKeyword("alias")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="ALIAS"))("ALIAS")
AND = (CaselessKeyword("and")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="AND"))("AND")
ANDOR = (CaselessKeyword("andor")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="ANDOR"))("ANDOR")
@@ -51,122 +29,64 @@ def parse(fn):
ASIN = (CaselessKeyword("asin")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="ASIN"))("ASIN")
ATAN = (CaselessKeyword("atan")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="ATAN"))("ATAN")
BAG = (CaselessKeyword("bag")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="BAG"))("BAG")
- BASED_ON = (CaselessKeyword("based_on")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="BASED_ON"))(
- "BASED_ON"
- )
+ BASED_ON = (CaselessKeyword("based_on")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="BASED_ON"))("BASED_ON")
BEGIN = (CaselessKeyword("begin")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="BEGIN"))("BEGIN")
BINARY = (CaselessKeyword("binary")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="BINARY"))("BINARY")
- BLENGTH = (CaselessKeyword("blength")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="BLENGTH"))(
- "BLENGTH"
- )
- BOOLEAN = (CaselessKeyword("boolean")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="BOOLEAN"))(
- "BOOLEAN"
- )
+ BLENGTH = (CaselessKeyword("blength")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="BLENGTH"))("BLENGTH")
+ BOOLEAN = (CaselessKeyword("boolean")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="BOOLEAN"))("BOOLEAN")
BY = (CaselessKeyword("by")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="BY"))("BY")
CASE = (CaselessKeyword("case")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="CASE"))("CASE")
- CONSTANT = (CaselessKeyword("constant")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="CONSTANT"))(
- "CONSTANT"
- )
- CONST_E = (CaselessKeyword("const_e")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="CONST_E"))(
- "CONST_E"
- )
+ CONSTANT = (CaselessKeyword("constant")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="CONSTANT"))("CONSTANT")
+ CONST_E = (CaselessKeyword("const_e")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="CONST_E"))("CONST_E")
COS = (CaselessKeyword("cos")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="COS"))("COS")
DERIVE = (CaselessKeyword("derive")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="DERIVE"))("DERIVE")
DIV = (CaselessKeyword("div")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="DIV"))("DIV")
ELSE = (CaselessKeyword("else")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="ELSE"))("ELSE")
END = (CaselessKeyword("end")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="END"))("END")
- END_ALIAS = (CaselessKeyword("end_alias")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="END_ALIAS"))(
- "END_ALIAS"
- )
- END_CASE = (CaselessKeyword("end_case")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="END_CASE"))(
- "END_CASE"
- )
- END_CONSTANT = (CaselessKeyword("end_constant")).setParseAction(
- lambda s, loc, t: Node(s, loc, t, rule="END_CONSTANT")
- )("END_CONSTANT")
- END_ENTITY = (CaselessKeyword("end_entity")).setParseAction(
- lambda s, loc, t: Node(s, loc, t, rule="END_ENTITY")
- )("END_ENTITY")
- END_FUNCTION = (CaselessKeyword("end_function")).setParseAction(
- lambda s, loc, t: Node(s, loc, t, rule="END_FUNCTION")
- )("END_FUNCTION")
+ END_ALIAS = (CaselessKeyword("end_alias")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="END_ALIAS"))("END_ALIAS")
+ END_CASE = (CaselessKeyword("end_case")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="END_CASE"))("END_CASE")
+ END_CONSTANT = (CaselessKeyword("end_constant")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="END_CONSTANT"))("END_CONSTANT")
+ END_ENTITY = (CaselessKeyword("end_entity")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="END_ENTITY"))("END_ENTITY")
+ END_FUNCTION = (CaselessKeyword("end_function")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="END_FUNCTION"))("END_FUNCTION")
END_IF = (CaselessKeyword("end_if")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="END_IF"))("END_IF")
- END_LOCAL = (CaselessKeyword("end_local")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="END_LOCAL"))(
- "END_LOCAL"
- )
- END_PROCEDURE = (CaselessKeyword("end_procedure")).setParseAction(
- lambda s, loc, t: Node(s, loc, t, rule="END_PROCEDURE")
- )("END_PROCEDURE")
- END_REPEAT = (CaselessKeyword("end_repeat")).setParseAction(
- lambda s, loc, t: Node(s, loc, t, rule="END_REPEAT")
- )("END_REPEAT")
- END_RULE = (CaselessKeyword("end_rule")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="END_RULE"))(
- "END_RULE"
- )
- END_SCHEMA = (CaselessKeyword("end_schema")).setParseAction(
- lambda s, loc, t: Node(s, loc, t, rule="END_SCHEMA")
- )("END_SCHEMA")
- END_SUBTYPE_CONSTRAINT = (CaselessKeyword("end_subtype_constraint")).setParseAction(
- lambda s, loc, t: Node(s, loc, t, rule="END_SUBTYPE_CONSTRAINT")
- )("END_SUBTYPE_CONSTRAINT")
- END_TYPE = (CaselessKeyword("end_type")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="END_TYPE"))(
- "END_TYPE"
- )
+ END_LOCAL = (CaselessKeyword("end_local")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="END_LOCAL"))("END_LOCAL")
+ END_PROCEDURE = (CaselessKeyword("end_procedure")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="END_PROCEDURE"))("END_PROCEDURE")
+ END_REPEAT = (CaselessKeyword("end_repeat")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="END_REPEAT"))("END_REPEAT")
+ END_RULE = (CaselessKeyword("end_rule")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="END_RULE"))("END_RULE")
+ END_SCHEMA = (CaselessKeyword("end_schema")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="END_SCHEMA"))("END_SCHEMA")
+ END_SUBTYPE_CONSTRAINT = (CaselessKeyword("end_subtype_constraint")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="END_SUBTYPE_CONSTRAINT"))("END_SUBTYPE_CONSTRAINT")
+ END_TYPE = (CaselessKeyword("end_type")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="END_TYPE"))("END_TYPE")
ENTITY = (CaselessKeyword("entity")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="ENTITY"))("ENTITY")
- ENUMERATION = (CaselessKeyword("enumeration")).setParseAction(
- lambda s, loc, t: Node(s, loc, t, rule="ENUMERATION")
- )("ENUMERATION")
+ ENUMERATION = (CaselessKeyword("enumeration")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="ENUMERATION"))("ENUMERATION")
ESCAPE = (CaselessKeyword("escape")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="ESCAPE"))("ESCAPE")
EXISTS = (CaselessKeyword("exists")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="EXISTS"))("EXISTS")
- EXTENSIBLE = (CaselessKeyword("extensible")).setParseAction(
- lambda s, loc, t: Node(s, loc, t, rule="EXTENSIBLE")
- )("EXTENSIBLE")
+ EXTENSIBLE = (CaselessKeyword("extensible")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="EXTENSIBLE"))("EXTENSIBLE")
EXP = (CaselessKeyword("exp")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="EXP"))("EXP")
FALSE = (CaselessKeyword("false")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="FALSE"))("FALSE")
FIXED = (CaselessKeyword("fixed")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="FIXED"))("FIXED")
FOR = (CaselessKeyword("for")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="FOR"))("FOR")
FORMAT = (CaselessKeyword("format")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="FORMAT"))("FORMAT")
FROM = (CaselessKeyword("from")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="FROM"))("FROM")
- FUNCTION = (CaselessKeyword("function")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="FUNCTION"))(
- "FUNCTION"
- )
- GENERIC = (CaselessKeyword("generic")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="GENERIC"))(
- "GENERIC"
- )
- GENERIC_ENTITY = (CaselessKeyword("generic_entity")).setParseAction(
- lambda s, loc, t: Node(s, loc, t, rule="GENERIC_ENTITY")
- )("GENERIC_ENTITY")
- HIBOUND = (CaselessKeyword("hibound")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="HIBOUND"))(
- "HIBOUND"
- )
- HIINDEX = (CaselessKeyword("hiindex")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="HIINDEX"))(
- "HIINDEX"
- )
+ FUNCTION = (CaselessKeyword("function")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="FUNCTION"))("FUNCTION")
+ GENERIC = (CaselessKeyword("generic")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="GENERIC"))("GENERIC")
+ GENERIC_ENTITY = (CaselessKeyword("generic_entity")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="GENERIC_ENTITY"))("GENERIC_ENTITY")
+ HIBOUND = (CaselessKeyword("hibound")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="HIBOUND"))("HIBOUND")
+ HIINDEX = (CaselessKeyword("hiindex")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="HIINDEX"))("HIINDEX")
IF = (CaselessKeyword("if")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="IF"))("IF")
IN = (CaselessKeyword("in")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="IN"))("IN")
INSERT = (CaselessKeyword("insert")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="INSERT"))("INSERT")
- INTEGER = (CaselessKeyword("integer")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="INTEGER"))(
- "INTEGER"
- )
- INVERSE = (CaselessKeyword("inverse")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="INVERSE"))(
- "INVERSE"
- )
+ INTEGER = (CaselessKeyword("integer")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="INTEGER"))("INTEGER")
+ INVERSE = (CaselessKeyword("inverse")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="INVERSE"))("INVERSE")
LENGTH = (CaselessKeyword("length")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="LENGTH"))("LENGTH")
LIKE = (CaselessKeyword("like")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="LIKE"))("LIKE")
LIST = (CaselessKeyword("list")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="LIST"))("LIST")
- LOBOUND = (CaselessKeyword("lobound")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="LOBOUND"))(
- "LOBOUND"
- )
+ LOBOUND = (CaselessKeyword("lobound")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="LOBOUND"))("LOBOUND")
LOCAL = (CaselessKeyword("local")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="LOCAL"))("LOCAL")
LOG = (CaselessKeyword("log")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="LOG"))("LOG")
LOG10 = (CaselessKeyword("log10")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="LOG10"))("LOG10")
LOG2 = (CaselessKeyword("log2")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="LOG2"))("LOG2")
- LOGICAL = (CaselessKeyword("logical")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="LOGICAL"))(
- "LOGICAL"
- )
- LOINDEX = (CaselessKeyword("loindex")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="LOINDEX"))(
- "LOINDEX"
- )
+ LOGICAL = (CaselessKeyword("logical")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="LOGICAL"))("LOGICAL")
+ LOINDEX = (CaselessKeyword("loindex")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="LOINDEX"))("LOINDEX")
MOD = (CaselessKeyword("mod")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="MOD"))("MOD")
NOT = (CaselessKeyword("not")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="NOT"))("NOT")
NUMBER = (CaselessKeyword("number")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="NUMBER"))("NUMBER")
@@ -174,31 +94,19 @@ def parse(fn):
ODD = (CaselessKeyword("odd")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="ODD"))("ODD")
OF = (CaselessKeyword("of")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="OF"))("OF")
ONEOF = (CaselessKeyword("oneof")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="ONEOF"))("ONEOF")
- OPTIONAL = (CaselessKeyword("optional")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="OPTIONAL"))(
- "OPTIONAL"
- )
+ OPTIONAL = (CaselessKeyword("optional")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="OPTIONAL"))("OPTIONAL")
OR = (CaselessKeyword("or")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="OR"))("OR")
- OTHERWISE = (CaselessKeyword("otherwise")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="OTHERWISE"))(
- "OTHERWISE"
- )
+ OTHERWISE = (CaselessKeyword("otherwise")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="OTHERWISE"))("OTHERWISE")
PI = (CaselessKeyword("pi")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="PI"))("PI")
- PROCEDURE = (CaselessKeyword("procedure")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="PROCEDURE"))(
- "PROCEDURE"
- )
+ PROCEDURE = (CaselessKeyword("procedure")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="PROCEDURE"))("PROCEDURE")
QUERY = (CaselessKeyword("query")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="QUERY"))("QUERY")
REAL = (CaselessKeyword("real")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="REAL"))("REAL")
- REFERENCE = (CaselessKeyword("reference")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="REFERENCE"))(
- "REFERENCE"
- )
+ REFERENCE = (CaselessKeyword("reference")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="REFERENCE"))("REFERENCE")
REMOVE = (CaselessKeyword("remove")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="REMOVE"))("REMOVE")
- RENAMED = (CaselessKeyword("renamed")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="RENAMED"))(
- "RENAMED"
- )
+ RENAMED = (CaselessKeyword("renamed")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="RENAMED"))("RENAMED")
REPEAT = (CaselessKeyword("repeat")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="REPEAT"))("REPEAT")
RETURN = (CaselessKeyword("return")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="RETURN"))("RETURN")
- ROLESOF = (CaselessKeyword("rolesof")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="ROLESOF"))(
- "ROLESOF"
- )
+ ROLESOF = (CaselessKeyword("rolesof")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="ROLESOF"))("ROLESOF")
RULE = (CaselessKeyword("rule")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="RULE"))("RULE")
SCHEMA = (CaselessKeyword("schema")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="SCHEMA"))("SCHEMA")
SELECT = (CaselessKeyword("select")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="SELECT"))("SELECT")
@@ -209,433 +117,84 @@ def parse(fn):
SKIP = (CaselessKeyword("skip")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="SKIP"))("SKIP")
SQRT = (CaselessKeyword("sqrt")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="SQRT"))("SQRT")
STRING = (CaselessKeyword("string")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="STRING"))("STRING")
- SUBTYPE = (CaselessKeyword("subtype")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="SUBTYPE"))(
- "SUBTYPE"
- )
- SUBTYPE_CONSTRAINT = (CaselessKeyword("subtype_constraint")).setParseAction(
- lambda s, loc, t: Node(s, loc, t, rule="SUBTYPE_CONSTRAINT")
- )("SUBTYPE_CONSTRAINT")
- SUPERTYPE = (CaselessKeyword("supertype")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="SUPERTYPE"))(
- "SUPERTYPE"
- )
+ SUBTYPE = (CaselessKeyword("subtype")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="SUBTYPE"))("SUBTYPE")
+ SUBTYPE_CONSTRAINT = (CaselessKeyword("subtype_constraint")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="SUBTYPE_CONSTRAINT"))("SUBTYPE_CONSTRAINT")
+ SUPERTYPE = (CaselessKeyword("supertype")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="SUPERTYPE"))("SUPERTYPE")
TAN = (CaselessKeyword("tan")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="TAN"))("TAN")
THEN = (CaselessKeyword("then")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="THEN"))("THEN")
TO = (CaselessKeyword("to")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="TO"))("TO")
- TOTAL_OVER = (CaselessKeyword("total_over")).setParseAction(
- lambda s, loc, t: Node(s, loc, t, rule="TOTAL_OVER")
- )("TOTAL_OVER")
+ TOTAL_OVER = (CaselessKeyword("total_over")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="TOTAL_OVER"))("TOTAL_OVER")
TRUE = (CaselessKeyword("true")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="TRUE"))("TRUE")
TYPE = (CaselessKeyword("type")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="TYPE"))("TYPE")
TYPEOF = (CaselessKeyword("typeof")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="TYPEOF"))("TYPEOF")
UNIQUE = (CaselessKeyword("unique")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="UNIQUE"))("UNIQUE")
- UNKNOWN = (CaselessKeyword("unknown")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="UNKNOWN"))(
- "UNKNOWN"
- )
+ UNKNOWN = (CaselessKeyword("unknown")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="UNKNOWN"))("UNKNOWN")
UNTIL = (CaselessKeyword("until")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="UNTIL"))("UNTIL")
USE = (CaselessKeyword("use")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="USE"))("USE")
USEDIN = (CaselessKeyword("usedin")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="USEDIN"))("USEDIN")
VALUE = (CaselessKeyword("value")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="VALUE"))("VALUE")
- VALUE_IN = (CaselessKeyword("value_in")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="VALUE_IN"))(
- "VALUE_IN"
- )
- VALUE_UNIQUE = (CaselessKeyword("value_unique")).setParseAction(
- lambda s, loc, t: Node(s, loc, t, rule="VALUE_UNIQUE")
- )("VALUE_UNIQUE")
+ VALUE_IN = (CaselessKeyword("value_in")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="VALUE_IN"))("VALUE_IN")
+ VALUE_UNIQUE = (CaselessKeyword("value_unique")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="VALUE_UNIQUE"))("VALUE_UNIQUE")
VAR = (CaselessKeyword("var")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="VAR"))("VAR")
WHERE = (CaselessKeyword("where")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="WHERE"))("WHERE")
WHILE = (CaselessKeyword("while")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="WHILE"))("WHILE")
WITH = (CaselessKeyword("with")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="WITH"))("WITH")
XOR = (CaselessKeyword("xor")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="XOR"))("XOR")
- bit = ((CaselessLiteral("0") | CaselessLiteral("1"))).setParseAction(
- lambda s, loc, t: Node(s, loc, t, rule="bit")
- )("bit")
- digit = (
- (
- CaselessLiteral("0")
- | CaselessLiteral("1")
- | CaselessLiteral("2")
- | CaselessLiteral("3")
- | CaselessLiteral("4")
- | CaselessLiteral("5")
- | CaselessLiteral("6")
- | CaselessLiteral("7")
- | CaselessLiteral("8")
- | CaselessLiteral("9")
- )
- )("digit")
+ bit = ((CaselessLiteral("0") | CaselessLiteral("1"))).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="bit"))("bit")
+ digit = ((CaselessLiteral("0") | CaselessLiteral("1") | CaselessLiteral("2") | CaselessLiteral("3") | CaselessLiteral("4") | CaselessLiteral("5") | CaselessLiteral("6") | CaselessLiteral("7") | CaselessLiteral("8") | CaselessLiteral("9")))("digit")
digits = ((digit + ZeroOrMore(digit)))("digits")
- hex_digit = (
- (
- digit
- | CaselessLiteral("a")
- | CaselessLiteral("b")
- | CaselessLiteral("c")
- | CaselessLiteral("d")
- | CaselessLiteral("e")
- | CaselessLiteral("f")
- )
- ).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="hex_digit"))("hex_digit")
- letter = (
- (
- CaselessLiteral("a")
- | CaselessLiteral("b")
- | CaselessLiteral("c")
- | CaselessLiteral("d")
- | CaselessLiteral("e")
- | CaselessLiteral("f")
- | CaselessLiteral("g")
- | CaselessLiteral("h")
- | CaselessLiteral("i")
- | CaselessLiteral("j")
- | CaselessLiteral("k")
- | CaselessLiteral("l")
- | CaselessLiteral("m")
- | CaselessLiteral("n")
- | CaselessLiteral("o")
- | CaselessLiteral("p")
- | CaselessLiteral("q")
- | CaselessLiteral("r")
- | CaselessLiteral("s")
- | CaselessLiteral("t")
- | CaselessLiteral("u")
- | CaselessLiteral("v")
- | CaselessLiteral("w")
- | CaselessLiteral("x")
- | CaselessLiteral("y")
- | CaselessLiteral("z")
- )
- )("letter")
- not_paren_star_quote_special = (
- (
- CaselessLiteral("!")
- | CaselessLiteral("#")
- | CaselessLiteral("$")
- | CaselessLiteral("%")
- | CaselessLiteral("&")
- | CaselessLiteral("+")
- | CaselessLiteral(",")
- | CaselessLiteral("-")
- | CaselessLiteral(".")
- | CaselessLiteral("/")
- | CaselessLiteral(":")
- | CaselessLiteral(";")
- | CaselessLiteral("<")
- | CaselessLiteral("=")
- | CaselessLiteral(">")
- | CaselessLiteral("?")
- | CaselessLiteral("@")
- | CaselessLiteral("[")
- | CaselessLiteral("\\")
- | CaselessLiteral("]")
- | CaselessLiteral("^")
- | CaselessLiteral("_")
- | CaselessLiteral("{")
- | CaselessLiteral("|")
- | CaselessLiteral("}")
- | CaselessLiteral("~")
- )
- ).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="not_paren_star_quote_special"))(
- "not_paren_star_quote_special"
- )
- not_paren_star_special = ((not_paren_star_quote_special | CaselessLiteral('""'))).setParseAction(
- lambda s, loc, t: Node(s, loc, t, rule="not_paren_star_special")
- )("not_paren_star_special")
- not_quote = (
- (
- not_paren_star_quote_special
- | letter
- | digit
- | CaselessLiteral("(")
- | CaselessLiteral(")")
- | CaselessLiteral("*")
- )
- ).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="not_quote"))("not_quote")
+ hex_digit = ((digit | CaselessLiteral("a") | CaselessLiteral("b") | CaselessLiteral("c") | CaselessLiteral("d") | CaselessLiteral("e") | CaselessLiteral("f"))).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="hex_digit"))("hex_digit")
+ letter = ((CaselessLiteral("a") | CaselessLiteral("b") | CaselessLiteral("c") | CaselessLiteral("d") | CaselessLiteral("e") | CaselessLiteral("f") | CaselessLiteral("g") | CaselessLiteral("h") | CaselessLiteral("i") | CaselessLiteral("j") | CaselessLiteral("k") | CaselessLiteral("l") | CaselessLiteral("m") | CaselessLiteral("n") | CaselessLiteral("o") | CaselessLiteral("p") | CaselessLiteral("q") | CaselessLiteral("r") | CaselessLiteral("s") | CaselessLiteral("t") | CaselessLiteral("u") | CaselessLiteral("v") | CaselessLiteral("w") | CaselessLiteral("x") | CaselessLiteral("y") | CaselessLiteral("z")))("letter")
+ not_paren_star_quote_special = ((CaselessLiteral("!") | CaselessLiteral("#") | CaselessLiteral("$") | CaselessLiteral("%") | CaselessLiteral("&") | CaselessLiteral("+") | CaselessLiteral(",") | CaselessLiteral("-") | CaselessLiteral(".") | CaselessLiteral("/") | CaselessLiteral(":") | CaselessLiteral(";") | CaselessLiteral("<") | CaselessLiteral("=") | CaselessLiteral(">") | CaselessLiteral("?") | CaselessLiteral("@") | CaselessLiteral("[") | CaselessLiteral("\\") | CaselessLiteral("]") | CaselessLiteral("^") | CaselessLiteral("_") | CaselessLiteral("{") | CaselessLiteral("|") | CaselessLiteral("}") | CaselessLiteral("~")))("not_paren_star_quote_special")
+ not_paren_star_special = ((not_paren_star_quote_special | CaselessLiteral("\"\""))).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="not_paren_star_special"))("not_paren_star_special")
+ not_quote = ((not_paren_star_quote_special | letter | digit | CaselessLiteral("(") | CaselessLiteral(")") | CaselessLiteral("*")))("not_quote")
octet = ((hex_digit + hex_digit)).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="octet"))("octet")
- special = (
- (
- not_paren_star_quote_special
- | CaselessLiteral("(")
- | CaselessLiteral(")")
- | CaselessLiteral("*")
- | CaselessLiteral('""')
- )
- ).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="special"))("special")
- binary_literal = ((CaselessLiteral("%") + bit + ZeroOrMore(bit))).setParseAction(
- lambda s, loc, t: ListNode(s, loc, t, rule="binary_literal")
- )("binary_literal")
+ special = ((not_paren_star_quote_special | CaselessLiteral("(") | CaselessLiteral(")") | CaselessLiteral("*") | CaselessLiteral("\"\""))).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="special"))("special")
+ binary_literal = ((CaselessLiteral("%") + bit + ZeroOrMore(bit))).setParseAction(lambda s, loc, t: ListNode(s, loc, t, rule="binary_literal"))("binary_literal")
integer_literal = (digits)("integer_literal")
- simple_id = (
- ~CaselessKeyword("supertype")
- + ~CaselessKeyword("generic")
- + ~CaselessKeyword("true")
- + ~CaselessKeyword("rolesof")
- + ~CaselessKeyword("local")
- + ~CaselessKeyword("enumeration")
- + ~CaselessKeyword("in")
- + ~CaselessKeyword("subtype_constraint")
- + ~CaselessKeyword("while")
- + ~CaselessKeyword("var")
- + ~CaselessKeyword("unique")
- + ~CaselessKeyword("type")
- + ~CaselessKeyword("format")
- + ~CaselessKeyword("log2")
- + ~CaselessKeyword("set")
- + ~CaselessKeyword("string")
- + ~CaselessKeyword("exp")
- + ~CaselessKeyword("inverse")
- + ~CaselessKeyword("sizeof")
- + ~CaselessKeyword("function")
- + ~CaselessKeyword("of")
- + ~CaselessKeyword("value_in")
- + ~CaselessKeyword("procedure")
- + ~CaselessKeyword("subtype")
- + ~CaselessKeyword("for")
- + ~CaselessKeyword("const_e")
- + ~CaselessKeyword("acos")
- + ~CaselessKeyword("asin")
- + ~CaselessKeyword("return")
- + ~CaselessKeyword("optional")
- + ~CaselessKeyword("usedin")
- + ~CaselessKeyword("log")
- + ~CaselessKeyword("not")
- + ~CaselessKeyword("from")
- + ~CaselessKeyword("and")
- + ~CaselessKeyword("pi")
- + ~CaselessKeyword("begin")
- + ~CaselessKeyword("end")
- + ~CaselessKeyword("end_procedure")
- + ~CaselessKeyword("loindex")
- + ~CaselessKeyword("bag")
- + ~CaselessKeyword("log10")
- + ~CaselessKeyword("aggregate")
- + ~CaselessKeyword("number")
- + ~CaselessKeyword("by")
- + ~CaselessKeyword("until")
- + ~CaselessKeyword("array")
- + ~CaselessKeyword("renamed")
- + ~CaselessKeyword("entity")
- + ~CaselessKeyword("andor")
- + ~CaselessKeyword("mod")
- + ~CaselessKeyword("end_function")
- + ~CaselessKeyword("cos")
- + ~CaselessKeyword("sin")
- + ~CaselessKeyword("list")
- + ~CaselessKeyword("as")
- + ~CaselessKeyword("binary")
- + ~CaselessKeyword("escape")
- + ~CaselessKeyword("value_unique")
- + ~CaselessKeyword("sqrt")
- + ~CaselessKeyword("real")
- + ~CaselessKeyword("atan")
- + ~CaselessKeyword("with")
- + ~CaselessKeyword("unknown")
- + ~CaselessKeyword("boolean")
- + ~CaselessKeyword("abs")
- + ~CaselessKeyword("fixed")
- + ~CaselessKeyword("use")
- + ~CaselessKeyword("repeat")
- + ~CaselessKeyword("self")
- + ~CaselessKeyword("value")
- + ~CaselessKeyword("insert")
- + ~CaselessKeyword("integer")
- + ~CaselessKeyword("rule")
- + ~CaselessKeyword("total_over")
- + ~CaselessKeyword("tan")
- + ~CaselessKeyword("case")
- + ~CaselessKeyword("else")
- + ~CaselessKeyword("schema")
- + ~CaselessKeyword("derive")
- + ~CaselessKeyword("remove")
- + ~CaselessKeyword("like")
- + ~CaselessKeyword("select")
- + ~CaselessKeyword("alias")
- + ~CaselessKeyword("abstract")
- + ~CaselessKeyword("blength")
- + ~CaselessKeyword("end_if")
- + ~CaselessKeyword("xor")
- + ~CaselessKeyword("skip")
- + ~CaselessKeyword("generic_entity")
- + ~CaselessKeyword("based_on")
- + ~CaselessKeyword("exists")
- + ~CaselessKeyword("or")
- + ~CaselessKeyword("odd")
- + ~CaselessKeyword("length")
- + ~CaselessKeyword("constant")
- + ~CaselessKeyword("end_type")
- + ~CaselessKeyword("false")
- + ~CaselessKeyword("end_subtype_constraint")
- + ~CaselessKeyword("then")
- + ~CaselessKeyword("end_repeat")
- + ~CaselessKeyword("nvl")
- + ~CaselessKeyword("where")
- + ~CaselessKeyword("hibound")
- + ~CaselessKeyword("lobound")
- + ~CaselessKeyword("end_rule")
- + ~CaselessKeyword("div")
- + ~CaselessKeyword("query")
- + ~CaselessKeyword("reference")
- + ~CaselessKeyword("end_alias")
- + ~CaselessKeyword("end_local")
- + ~CaselessKeyword("logical")
- + ~CaselessKeyword("if")
- + ~CaselessKeyword("hiindex")
- + ~CaselessKeyword("end_entity")
- + ~CaselessKeyword("extensible")
- + ~CaselessKeyword("end_case")
- + ~CaselessKeyword("oneof")
- + ~CaselessKeyword("otherwise")
- + ~CaselessKeyword("end_constant")
- + ~CaselessKeyword("end_schema")
- + ~CaselessKeyword("to")
- + ~CaselessKeyword("typeof")
- + originalTextFor(Combine((letter + ZeroOrMore((letter | digit | CaselessLiteral("_"))))))("simple_id")
- )
- simple_string_literal = (
- (
- CaselessLiteral("'")
- + ZeroOrMore(((CaselessLiteral("'") + CaselessLiteral("'")) | not_quote))
- + CaselessLiteral("'")
- )
- ).setParseAction(lambda s, loc, t: ListNode(s, loc, t, rule="simple_string_literal"))("simple_string_literal")
+ simple_id = ~CaselessKeyword("abstract") + ~CaselessKeyword("reference") + ~CaselessKeyword("pi") + ~CaselessKeyword("andor") + ~CaselessKeyword("loindex") + ~CaselessKeyword("aggregate") + ~CaselessKeyword("self") + ~CaselessKeyword("length") + ~CaselessKeyword("optional") + ~CaselessKeyword("for") + ~CaselessKeyword("end") + ~CaselessKeyword("local") + ~CaselessKeyword("true") + ~CaselessKeyword("logical") + ~CaselessKeyword("constant") + ~CaselessKeyword("nvl") + ~CaselessKeyword("bag") + ~CaselessKeyword("repeat") + ~CaselessKeyword("boolean") + ~CaselessKeyword("otherwise") + ~CaselessKeyword("type") + ~CaselessKeyword("typeof") + ~CaselessKeyword("alias") + ~CaselessKeyword("in") + ~CaselessKeyword("mod") + ~CaselessKeyword("escape") + ~CaselessKeyword("or") + ~CaselessKeyword("of") + ~CaselessKeyword("like") + ~CaselessKeyword("value_unique") + ~CaselessKeyword("tan") + ~CaselessKeyword("oneof") + ~CaselessKeyword("log") + ~CaselessKeyword("schema") + ~CaselessKeyword("fixed") + ~CaselessKeyword("by") + ~CaselessKeyword("integer") + ~CaselessKeyword("div") + ~CaselessKeyword("log10") + ~CaselessKeyword("not") + ~CaselessKeyword("skip") + ~CaselessKeyword("odd") + ~CaselessKeyword("return") + ~CaselessKeyword("end_subtype_constraint") + ~CaselessKeyword("end_alias") + ~CaselessKeyword("remove") + ~CaselessKeyword("unknown") + ~CaselessKeyword("end_repeat") + ~CaselessKeyword("enumeration") + ~CaselessKeyword("query") + ~CaselessKeyword("function") + ~CaselessKeyword("list") + ~CaselessKeyword("end_local") + ~CaselessKeyword("cos") + ~CaselessKeyword("atan") + ~CaselessKeyword("hibound") + ~CaselessKeyword("rolesof") + ~CaselessKeyword("end_function") + ~CaselessKeyword("abs") + ~CaselessKeyword("renamed") + ~CaselessKeyword("select") + ~CaselessKeyword("end_if") + ~CaselessKeyword("case") + ~CaselessKeyword("sizeof") + ~CaselessKeyword("var") + ~CaselessKeyword("end_case") + ~CaselessKeyword("acos") + ~CaselessKeyword("supertype") + ~CaselessKeyword("then") + ~CaselessKeyword("inverse") + ~CaselessKeyword("hiindex") + ~CaselessKeyword("false") + ~CaselessKeyword("generic") + ~CaselessKeyword("as") + ~CaselessKeyword("use") + ~CaselessKeyword("end_entity") + ~CaselessKeyword("rule") + ~CaselessKeyword("derive") + ~CaselessKeyword("set") + ~CaselessKeyword("subtype") + ~CaselessKeyword("unique") + ~CaselessKeyword("subtype_constraint") + ~CaselessKeyword("where") + ~CaselessKeyword("until") + ~CaselessKeyword("usedin") + ~CaselessKeyword("value") + ~CaselessKeyword("array") + ~CaselessKeyword("sqrt") + ~CaselessKeyword("value_in") + ~CaselessKeyword("to") + ~CaselessKeyword("xor") + ~CaselessKeyword("sin") + ~CaselessKeyword("while") + ~CaselessKeyword("with") + ~CaselessKeyword("string") + ~CaselessKeyword("total_over") + ~CaselessKeyword("binary") + ~CaselessKeyword("exp") + ~CaselessKeyword("and") + ~CaselessKeyword("number") + ~CaselessKeyword("generic_entity") + ~CaselessKeyword("const_e") + ~CaselessKeyword("end_type") + ~CaselessKeyword("log2") + ~CaselessKeyword("lobound") + ~CaselessKeyword("end_procedure") + ~CaselessKeyword("end_schema") + ~CaselessKeyword("end_constant") + ~CaselessKeyword("procedure") + ~CaselessKeyword("else") + ~CaselessKeyword("end_rule") + ~CaselessKeyword("if") + ~CaselessKeyword("based_on") + ~CaselessKeyword("exists") + ~CaselessKeyword("asin") + ~CaselessKeyword("blength") + ~CaselessKeyword("entity") + ~CaselessKeyword("from") + ~CaselessKeyword("format") + ~CaselessKeyword("insert") + ~CaselessKeyword("begin") + ~CaselessKeyword("extensible") + ~CaselessKeyword("real") + originalTextFor(Combine((letter + ZeroOrMore((letter | digit | CaselessLiteral("_"))))))("simple_id")
+ simple_string_literal = ((CaselessLiteral("'") + ZeroOrMore(((CaselessLiteral("'") + CaselessLiteral("'")) | not_quote)) + CaselessLiteral("'")))("simple_string_literal")
abstract_entity_declaration = (ABSTRACT)("abstract_entity_declaration")
- abstract_supertype = ((ABSTRACT + SUPERTYPE + CaselessLiteral(";"))).setParseAction(
- lambda s, loc, t: Node(s, loc, t, rule="abstract_supertype")
- )("abstract_supertype")
- add_like_op = ((CaselessLiteral("+") | CaselessLiteral("-") | OR | XOR)).setParseAction(
- lambda s, loc, t: Node(s, loc, t, rule="add_like_op")
- )("add_like_op")
+ abstract_supertype = ((ABSTRACT + SUPERTYPE + CaselessLiteral(";"))).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="abstract_supertype"))("abstract_supertype")
+ add_like_op = ((CaselessLiteral("+") | CaselessLiteral("-") | OR | XOR)).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="add_like_op"))("add_like_op")
attribute_id = (simple_id)("attribute_id")
boolean_type = (BOOLEAN)("boolean_type")
- built_in_constant = ((CONST_E | PI | SELF | CaselessLiteral("?"))).setParseAction(
- lambda s, loc, t: Node(s, loc, t, rule="built_in_constant")
- )("built_in_constant")
- built_in_function = (
- (
- ABS
- | ACOS
- | ASIN
- | ATAN
- | BLENGTH
- | COS
- | EXISTS
- | EXP
- | FORMAT
- | HIBOUND
- | HIINDEX
- | LENGTH
- | LOBOUND
- | LOINDEX
- | LOG
- | LOG2
- | LOG10
- | NVL
- | ODD
- | ROLESOF
- | SIN
- | SIZEOF
- | SQRT
- | TAN
- | TYPEOF
- | USEDIN
- | VALUE
- | VALUE_IN
- | VALUE_UNIQUE
- )
- ).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="built_in_function"))("built_in_function")
- built_in_procedure = ((INSERT | REMOVE)).setParseAction(
- lambda s, loc, t: Node(s, loc, t, rule="built_in_procedure")
- )("built_in_procedure")
+ built_in_constant = ((CONST_E | PI | SELF | CaselessLiteral("?"))).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="built_in_constant"))("built_in_constant")
+ built_in_function = ((ABS | ACOS | ASIN | ATAN | BLENGTH | COS | EXISTS | EXP | FORMAT | HIBOUND | HIINDEX | LENGTH | LOBOUND | LOINDEX | LOG | LOG2 | LOG10 | NVL | ODD | ROLESOF | SIN | SIZEOF | SQRT | TAN | TYPEOF | USEDIN | VALUE | VALUE_IN | VALUE_UNIQUE)).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="built_in_function"))("built_in_function")
+ built_in_procedure = ((INSERT | REMOVE)).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="built_in_procedure"))("built_in_procedure")
constant_id = (simple_id)("constant_id")
entity_id = (simple_id)("entity_id")
enumeration_id = (simple_id)("enumeration_id")
- enumeration_items = (
- (
- CaselessLiteral("(")
- + enumeration_id
- + ZeroOrMore((CaselessLiteral(",") + enumeration_id))
- + CaselessLiteral(")")
- )
- ).setParseAction(lambda s, loc, t: ListNode(s, loc, t, rule="enumeration_items"))("enumeration_items")
- escape_stmt = ((ESCAPE + CaselessLiteral(";"))).setParseAction(
- lambda s, loc, t: Node(s, loc, t, rule="escape_stmt")
- )("escape_stmt")
+ enumeration_items = ((CaselessLiteral("(") + enumeration_id + ZeroOrMore((CaselessLiteral(",") + enumeration_id)) + CaselessLiteral(")"))).setParseAction(lambda s, loc, t: ListNode(s, loc, t, rule="enumeration_items"))("enumeration_items")
+ escape_stmt = ((ESCAPE + CaselessLiteral(";"))).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="escape_stmt"))("escape_stmt")
function_id = (simple_id)("function_id")
integer_type = (INTEGER)("integer_type")
- interval_op = ((CaselessLiteral("<=") | CaselessLiteral("<"))).setParseAction(
- lambda s, loc, t: Node(s, loc, t, rule="interval_op")
- )("interval_op")
- logical_literal = ((FALSE | TRUE | UNKNOWN)).setParseAction(
- lambda s, loc, t: Node(s, loc, t, rule="logical_literal")
- )("logical_literal")
+ interval_op = ((CaselessLiteral("<=") | CaselessLiteral("<"))).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="interval_op"))("interval_op")
+ logical_literal = ((FALSE | TRUE | UNKNOWN)).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="logical_literal"))("logical_literal")
logical_type = (LOGICAL)("logical_type")
- multiplication_like_op = (
- (CaselessLiteral("*") | CaselessLiteral("/") | DIV | MOD | AND | CaselessLiteral("||"))
- ).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="multiplication_like_op"))("multiplication_like_op")
- null_stmt = (CaselessLiteral(";")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="null_stmt"))(
- "null_stmt"
- )
+ multiplication_like_op = ((CaselessLiteral("*") | CaselessLiteral("/") | DIV | MOD | AND | CaselessLiteral("||"))).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="multiplication_like_op"))("multiplication_like_op")
+ null_stmt = (CaselessLiteral(";")).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="null_stmt"))("null_stmt")
number_type = (NUMBER)("number_type")
parameter_id = (simple_id)("parameter_id")
procedure_id = (simple_id)("procedure_id")
- rel_op = (
- (
- CaselessLiteral("<=")
- | CaselessLiteral(">=")
- | CaselessLiteral("<>")
- | CaselessLiteral("=")
- | CaselessLiteral(":<>:")
- | CaselessLiteral(":=:")
- | CaselessLiteral("<")
- | CaselessLiteral(">")
- )
- ).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="rel_op"))("rel_op")
- rel_op_extended = ((rel_op | IN | LIKE)).setParseAction(
- lambda s, loc, t: Node(s, loc, t, rule="rel_op_extended")
- )("rel_op_extended")
+ rel_op = ((CaselessLiteral("<=") | CaselessLiteral(">=") | CaselessLiteral("<>") | CaselessLiteral("=") | CaselessLiteral(":<>:") | CaselessLiteral(":=:") | CaselessLiteral("<") | CaselessLiteral(">"))).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="rel_op"))("rel_op")
+ rel_op_extended = ((rel_op | IN | LIKE)).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="rel_op_extended"))("rel_op_extended")
rule_id = (simple_id)("rule_id")
rule_label_id = (simple_id)("rule_label_id")
schema_id = (simple_id)("schema_id")
- sign = ((CaselessLiteral("+") | CaselessLiteral("-"))).setParseAction(
- lambda s, loc, t: Node(s, loc, t, rule="sign")
- )("sign")
- skip_stmt = ((SKIP + CaselessLiteral(";"))).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="skip_stmt"))(
- "skip_stmt"
- )
+ sign = ((CaselessLiteral("+") | CaselessLiteral("-"))).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="sign"))("sign")
+ skip_stmt = ((SKIP + CaselessLiteral(";"))).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="skip_stmt"))("skip_stmt")
subtype_constraint_id = (simple_id)("subtype_constraint_id")
type_id = (simple_id)("type_id")
type_label_id = (simple_id)("type_label_id")
- unary_op = ((CaselessLiteral("+") | CaselessLiteral("-") | NOT)).setParseAction(
- lambda s, loc, t: Node(s, loc, t, rule="unary_op")
- )("unary_op")
+ unary_op = ((CaselessLiteral("+") | CaselessLiteral("-") | NOT)).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="unary_op"))("unary_op")
variable_id = (simple_id)("variable_id")
- encoded_character = ((octet + octet + octet + octet)).setParseAction(
- lambda s, loc, t: Node(s, loc, t, rule="encoded_character")
- )("encoded_character")
- not_paren_star = ((letter | digit | not_paren_star_special)).setParseAction(
- lambda s, loc, t: Node(s, loc, t, rule="not_paren_star")
- )("not_paren_star")
- not_rparen_star = ((not_paren_star | CaselessLiteral("("))).setParseAction(
- lambda s, loc, t: Node(s, loc, t, rule="not_rparen_star")
- )("not_rparen_star")
- not_rparen_star_then_rparen = (
- (not_rparen_star + ZeroOrMore(not_rparen_star) + CaselessLiteral(")") + ZeroOrMore(CaselessLiteral(")")))
- ).setParseAction(lambda s, loc, t: ListNode(s, loc, t, rule="not_rparen_star_then_rparen"))(
- "not_rparen_star_then_rparen"
- )
- encoded_string_literal = (
- (CaselessLiteral('"') + encoded_character + ZeroOrMore(encoded_character) + CaselessLiteral('"'))
- ).setParseAction(lambda s, loc, t: ListNode(s, loc, t, rule="encoded_string_literal"))("encoded_string_literal")
- real_literal = (
- (
- (
- digits
- + CaselessLiteral(".")
- + Optional(digits)
- + Optional((CaselessLiteral("e") + Optional(sign) + digits))
- )
- | integer_literal
- )
- )("real_literal")
+ encoded_character = ((octet + octet + octet + octet)).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="encoded_character"))("encoded_character")
+ not_paren_star = ((letter | digit | not_paren_star_special)).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="not_paren_star"))("not_paren_star")
+ not_rparen_star = ((not_paren_star | CaselessLiteral("("))).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="not_rparen_star"))("not_rparen_star")
+ not_rparen_star_then_rparen = ((not_rparen_star + ZeroOrMore(not_rparen_star) + CaselessLiteral(")") + ZeroOrMore(CaselessLiteral(")")))).setParseAction(lambda s, loc, t: ListNode(s, loc, t, rule="not_rparen_star_then_rparen"))("not_rparen_star_then_rparen")
+ encoded_string_literal = ((CaselessLiteral("\"") + encoded_character + ZeroOrMore(encoded_character) + CaselessLiteral("\""))).setParseAction(lambda s, loc, t: ListNode(s, loc, t, rule="encoded_string_literal"))("encoded_string_literal")
+ real_literal = (((digits + CaselessLiteral(".") + Optional(digits) + Optional((CaselessLiteral("e") + Optional(sign) + digits))) | integer_literal))("real_literal")
attribute_ref = (attribute_id)("attribute_ref")
constant_ref = (constant_id)("constant_ref")
entity_ref = (entity_id)("entity_ref")
@@ -650,830 +209,265 @@ def parse(fn):
type_label_ref = (type_label_id)("type_label_ref")
type_ref = (type_id)("type_ref")
variable_ref = (variable_id)("variable_ref")
- attribute_qualifier = ((CaselessLiteral(".") + attribute_ref)).setParseAction(
- lambda s, loc, t: Node(s, loc, t, rule="attribute_qualifier")
- )("attribute_qualifier")
- constant_factor = ((built_in_constant | constant_ref)).setParseAction(
- lambda s, loc, t: Node(s, loc, t, rule="constant_factor")
- )("constant_factor")
- enumeration_extension = ((BASED_ON + type_ref + Optional((WITH + enumeration_items)))).setParseAction(
- lambda s, loc, t: Node(s, loc, t, rule="enumeration_extension")
- )("enumeration_extension")
- enumeration_reference = ((Optional((type_ref + CaselessLiteral("."))) + enumeration_ref)).setParseAction(
- lambda s, loc, t: Node(s, loc, t, rule="enumeration_reference")
- )("enumeration_reference")
- enumeration_type = (
- (Optional(EXTENSIBLE) + ENUMERATION + Optional(((OF + enumeration_items) | enumeration_extension)))
- ).setParseAction(EnumerationType)("enumeration_type")
- general_ref = ((parameter_ref | variable_ref)).setParseAction(
- lambda s, loc, t: Node(s, loc, t, rule="general_ref")
- )("general_ref")
- group_qualifier = ((CaselessLiteral("\\") + entity_ref)).setParseAction(
- lambda s, loc, t: Node(s, loc, t, rule="group_qualifier")
- )("group_qualifier")
+ attribute_qualifier = ((CaselessLiteral(".") + attribute_ref)).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="attribute_qualifier"))("attribute_qualifier")
+ constant_factor = ((built_in_constant | constant_ref)).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="constant_factor"))("constant_factor")
+ enumeration_extension = ((BASED_ON + type_ref + Optional((WITH + enumeration_items)))).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="enumeration_extension"))("enumeration_extension")
+ enumeration_reference = ((Optional((type_ref + CaselessLiteral("."))) + enumeration_ref)).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="enumeration_reference"))("enumeration_reference")
+ enumeration_type = ((Optional(EXTENSIBLE) + ENUMERATION + Optional(((OF + enumeration_items) | enumeration_extension)))).setParseAction(EnumerationType)("enumeration_type")
+ general_ref = ((parameter_ref | variable_ref)).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="general_ref"))("general_ref")
+ group_qualifier = ((CaselessLiteral("\\") + entity_ref)).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="group_qualifier"))("group_qualifier")
named_types = ((entity_ref | type_ref)).setParseAction(NamedType)("named_types")
- named_type_or_rename = ((named_types + Optional((AS + (entity_id | type_id))))).setParseAction(
- lambda s, loc, t: Node(s, loc, t, rule="named_type_or_rename")
- )("named_type_or_rename")
+ named_type_or_rename = ((named_types + Optional((AS + (entity_id | type_id))))).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="named_type_or_rename"))("named_type_or_rename")
population = (entity_ref)("population")
- qualified_attribute = ((SELF + group_qualifier + attribute_qualifier)).setParseAction(
- lambda s, loc, t: Node(s, loc, t, rule="qualified_attribute")
- )("qualified_attribute")
- redeclared_attribute = ((qualified_attribute + Optional((RENAMED + attribute_id)))).setParseAction(
- lambda s, loc, t: Node(s, loc, t, rule="redeclared_attribute")
- )("redeclared_attribute")
- referenced_attribute = ((attribute_ref | qualified_attribute)).setParseAction(
- lambda s, loc, t: Node(s, loc, t, rule="referenced_attribute")
- )("referenced_attribute")
- rename_id = ((constant_id | entity_id | function_id | procedure_id | type_id)).setParseAction(
- lambda s, loc, t: Node(s, loc, t, rule="rename_id")
- )("rename_id")
- resource_ref = ((constant_ref | entity_ref | function_ref | procedure_ref | type_ref)).setParseAction(
- lambda s, loc, t: Node(s, loc, t, rule="resource_ref")
- )("resource_ref")
- rule_head = (
- (
- RULE
- + rule_id
- + FOR
- + CaselessLiteral("(")
- + entity_ref
- + ZeroOrMore((CaselessLiteral(",") + entity_ref))
- + CaselessLiteral(")")
- + CaselessLiteral(";")
- )
- ).setParseAction(lambda s, loc, t: ListNode(s, loc, t, rule="rule_head"))("rule_head")
- select_list = (
- (
- CaselessLiteral("(")
- + named_types
- + ZeroOrMore((CaselessLiteral(",") + named_types))
- + CaselessLiteral(")")
- )
- ).setParseAction(lambda s, loc, t: ListNode(s, loc, t, rule="select_list"))("select_list")
- string_literal = ((simple_string_literal | encoded_string_literal)).setParseAction(
- lambda s, loc, t: Node(s, loc, t, rule="string_literal")
- )("string_literal")
- subtype_constraint_head = (
- (SUBTYPE_CONSTRAINT + subtype_constraint_id + FOR + entity_ref + CaselessLiteral(";"))
- ).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="subtype_constraint_head"))("subtype_constraint_head")
- subtype_declaration = (
- (
- SUBTYPE
- + OF
- + CaselessLiteral("(")
- + entity_ref
- + ZeroOrMore((CaselessLiteral(",") + entity_ref))
- + CaselessLiteral(")")
- )
- ).setParseAction(SubTypeExpression)("subtype_declaration")
- total_over = (
- (
- TOTAL_OVER
- + CaselessLiteral("(")
- + entity_ref
- + ZeroOrMore((CaselessLiteral(",") + entity_ref))
- + CaselessLiteral(")")
- + CaselessLiteral(";")
- )
- ).setParseAction(lambda s, loc, t: ListNode(s, loc, t, rule="total_over"))("total_over")
- type_label = ((type_label_id | type_label_ref)).setParseAction(
- lambda s, loc, t: Node(s, loc, t, rule="type_label")
- )("type_label")
- unique_rule = (
- (
- Optional((rule_label_id + CaselessLiteral(":")))
- + referenced_attribute
- + ZeroOrMore((CaselessLiteral(",") + referenced_attribute))
- )
- ).setParseAction(lambda s, loc, t: ListNode(s, loc, t, rule="unique_rule"))("unique_rule")
- use_clause = (
- (
- USE
- + FROM
- + schema_ref
- + Optional(
- (
- CaselessLiteral("(")
- + named_type_or_rename
- + ZeroOrMore((CaselessLiteral(",") + named_type_or_rename))
- + CaselessLiteral(")")
- )
- )
- + CaselessLiteral(";")
- )
- ).setParseAction(lambda s, loc, t: ListNode(s, loc, t, rule="use_clause"))("use_clause")
- not_lparen_star = ((not_paren_star | CaselessLiteral(")"))).setParseAction(
- lambda s, loc, t: Node(s, loc, t, rule="not_lparen_star")
- )("not_lparen_star")
- remark_ref = (
- (
- attribute_ref
- | constant_ref
- | entity_ref
- | enumeration_ref
- | function_ref
- | parameter_ref
- | procedure_ref
- | rule_label_ref
- | rule_ref
- | schema_ref
- | subtype_constraint_ref
- | type_label_ref
- | type_ref
- | variable_ref
- )
- ).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="remark_ref"))("remark_ref")
- attribute_decl = ((redeclared_attribute | attribute_id)).setParseAction(
- lambda s, loc, t: Node(s, loc, t, rule="attribute_decl")
- )("attribute_decl")
- generic_entity_type = ((GENERIC_ENTITY + Optional((CaselessLiteral(":") + type_label)))).setParseAction(
- lambda s, loc, t: Node(s, loc, t, rule="generic_entity_type")
- )("generic_entity_type")
- generic_type = ((GENERIC + Optional((CaselessLiteral(":") + type_label)))).setParseAction(
- lambda s, loc, t: Node(s, loc, t, rule="generic_type")
- )("generic_type")
- literal = ((binary_literal | logical_literal | real_literal | string_literal)).setParseAction(
- lambda s, loc, t: Node(s, loc, t, rule="literal")
- )("literal")
- resource_or_rename = ((resource_ref + Optional((AS + rename_id)))).setParseAction(
- lambda s, loc, t: Node(s, loc, t, rule="resource_or_rename")
- )("resource_or_rename")
+ qualified_attribute = ((SELF + group_qualifier + attribute_qualifier)).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="qualified_attribute"))("qualified_attribute")
+ redeclared_attribute = ((qualified_attribute + Optional((RENAMED + attribute_id)))).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="redeclared_attribute"))("redeclared_attribute")
+ referenced_attribute = ((attribute_ref | qualified_attribute)).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="referenced_attribute"))("referenced_attribute")
+ rename_id = ((constant_id | entity_id | function_id | procedure_id | type_id)).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="rename_id"))("rename_id")
+ resource_ref = ((constant_ref | entity_ref | function_ref | procedure_ref | type_ref)).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="resource_ref"))("resource_ref")
+ rule_head = ((RULE + rule_id + FOR + CaselessLiteral("(") + entity_ref + ZeroOrMore((CaselessLiteral(",") + entity_ref)) + CaselessLiteral(")") + CaselessLiteral(";"))).setParseAction(lambda s, loc, t: ListNode(s, loc, t, rule="rule_head"))("rule_head")
+ select_list = ((CaselessLiteral("(") + named_types + ZeroOrMore((CaselessLiteral(",") + named_types)) + CaselessLiteral(")"))).setParseAction(lambda s, loc, t: ListNode(s, loc, t, rule="select_list"))("select_list")
+ string_literal = ((simple_string_literal | encoded_string_literal))("string_literal")
+ subtype_constraint_head = ((SUBTYPE_CONSTRAINT + subtype_constraint_id + FOR + entity_ref + CaselessLiteral(";"))).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="subtype_constraint_head"))("subtype_constraint_head")
+ subtype_declaration = ((SUBTYPE + OF + CaselessLiteral("(") + entity_ref + ZeroOrMore((CaselessLiteral(",") + entity_ref)) + CaselessLiteral(")"))).setParseAction(SubTypeExpression)("subtype_declaration")
+ total_over = ((TOTAL_OVER + CaselessLiteral("(") + entity_ref + ZeroOrMore((CaselessLiteral(",") + entity_ref)) + CaselessLiteral(")") + CaselessLiteral(";"))).setParseAction(lambda s, loc, t: ListNode(s, loc, t, rule="total_over"))("total_over")
+ type_label = ((type_label_id | type_label_ref)).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="type_label"))("type_label")
+ unique_rule = ((Optional((rule_label_id + CaselessLiteral(":"))) + referenced_attribute + ZeroOrMore((CaselessLiteral(",") + referenced_attribute)))).setParseAction(lambda s, loc, t: ListNode(s, loc, t, rule="unique_rule"))("unique_rule")
+ use_clause = ((USE + FROM + schema_ref + Optional((CaselessLiteral("(") + named_type_or_rename + ZeroOrMore((CaselessLiteral(",") + named_type_or_rename)) + CaselessLiteral(")"))) + CaselessLiteral(";"))).setParseAction(lambda s, loc, t: ListNode(s, loc, t, rule="use_clause"))("use_clause")
+ not_lparen_star = ((not_paren_star | CaselessLiteral(")"))).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="not_lparen_star"))("not_lparen_star")
+ remark_ref = ((attribute_ref | constant_ref | entity_ref | enumeration_ref | function_ref | parameter_ref | procedure_ref | rule_label_ref | rule_ref | schema_ref | subtype_constraint_ref | type_label_ref | type_ref | variable_ref)).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="remark_ref"))("remark_ref")
+ attribute_decl = ((redeclared_attribute | attribute_id)).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="attribute_decl"))("attribute_decl")
+ generic_entity_type = ((GENERIC_ENTITY + Optional((CaselessLiteral(":") + type_label)))).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="generic_entity_type"))("generic_entity_type")
+ generic_type = ((GENERIC + Optional((CaselessLiteral(":") + type_label)))).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="generic_type"))("generic_type")
+ literal = ((binary_literal | logical_literal | real_literal | string_literal)).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="literal"))("literal")
+ resource_or_rename = ((resource_ref + Optional((AS + rename_id)))).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="resource_or_rename"))("resource_or_rename")
schema_version_id = (string_literal)("schema_version_id")
- select_extension = ((BASED_ON + type_ref + Optional((WITH + select_list)))).setParseAction(
- lambda s, loc, t: Node(s, loc, t, rule="select_extension")
- )("select_extension")
- select_type = (
- (Optional((EXTENSIBLE + Optional(GENERIC_ENTITY))) + SELECT + Optional((select_list | select_extension)))
- ).setParseAction(SelectType)("select_type")
- unique_clause = (
- (UNIQUE + unique_rule + CaselessLiteral(";") + ZeroOrMore((unique_rule + CaselessLiteral(";"))))
- ).setParseAction(lambda s, loc, t: ListNode(s, loc, t, rule="unique_clause"))("unique_clause")
- lparen_then_not_lparen_star = (
- (CaselessLiteral("(") + ZeroOrMore(CaselessLiteral("(")) + not_lparen_star + ZeroOrMore(not_lparen_star))
- ).setParseAction(lambda s, loc, t: ListNode(s, loc, t, rule="lparen_then_not_lparen_star"))(
- "lparen_then_not_lparen_star"
- )
- remark_tag = (
- (CaselessLiteral('"') + remark_ref + ZeroOrMore((CaselessLiteral(".") + remark_ref)) + CaselessLiteral('"'))
- ).setParseAction(lambda s, loc, t: ListNode(s, loc, t, rule="remark_tag"))("remark_tag")
- tail_remark = ((CaselessLiteral("--") + Optional(remark_tag))).setParseAction(
- lambda s, loc, t: Node(s, loc, t, rule="tail_remark")
- )("tail_remark")
- constructed_types = ((enumeration_type | select_type)).setParseAction(
- lambda s, loc, t: Node(s, loc, t, rule="constructed_types")
- )("constructed_types")
- reference_clause = (
- (
- REFERENCE
- + FROM
- + schema_ref
- + Optional(
- (
- CaselessLiteral("(")
- + resource_or_rename
- + ZeroOrMore((CaselessLiteral(",") + resource_or_rename))
- + CaselessLiteral(")")
- )
- )
- + CaselessLiteral(";")
- )
- ).setParseAction(lambda s, loc, t: ListNode(s, loc, t, rule="reference_clause"))("reference_clause")
- interface_specification = ((reference_clause | use_clause)).setParseAction(
- lambda s, loc, t: Node(s, loc, t, rule="interface_specification")
- )("interface_specification")
- binary_type = Forward()("binary_type")
- function_decl = Forward()("function_decl")
- general_set_type = Forward()("general_set_type")
- actual_parameter_list = Forward()("actual_parameter_list")
- if_stmt = Forward()("if_stmt")
- simple_factor = Forward()("simple_factor")
- case_stmt = Forward()("case_stmt")
- qualifier = Forward()("qualifier")
- general_list_type = Forward()("general_list_type")
- interval = Forward()("interval")
- set_type = Forward()("set_type")
- return_stmt = Forward()("return_stmt")
- schema_decl = Forward()("schema_decl")
- bound_spec = Forward()("bound_spec")
- supertype_factor = Forward()("supertype_factor")
- logical_expression = Forward()("logical_expression")
- numeric_expression = Forward()("numeric_expression")
- repeat_control = Forward()("repeat_control")
- qualifiable_factor = Forward()("qualifiable_factor")
- inverse_attr = Forward()("inverse_attr")
- increment_control = Forward()("increment_control")
- compound_stmt = Forward()("compound_stmt")
- until_control = Forward()("until_control")
- remark = Forward()("remark")
- simple_expression = Forward()("simple_expression")
- instantiable_type = Forward()("instantiable_type")
- constant_body = Forward()("constant_body")
- inverse_clause = Forward()("inverse_clause")
- query_expression = Forward()("query_expression")
- repeat_stmt = Forward()("repeat_stmt")
- increment = Forward()("increment")
- aggregate_type = Forward()("aggregate_type")
- index_1 = Forward()("index_1")
- bound_2 = Forward()("bound_2")
- factor = Forward()("factor")
- interval_item = Forward()("interval_item")
- type_decl = Forward()("type_decl")
- supertype_rule = Forward()("supertype_rule")
- assignment_stmt = Forward()("assignment_stmt")
- interval_low = Forward()("interval_low")
- concrete_types = Forward()("concrete_types")
- element = Forward()("element")
- string_type = Forward()("string_type")
- procedure_decl = Forward()("procedure_decl")
- width_spec = Forward()("width_spec")
- alias_stmt = Forward()("alias_stmt")
- subtype_constraint = Forward()("subtype_constraint")
- index = Forward()("index")
- declaration = Forward()("declaration")
- real_type = Forward()("real_type")
- index_qualifier = Forward()("index_qualifier")
- generalized_types = Forward()("generalized_types")
- constant_decl = Forward()("constant_decl")
- precision_spec = Forward()("precision_spec")
- function_head = Forward()("function_head")
- derive_clause = Forward()("derive_clause")
- function_call = Forward()("function_call")
- case_label = Forward()("case_label")
- supertype_expression = Forward()("supertype_expression")
- procedure_head = Forward()("procedure_head")
- derived_attr = Forward()("derived_attr")
- bag_type = Forward()("bag_type")
- term = Forward()("term")
- supertype_constraint = Forward()("supertype_constraint")
- aggregate_source = Forward()("aggregate_source")
- where_clause = Forward()("where_clause")
- repetition = Forward()("repetition")
- abstract_supertype_declaration = Forward()("abstract_supertype_declaration")
- domain_rule = Forward()("domain_rule")
- index_2 = Forward()("index_2")
- subsuper = Forward()("subsuper")
- supertype_term = Forward()("supertype_term")
- underlying_type = Forward()("underlying_type")
- subtype_constraint_decl = Forward()("subtype_constraint_decl")
- parameter = Forward()("parameter")
- rule_decl = Forward()("rule_decl")
- case_action = Forward()("case_action")
- local_decl = Forward()("local_decl")
- primary = Forward()("primary")
- one_of = Forward()("one_of")
- local_variable = Forward()("local_variable")
- entity_head = Forward()("entity_head")
- formal_parameter = Forward()("formal_parameter")
- array_type = Forward()("array_type")
- subtype_constraint_body = Forward()("subtype_constraint_body")
- explicit_attr = Forward()("explicit_attr")
- general_bag_type = Forward()("general_bag_type")
- while_control = Forward()("while_control")
- schema_body = Forward()("schema_body")
+ select_extension = ((BASED_ON + type_ref + Optional((WITH + select_list)))).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="select_extension"))("select_extension")
+ select_type = ((Optional((EXTENSIBLE + Optional(GENERIC_ENTITY))) + SELECT + Optional((select_list | select_extension)))).setParseAction(SelectType)("select_type")
+ unique_clause = ((UNIQUE + unique_rule + CaselessLiteral(";") + ZeroOrMore((unique_rule + CaselessLiteral(";"))))).setParseAction(lambda s, loc, t: ListNode(s, loc, t, rule="unique_clause"))("unique_clause")
+ lparen_then_not_lparen_star = ((CaselessLiteral("(") + ZeroOrMore(CaselessLiteral("(")) + not_lparen_star + ZeroOrMore(not_lparen_star))).setParseAction(lambda s, loc, t: ListNode(s, loc, t, rule="lparen_then_not_lparen_star"))("lparen_then_not_lparen_star")
+ remark_tag = ((CaselessLiteral("\"") + remark_ref + ZeroOrMore((CaselessLiteral(".") + remark_ref)) + CaselessLiteral("\""))).setParseAction(lambda s, loc, t: ListNode(s, loc, t, rule="remark_tag"))("remark_tag")
+ tail_remark = ((CaselessLiteral("--") + Optional(remark_tag))).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="tail_remark"))("tail_remark")
+ constructed_types = ((enumeration_type | select_type)).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="constructed_types"))("constructed_types")
+ reference_clause = ((REFERENCE + FROM + schema_ref + Optional((CaselessLiteral("(") + resource_or_rename + ZeroOrMore((CaselessLiteral(",") + resource_or_rename)) + CaselessLiteral(")"))) + CaselessLiteral(";"))).setParseAction(lambda s, loc, t: ListNode(s, loc, t, rule="reference_clause"))("reference_clause")
+ interface_specification = ((reference_clause | use_clause)).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="interface_specification"))("interface_specification")
list_type = Forward()("list_type")
- entity_constructor = Forward()("entity_constructor")
- syntax = Forward()("syntax")
- entity_decl = Forward()("entity_decl")
- algorithm_head = Forward()("algorithm_head")
- general_array_type = Forward()("general_array_type")
- entity_body = Forward()("entity_body")
- aggregation_types = Forward()("aggregation_types")
- selector = Forward()("selector")
- embedded_remark = Forward()("embedded_remark")
- aggregate_initializer = Forward()("aggregate_initializer")
parameter_type = Forward()("parameter_type")
- general_aggregation_types = Forward()("general_aggregation_types")
- bound_1 = Forward()("bound_1")
- stmt = Forward()("stmt")
+ qualifiable_factor = Forward()("qualifiable_factor")
+ supertype_expression = Forward()("supertype_expression")
+ precision_spec = Forward()("precision_spec")
+ element = Forward()("element")
+ subtype_constraint_decl = Forward()("subtype_constraint_decl")
+ derived_attr = Forward()("derived_attr")
+ general_bag_type = Forward()("general_bag_type")
+ aggregation_types = Forward()("aggregation_types")
+ entity_decl = Forward()("entity_decl")
+ rule_decl = Forward()("rule_decl")
+ numeric_expression = Forward()("numeric_expression")
+ increment = Forward()("increment")
+ supertype_constraint = Forward()("supertype_constraint")
+ concrete_types = Forward()("concrete_types")
+ remark = Forward()("remark")
width = Forward()("width")
+ index = Forward()("index")
+ selector = Forward()("selector")
+ simple_factor = Forward()("simple_factor")
+ actual_parameter_list = Forward()("actual_parameter_list")
+ general_set_type = Forward()("general_set_type")
+ declaration = Forward()("declaration")
+ repeat_stmt = Forward()("repeat_stmt")
+ until_control = Forward()("until_control")
+ supertype_factor = Forward()("supertype_factor")
+ one_of = Forward()("one_of")
procedure_call_stmt = Forward()("procedure_call_stmt")
+ repetition = Forward()("repetition")
+ case_action = Forward()("case_action")
+ inverse_attr = Forward()("inverse_attr")
+ aggregate_initializer = Forward()("aggregate_initializer")
+ bound_spec = Forward()("bound_spec")
interval_high = Forward()("interval_high")
+ algorithm_head = Forward()("algorithm_head")
+ real_type = Forward()("real_type")
+ case_stmt = Forward()("case_stmt")
+ constant_decl = Forward()("constant_decl")
+ alias_stmt = Forward()("alias_stmt")
+ function_head = Forward()("function_head")
+ interval_low = Forward()("interval_low")
+ aggregate_source = Forward()("aggregate_source")
+ query_expression = Forward()("query_expression")
+ width_spec = Forward()("width_spec")
+ interval_item = Forward()("interval_item")
+ subsuper = Forward()("subsuper")
+ array_type = Forward()("array_type")
+ primary = Forward()("primary")
+ case_label = Forward()("case_label")
+ index_1 = Forward()("index_1")
+ entity_constructor = Forward()("entity_constructor")
+ subtype_constraint_body = Forward()("subtype_constraint_body")
+ constant_body = Forward()("constant_body")
+ explicit_attr = Forward()("explicit_attr")
+ entity_body = Forward()("entity_body")
+ repeat_control = Forward()("repeat_control")
expression = Forward()("expression")
+ if_stmt = Forward()("if_stmt")
+ subtype_constraint = Forward()("subtype_constraint")
+ while_control = Forward()("while_control")
+ logical_expression = Forward()("logical_expression")
+ aggregate_type = Forward()("aggregate_type")
+ interval = Forward()("interval")
+ general_array_type = Forward()("general_array_type")
+ underlying_type = Forward()("underlying_type")
+ instantiable_type = Forward()("instantiable_type")
+ supertype_rule = Forward()("supertype_rule")
+ generalized_types = Forward()("generalized_types")
+ local_variable = Forward()("local_variable")
+ schema_body = Forward()("schema_body")
+ general_list_type = Forward()("general_list_type")
+ assignment_stmt = Forward()("assignment_stmt")
+ bound_2 = Forward()("bound_2")
+ binary_type = Forward()("binary_type")
+ syntax = Forward()("syntax")
+ parameter = Forward()("parameter")
+ string_type = Forward()("string_type")
+ supertype_term = Forward()("supertype_term")
+ embedded_remark = Forward()("embedded_remark")
+ increment_control = Forward()("increment_control")
+ local_decl = Forward()("local_decl")
+ factor = Forward()("factor")
+ procedure_head = Forward()("procedure_head")
+ function_decl = Forward()("function_decl")
+ type_decl = Forward()("type_decl")
+ general_aggregation_types = Forward()("general_aggregation_types")
+ domain_rule = Forward()("domain_rule")
+ schema_decl = Forward()("schema_decl")
+ derive_clause = Forward()("derive_clause")
+ return_stmt = Forward()("return_stmt")
+ bag_type = Forward()("bag_type")
+ procedure_decl = Forward()("procedure_decl")
+ abstract_supertype_declaration = Forward()("abstract_supertype_declaration")
+ inverse_clause = Forward()("inverse_clause")
+ index_qualifier = Forward()("index_qualifier")
+ bound_1 = Forward()("bound_1")
+ compound_stmt = Forward()("compound_stmt")
+ set_type = Forward()("set_type")
+ where_clause = Forward()("where_clause")
+ qualifier = Forward()("qualifier")
+ entity_head = Forward()("entity_head")
+ stmt = Forward()("stmt")
+ index_2 = Forward()("index_2")
+ term = Forward()("term")
+ function_call = Forward()("function_call")
+ formal_parameter = Forward()("formal_parameter")
+ simple_expression = Forward()("simple_expression")
simple_types = Forward()("simple_types")
- binary_type << (((BINARY + Optional(width_spec)))).setParseAction(BinaryType)
- function_decl << (
- ((function_head + algorithm_head + stmt + ZeroOrMore(stmt) + END_FUNCTION + CaselessLiteral(";")))
- ).setParseAction(lambda s, loc, t: ListNode(s, loc, t, rule="function_decl"))
- general_set_type << (((SET + Optional(bound_spec) + OF + parameter_type))).setParseAction(
- lambda s, loc, t: Node(s, loc, t, rule="general_set_type")
- )
- actual_parameter_list << (
- (
- (
- CaselessLiteral("(")
- + Optional(parameter)
- + ZeroOrMore((CaselessLiteral(",") + parameter))
- + CaselessLiteral(")")
- )
- )
- ).setParseAction(lambda s, loc, t: ListNode(s, loc, t, rule="actual_parameter_list"))
- if_stmt << (
- (
- (
- IF
- + logical_expression
- + THEN
- + stmt
- + ZeroOrMore(stmt)
- + Optional((ELSE + stmt + ZeroOrMore(stmt)))
- + END_IF
- + CaselessLiteral(";")
- )
- )
- ).setParseAction(lambda s, loc, t: ListNode(s, loc, t, rule="if_stmt"))
- simple_factor << (
- (
- (
- aggregate_initializer
- | interval
- | query_expression
- | (Optional(unary_op) + ((CaselessLiteral("(") + expression + CaselessLiteral(")")) | primary))
- | entity_constructor
- | enumeration_reference
- )
- )
- ).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="simple_factor"))
- case_stmt << (
- (
- (
- CASE
- + selector
- + OF
- + ZeroOrMore(case_action)
- + Optional((OTHERWISE + CaselessLiteral(":") + stmt))
- + END_CASE
- + CaselessLiteral(";")
- )
- )
- ).setParseAction(lambda s, loc, t: ListNode(s, loc, t, rule="case_stmt"))
- qualifier << (((attribute_qualifier | group_qualifier | index_qualifier))).setParseAction(
- lambda s, loc, t: Node(s, loc, t, rule="qualifier")
- )
- general_list_type << (((LIST + Optional(bound_spec) + OF + Optional(UNIQUE) + parameter_type))).setParseAction(
- lambda s, loc, t: Node(s, loc, t, rule="general_list_type")
- )
- interval << (
- (
- (
- CaselessLiteral("{")
- + interval_low
- + interval_op
- + interval_item
- + interval_op
- + interval_high
- + CaselessLiteral("}")
- )
- )
- ).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="interval"))
- set_type << (((SET + Optional(bound_spec) + OF + instantiable_type))).setParseAction(
- lambda s, loc, t: Node(s, loc, t, rule="set_type")
- )
- return_stmt << (
- ((RETURN + Optional((CaselessLiteral("(") + expression + CaselessLiteral(")"))) + CaselessLiteral(";")))
- ).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="return_stmt"))
- schema_decl << (
- (
- (
- SCHEMA
- + schema_id
- + Optional(schema_version_id)
- + CaselessLiteral(";")
- + schema_body
- + END_SCHEMA
- + CaselessLiteral(";")
- )
- )
- ).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="schema_decl"))
- bound_spec << (
- ((CaselessLiteral("[") + bound_1 + CaselessLiteral(":") + bound_2 + CaselessLiteral("]")))
- ).setParseAction(BoundSpecification)
- supertype_factor << (((supertype_term + ZeroOrMore((AND + supertype_term))))).setParseAction(
- lambda s, loc, t: ListNode(s, loc, t, rule="supertype_factor")
- )
- logical_expression << (expression)
- numeric_expression << (simple_expression)
- repeat_control << (
- ((Optional(increment_control) + Optional(while_control) + Optional(until_control)))
- ).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="repeat_control"))
- qualifiable_factor << (
- ((function_call | attribute_ref | constant_factor | general_ref | population))
- ).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="qualifiable_factor"))
- inverse_attr << (
- (
- (
- attribute_decl
- + CaselessLiteral(":")
- + Optional(((SET | BAG) + Optional(bound_spec) + OF))
- + entity_ref
- + FOR
- + Optional((entity_ref + CaselessLiteral(".")))
- + attribute_ref
- + CaselessLiteral(";")
- )
- )
- ).setParseAction(InverseAttribute)
- increment_control << (
- ((variable_id + CaselessLiteral(":=") + bound_1 + TO + bound_2 + Optional((BY + increment))))
- ).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="increment_control"))
- compound_stmt << (((BEGIN + stmt + ZeroOrMore(stmt) + END + CaselessLiteral(";")))).setParseAction(
- lambda s, loc, t: ListNode(s, loc, t, rule="compound_stmt")
- )
- until_control << (((UNTIL + logical_expression))).setParseAction(
- lambda s, loc, t: Node(s, loc, t, rule="until_control")
- )
- remark << (((embedded_remark | tail_remark))).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="remark"))
- simple_expression << (((term + ZeroOrMore((add_like_op + term))))).setParseAction(
- lambda s, loc, t: ListNode(s, loc, t, rule="simple_expression")
- )
- instantiable_type << (((concrete_types | entity_ref))).setParseAction(
- lambda s, loc, t: Node(s, loc, t, rule="instantiable_type")
- )
- constant_body << (
- (
- (
- constant_id
- + CaselessLiteral(":")
- + instantiable_type
- + CaselessLiteral(":=")
- + expression
- + CaselessLiteral(";")
- )
- )
- ).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="constant_body"))
- inverse_clause << (((INVERSE + inverse_attr + ZeroOrMore(inverse_attr)))).setParseAction(AttributeList)
- query_expression << (
- (
- (
- QUERY
- + CaselessLiteral("(")
- + variable_id
- + CaselessLiteral("<*")
- + aggregate_source
- + CaselessLiteral("|")
- + logical_expression
- + CaselessLiteral(")")
- )
- )
- ).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="query_expression"))
- repeat_stmt << (
- (
- (
- REPEAT
- + repeat_control
- + CaselessLiteral(";")
- + stmt
- + ZeroOrMore(stmt)
- + END_REPEAT
- + CaselessLiteral(";")
- )
- )
- ).setParseAction(lambda s, loc, t: ListNode(s, loc, t, rule="repeat_stmt"))
- increment << (numeric_expression)
- aggregate_type << (
- ((AGGREGATE + Optional((CaselessLiteral(":") + type_label)) + OF + parameter_type))
- ).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="aggregate_type"))
- index_1 << (index)
- bound_2 << (numeric_expression)
- factor << (((simple_factor + Optional((CaselessLiteral("**") + simple_factor))))).setParseAction(
- lambda s, loc, t: Node(s, loc, t, rule="factor")
- )
- interval_item << (simple_expression)
- type_decl << (
- (
- (
- TYPE
- + type_id
- + CaselessLiteral("=")
- + underlying_type
- + CaselessLiteral(";")
- + Optional(where_clause)
- + END_TYPE
- + CaselessLiteral(";")
- )
- )
- ).setParseAction(TypeDeclaration)
- supertype_rule << (((SUPERTYPE + subtype_constraint))).setParseAction(
- lambda s, loc, t: Node(s, loc, t, rule="supertype_rule")
- )
- assignment_stmt << (
- ((general_ref + ZeroOrMore(qualifier) + CaselessLiteral(":=") + expression + CaselessLiteral(";")))
- ).setParseAction(lambda s, loc, t: ListNode(s, loc, t, rule="assignment_stmt"))
- interval_low << (simple_expression)
- concrete_types << (((aggregation_types | simple_types | type_ref))).setParseAction(
- lambda s, loc, t: Node(s, loc, t, rule="concrete_types")
- )
- element << (((expression + Optional((CaselessLiteral(":") + repetition))))).setParseAction(
- lambda s, loc, t: Node(s, loc, t, rule="element")
- )
- string_type << (((STRING + Optional(width_spec)))).setParseAction(StringType)
- procedure_decl << (
- ((procedure_head + algorithm_head + ZeroOrMore(stmt) + END_PROCEDURE + CaselessLiteral(";")))
- ).setParseAction(lambda s, loc, t: ListNode(s, loc, t, rule="procedure_decl"))
- width_spec << (((CaselessLiteral("(") + width + CaselessLiteral(")") + Optional(FIXED)))).setParseAction(
- WidthSpec
- )
- alias_stmt << (
- (
- (
- ALIAS
- + variable_id
- + FOR
- + general_ref
- + ZeroOrMore(qualifier)
- + CaselessLiteral(";")
- + stmt
- + ZeroOrMore(stmt)
- + END_ALIAS
- + CaselessLiteral(";")
- )
- )
- ).setParseAction(lambda s, loc, t: ListNode(s, loc, t, rule="alias_stmt"))
- subtype_constraint << (
- ((OF + CaselessLiteral("(") + supertype_expression + CaselessLiteral(")")))
- ).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="subtype_constraint"))
- index << (numeric_expression)
- declaration << (
- ((entity_decl | function_decl | procedure_decl | subtype_constraint_decl | type_decl))
- ).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="declaration"))
- real_type << (
- ((REAL + Optional((CaselessLiteral("(") + precision_spec + CaselessLiteral(")")))))
- ).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="real_type"))
- index_qualifier << (
- ((CaselessLiteral("[") + index_1 + Optional((CaselessLiteral(":") + index_2)) + CaselessLiteral("]")))
- ).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="index_qualifier"))
- generalized_types << (
- ((aggregate_type | general_aggregation_types | generic_entity_type | generic_type))
- ).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="generalized_types"))
- constant_decl << (
- ((CONSTANT + constant_body + ZeroOrMore(constant_body) + END_CONSTANT + CaselessLiteral(";")))
- ).setParseAction(lambda s, loc, t: ListNode(s, loc, t, rule="constant_decl"))
+ list_type << (((LIST + Optional(bound_spec) + OF + Optional(UNIQUE) + instantiable_type))).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="list_type"))
+ parameter_type << (((generalized_types | simple_types | named_types))).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="parameter_type"))
+ qualifiable_factor << (((function_call | attribute_ref | constant_factor | general_ref | population))).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="qualifiable_factor"))
+ supertype_expression << (((supertype_factor + ZeroOrMore((ANDOR + supertype_factor))))).setParseAction(lambda s, loc, t: ListNode(s, loc, t, rule="supertype_expression"))
precision_spec << (numeric_expression)
- function_head << (
- (
- (
- FUNCTION
- + function_id
- + Optional(
- (
- CaselessLiteral("(")
- + formal_parameter
- + ZeroOrMore((CaselessLiteral(";") + formal_parameter))
- + CaselessLiteral(")")
- )
- )
- + CaselessLiteral(":")
- + parameter_type
- + CaselessLiteral(";")
- )
- )
- ).setParseAction(lambda s, loc, t: ListNode(s, loc, t, rule="function_head"))
- derive_clause << (((DERIVE + derived_attr + ZeroOrMore(derived_attr)))).setParseAction(AttributeList)
- function_call << ((((built_in_function | function_ref) + actual_parameter_list))).setParseAction(
- lambda s, loc, t: Node(s, loc, t, rule="function_call")
- )
- case_label << (expression)
- supertype_expression << (((supertype_factor + ZeroOrMore((ANDOR + supertype_factor))))).setParseAction(
- lambda s, loc, t: ListNode(s, loc, t, rule="supertype_expression")
- )
- procedure_head << (
- (
- (
- PROCEDURE
- + procedure_id
- + Optional(
- (
- CaselessLiteral("(")
- + Optional(VAR)
- + formal_parameter
- + ZeroOrMore((CaselessLiteral(";") + Optional(VAR) + formal_parameter))
- + CaselessLiteral(")")
- )
- )
- + CaselessLiteral(";")
- )
- )
- ).setParseAction(lambda s, loc, t: ListNode(s, loc, t, rule="procedure_head"))
- derived_attr << (
- (
- (
- attribute_decl
- + CaselessLiteral(":")
- + parameter_type
- + CaselessLiteral(":=")
- + expression
- + CaselessLiteral(";")
- )
- )
- ).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="derived_attr"))
- bag_type << (((BAG + Optional(bound_spec) + OF + instantiable_type))).setParseAction(
- lambda s, loc, t: Node(s, loc, t, rule="bag_type")
- )
- term << (((factor + ZeroOrMore((multiplication_like_op + factor))))).setParseAction(
- lambda s, loc, t: ListNode(s, loc, t, rule="term")
- )
- supertype_constraint << (
- ((abstract_supertype_declaration | abstract_entity_declaration | supertype_rule))
- ).setParseAction(SuperTypeExpression)
- aggregate_source << (simple_expression)
- where_clause << (
- ((WHERE + domain_rule + CaselessLiteral(";") + ZeroOrMore((domain_rule + CaselessLiteral(";")))))
- ).setParseAction(lambda s, loc, t: ListNode(s, loc, t, rule="where_clause"))
- repetition << (numeric_expression)
- abstract_supertype_declaration << (((ABSTRACT + SUPERTYPE + Optional(subtype_constraint)))).setParseAction(
- lambda s, loc, t: Node(s, loc, t, rule="abstract_supertype_declaration")
- )
- domain_rule << (((Optional((rule_label_id + CaselessLiteral(":"))) + expression))).setParseAction(
- lambda s, loc, t: Node(s, loc, t, rule="domain_rule")
- )
- index_2 << (index)
- subsuper << (((Optional(supertype_constraint) + Optional(subtype_declaration)))).setParseAction(
- lambda s, loc, t: Node(s, loc, t, rule="subsuper")
- )
- supertype_term << (
- ((one_of | (CaselessLiteral("(") + supertype_expression + CaselessLiteral(")")) | entity_ref))
- ).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="supertype_term"))
- underlying_type << (((constructed_types | concrete_types))).setParseAction(
- lambda s, loc, t: Node(s, loc, t, rule="underlying_type")
- )
- subtype_constraint_decl << (
- ((subtype_constraint_head + subtype_constraint_body + END_SUBTYPE_CONSTRAINT + CaselessLiteral(";")))
- ).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="subtype_constraint_decl"))
- parameter << (expression)
- rule_decl << (
- ((rule_head + algorithm_head + ZeroOrMore(stmt) + where_clause + END_RULE + CaselessLiteral(";")))
- ).setParseAction(lambda s, loc, t: ListNode(s, loc, t, rule="rule_decl"))
- case_action << (
- ((case_label + ZeroOrMore((CaselessLiteral(",") + case_label)) + CaselessLiteral(":") + stmt))
- ).setParseAction(lambda s, loc, t: ListNode(s, loc, t, rule="case_action"))
- local_decl << (
- ((LOCAL + local_variable + ZeroOrMore(local_variable) + END_LOCAL + CaselessLiteral(";")))
- ).setParseAction(lambda s, loc, t: ListNode(s, loc, t, rule="local_decl"))
- primary << (((literal | (qualifiable_factor + ZeroOrMore(qualifier))))).setParseAction(
- lambda s, loc, t: ListNode(s, loc, t, rule="primary")
- )
- one_of << (
- (
- (
- ONEOF
- + CaselessLiteral("(")
- + supertype_expression
- + ZeroOrMore((CaselessLiteral(",") + supertype_expression))
- + CaselessLiteral(")")
- )
- )
- ).setParseAction(lambda s, loc, t: ListNode(s, loc, t, rule="one_of"))
- local_variable << (
- (
- (
- variable_id
- + ZeroOrMore((CaselessLiteral(",") + variable_id))
- + CaselessLiteral(":")
- + parameter_type
- + Optional((CaselessLiteral(":=") + expression))
- + CaselessLiteral(";")
- )
- )
- ).setParseAction(lambda s, loc, t: ListNode(s, loc, t, rule="local_variable"))
- entity_head << (((ENTITY + entity_id + subsuper + CaselessLiteral(";")))).setParseAction(
- lambda s, loc, t: Node(s, loc, t, rule="entity_head")
- )
- formal_parameter << (
- ((parameter_id + ZeroOrMore((CaselessLiteral(",") + parameter_id)) + CaselessLiteral(":") + parameter_type))
- ).setParseAction(lambda s, loc, t: ListNode(s, loc, t, rule="formal_parameter"))
- array_type << (
- ((ARRAY + bound_spec + OF + Optional(OPTIONAL) + Optional(UNIQUE) + instantiable_type))
- ).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="array_type"))
- subtype_constraint_body << (
- (
- (
- Optional(abstract_supertype)
- + Optional(total_over)
- + Optional((supertype_expression + CaselessLiteral(";")))
- )
- )
- ).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="subtype_constraint_body"))
- explicit_attr << (
- (
- (
- attribute_decl
- + ZeroOrMore((CaselessLiteral(",") + attribute_decl))
- + CaselessLiteral(":")
- + Optional(OPTIONAL)
- + parameter_type
- + CaselessLiteral(";")
- )
- )
- ).setParseAction(ExplicitAttribute)
- general_bag_type << (((BAG + Optional(bound_spec) + OF + parameter_type))).setParseAction(
- lambda s, loc, t: Node(s, loc, t, rule="general_bag_type")
- )
- while_control << (((WHILE + logical_expression))).setParseAction(
- lambda s, loc, t: Node(s, loc, t, rule="while_control")
- )
- schema_body << (
- ((ZeroOrMore(interface_specification) + Optional(constant_decl) + ZeroOrMore((declaration | rule_decl))))
- ).setParseAction(lambda s, loc, t: ListNode(s, loc, t, rule="schema_body"))
- list_type << (((LIST + Optional(bound_spec) + OF + Optional(UNIQUE) + instantiable_type))).setParseAction(
- lambda s, loc, t: Node(s, loc, t, rule="list_type")
- )
- entity_constructor << (
- (
- (
- entity_ref
- + CaselessLiteral("(")
- + Optional((expression + ZeroOrMore((CaselessLiteral(",") + expression))))
- + CaselessLiteral(")")
- )
- )
- ).setParseAction(lambda s, loc, t: ListNode(s, loc, t, rule="entity_constructor"))
- syntax << (((schema_decl + ZeroOrMore(schema_decl)))).setParseAction(
- lambda s, loc, t: ListNode(s, loc, t, rule="syntax")
- )
- entity_decl << (((entity_head + entity_body + END_ENTITY + CaselessLiteral(";")))).setParseAction(
- EntityDeclaration
- )
- algorithm_head << (((ZeroOrMore(declaration) + Optional(constant_decl) + Optional(local_decl)))).setParseAction(
- lambda s, loc, t: ListNode(s, loc, t, rule="algorithm_head")
- )
- general_array_type << (
- ((ARRAY + Optional(bound_spec) + OF + Optional(OPTIONAL) + Optional(UNIQUE) + parameter_type))
- ).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="general_array_type"))
- entity_body << (
- (
- (
- ZeroOrMore(explicit_attr)
- + Optional(derive_clause)
- + Optional(inverse_clause)
- + Optional(unique_clause)
- + Optional(where_clause)
- )
- )
- ).setParseAction(lambda s, loc, t: ListNode(s, loc, t, rule="entity_body"))
+ element << (((expression + Optional((CaselessLiteral(":") + repetition))))).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="element"))
+ subtype_constraint_decl << (((subtype_constraint_head + subtype_constraint_body + END_SUBTYPE_CONSTRAINT + CaselessLiteral(";")))).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="subtype_constraint_decl"))
+ derived_attr << (((attribute_decl + CaselessLiteral(":") + parameter_type + CaselessLiteral(":=") + expression + CaselessLiteral(";")))).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="derived_attr"))
+ general_bag_type << (((BAG + Optional(bound_spec) + OF + parameter_type))).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="general_bag_type"))
aggregation_types << (((array_type | bag_type | list_type | set_type))).setParseAction(AggregationType)
- selector << (expression)
- embedded_remark << (
- (
- (
- CaselessLiteral("(*")
- + Optional(remark_tag)
- + ZeroOrMore(
- (
- (not_paren_star + ZeroOrMore(not_paren_star))
- | lparen_then_not_lparen_star
- | (CaselessLiteral("*") + ZeroOrMore(CaselessLiteral("*")))
- | not_rparen_star_then_rparen
- | embedded_remark
- )
- )
- + CaselessLiteral("*)")
- )
- )
- ).setParseAction(lambda s, loc, t: ListNode(s, loc, t, rule="embedded_remark"))
- aggregate_initializer << (
- (
- (
- CaselessLiteral("[")
- + Optional((element + ZeroOrMore((CaselessLiteral(",") + element))))
- + CaselessLiteral("]")
- )
- )
- ).setParseAction(lambda s, loc, t: ListNode(s, loc, t, rule="aggregate_initializer"))
- parameter_type << (((generalized_types | simple_types | named_types))).setParseAction(
- lambda s, loc, t: Node(s, loc, t, rule="parameter_type")
- )
- general_aggregation_types << (
- ((general_array_type | general_bag_type | general_list_type | general_set_type))
- ).setParseAction(AggregationType)
- bound_1 << (numeric_expression)
- stmt << (
- (
- (
- alias_stmt
- | assignment_stmt
- | case_stmt
- | compound_stmt
- | escape_stmt
- | if_stmt
- | null_stmt
- | procedure_call_stmt
- | repeat_stmt
- | return_stmt
- | skip_stmt
- )
- )
- ).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="stmt"))
+ entity_decl << (((entity_head + entity_body + END_ENTITY + CaselessLiteral(";")))).setParseAction(EntityDeclaration)
+ rule_decl << (((rule_head + algorithm_head + ZeroOrMore(stmt) + where_clause + END_RULE + CaselessLiteral(";")))).setParseAction(lambda s, loc, t: ListNode(s, loc, t, rule="rule_decl"))
+ numeric_expression << (simple_expression)
+ increment << (numeric_expression)
+ supertype_constraint << (((abstract_supertype_declaration | abstract_entity_declaration | supertype_rule))).setParseAction(SuperTypeExpression)
+ concrete_types << (((aggregation_types | simple_types | type_ref))).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="concrete_types"))
+ remark << (((embedded_remark | tail_remark))).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="remark"))
width << (numeric_expression)
- procedure_call_stmt << (
- (((built_in_procedure | procedure_ref) + actual_parameter_list + CaselessLiteral(";")))
- ).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="procedure_call_stmt"))
+ index << (numeric_expression)
+ selector << (expression)
+ simple_factor << (((aggregate_initializer | interval | query_expression | (Optional(unary_op) + ((CaselessLiteral("(") + expression + CaselessLiteral(")")) | primary)) | entity_constructor | enumeration_reference))).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="simple_factor"))
+ actual_parameter_list << (((CaselessLiteral("(") + Optional(parameter) + ZeroOrMore((CaselessLiteral(",") + parameter)) + CaselessLiteral(")")))).setParseAction(lambda s, loc, t: ListNode(s, loc, t, rule="actual_parameter_list"))
+ general_set_type << (((SET + Optional(bound_spec) + OF + parameter_type))).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="general_set_type"))
+ declaration << (((entity_decl | function_decl | procedure_decl | subtype_constraint_decl | type_decl))).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="declaration"))
+ repeat_stmt << (((REPEAT + repeat_control + CaselessLiteral(";") + stmt + ZeroOrMore(stmt) + END_REPEAT + CaselessLiteral(";")))).setParseAction(lambda s, loc, t: ListNode(s, loc, t, rule="repeat_stmt"))
+ until_control << (((UNTIL + logical_expression))).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="until_control"))
+ supertype_factor << (((supertype_term + ZeroOrMore((AND + supertype_term))))).setParseAction(lambda s, loc, t: ListNode(s, loc, t, rule="supertype_factor"))
+ one_of << (((ONEOF + CaselessLiteral("(") + supertype_expression + ZeroOrMore((CaselessLiteral(",") + supertype_expression)) + CaselessLiteral(")")))).setParseAction(lambda s, loc, t: ListNode(s, loc, t, rule="one_of"))
+ procedure_call_stmt << ((((built_in_procedure | procedure_ref) + actual_parameter_list + CaselessLiteral(";")))).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="procedure_call_stmt"))
+ repetition << (numeric_expression)
+ case_action << (((case_label + ZeroOrMore((CaselessLiteral(",") + case_label)) + CaselessLiteral(":") + stmt))).setParseAction(lambda s, loc, t: ListNode(s, loc, t, rule="case_action"))
+ inverse_attr << (((attribute_decl + CaselessLiteral(":") + Optional(((SET | BAG) + Optional(bound_spec) + OF)) + entity_ref + FOR + Optional((entity_ref + CaselessLiteral("."))) + attribute_ref + CaselessLiteral(";")))).setParseAction(InverseAttribute)
+ aggregate_initializer << (((CaselessLiteral("[") + Optional((element + ZeroOrMore((CaselessLiteral(",") + element)))) + CaselessLiteral("]")))).setParseAction(lambda s, loc, t: ListNode(s, loc, t, rule="aggregate_initializer"))
+ bound_spec << (((CaselessLiteral("[") + bound_1 + CaselessLiteral(":") + bound_2 + CaselessLiteral("]")))).setParseAction(BoundSpecification)
interval_high << (simple_expression)
- expression << (((simple_expression + Optional((rel_op_extended + simple_expression))))).setParseAction(
- lambda s, loc, t: Node(s, loc, t, rule="expression")
- )
- simple_types << (
- ((binary_type | boolean_type | integer_type | logical_type | number_type | real_type | string_type))
- ).setParseAction(SimpleType)
+ algorithm_head << (((ZeroOrMore(declaration) + Optional(constant_decl) + Optional(local_decl)))).setParseAction(lambda s, loc, t: ListNode(s, loc, t, rule="algorithm_head"))
+ real_type << (((REAL + Optional((CaselessLiteral("(") + precision_spec + CaselessLiteral(")")))))).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="real_type"))
+ case_stmt << (((CASE + selector + OF + ZeroOrMore(case_action) + Optional((OTHERWISE + CaselessLiteral(":") + stmt)) + END_CASE + CaselessLiteral(";")))).setParseAction(lambda s, loc, t: ListNode(s, loc, t, rule="case_stmt"))
+ constant_decl << (((CONSTANT + constant_body + ZeroOrMore(constant_body) + END_CONSTANT + CaselessLiteral(";")))).setParseAction(lambda s, loc, t: ListNode(s, loc, t, rule="constant_decl"))
+ alias_stmt << (((ALIAS + variable_id + FOR + general_ref + ZeroOrMore(qualifier) + CaselessLiteral(";") + stmt + ZeroOrMore(stmt) + END_ALIAS + CaselessLiteral(";")))).setParseAction(lambda s, loc, t: ListNode(s, loc, t, rule="alias_stmt"))
+ function_head << (((FUNCTION + function_id + Optional((CaselessLiteral("(") + formal_parameter + ZeroOrMore((CaselessLiteral(";") + formal_parameter)) + CaselessLiteral(")"))) + CaselessLiteral(":") + parameter_type + CaselessLiteral(";")))).setParseAction(lambda s, loc, t: ListNode(s, loc, t, rule="function_head"))
+ interval_low << (simple_expression)
+ aggregate_source << (simple_expression)
+ query_expression << (((QUERY + CaselessLiteral("(") + variable_id + CaselessLiteral("<*") + aggregate_source + CaselessLiteral("|") + logical_expression + CaselessLiteral(")")))).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="query_expression"))
+ width_spec << (((CaselessLiteral("(") + width + CaselessLiteral(")") + Optional(FIXED)))).setParseAction(WidthSpec)
+ interval_item << (simple_expression)
+ subsuper << (((Optional(supertype_constraint) + Optional(subtype_declaration)))).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="subsuper"))
+ array_type << (((ARRAY + bound_spec + OF + Optional(OPTIONAL) + Optional(UNIQUE) + instantiable_type))).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="array_type"))
+ primary << (((literal | (qualifiable_factor + ZeroOrMore(qualifier))))).setParseAction(lambda s, loc, t: ListNode(s, loc, t, rule="primary"))
+ case_label << (expression)
+ index_1 << (index)
+ entity_constructor << (((entity_ref + CaselessLiteral("(") + Optional((expression + ZeroOrMore((CaselessLiteral(",") + expression)))) + CaselessLiteral(")")))).setParseAction(lambda s, loc, t: ListNode(s, loc, t, rule="entity_constructor"))
+ subtype_constraint_body << (((Optional(abstract_supertype) + Optional(total_over) + Optional((supertype_expression + CaselessLiteral(";")))))).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="subtype_constraint_body"))
+ constant_body << (((constant_id + CaselessLiteral(":") + instantiable_type + CaselessLiteral(":=") + expression + CaselessLiteral(";")))).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="constant_body"))
+ explicit_attr << (((attribute_decl + ZeroOrMore((CaselessLiteral(",") + attribute_decl)) + CaselessLiteral(":") + Optional(OPTIONAL) + parameter_type + CaselessLiteral(";")))).setParseAction(ExplicitAttribute)
+ entity_body << (((ZeroOrMore(explicit_attr) + Optional(derive_clause) + Optional(inverse_clause) + Optional(unique_clause) + Optional(where_clause)))).setParseAction(lambda s, loc, t: ListNode(s, loc, t, rule="entity_body"))
+ repeat_control << (((Optional(increment_control) + Optional(while_control) + Optional(until_control)))).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="repeat_control"))
+ expression << (((simple_expression + Optional((rel_op_extended + simple_expression))))).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="expression"))
+ if_stmt << (((IF + logical_expression + THEN + stmt + ZeroOrMore(stmt) + Optional((ELSE + stmt + ZeroOrMore(stmt))) + END_IF + CaselessLiteral(";")))).setParseAction(lambda s, loc, t: ListNode(s, loc, t, rule="if_stmt"))
+ subtype_constraint << (((OF + CaselessLiteral("(") + supertype_expression + CaselessLiteral(")")))).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="subtype_constraint"))
+ while_control << (((WHILE + logical_expression))).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="while_control"))
+ logical_expression << (expression)
+ aggregate_type << (((AGGREGATE + Optional((CaselessLiteral(":") + type_label)) + OF + parameter_type))).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="aggregate_type"))
+ interval << (((CaselessLiteral("{") + interval_low + interval_op + interval_item + interval_op + interval_high + CaselessLiteral("}")))).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="interval"))
+ general_array_type << (((ARRAY + Optional(bound_spec) + OF + Optional(OPTIONAL) + Optional(UNIQUE) + parameter_type))).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="general_array_type"))
+ underlying_type << (((constructed_types | concrete_types))).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="underlying_type"))
+ instantiable_type << (((concrete_types | entity_ref))).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="instantiable_type"))
+ supertype_rule << (((SUPERTYPE + subtype_constraint))).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="supertype_rule"))
+ generalized_types << (((aggregate_type | general_aggregation_types | generic_entity_type | generic_type))).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="generalized_types"))
+ local_variable << (((variable_id + ZeroOrMore((CaselessLiteral(",") + variable_id)) + CaselessLiteral(":") + parameter_type + Optional((CaselessLiteral(":=") + expression)) + CaselessLiteral(";")))).setParseAction(lambda s, loc, t: ListNode(s, loc, t, rule="local_variable"))
+ schema_body << (((ZeroOrMore(interface_specification) + Optional(constant_decl) + ZeroOrMore((declaration | rule_decl))))).setParseAction(lambda s, loc, t: ListNode(s, loc, t, rule="schema_body"))
+ general_list_type << (((LIST + Optional(bound_spec) + OF + Optional(UNIQUE) + parameter_type))).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="general_list_type"))
+ assignment_stmt << (((general_ref + ZeroOrMore(qualifier) + CaselessLiteral(":=") + expression + CaselessLiteral(";")))).setParseAction(lambda s, loc, t: ListNode(s, loc, t, rule="assignment_stmt"))
+ bound_2 << (numeric_expression)
+ binary_type << (((BINARY + Optional(width_spec)))).setParseAction(BinaryType)
+ syntax << (((schema_decl + ZeroOrMore(schema_decl)))).setParseAction(lambda s, loc, t: ListNode(s, loc, t, rule="syntax"))
+ parameter << (expression)
+ string_type << (((STRING + Optional(width_spec)))).setParseAction(StringType)
+ supertype_term << (((one_of | (CaselessLiteral("(") + supertype_expression + CaselessLiteral(")")) | entity_ref))).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="supertype_term"))
+ embedded_remark << (((CaselessLiteral("(*") + Optional(remark_tag) + ZeroOrMore(((not_paren_star + ZeroOrMore(not_paren_star)) | lparen_then_not_lparen_star | (CaselessLiteral("*") + ZeroOrMore(CaselessLiteral("*"))) | not_rparen_star_then_rparen | embedded_remark)) + CaselessLiteral("*)")))).setParseAction(lambda s, loc, t: ListNode(s, loc, t, rule="embedded_remark"))
+ increment_control << (((variable_id + CaselessLiteral(":=") + bound_1 + TO + bound_2 + Optional((BY + increment))))).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="increment_control"))
+ local_decl << (((LOCAL + local_variable + ZeroOrMore(local_variable) + END_LOCAL + CaselessLiteral(";")))).setParseAction(lambda s, loc, t: ListNode(s, loc, t, rule="local_decl"))
+ factor << (((simple_factor + Optional((CaselessLiteral("**") + simple_factor))))).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="factor"))
+ procedure_head << (((PROCEDURE + procedure_id + Optional((CaselessLiteral("(") + Optional(VAR) + formal_parameter + ZeroOrMore((CaselessLiteral(";") + Optional(VAR) + formal_parameter)) + CaselessLiteral(")"))) + CaselessLiteral(";")))).setParseAction(lambda s, loc, t: ListNode(s, loc, t, rule="procedure_head"))
+ function_decl << (((function_head + algorithm_head + stmt + ZeroOrMore(stmt) + END_FUNCTION + CaselessLiteral(";")))).setParseAction(lambda s, loc, t: ListNode(s, loc, t, rule="function_decl"))
+ type_decl << (((TYPE + type_id + CaselessLiteral("=") + underlying_type + CaselessLiteral(";") + Optional(where_clause) + END_TYPE + CaselessLiteral(";")))).setParseAction(TypeDeclaration)
+ general_aggregation_types << (((general_array_type | general_bag_type | general_list_type | general_set_type))).setParseAction(AggregationType)
+ domain_rule << (((Optional((rule_label_id + CaselessLiteral(":"))) + expression))).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="domain_rule"))
+ schema_decl << (((SCHEMA + schema_id + Optional(schema_version_id) + CaselessLiteral(";") + schema_body + END_SCHEMA + CaselessLiteral(";")))).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="schema_decl"))
+ derive_clause << (((DERIVE + derived_attr + ZeroOrMore(derived_attr)))).setParseAction(AttributeList)
+ return_stmt << (((RETURN + Optional((CaselessLiteral("(") + expression + CaselessLiteral(")"))) + CaselessLiteral(";")))).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="return_stmt"))
+ bag_type << (((BAG + Optional(bound_spec) + OF + instantiable_type))).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="bag_type"))
+ procedure_decl << (((procedure_head + algorithm_head + ZeroOrMore(stmt) + END_PROCEDURE + CaselessLiteral(";")))).setParseAction(lambda s, loc, t: ListNode(s, loc, t, rule="procedure_decl"))
+ abstract_supertype_declaration << (((ABSTRACT + SUPERTYPE + Optional(subtype_constraint)))).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="abstract_supertype_declaration"))
+ inverse_clause << (((INVERSE + inverse_attr + ZeroOrMore(inverse_attr)))).setParseAction(AttributeList)
+ index_qualifier << (((CaselessLiteral("[") + index_1 + Optional((CaselessLiteral(":") + index_2)) + CaselessLiteral("]")))).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="index_qualifier"))
+ bound_1 << (numeric_expression)
+ compound_stmt << (((BEGIN + stmt + ZeroOrMore(stmt) + END + CaselessLiteral(";")))).setParseAction(lambda s, loc, t: ListNode(s, loc, t, rule="compound_stmt"))
+ set_type << (((SET + Optional(bound_spec) + OF + instantiable_type))).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="set_type"))
+ where_clause << (((WHERE + domain_rule + CaselessLiteral(";") + ZeroOrMore((domain_rule + CaselessLiteral(";")))))).setParseAction(lambda s, loc, t: ListNode(s, loc, t, rule="where_clause"))
+ qualifier << (((attribute_qualifier | group_qualifier | index_qualifier))).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="qualifier"))
+ entity_head << (((ENTITY + entity_id + subsuper + CaselessLiteral(";")))).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="entity_head"))
+ stmt << (((alias_stmt | assignment_stmt | case_stmt | compound_stmt | escape_stmt | if_stmt | null_stmt | procedure_call_stmt | repeat_stmt | return_stmt | skip_stmt))).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="stmt"))
+ index_2 << (index)
+ term << (((factor + ZeroOrMore((multiplication_like_op + factor))))).setParseAction(lambda s, loc, t: ListNode(s, loc, t, rule="term"))
+ function_call << ((((built_in_function | function_ref) + actual_parameter_list))).setParseAction(lambda s, loc, t: Node(s, loc, t, rule="function_call"))
+ formal_parameter << (((parameter_id + ZeroOrMore((CaselessLiteral(",") + parameter_id)) + CaselessLiteral(":") + parameter_type))).setParseAction(lambda s, loc, t: ListNode(s, loc, t, rule="formal_parameter"))
+ simple_expression << (((term + ZeroOrMore((add_like_op + term))))).setParseAction(lambda s, loc, t: ListNode(s, loc, t, rule="simple_expression"))
+ simple_types << (((binary_type | boolean_type | integer_type | logical_type | number_type | real_type | string_type))).setParseAction(SimpleType)
syntax.ignore("--" + restOfLine)
syntax.ignore(Regex(r"\((?:\*(?:[^*]*\*+)+?\))"))
@@ -1484,13 +478,12 @@ def parse(fn):
with open(cache_file, "wb") as f:
pickle.dump(m, f, protocol=0)
return m
-
-
+
if __name__ == "__main__":
m = parse(sys.argv[1])
import importlib
-
for output in sys.argv[2:]:
mdl = importlib.import_module(output)
mdl.Generator(m).emit()
sys.stdout.write(m.schema.name)
+
diff --git a/src/ifcopenshell-python/ifcopenshell/express/nodes.py b/src/ifcopenshell-python/ifcopenshell/express/nodes.py
index 8b8133f860..412ff49877 100644
--- a/src/ifcopenshell-python/ifcopenshell/express/nodes.py
+++ b/src/ifcopenshell-python/ifcopenshell/express/nodes.py
@@ -21,6 +21,7 @@ from __future__ import print_function
import io
import string
+import operator
import collections
@@ -55,6 +56,11 @@ class ListNode:
def __init__(self, s, loc, tokens, rule=None):
self.rule = rule or (type(self).__name__)
self.tokens = tokens.asList()
+ self.dict_tokens = collections.defaultdict(list)
+ for t in self.tokens:
+ r = getattr(t, 'rule', None)
+ if r:
+ self.dict_tokens[r].append(t)
self.flat = sum([getattr(t, "flat", [t]) for t in self.tokens], [])
def __repr__(self):
@@ -97,7 +103,7 @@ def format_clause(exp):
return "".join(whitespace(term) for term in exp.flat)
-class TypeDeclaration(Node):
+class TypeDeclaration(Node):
name = property(lambda self: self.type_id[0])
utype = property(lambda self: self.underlying_type.any().any())
type = property(lambda self: self.utype[0] if isinstance(self.utype, list) else self.utype)
@@ -229,6 +235,41 @@ class NamedType(Node):
return self.type
+def do_try(fn):
+ try:
+ return fn()
+ except: pass
+
+
+def to_tree(x, key=None):
+ def get_rule_id(x):
+ from bootstrap import actions
+ ty = type(x).__name__
+ matches = [k for k, v in actions.items() if v == ty]
+ if matches:
+ return matches[0]
+
+ def prune(di):
+ import bootstrap
+ rule_dependencies = {
+ k: list(map(operator.attrgetter('contents'), bootstrap.reduce(lambda x, y: x | y, (bootstrap.find_bytype(e, bootstrap.Keyword) for e in [v])))) \
+ for k, v in bootstrap.express
+ }
+ subrules = list(filter(str.islower, rule_dependencies[key]))
+ return {k: v for k, v in di.items() if k in subrules}
+
+ if isinstance(x, ListNode):
+ return to_tree(x.dict_tokens, key=get_rule_id(x) or key)
+ if isinstance(x, Node,):
+ return to_tree(x.tokens, key=get_rule_id(x) or key)
+ elif isinstance(x, dict):
+ return prune({k: to_tree(v, key=k) for k, v in x.items()})
+ elif isinstance(x, list):
+ return [to_tree(v, key=key) for v in x]
+ else:
+ return x
+
+
class AggregationType(Node):
aggregate_type = property(lambda self: self.flat[0])
bounds = property(lambda self: (list(self.tokens.values())[0][0].bound_spec or [None])[0])
@@ -247,6 +288,8 @@ class AggregationType(Node):
return v.parameter_type.named_types
elif v.parameter_type.generalized_types.general_aggregation_types:
return v.parameter_type.generalized_types.general_aggregation_types
+ elif do_try(lambda: v.parameter_type.generalized_types.generic_type.generic_type[0].GENERIC):
+ return do_try(lambda: v.parameter_type.generalized_types.generic_type.generic_type[0].GENERIC)
else:
import pdb
diff --git a/src/ifcopenshell-python/ifcopenshell/express/schema.py b/src/ifcopenshell-python/ifcopenshell/express/schema.py
index d22f652661..ed217d3123 100644
--- a/src/ifcopenshell-python/ifcopenshell/express/schema.py
+++ b/src/ifcopenshell-python/ifcopenshell/express/schema.py
@@ -84,6 +84,7 @@ class Schema:
return self.types_entities[key]
def __init__(self, parsetree):
+ self.tree = parsetree
self.name = parsetree.syntax[0][0].simple_id
sort = lambda d: OrderedCaseInsensitiveDict(sorted(d))
diff --git a/src/ifcopenshell-python/ifcopenshell/ids.py b/src/ifcopenshell-python/ifcopenshell/ids.py
deleted file mode 100644
index 9d7082541d..0000000000
--- a/src/ifcopenshell-python/ifcopenshell/ids.py
+++ /dev/null
@@ -1,1499 +0,0 @@
-# IDS - Information Delivery Specification.
-# Copyright (C) 2021 Artur Tomczak , Thomas Krijnen , Dion Moult
-#
-# This file is part of IfcOpenShell.
-#
-# IfcOpenShell is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# IfcOpenShell is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public License
-# along with IfcOpenShell. If not, see .
-
-import os
-import re
-import logging
-import numpy as np
-import datetime
-import builtins
-import ifcopenshell.util.unit
-import ifcopenshell.util.element
-import ifcopenshell.util.placement
-import ifcopenshell.util.classification
-from bcf.v2.bcfxml import BcfXml
-from bcf.v2 import data as bcf
-from xmlschema import XMLSchema
-from xmlschema import etree_tostring
-from xmlschema.validators import identities
-from xml.etree import ElementTree as ET
-
-
-# http://standards.buildingsmart.org/IDS/ids_05.xsd
-cwd = os.path.dirname(os.path.realpath(__file__))
-ids_schema = XMLSchema(os.path.join(cwd, "ids.xsd"))
-
-
-def error(msg):
- raise Exception(msg)
-
-
-class ids:
- """Represents the XML root node and its childNodes."""
-
- def __init__(
- self,
- title="Untitled",
- copyright=None,
- version=None,
- description=None,
- author=None,
- date=None,
- purpose=None,
- milestone=None,
- ):
- """Create an IDS object.
-
- :param title: Name of the IDS file, defaults to None
- :type title: str, required
- :param copyright:, defaults to None
- :type copyright: str, optional
- :param version: IDS file version, defaults to None
- :type version: float, optional
- :param description:, defaults to None
- :type description: str, optional
- :param author: Email of the IDS author, defaults to None
- :type author: str, optional
- :param date: Date in 'yyyy-mm-dd' format, defaults to current date
- :type date: str, optional
- :param purpose:, defaults to None
- :type purpose: str, optional
- :param milestone:, defaults to None
- :type milestone: str, optional
- """
- self.specifications = []
- self.info = {}
- self.info["title"] = title or "Untitled"
- if copyright:
- self.info["copyright"] = copyright
- if version:
- self.info["version"] = version
- if description:
- self.info["description"] = description
- if author and "@" in author:
- self.info["author"] = author
- if date:
- try:
- self.info["date"] = datetime.date.fromisoformat(date).isoformat()
- except ValueError:
- pass
- if purpose:
- self.info["purpose"] = purpose
- if milestone:
- self.info["milestone"] = milestone
-
- def asdict(self):
- """Converts object to a dictionary, adding required attributes.
-
- :return: Xmlschema compliant dictionary.
- :rtype: dict
- """
- ids_dict = {
- "@xmlns": "http://standards.buildingsmart.org/IDS",
- "@xmlns:xs": "http://www.w3.org/2001/XMLSchema",
- "@xmlns:xsi": "http://www.w3.org/2001/XMLSchema-instance",
- "@xsi:schemaLocation": "http://standards.buildingsmart.org/IDS/ids_05.xsd",
- "info": self.info,
- "specifications": {"specification": []},
- }
- for spec in self.specifications:
- ids_dict["specifications"]["specification"].append(spec.asdict())
- return ids_dict
-
- def to_string(self, ids_schema=ids_schema):
- """Convert IDS object to XML string
-
- :param ids_schema: XML Schema for an IDS file, defaults to ids_schema object from buildingSMART
- :type ids_schema: XMLschema, optional
- :return: The contents of the XML data in string form
- :rtype: string
- """
- ns = {"": "http://standards.buildingsmart.org/IDS"}
- return etree_tostring(ids_schema.encode(self.asdict()), namespaces=ns)
-
- def to_xml(self, filepath="output.xml", ids_schema=ids_schema):
- """Writes IDS object to an XML file.
-
- :param filepath: Path to the file, defaults to "output.xml"
- :type filepath: str, optional
- :param ids_schema: XML Schema for an IDS file, defaults to ids_schema object from buildingSMART
- :type ids_schema: XMLschema, optional
- :return: Result of the newly created file validation against the schema.
- :rtype: bool
- """
- ET.register_namespace("", "http://standards.buildingsmart.org/IDS")
- ET.ElementTree(ids_schema.encode(self.asdict())).write(filepath, encoding="utf-8", xml_declaration=True)
- return ids_schema.is_valid(filepath)
-
- @staticmethod
- def open(filepath, ids_schema=ids_schema):
- """Use to open ids.xml files
-
- :param filepath: ids file path
- :type filepath: str
- :param ids_schema: XML Schema for an IDS file, defaults to ids_schema object from buildingSMART
- :type ids_schema: XMLschema, optional
- :return: IDS file as a python object
- :rtype: ids object
- """
-
- ids_schema.validate(filepath)
- ids_content = ids_schema.decode(
- filepath, strip_namespaces=True, namespaces={"": "http://standards.buildingsmart.org/IDS"}
- )
- ids_file = ids()
- ids_file.specifications = [specification.parse(s) for s in ids_content["specifications"]["specification"]]
- return ids_file
-
- def validate2(self, ifc_file):
- """Use to validate IFC model against IDS specifications.
-
- :param ifc_file: path to ifc file
- :type ifc_file: str
- :param logger: Logging object with handlers, defaults to None
- :type logger: logging, optional
- """
- for specification in self.specifications:
- specification.applicable_entities.clear()
- specification.failed_entities.clear()
- specification.status = None
- for element in ifc_file:
- for specification in self.specifications:
- if not specification.applicability(element, None):
- continue
- specification.applicable_entities.append(element)
- if specification.requirements(element, None):
- specification.status = True
- else:
- specification.status = False
- specification.failed_entities.append(element)
-
- def validate(self, ifc_file, logger=None):
- """Use to validate IFC model against IDS specifications.
-
- :param ifc_file: path to ifc file
- :type ifc_file: str
- :param logger: Logging object with handlers, defaults to None
- :type logger: logging, optional
- """
- if not isinstance(logger, logging.Logger):
- logger = logging.getLogger("IDS_Logger")
- logging.basicConfig(level=logging.INFO, format="%(message)s")
- logger.setLevel(logging.INFO)
-
- # Consider other way around: for elem, for spec so we can see if an element pass all IDSes?
- for spec in self.specifications:
- self.ifc_applicable = 0
- self.ifc_passed = 0
- for elem in ifc_file:
- apply, comply = spec(elem, logger)
- if apply:
- self.ifc_applicable += 1
- if comply:
- self.ifc_passed += 1
- if self.ifc_applicable == 0:
- if spec.minOccurs != "0":
- logger.error("No applicable elements found. Minimum 1 applicable element required.")
- else:
- logger.debug("No applicable elements found. None required.")
-
- try:
- percentage = self.ifc_passed / self.ifc_applicable * 100
- except ZeroDivisionError:
- percentage = 0
-
- logger.debug(
- "Out of %s IFC elements, %s were applicable and %s of them passed (%s)."
- % (
- len(ifc_file.by_type("IfcProduct")),
- self.ifc_applicable,
- self.ifc_passed,
- str(percentage) + "%",
- )
- )
- for h in logger.handlers:
- h.flush()
-
-
-class specification:
- """Represents the XML node and its two children and """
-
- def __init__(
- self,
- name="Unnamed",
- minOccurs=None,
- maxOccurs=None,
- ifcVersion=["IFC2X3", "IFC4"],
- identifier=None,
- description=None,
- instructions=None,
- ):
- """Create a specification to be added in ids.
-
- :param name: Name describing the specification to a contract reader
- :type name: str
- :param minOccurs: The minimum total entities that should pass as an integer >= 0
- :type minOccurs: str, optional
- :param maxOccurs: The maximum total entities that should pass as an integer >= 0 or "unbounded"
- :type maxOccurs: str, optional
- """
- self.name = name or "Unnamed"
- self.applicability = None
- self.requirements = None
- self.minOccurs = minOccurs
- self.maxOccurs = maxOccurs
- self.ifcVersion = ifcVersion
- self.identifier = identifier
- self.description = description
- self.instructions = instructions
-
- self.applicable_entities = []
- self.failed_entities = []
- self.status = None
-
- def asdict(self):
- """Converts object to a dictionary, adding required attributes.
-
- :return: Xmlschema compliant dictionary.
- :rtype: dict
- """
- # if older python collections.OrderedDict()
- results = {
- "@name": self.name,
- "@ifcVersion": self.ifcVersion,
- "applicability": {},
- "requirements": {},
- }
- for attribute in ["identifier", "description", "instructions", "minOccurs", "maxOccurs"]:
- value = getattr(self, attribute)
- if value:
- results[f"@{attribute}"] = value
- for clause_type in ["applicability", "requirements"]:
- clause = getattr(self, clause_type)
- if not clause:
- continue
- for fac in clause.terms:
- fclass = type(fac).__name__
- if fclass in results[clause_type]:
- results[clause_type][fclass].append(fac.asdict())
- else:
- results[clause_type][fclass] = [fac.asdict()]
- return results
-
- @staticmethod
- def parse(ids_dict):
- """Parse xml specification to python object.
-
- :param ids_dict:
- :type ids_dict: dict
- """
-
- def parse_rules(dict):
- facet_names = list(dict.keys())
- facet_properties = [v[0] if isinstance(v, list) else v for v in list(dict.values())]
- classes = [meta_facet.facets.__getitem__(f) for f in facet_names]
- facets = [cls(n) for cls, n in zip(classes, facet_properties)]
- return facets
-
- spec = specification()
- try:
- spec.name = ids_dict["@name"]
- except KeyError:
- spec.name = ""
- spec.minOccurs = ids_dict["@minOccurs"]
- spec.maxOccurs = ids_dict["@maxOccurs"]
- spec.ifcVersion = ids_dict["@ifcVersion"]
- spec.applicability = boolean_and(parse_rules(ids_dict["applicability"]))
- spec.requirements = boolean_and(parse_rules(ids_dict["requirements"]))
- return spec
-
- def add_applicability(self, facet):
- """Applicability specifies a filter for IFC entities are to be validated.
-
- At least one filter must be added.
-
- :param facet: any of entity|attribute|classification|property|material
- :type facet: facet
-
- Example::
-
- specs = ids.ids()
- spec = ids.specification(name="Test_Specification")
- spec.add_applicability(ids.entity.create(name="IfcWall"))
- specs.specifications.append(spec)
- """
- if self.applicability:
- self.applicability = boolean_and(self.applicability.terms + [facet])
- else:
- self.applicability = boolean_and([facet])
-
- def add_requirement(self, facet):
- """A requirement specifies data to be checked for all applicable entities.
-
- At least one requirement must be added.
-
- :param facet: any of entity|attribute|classification|property|material|partOf
- :type facet: facet
- """
- if self.requirements:
- self.requirements = boolean_and(self.requirements.terms + [facet])
- else:
- self.requirements = boolean_and([facet])
-
- def __call__(self, inst, logger):
- """When specification is called on an ifc instance, it validates against applicability and requirements.
-
- :param inst: IFC entity element
- :type inst: IFC entity
- :param logger: Logging object
- :type logger: logging
- :return: results of validation on applicability and requirements
- :rtype: [bool,bool]
- """
- if self.applicability(inst, logger):
- valid = self.requirements(inst, logger)
-
- if valid:
- logger.info(
- {
- "guid": inst.GlobalId,
- "result": valid.success,
- "sentence": str(self)
- + ".\n"
- + inst.is_a()
- + " '"
- + str(inst.Name)
- + "' (#"
- + str(inst.id())
- + ") has "
- + str(valid)
- + " so is compliant",
- "ifc_element": inst,
- }
- )
- return True, True
- else:
- # BUG "has does not have"
- logger.error(
- {
- "guid": inst.GlobalId,
- "result": valid.success,
- "sentence": str(self)
- + ".\n"
- + inst.is_a()
- + " '"
- + str(inst.Name)
- + "' (#"
- + str(inst.id())
- + ") has "
- + str(valid)
- + " so is not compliant",
- "ifc_element": inst,
- }
- )
- return True, False
- else:
- return False, False
-
- def __str__(self):
- """Represent the specification in human readable sentence.
-
- :return: sentence
- :rtype: str
- """
- return "Given an instance with %(applicability)s\nWe expect %(requirements)s" % self.__dict__
-
-
-class facet_evaluation:
- """The evaluation of a facet with data from IFC. Converts to bool and has a human readable string format."""
-
- def __init__(self, success, str):
- self.success = success
- self.str = str
-
- def __bool__(self):
- return self.success
-
- def __str__(self):
- return self.str
-
-
-class meta_facet(type):
- """A metaclass for automatically registering facets in a map to be instantiated based on XML tagnames."""
-
- facets = {}
-
- def __new__(cls, clsname, bases, attrs):
- newclass = super(meta_facet, cls).__new__(cls, clsname, bases, attrs)
- meta_facet.facets[clsname] = newclass
- return newclass
-
-
-class facet(metaclass=meta_facet):
- """
- The base class for IDS facets. IDS facets are functors constructed from
- XML nodes that return True or False. A getattr method is provided for
- conveniently extracting XML child node text content.
- Use child classes instead: entity, classification, property and material.
- """
-
- def __init__(self, node=None):
- if node:
- self.node = node
-
- def __getattr__(self, attr):
-
- if attr in getattr(self, "node", None):
- v = self.node[attr]
-
- # BUG list of dictionaries should not happen
- if isinstance(v, list):
- v = v[0]
-
- if "simpleValue" in list(v):
- return v["simpleValue"]
- elif "restriction" in list(v):
- return restriction.parse(v["restriction"][0])
- # TODO handle more than one restriction: return [restriction(r) for r in v["restriction"]]
- else:
- raise Exception("Unknown value declaration.")
- # except KeyError:
- else:
- return None
-
- def __iter__(self):
- for k in self.parameters:
- yield k, getattr(self, k)
-
- def __str__(self):
- di = dict(list(self))
- for k, v in di.items():
- if isinstance(v, str) and not len(v):
- di[k] = "not specified"
- return self.message % di
-
-
-class entity(facet):
- """The IDS entity facet currently *with* inheritance"""
-
- parameters = ["name", "predefinedType", "instructions"]
-
- @staticmethod
- def create(name=None, predefinedType=None, instructions=None):
- """Create an entity facet that can be added to applicability or requirements of IDS specification.
-
- :param name: IFC entity name that is required. e.g. IfcWall, defaults to None
- :type name: str, optional
- :param predefinedType: name of the predefined type, defaults to None
- :type predefinedType: str, optional
- :return: entity object
- :rtype: entity
- """
-
- inst = entity()
- inst.name = name
- inst.predefinedType = predefinedType
- inst.instructions = instructions
- return inst
-
- def asdict(self):
- """Converts object to a dictionary, adding required attributes.
-
- :return: Xmlschema compliant dictionary.
- :rtype: dict
- """
- results = {"name": parameter_asdict(self.name)}
- if self.predefinedType:
- results["predefinedType"] = parameter_asdict(self.predefinedType)
- if self.instructions:
- results["@instructions"] = self.instructions
- return results
-
- def __call__(self, inst, logger=None):
- """Validate an entity.
-
- Subclasses are not considered to pass the requirements. PredefinedType
- checks support userdefined types for both element and type elements.
-
- :param inst: IFC entity element
- :type inst: IFC entity
- :param logger: Logging object
- :type logger: logging
- :return: result of the validation as bool and message
- :rtype: facet_evaluation(bool, str)
- """
- is_pass = inst.is_a().upper() == self.name
- if is_pass and self.predefinedType:
- predefined_type = ifcopenshell.util.element.get_predefined_type(inst)
- is_pass = predefined_type == self.predefinedType
-
- if self.predefinedType:
- self.message = "an entity name '%(name)s' of predefined type '%(predefinedType)s'"
- return facet_evaluation(is_pass, self.message % {"name": inst.is_a(), "predefinedType": predefined_type})
- else:
- self.message = "an entity name '%(name)s'"
- return facet_evaluation(is_pass, self.message % {"name": inst.is_a()})
-
-
-class attribute(facet):
- """The IDS attribute facet"""
-
- parameters = ["name", "value", "minOccurs", "maxOccurs", "instructions"]
-
- @staticmethod
- def create(name="Name", value=None, minOccurs=None, maxOccurs=None, instructions=None):
- """Create an attribute facet that can be added to applicability or requirements of IDS specification.
-
- :param name: Attribute name, such as "Description"
- :type name: str
- :param value: Attribute value, with type being strictly checked
- :type value: str, optional
- :param minOccurs: The minimum total entities that should pass as an integer >= 0
- :type minOccurs: str, optional
- :param maxOccurs: The maximum total entities that should pass as an integer >= 0 or "unbounded"
- :type maxOccurs: str, optional
- :param instructions: Instructions as a guide for model authors when reading the requirements
- :type instructions: str, optional
- :return: entity object
- :rtype: entity
- """
-
- inst = attribute()
- inst.name = name
- inst.value = value
- inst.minOccurs = minOccurs
- inst.maxOccurs = maxOccurs
- inst.instructions = instructions
- return inst
-
- def asdict(self):
- """Converts object to a dictionary, adding required attributes.
-
- :return: Xmlschema compliant dictionary.
- :rtype: dict
- """
- results = {"name": parameter_asdict(self.name)}
- if self.value:
- results["value"] = parameter_asdict(self.value)
- if self.minOccurs:
- results["@minOccurs"] = self.minOccurs
- if self.maxOccurs:
- results["@maxOccurs"] = self.maxOccurs
- if self.instructions:
- results["@instructions"] = self.instructions
- return results
-
- def __call__(self, inst, logger=None):
- """Validate an ifc instance.
-
- :param inst: IFC entity element
- :type inst: IFC entity
- :param logger: Logging object
- :type logger: logging
- :return: result of the validation as bool and message
- :rtype: facet_evaluation(bool, str)
- """
-
- def get_values(element, name):
- if isinstance(name, str):
- return [getattr(element, name, None)]
- return [v for k, v in element.get_info().items() if k == name]
-
- element_type = ifcopenshell.util.element.get_type(inst)
-
- if isinstance(self.name, str):
- type_value = getattr(element_type, self.name, None) if element_type else None
- occurrence_value = getattr(inst, self.name, None)
- names = [self.name]
- values = [occurrence_value if occurrence_value is not None else type_value]
- else:
- if element_type:
- info = element_type.get_info()
- info.update({k: v for k, v in inst.get_info().items() if v is not None})
- else:
- info = inst.get_info()
- names = []
- values = []
- for k, v in info.items():
- if k == self.name:
- names.append(k)
- values.append(v)
-
- is_pass = bool(values)
-
- if is_pass:
- for i, value in enumerate(values):
- if value is None:
- is_pass = False
- elif value == "":
- is_pass = False
- elif value == tuple():
- is_pass = False
- else:
- argument_index = inst.wrapped_data.get_argument_index(names[i])
- try:
- attribute_type = inst.attribute_type(argument_index)
- if attribute_type == "LOGICAL" and value == "UNKNOWN":
- is_pass = False
- except:
- if names[i] in inst.wrapped_data.get_inverse_attribute_names():
- is_pass = False
- if not is_pass:
- break
-
- if is_pass and self.value:
- for value in values:
- if isinstance(value, ifcopenshell.entity_instance):
- is_pass = False
- break
- elif isinstance(self.value, str) and isinstance(value, str):
- if value != self.value:
- is_pass = False
- break
- elif isinstance(self.value, str):
- cast_value = cast_to_value(self.value, value)
- if value != cast_value:
- is_pass = False
- break
- elif value != self.value:
- is_pass = False
- break
-
- if self.value:
- self.message = "foo"
- return facet_evaluation(is_pass, f"an entity with {self.name} set to something wrong")
- else:
- return facet_evaluation(is_pass, f"an entity with {self.name}")
-
-
-class classification(facet):
- """
- The IDS classification facet by traversing the HasAssociations inverse attribute
- """
-
- parameters = ["system", "value", "uri", "minOccurs", "maxOccurs" "instructions"]
- message = "sclassification reference %(value)s from '%(system)s'"
-
- @staticmethod
- def create(value=None, system=None, uri=None, minOccurs=None, maxOccurs=None, instructions=None):
- """Create a classification facet that can be added to applicability or requirements of IDS specification.
-
- :param value: Value that is required. Could be alphanumeric or restriction object, defaults to None
- :type value: restriction|alphanumeric, optional
- :param system: System that is required. Could be alphanumeric or restriction object, defaults to None
- :type system: restriction|alphanumeric, optional
- :param minOccurs: The minimum total entities that should pass as an integer >= 0
- :type minOccurs: str, optional
- :param maxOccurs: The maximum total entities that should pass as an integer >= 0 or "unbounded"
- :type maxOccurs: str, optional
- :return: classification object
- :rtype: classification
- """
- inst = classification()
- inst.value = value
- inst.system = system
- inst.uri = uri
- inst.minOccurs = minOccurs
- inst.maxOccurs = maxOccurs
- inst.instructions = instructions
- return inst
-
- def asdict(self):
- """Converts object to a dictionary, adding required attributes.
-
- :return: Xmlschema compliant dictionary.
- :rtype: dict
- """
- results = {}
- if self.value:
- results["value"] = parameter_asdict(self.value)
- if self.system:
- results["system"] = parameter_asdict(self.system)
- if self.uri:
- results["@uri"] = self.uri
- if self.minOccurs:
- results["@minOccurs"] = self.minOccurs
- if self.maxOccurs:
- results["@maxOccurs"] = self.maxOccurs
- if self.instructions:
- results["@instructions"] = self.instructions
- return results
-
- def __call__(self, inst, logger=None):
- """Validate an ifc instance against that classification facet.
-
- :param inst: IFC entity element
- :type inst: IFC entity
- :param logger: Logging object
- :type logger: logging
- :return: result of the validation as bool and message
- :rtype: facet_evaluation(bool, str)
- """
- leaf_references = ifcopenshell.util.classification.get_references(inst)
-
- references = leaf_references.copy()
- for leaf_reference in leaf_references:
- references.update(ifcopenshell.util.classification.get_inherited_references(leaf_reference))
-
- is_pass = bool(references)
- if is_pass and self.value:
- is_pass = any(
- [self.value == getattr(r, "Identification", getattr(r, "ItemReference", None)) for r in references]
- )
- if is_pass and self.system:
- is_pass = any(
- [self.system == ifcopenshell.util.classification.get_classification(r).Name for r in references]
- )
-
- if references:
- return facet_evaluation(
- is_pass,
- self.message
- % {
- "system": list(references)[0][0],
- "value": list(references)[0][1],
- }, # TODO Fix this 0 index reference assumption when I refactor out the messages
- )
- else:
- return facet_evaluation(False, "does not have classification reference")
-
-
-class partOf(facet):
- """
- The IDS partOf facet by traversing the _______ inverse attribute
- """
-
- parameters = ["entity"]
- message = "relation as part of %(entity)s"
-
- @staticmethod
- def create(entity="IfcSystem"):
- """Create a partOf facet that can be added to applicability or requirements of IDS specification.
-
- :param entity: Entity that should contain this object. Could be alphanumeric or restriction object, defaults to None
- :type entity: restriction|alphanumeric, optional
- :return: partOf object
- :rtype: partOf
- """
-
- inst = partOf()
- inst.entity = entity
- return inst
-
- def asdict(self):
- """Converts object to a dictionary, adding required attributes.
-
- :return: Xmlschema compliant dictionary.
- :rtype: dict
- """
- return {"@entity": self.entity}
-
- def __call__(self, inst, logger=None):
- """Validate an ifc instance against that partOf facet.
-
- :param inst: IFC entity element
- :type inst: IFC entity
- :param logger: Logging object
- :type logger: logging
- :return: result of the validation as bool and message
- :rtype: facet_evaluation(bool, str)
- """
- if self.entity == "IfcElementAssembly":
- is_pass = False
- aggregate = ifcopenshell.util.element.get_aggregate(inst)
- while aggregate is not None:
- if aggregate.is_a() == "IfcElementAssembly":
- is_pass = True
- break
- aggregate = ifcopenshell.util.element.get_aggregate(aggregate)
- else:
- is_pass = False
- for rel in getattr(inst, "HasAssignments", []) or []:
- if rel.is_a("IfcRelAssignsToGroup") and rel.RelatingGroup.is_a(self.entity):
- is_pass = True
-
- return facet_evaluation(is_pass, "is not a part of")
-
-
-class property(facet):
- """
- The IDS property facet implemented using `ifcopenshell.util.element`
- """
-
- parameters = ["name", "propertySet", "value"]
- message = "property '%(name)s' in '%(propertySet)s' with a value %(value)s"
-
- @staticmethod
- def create(
- propertySet="Property_Set",
- name="PropertyName",
- value=None,
- measure=None,
- uri=None,
- minOccurs=None,
- maxOccurs=None,
- instructions=None,
- ):
- """Create a property facet that can be added to applicability or requirements of IDS specification.
-
- :param propertySet: Propertyset that is required. Could be alphanumeric or restriction object, defaults to None
- :type propertySet: restriction|alphanumeric, optional
- :param name: Name that is required. Could be alphanumeric or restriction object, defaults to None
- :type name: restriction|alphanumeric, optional
- :param value: Value that is required. Could be alphanumeric or restriction object, defaults to None
- :type value: restriction|alphanumeric, optional
- :param minOccurs: The minimum total entities that should pass as an integer >= 0
- :type minOccurs: str, optional
- :param maxOccurs: The maximum total entities that should pass as an integer >= 0 or "unbounded"
- :type maxOccurs: str, optional
- :return: property object
- :rtype: property
- """
- inst = property()
- inst.propertySet = propertySet
- inst.name = name
- inst.value = value
- inst.measure = measure
- inst.uri = uri
- inst.minOccurs = minOccurs
- inst.maxOccurs = maxOccurs
- inst.instructions = instructions
- return inst
-
- def asdict(self):
- """Converts object to a dictionary, adding required attributes.
-
- :return: Xmlschema compliant dictionary.
- :rtype: dict
- """
- results = {
- "propertySet": parameter_asdict(self.propertySet),
- "name": parameter_asdict(self.name),
- }
- if self.value:
- results["value"] = parameter_asdict(self.value)
- if self.measure:
- results["@measure"] = self.measure
- if self.uri:
- results["@uri"] = self.uri
- if self.minOccurs:
- results["@minOccurs"] = self.minOccurs
- if self.maxOccurs:
- results["@maxOccurs"] = self.maxOccurs
- if self.instructions:
- results["@instructions"] = self.instructions
- # TODO '@href': 'http://identifier.buildingsmart.org/uri/buildingsmart/ifc-4.3/prop/FireRating', #https://identifier.buildingsmart.org/uri/something
- return results
-
- def __call__(self, inst, logger=None):
- """Validate an ifc instance against that property facet.
-
- :param inst: IFC entity element
- :type inst: IFC entity
- :param logger: Logging object
- :type logger: logging
- :return: result of the validation as bool and message
- :rtype: facet_evaluation(bool, str)
- """
- all_psets = ifcopenshell.util.element.get_psets(inst)
-
- if isinstance(self.propertySet, str):
- pset = all_psets.get(self.propertySet, None)
- psets = {self.propertySet: pset} if pset else {}
- else:
- psets = {k: v for k, v in all_psets.items() if k == self.propertySet}
-
- is_pass = bool(psets)
-
- if is_pass:
- props = {}
- for pset_name, pset_props in psets.items():
- props[pset_name] = {}
- if isinstance(self.name, str):
- prop = pset_props.get(self.name)
- if prop:
- props[pset_name][self.name] = prop
- else:
- props[pset_name] = {k: v for k, v in pset_props.items() if k == self.name}
-
- if not bool(props[pset_name]):
- is_pass = False
- break
-
- if self.measure:
- pset_entity = inst.wrapped_data.file.by_id(pset_props["id"])
- for prop_entity in pset_entity.HasProperties:
- if (
- prop_entity.Name not in props[pset_name].keys()
- or not prop_entity.is_a("IfcPropertySingleValue")
- or prop_entity.NominalValue is None
- ):
- continue
-
- data_type = prop_entity.NominalValue.is_a().replace("Ifc", "").replace("Measure", "")
-
- if data_type != self.measure:
- is_pass = False
- break
-
- unit = ifcopenshell.util.unit.get_property_unit(prop_entity, inst.wrapped_data.file)
-
- props[pset_name][prop_entity.Name] = ifcopenshell.util.unit.convert(
- prop_entity.NominalValue.wrappedValue,
- getattr(unit, "Prefix", None),
- unit.Name,
- None,
- ifcopenshell.util.unit.si_type_names[unit.UnitType],
- )
-
- if not is_pass:
- break
-
- if self.value:
- if any([v != self.value for v in props[pset_name].values()]):
- is_pass = False
- break
-
- # TODO implement data type comparison
- # xs:string
- # xs:decimal
- # xs:integer
- # xs:boolean
- # xs:anyURI
- # xs:date YYYY-MM-DD
- # xs:time hh:mm:ss
- # xs:dateTime YYYY-MM-DDThh:mm:ss
- # xs:duration PnYnMnDTnHnMnS
-
- return facet_evaluation(is_pass, "todo")
-
-
-class material(facet):
- """The IDS material facet used to traverse the HasAssociations inverse attribute."""
-
- parameters = ["value"]
- message = "material '%(value)s'"
-
- @staticmethod
- def create(value=None, uri=None, minOccurs=None, maxOccurs=None, instructions=None):
- """Create a material facet that can be added to applicability or requirements of IDS specification.
-
- :param value: Value that is required. Could be alphanumeric or restriction object, defaults to None
- :type value: restriction|alphanumeric, optional
- :return: material object
- :rtype: material
- """
- inst = material()
- inst.value = value
- inst.uri = uri
- inst.minOccurs = minOccurs
- inst.maxOccurs = maxOccurs
- inst.instructions = instructions
- return inst
-
- def asdict(self):
- """Converts object to a dictionary, adding required attributes.
-
- :return: Xmlschema compliant dictionary.
- :rtype: dict
- """
- results = {}
- if self.value:
- results["value"] = parameter_asdict(self.value)
- if self.uri:
- results["@uri"] = self.uri
- if self.minOccurs:
- results["@minOccurs"] = self.minOccurs
- if self.maxOccurs:
- results["@maxOccurs"] = self.maxOccurs
- if self.instructions:
- results["@instructions"] = self.instructions
- return results
-
- def __call__(self, inst, logger=None):
- """Validate an ifc instance against that material facet.
-
- :param inst: IFC entity element
- :type inst: IFC entity
- :param logger: Logging object
- :type logger: logging
- :return: result of the validation as bool and message
- :rtype: facet_evaluation(bool, str)
- """
- material = ifcopenshell.util.element.get_material(inst, should_skip_usage=True)
-
- is_pass = material is not None
-
- if is_pass and self.value:
- if material.is_a("IfcMaterial"):
- values = {material.Name, getattr(material, "Category")}
- elif material.is_a("IfcMaterialList"):
- values = set()
- for mat in material.Materials or []:
- values.update([mat.Name, getattr(mat, "Category")])
- elif material.is_a("IfcMaterialLayerSet"):
- values = {material.LayerSetName}
- for item in material.MaterialLayers or []:
- values.update([item.Name, item.Category, item.Material.Name, getattr(item.Material, "Category")])
- elif material.is_a("IfcMaterialProfileSet"):
- values = {material.Name}
- for item in material.MaterialProfiles or []:
- values.update([item.Name, item.Category, item.Material.Name, getattr(item.Material, "Category")])
- elif material.is_a("IfcMaterialConstituentSet"):
- values = {material.Name}
- for item in material.MaterialConstituents or []:
- values.update([item.Name, item.Category, item.Material.Name, getattr(item.Material, "Category")])
-
- is_pass = False
- for value in values:
- if value == self.value:
- is_pass = True
- break
-
- return facet_evaluation(
- is_pass,
- self.message % {"value": "todo", "location": "todo"},
- )
-
-
-def parameter_asdict(parameter):
- """Converts parameter to an IDS compliant dictionary, handling both value and restrictions.
-
- :return: Xmlschema compliant dictionary.
- :rtype: dict
- """
- if isinstance(parameter, str):
- parameter_dict = {"simpleValue": parameter}
- elif isinstance(parameter, restriction):
- parameter_dict = {"xs:restriction": [parameter.asdict()]}
- elif isinstance(parameter, list):
- restrictions = {"@base": "xs:" + parameter[0].base}
- for p in parameter:
- x = p.asdict()
- restrictions[list(x)[1]] = x[list(x)[1]]
- parameter_dict = {"xs:restriction": [restrictions]}
- else:
- raise Exception(str(parameter) + " was not able to be converted into 'Parameter_dict'")
- return parameter_dict
-
-
-class boolean_logic:
- """Boolean conjunction over a collection of functions"""
-
- def __init__(self, terms):
- self.terms = terms
-
- def __call__(self, *args):
- eval = [t(*args) for t in self.terms]
- join = [" and ", " or "][self.fold == any]
- return facet_evaluation(self.fold(eval), join.join(map(str, eval)))
-
- def __str__(self):
- return [" and ", " or "][self.fold == any].join(map(str, self.terms))
-
-
-class boolean_and(boolean_logic):
- fold = all
-
-
-class boolean_or(boolean_logic):
- fold = any
-
-
-def cast_to_value(from_value, to_value):
- try:
- target_type = type(to_value).__name__
- if target_type == "int":
- # Casting str -> float -> int means that notation like '1e3' is preserved
- return int(float(from_value))
- elif target_type == "bool":
- if from_value == "TRUE":
- return True
- elif from_value == "FALSE":
- return False
- return builtins.__dict__[target_type](from_value)
- except ValueError:
- pass
-
-
-class restriction:
- """
- The value restriction from XSD implemented as a list of values and a containment test
- """
-
- def __init__(self):
- """Create a restriction that can be used instead of value of a parameter."""
- self.type = ""
- self.options = []
-
- @staticmethod
- def parse(ids_dict):
- """Parse xml restriction to python object.
-
- :param ids_dict:
- :type ids_dict: dict
- """
- r = restriction()
- if ids_dict:
- # TODO 'base' missing in some IDS?!
-
- try:
- r.base = ids_dict["@base"][3:]
- except KeyError:
- r.base = "String"
-
- for n in ids_dict:
- if n == "enumeration":
- r.type = "enumeration"
- for x in ids_dict[n]:
- r.options.append(x["@value"])
- elif n[-7:] == "clusive":
- r.type = "bounds"
- r.options.append({n: ids_dict[n]["@value"]})
- elif n[-5:] == "ength":
- r.type = "length"
- if n[3:6] == "min":
- r.options.append(">=")
- elif n[3:6] == "max":
- r.options.append("<=")
- else:
- r.options.append("==")
- r.options[-1] += str(ids_dict[n]["@value"])
- elif n == "pattern":
- r.type = "pattern"
- r.options.append(ids_dict[n]["@value"])
- # TODO add fractionDigits
- # TODO add totalDigits
- # TODO add whiteSpace
- elif n == "@base":
- pass
- else:
- print("Error! Restriction not implemented")
- return r
-
- def asdict(self):
- """Converts object to a dictionary, adding required attributes.
-
- :return: Xmlschema compliant dictionary.
- :rtype: dict
- """
- rest_dict = {"@base": "xs:" + self.base}
- if self.type == "enumeration":
- for option in self.options:
- if "xs:enumeration" not in rest_dict:
- rest_dict["xs:enumeration"] = [{"@value": option}]
- else:
- rest_dict["xs:enumeration"].append({"@value": option})
- elif self.type == "bounds":
- for option in self.options:
- rest_dict["xs:" + option] = [{"@value": str(self.options[option]), "@fixed": False}]
- elif self.type == "pattern":
- if "xs:pattern" not in rest_dict:
- rest_dict["xs:pattern"] = [{"@value": self.options}]
- else:
- rest_dict["xs:pattern"].append({"@value": self.options})
- return rest_dict
-
- @staticmethod
- def create(options, type="pattern", base="string"):
- """Create restriction instead of simpleValue
-
- :param type: One of "enumeration"|"pattern"|"bounds", defaults to "pattern"
- :type type: str, optional
- :param options: if enumeration: list of possible values
- if pattern: xml regular expression string
- if bounds: dictionary with possible keys: 'minInclusive', 'maxInclusive', 'minExclusive', 'maxExclusive'
- :type options: list|str|dict
- :param base: One of "string"|"boolean"|"decimal"|"integer", defaults to "string"
- :type base: str, optional
- :raises Exception: If not properly defined restriction.
- :return: restriction object
- :rtype: restriction
- """
- rest = restriction()
- if type in ["enumeration", "pattern", "bounds"]:
- rest.type = type
- rest.base = base
- rest.options = options
- if (
- (type == "enumeration" and isinstance(options, list))
- or (type == "bounds" and isinstance(options, dict))
- or (type == "pattern" and isinstance(options, str))
- ):
- rest.options = options
- else:
- raise Exception("Options were not properly defined.")
- return rest
- else:
- raise Exception(
- "Such restriction not implemented. Try: 'enumeration', 'pattern' or 'min/maxInclusive' or 'min/maxExclusive'."
- )
-
- def __eq__(self, other):
- """Evaluate the restriction using equality sign.
-
- :param other: value to compare with the restriction.
- :type other: str|float|int
- :return: True if 'other' match the restriction, False if not.
- :rtype: bool
- """
- result = False
- if self and (other or other == 0):
- if self.type == "enumeration" and self.base == "bool":
- self.options = [x.lower() for x in self.options]
- result = str(other).lower() in self.options
- elif self.type == "enumeration":
- result = other in [cast_to_value(o, other) for o in self.options]
- elif self.type == "bounds":
- result = True
- for sign in self.options.keys():
- if sign == "minInclusive" and other < self.options[sign]:
- result = False
- elif sign == "maxInclusive" and other > self.options[sign]:
- result = False
- elif sign == "minExclusive" and other <= self.options[sign]:
- result = False
- elif sign == "maxExclusive" and other >= self.options[sign]:
- result = False
- elif self.type == "length":
- for op in self.options:
- if eval(str(len(other)) + op): # TODO eval not safe?
- result = True
- elif self.type == "pattern":
- if isinstance(self.options, list):
- # TODO handle case with multiple pattern options
- translated_pattern = identities.translate_pattern(self.options[0])
- else:
- translated_pattern = identities.translate_pattern(self.options)
- regex_pattern = re.compile(translated_pattern)
- if regex_pattern.fullmatch(other) is not None:
- result = True
- # TODO add fractionDigits
- # TODO add totalDigits
- # TODO add whiteSpace
- return result
-
- def __repr__(self):
- """Represent the restriction in human readable sentence.
-
- :return: sentence
- :rtype: str
- """
- msg = "of type '%s', " % (self.base)
- if self.type == "enumeration":
- msg = msg + "of value: '%s'" % "' or '".join(self.options)
- elif self.type == "bounds":
- msg = msg + "of value %s" % ", and ".join([bounds[x] + str(self.options[x]) for x in self.options])
- elif self.type == "length":
- msg = msg + "with %s letters" % " and ".join(self.options)
- elif self.type == "pattern":
- msg = msg + "respecting the pattern '%s'" % self.options
- # TODO add fractionDigits
- # TODO add totalDigits
- # TODO add whiteSpace
- return msg
-
-
-class SimpleHandler(logging.StreamHandler):
- """Logging handler listing all cases in python list."""
-
- def __init__(self, report_valid=False):
- """Logging handler listing all cases in python list.
-
- :param report_valid: True if you want to list all the compliant cases as well, defaults to False
- :type report_valid: bool, optional
- """
- logging.StreamHandler.__init__(self)
- self.statements = []
- if report_valid:
- self.setLevel(logging.DEBUG)
- else:
- self.setLevel(logging.ERROR)
-
- def emit(self, mymsg):
- """Triggered on each use of logging with the Simple handler enabled.
-
- :param log_content: default logger message
- :type log_content: string|dict
- """
- self.statements.append(mymsg.msg)
-
-
-class CsvHandler(logging.StreamHandler):
- """Logging handler listing all cases in csv file."""
-
- def __init__(self, filepath="./Report.csv", report_valid=False):
- """Logging handler listing all cases in csv file.
-
- :param report_valid: True if you want to list all the compliant cases as well, defaults to False
- :type report_valid: bool, optional
- """
- import csv
-
- logging.StreamHandler.__init__(self)
- if report_valid:
- self.setLevel(logging.INFO)
- else:
- self.setLevel(logging.ERROR)
- self.file = open(filepath, "w", encoding="UTF8", newline="")
- self.csvwriter = csv.writer(self.file)
- self.csvwriter.writerow(["guid", "result", "sentence"]) # header
-
- def emit(self, mymsg):
- """Triggered on each use of logging with the Simple handler enabled.
-
- :param log_content: default logger message
- :type log_content: string|dict
- """
- # BUG bytes-like object is required, not 'str'
- self.csvwriter.writerow(mymsg.msg)
-
- def flush(self):
- self.file.close()
-
-
-class BcfHandler(logging.StreamHandler):
- """Logging handler for creation of BCF report files.
-
- :param project_name: defaults to "IDS Project"
- :type project_name: str, optional
- :param author: Email of the person creating the BCF report, defaults to "your@email.com"
- :type author: str, optional
- :param filepath: Path to save the BCF report, defaults to None
- :type filepath: str, optional
- :param report_valid: True if you want to list all the compliant cases as well, defaults to False
- :type report_valid: bool, optional
-
- Example::
-
- bcf_handler = BcfHandler(
- project_name="Default IDS Project",
- author="your@email.com",
- filepath="example.bcf",
- )
- logger = logging.getLogger("IDS_Logger")
- logging.basicConfig(level=logging.INFO, format="%(message)s")
- logger.addHandler(bcf_handler)
- """
-
- def __init__(self, project_name="IDS Project", author="your@email.com", filepath=None, report_valid=False):
-
- logging.StreamHandler.__init__(self)
- if report_valid:
- self.setLevel(logging.INFO)
- else:
- self.setLevel(logging.ERROR)
- self.bcf = BcfXml()
- self.bcf.author = author
- self.bcf.new_project()
- self.bcf.project.name = project_name
- self.filepath = filepath
- self.bcf.edit_project()
-
- def emit(self, log_content):
- """Triggered on each use of logging with the BCF handler enabled.
-
- :param log_content: default logger message
- :type log_content: string|dict
- """
- topic = bcf.Topic()
- topic.title = log_content.msg["sentence"].split(".\n")[1]
- topic.description = log_content.msg["sentence"].split(".\n")[0]
- self.bcf.add_topic(topic)
- # try: # Add viewpoint and link to ifc object
- viewpoint = bcf.Viewpoint()
- viewpoint.perspective_camera = bcf.PerspectiveCamera()
- ifc_elem = log_content.msg["ifc_element"]
- # ifc_elem = ifc_file.by_guid(log_content.msg["guid"])
- target_position = np.array(ifcopenshell.util.placement.get_local_placement(ifc_elem.ObjectPlacement))
- target_position = target_position[:, 3][0:3]
- camera_position = target_position + np.array((5, 5, 5))
- viewpoint.perspective_camera.camera_view_point.x = camera_position[0]
- viewpoint.perspective_camera.camera_view_point.y = camera_position[1]
- viewpoint.perspective_camera.camera_view_point.z = camera_position[2]
- camera_direction = camera_position - target_position
- camera_direction = camera_direction / np.linalg.norm(camera_direction)
- camera_right = np.cross(np.array([0.0, 0.0, 1.0]), camera_direction)
- camera_right = camera_right / np.linalg.norm(camera_right)
- camera_up = np.cross(camera_direction, camera_right)
- camera_up = camera_up / np.linalg.norm(camera_up)
- rotation_transform = np.zeros((4, 4))
- rotation_transform[0, :3] = camera_right
- rotation_transform[1, :3] = camera_up
- rotation_transform[2, :3] = camera_direction
- rotation_transform[-1, -1] = 1
- translation_transform = np.eye(4)
- translation_transform[:3, -1] = -camera_position
- look_at_transform = np.matmul(rotation_transform, translation_transform)
- mat = np.linalg.inv(look_at_transform)
- viewpoint.perspective_camera.camera_direction.x = mat[0][2] * -1
- viewpoint.perspective_camera.camera_direction.y = mat[1][2] * -1
- viewpoint.perspective_camera.camera_direction.z = mat[2][2] * -1
- viewpoint.perspective_camera.camera_up_vector.x = mat[0][1]
- viewpoint.perspective_camera.camera_up_vector.y = mat[1][1]
- viewpoint.perspective_camera.camera_up_vector.z = mat[2][1]
- viewpoint.components = bcf.Components()
- c = bcf.Component()
- c.ifc_guid = log_content.msg["guid"]
- viewpoint.components.selection.append(c)
- viewpoint.components.visibility = bcf.ComponentVisibility()
- viewpoint.components.visibility.default_visibility = True
- viewpoint.snapshot = None
- self.bcf.add_viewpoint(topic, viewpoint)
-
- def flush(self):
- """Saves the BCF report to file. Triggered at the end of the validation process."""
- if not self.filepath:
- self.filepath = os.getcwd() + r"\IDS_report.bcf"
- if not (self.filepath.endswith(".bcf") or self.filepath.endswith(".bcfzip")):
- self.filepath = self.filepath + r"\IDS_report.bcf"
- self.bcf.save_project(self.filepath)
-
-
-location = {"instance": "an instance ", "type": "a type ", "any": "a "}
-
-bounds = {
- "minInclusive": "larger or equal ",
- "maxInclusive": "smaller or equal ",
- "minExclusive": "larger than ",
- "maxExclusive": "smaller than ",
-}
-
-if __name__ == "__main__":
- import sys, os
- import ifcopenshell
-
- ids_file = ids.open(sys.argv[1])
- ifc_file = ifcopenshell.open(sys.argv[2])
- filepath = sys.argv[3]
-
- logger = logging.getLogger("IDS_Logger")
- logging.basicConfig(filename=filepath, level=logging.INFO, format="%(message)s")
- logging.FileHandler(filepath + r"\report.txt", mode="w")
-
- bcf_handler = BcfHandler(
- project_name="Default IDS Project",
- author="your@email.com",
- filepath=filepath + r"\report.bcfzip",
- )
- logger.addHandler(bcf_handler)
-
- report = SimpleHandler()
- logger.addHandler(report)
-
- ids_file.validate(ifc_file, logger)
diff --git a/src/ifcopenshell-python/ifcopenshell/requirements.txt b/src/ifcopenshell-python/ifcopenshell/requirements.txt
index 29dd91befd..61483c9779 100644
--- a/src/ifcopenshell-python/ifcopenshell/requirements.txt
+++ b/src/ifcopenshell-python/ifcopenshell/requirements.txt
@@ -1,4 +1,4 @@
-lxml==4.6.5
+lxml==4.9.1
numpy==1.22.0
regex==2021.4.4
xmlschema==1.6.4
\ No newline at end of file
diff --git a/src/ifcopenshell-python/ifcopenshell/util/element.py b/src/ifcopenshell-python/ifcopenshell/util/element.py
index 7c75ec98d9..49e56493f8 100644
--- a/src/ifcopenshell-python/ifcopenshell/util/element.py
+++ b/src/ifcopenshell-python/ifcopenshell/util/element.py
@@ -80,6 +80,10 @@ def get_properties(properties):
for prop in properties or []:
if prop.is_a("IfcPropertySingleValue"):
results[prop.Name] = prop.NominalValue.wrappedValue if prop.NominalValue else None
+ elif prop.is_a("IfcPropertyEnumeratedValue"):
+ values = [v.wrappedValue for v in prop.EnumerationValues]
+ results[prop.Name] = [v.wrappedValue for v in prop.EnumerationValues] or None
+
elif prop.is_a("IfcComplexProperty"):
data = {k: v for k, v in prop.get_info().items() if v is not None and k != "Name"}
data["properties"] = get_properties(prop.HasProperties)
diff --git a/src/ifcopenshell-python/ifcopenshell/util/schema/Pset_IFC4_ADD2.ifc b/src/ifcopenshell-python/ifcopenshell/util/schema/Pset_IFC4_ADD2.ifc
index 370ce2ec16..75ef40f33d 100644
--- a/src/ifcopenshell-python/ifcopenshell/util/schema/Pset_IFC4_ADD2.ifc
+++ b/src/ifcopenshell-python/ifcopenshell/util/schema/Pset_IFC4_ADD2.ifc
@@ -7,7 +7,7 @@ ENDSEC;
DATA;
#1= IFCPROJECT('3QGWbhaEj3pBvtVSPml_3_',$,'IFC4 Property Set Templates',$,$,$,$,$,$);
-#2= IFCRELDECLARES('1zDnNP0LPDzu65koq6JWBn',$,$,$,#1,(#3,#31,#61,#77,#119,#156,#313,#358,#451,#516,#541,#559,#577,#613,#840,#982,#1016,#1081,#1154,#1221,#1338,#1413,#1444,#1516,#1551,#1750,#1753,#1826,#1865,#1920,#1974,#2030,#2072,#2087,#2108,#2206,#2327,#2413,#2486,#2502,#2599,#2709,#2741,#2876,#2899,#3007,#3182,#3400,#3521,#3620,#3697,#3820,#3908,#3995,#4132,#4269,#4452,#4594,#4727,#4884,#4952,#4955,#4969,#5037,#5065,#5107,#5142,#5192,#5237,#5251,#5286,#5306,#5379,#5399,#5483,#5518,#5687,#5719,#5759,#5855,#5881,#5977,#6031,#6057,#6083,#6137,#6156,#6201,#6225,#6245,#6362,#6430,#6515,#6527,#6602,#6697,#6790,#6827,#6839,#6929,#7032,#7135,#7189,#7236,#7264,#7279,#7326,#7359,#7406,#7439,#7472,#7519,#7545,#7592,#7652,#7703,#7732,#7759,#7762,#7815,#7835,#7847,#7885,#7891,#7897,#7906,#7937,#7974,#8026,#8169,#8178,#8202,#8220,#8255,#8296,#8323,#8343,#8379,#8394,#8409,#8477,#8487,#8496,#8511,#8537,#8614,#8644,#8663,#8682,#8701,#8720,#8738,#8775,#8795,#8827,#8916,#8944,#9017,#9072,#9122,#9134,#9166,#9198,#9230,#9245,#9251,#9283,#9295,#9307,#9333,#9345,#9351,#9371,#9397,#9409,#9415,#9434,#9446,#9458,#9470,#9490,#9502,#9521,#9533,#9545,#9571,#9583,#9619,#9659,#9674,#9709,#9734,#9740,#9746,#9752,#9758,#9764,#9770,#9776,#9819,#9828,#9843,#9852,#9871,#9908,#9996,#10040,#10173,#10210,#10264,#10301,#10373,#10417,#10449,#10475,#10501,#10527,#10559,#10603,#10635,#10706,#10718,#10828,#10860,#10954,#11080,#11086,#11118,#11183,#11189,#11221,#11250,#11281,#11290,#11322,#11324,#11491,#11544,#11661,#11693,#11813,#11932,#12046,#12160,#12192,#12234,#12279,#12324,#12369,#12440,#12506,#12570,#12600,#12724,#12823,#12891,#13011,#13056,#13120,#13187,#13279,#13343,#13374,#13443,#13509,#13541,#13571,#13640,#13652,#13664,#13687,#13721,#13808,#13841,#13866,#13887,#13910,#13931,#13937,#14014,#14047,#14092,#14181,#14363,#14369,#14375,#14390,#14396,#14411,#14417,#14423,#14432,#14438,#14444,#14450,#14456,#14465,#14471,#14477,#14483,#14489,#14495,#14501,#14510,#14516,#14522,#14555,#14708,#14762,#14816,#15144,#15226,#15306,#15374,#15525,#15547,#15560,#15628,#15646,#15723,#15731,#15754,#15829,#15934,#16007,#16125,#16161,#16229,#16271,#16283,#16326,#16456,#16474,#16616,#16631,#16652,#16811,#16831,#16868,#16908,#16914,#16934,#16954,#16999,#17019,#17044,#17132,#17147,#17212,#17270,#17300,#17372,#17430,#17550,#17627,#17738,#17788,#17899,#17911,#17991,#18052,#18083,#18106,#18125,#18170,#18182,#18212,#18221,#18271,#18319,#18327,#18340,#18432,#18462,#18505,#18518,#18531,#18544,#18592,#18631,#18652,#18665,#18723,#18736,#18749,#18793,#18826,#18886,#18895,#18960,#19122,#19143,#19178,#19213,#19244,#19248,#19411,#19431,#19486,#19506,#19526,#19626,#19671,#19721,#19763,#19793,#19813,#19823,#19962,#19972,#20061,#20081,#20091,#20117,#20145,#20160,#20170,#20221,#20233,#20239,#20245,#20257,#20263,#20269,#20275,#20281,#20287,#20293,#20299,#20305,#20323,#20341,#20347,#20353,#20359,#20365,#20371,#20377,#20383,#20389,#20410,#20431,#20437,#20449,#20461,#20470,#20476,#20482,#20488,#20540,#20570,#20636,#20716,#20841,#20895,#20934,#20969,#21032,#21062,#21108,#21144,#21224,#21296,#21346,#21405,#21435,#21465,#21583,#21618,#21732,#21849,#21884,#21904,#21939,#21945,#21951,#21957,#21963,#21969,#21999,#22078,#22117,#22156,#22180,#22271,#22298,#22333,#22358,#22414,#22439,#22514,#22562,#22595,#22633,#22659,#22687,#22726,#22753,#22757,#22772,#22784,#22805,#22829,#22844,#22862,#22880,#22910,#22934,#22949,#22973,#23003,#23060,#23102,#23150,#23222));
+#2= IFCRELDECLARES('1zDnNP0LPDzu65koq6JWBn',$,$,$,#1,(#3,#31,#61,#77,#119,#156,#358,#451,#516,#541,#559,#613,#840,#982,#1016,#1081,#1154,#1221,#1338,#1413,#1444,#1516,#1551,#1750,#1753,#1826,#1865,#1920,#1974,#2030,#2072,#2087,#2108,#2206,#2327,#2413,#2486,#2502,#2599,#2709,#2741,#2876,#2899,#3007,#3182,#3400,#3521,#3620,#3697,#3820,#3908,#3995,#4132,#4269,#4452,#4594,#4727,#4884,#4952,#4955,#4969,#5037,#5065,#5107,#5142,#5192,#5237,#5251,#5286,#5306,#5379,#5399,#5483,#5518,#5687,#5719,#5759,#5855,#5881,#5977,#6031,#6057,#6083,#6137,#6156,#6201,#6225,#6245,#6362,#6430,#6515,#6527,#6602,#6697,#6790,#6827,#6839,#6929,#7032,#7135,#7189,#7236,#7264,#7279,#7326,#7359,#7406,#7439,#7472,#7519,#7545,#7592,#7652,#7703,#7732,#7759,#7762,#7815,#7835,#7847,#7885,#7891,#7897,#7906,#7937,#7974,#8026,#8169,#8178,#8202,#8220,#8255,#8296,#8323,#8343,#8379,#8394,#8409,#8477,#8487,#8496,#8511,#8537,#8614,#8644,#8663,#8682,#8701,#8720,#8738,#8775,#8795,#8827,#8916,#8944,#9017,#9072,#9122,#9134,#9166,#9198,#9230,#9245,#9251,#9283,#9295,#9307,#9333,#9345,#9351,#9371,#9397,#9409,#9415,#9434,#9446,#9458,#9470,#9490,#9502,#9521,#9533,#9545,#9571,#9583,#9619,#9659,#9674,#9709,#9734,#9740,#9746,#9752,#9758,#9764,#9770,#9776,#9819,#9828,#9843,#9852,#9871,#9908,#9996,#10040,#10173,#10210,#10264,#10301,#10373,#10417,#10449,#10475,#10501,#10527,#10559,#10603,#10635,#10706,#10718,#10828,#10860,#10954,#11080,#11086,#11118,#11183,#11189,#11221,#11250,#11281,#11290,#11322,#11324,#11491,#11544,#11661,#11693,#11813,#11932,#12046,#12160,#12192,#12234,#12279,#12324,#12369,#12440,#12506,#12570,#12600,#12724,#12823,#12891,#13011,#13056,#13120,#13187,#13279,#13343,#13374,#13443,#13509,#13541,#13571,#13640,#13652,#13664,#13687,#13721,#13808,#13841,#13866,#13887,#13910,#13931,#13937,#14014,#14047,#14092,#14181,#14363,#14369,#14375,#14390,#14396,#14411,#14417,#14423,#14432,#14438,#14444,#14450,#14456,#14465,#14471,#14477,#14483,#14489,#14495,#14501,#14510,#14516,#14522,#14555,#14708,#14762,#14816,#15144,#15226,#15306,#15374,#15525,#15547,#15560,#15628,#15646,#15723,#15731,#15754,#15829,#15934,#16007,#16125,#16161,#16229,#16271,#16283,#16326,#16456,#16474,#16616,#16631,#16652,#16811,#16831,#16868,#16908,#16914,#16934,#16954,#16999,#17019,#17044,#17132,#17147,#17212,#17270,#17300,#17372,#17430,#17550,#17627,#17738,#17788,#17899,#17911,#17991,#18052,#18083,#18106,#18125,#18170,#18182,#18212,#18221,#18271,#18319,#18327,#18340,#18432,#18462,#18505,#18518,#18531,#18544,#18592,#18631,#18652,#18665,#18723,#18736,#18749,#18793,#18826,#18886,#18895,#18960,#19122,#19143,#19178,#19213,#19244,#19248,#19411,#19431,#19486,#19506,#19526,#19626,#19671,#19721,#19763,#19793,#19813,#19823,#19962,#19972,#20061,#20081,#20091,#20117,#20145,#20160,#20170,#20221,#20233,#20239,#20245,#20257,#20263,#20269,#20275,#20281,#20287,#20293,#20299,#20305,#20323,#20341,#20347,#20353,#20359,#20365,#20371,#20377,#20383,#20389,#20410,#20431,#20437,#20449,#20461,#20470,#20476,#20482,#20488,#20540,#20570,#20636,#20716,#20841,#20895,#20934,#20969,#21032,#21062,#21108,#21144,#21224,#21296,#21346,#21405,#21435,#21465,#21583,#21618,#21732,#21849,#21884,#21904,#21939,#21945,#21951,#21957,#21963,#21969,#21999,#22078,#22117,#22156,#22180,#22271,#22298,#22333,#22358,#22414,#22439,#22514,#22562,#22595,#22633,#22659,#22687,#22726,#22753,#22757,#22772,#22784,#22805,#22829,#22844,#22862,#22880,#22910,#22934,#22949,#22973,#23003,#23060,#23102,#23150,#23222));
#3= IFCPROPERTYSETTEMPLATE('3trzS0qRmHuO00025QrE$V',$,'Pset_ActorCommon','A property set that enables further classification of actors, including the ability to give a number of actors to be designated as a population, the number being specified as a property to be dealt with as a single value rather than having to aggregate a number of instances of IfcActor.',.PSET_TYPEDRIVENOVERRIDE.,'IfcActor',(#10,#17,#24));
#4= IFCLIBRARYREFERENCE($,$,'Actor Common',$,'en',$);
#5= IFCRELASSOCIATESLIBRARY('3Sj0T8qcX67xNXu1cvvrJw',$,$,$,(#3),#4);
@@ -318,7 +318,6 @@ DATA;
#310= IFCRELASSOCIATESLIBRARY('31D1zec155FPDy9bldVM5S',$,$,$,(#302),#309);
#311= IFCLIBRARYREFERENCE($,$,'\X2\B79CB4DCB9C8D06C\X0\ \X2\AD6CBD84\X0\','\X2\C774\X0\ \X2\AC74BB3CC740\X0\ \X2\C5EDC0ACC801C778\X0\ \X2\AC74BB3C\X0\ \X2\C788B294C9C0\X0\ \X2\C5ECBD80B97C\X0\ \X2\B098D0C0B0B4B294\X0\ \X2\AC12\X0\','ko-KR',$);
#312= IFCRELASSOCIATESLIBRARY('2AEB4Sbnv4N9F3LtPgkoo6',$,$,$,(#302),#311);
-#313= IFCPROPERTYSETTEMPLATE('0P5PgQe5XA1Rk37$BdUJdH',$,'Pset_BuildingElementCommon',$,$,'IfcBuildingElement',(#314,#325,#336,#347));
#314= IFCSIMPLEPROPERTYTEMPLATE('3wicPbQZz5Ru6Zjj9F$4Lp',$,'IsExternal','Indication whether the element is designed for use in the exterior (TRUE) or not (FALSE). If (TRUE) it is an external element and faces the outside of the building.',.P_SINGLEVALUE.,'IfcBoolean','',$,$,$,$,.READWRITE.);
#315= IFCLIBRARYREFERENCE($,$,'Au\S\_enbauteil','Angabe, ob dieses Bauteil ein Aussenbauteil ist (JA) oder ein Innenbauteil (NEIN). Als Aussenbauteil grenzt es an den Aussenraum (oder Erdreich, oder Wasser).','de-DE',$);
#316= IFCRELASSOCIATESLIBRARY('1EqK31rnP8CwXGTFf4olyw',$,$,$,(#314),#315);
@@ -546,7 +545,7 @@ DATA;
#538= IFCRELASSOCIATESLIBRARY('1OXpNZn952bOJuR1pIHt3g',$,$,$,(#536),#537);
#539= IFCLIBRARYREFERENCE($,$,'CommentaireUsage','Information sur l''usage des b\S\btiments voisins','fr-FR',$);
#540= IFCRELASSOCIATESLIBRARY('0eYUfGP195qvKGZK9G8oXh',$,$,$,(#536),#539);
-#541= IFCPROPERTYSETTEMPLATE('2QshPSbtHEWeYz4t$IJ_5k',$,'Pset_CivilElementCommon','Properties common to the definition of all occurrence and type objects of civil element.',$,$,(#542,#543));
+#541= IFCPROPERTYSETTEMPLATE('2QshPSbtHEWeYz4t$IJ_5k',$,'Pset_CivilElementCommon','Properties common to the definition of all occurrence and type objects of civil element.',.PSET_TYPEDRIVENOVERRIDE.,'IfcCivilElement',(#542,#543));
#542= IFCSIMPLEPROPERTYTEMPLATE('1mSb87I6b0egBV57bTxz1d',$,'Reference',$,.P_SINGLEVALUE.,$,$,$,$,$,$,.READWRITE.);
#543= IFCSIMPLEPROPERTYTEMPLATE('2KCc_Rd5D99x5nZnZcj2$j',$,'Status',$,.P_ENUMERATEDVALUE.,'IfcLabel',$,#544,$,$,$,.READWRITE.);
#544= IFCPROPERTYENUMERATION('PEnum_ElementStatus',(IFCLABEL('NEW'),IFCLABEL('EXISTING'),IFCLABEL('DEMOLISH'),IFCLABEL('TEMPORARY'),IFCLABEL('OTHER'),IFCLABEL('NOTKNOWN'),IFCLABEL('UNSET')),$);
@@ -564,7 +563,7 @@ DATA;
#556= IFCRELASSOCIATESLIBRARY('24m5X46AbDzezI9ZGB4iLZ',$,$,$,(#543),#555);
#557= IFCLIBRARYREFERENCE($,'UNSET','(unset)','Value has not been specified.','en',$);
#558= IFCRELASSOCIATESLIBRARY('0doKkNzXD98RcxgzjgnjuO',$,$,$,(#543),#557);
-#559= IFCPROPERTYSETTEMPLATE('0FFkv1bQb5xBumBg6nZobE',$,'Pset_ElementAssemblyCommon','Properties common to the definition of all occurrence and type objects of element assembly.',$,$,(#560,#561));
+#559= IFCPROPERTYSETTEMPLATE('0FFkv1bQb5xBumBg6nZobE',$,'Pset_ElementAssemblyCommon','Properties common to the definition of all occurrence and type objects of element assembly.',.PSET_TYPEDRIVENOVERRIDE.,'IfcElementAssembly',(#560,#561));
#560= IFCSIMPLEPROPERTYTEMPLATE('2KCLcfF8r35gUW6qE2nkg0',$,'Reference',$,.P_SINGLEVALUE.,$,$,$,$,$,$,.READWRITE.);
#561= IFCSIMPLEPROPERTYTEMPLATE('2KCc_Rd5D99x5nZnZcj2$j',$,'Status',$,.P_ENUMERATEDVALUE.,'IfcLabel',$,#562,$,$,$,.READWRITE.);
#562= IFCPROPERTYENUMERATION('PEnum_ElementStatus',(IFCLABEL('NEW'),IFCLABEL('EXISTING'),IFCLABEL('DEMOLISH'),IFCLABEL('TEMPORARY'),IFCLABEL('OTHER'),IFCLABEL('NOTKNOWN'),IFCLABEL('UNSET')),$);
@@ -582,7 +581,6 @@ DATA;
#574= IFCRELASSOCIATESLIBRARY('0nKEMCXdT1E9i164FE48p_',$,$,$,(#561),#573);
#575= IFCLIBRARYREFERENCE($,'UNSET','(unset)','Value has not been specified.','en',$);
#576= IFCRELASSOCIATESLIBRARY('12y6u5dOz6aQrCiE93fe4L',$,$,$,(#561),#575);
-#577= IFCPROPERTYSETTEMPLATE('1$kUwEqwL2BvJ_iHWNGoOf',$,'Pset_ElementCommon','This property set serves as a placeholder for common properties to assist in translation, and is not currently published (the property set type is set to NOTDEFINED).',$,'IfcElement',(#578,#589));
#578= IFCSIMPLEPROPERTYTEMPLATE('33frgWW4D3euBRuniN2rSn',$,'Reference','Reference ID for this specified type in this project (e.g. type ''A-1''), Also referred to as "construction type". It should be provided as an alternative to the name of the "object type", if the software does not support object types.',.P_SINGLEVALUE.,'IfcIdentifier','',$,$,$,$,.READWRITE.);
#579= IFCLIBRARYREFERENCE($,$,'Bauteiltyp','Bezeichnung zur Zusammenfassung gleichartiger Bauteile zu einem Bauteiltyp (auch Konstruktionstyp genannt). Alternativ zum Namen des "Typobjekts", insbesondere wenn die Software keine Typen unterst\S\|tzt.','de-DE',$);
#580= IFCRELASSOCIATESLIBRARY('2AGVGoTTL4LRu9JRR5MaXQ',$,$,$,(#578),#579);
@@ -1755,7 +1753,7 @@ DATA;
#1747= IFCRELASSOCIATESLIBRARY('1YNcMDyzjEnfJoOMX6zEhC',$,$,$,(#1739),#1746);
#1748= IFCLIBRARYREFERENCE($,$,'\X2\C911C559C2DD\X0\ \X2\C5D0C5B4CEE8\X0\','\X2\ACF5AC04C774\X0\ \X2\C911C559\X0\ \X2\C2DD\X0\ \X2\ACF5C870B97C\X0\ \X2\C694CCADD560C9C0\X0\ \X2\C5ECBD80B97C\X0\ \X2\B098D0C0B0B4B294\X0\ \X2\BD80C6B8\X0\ \X2\AC12C785B2C8B2E4\X0\. "\X2\ACF5C870\X0\"\X2\C18DC131C774\X0\ TRUE\X2\B85C\X0\ \X2\C124C815B41C\X0\ \X2\ACBDC6B0C5D0B9CC\X0\ \X2\C8FCC5B4C9C4B2E4\X0\.','ko-KR',$);
#1749= IFCRELASSOCIATESLIBRARY('1Cny$1o4bCowGEleAjaHMM',$,$,$,(#1739),#1748);
-#1750= IFCPROPERTYSETTEMPLATE('0FrzQVlZv4rBwQtsDewSnh',$,'Pset_SpatialZoneCommon',$,$,$,(#1751,#1752));
+#1750= IFCPROPERTYSETTEMPLATE('0FrzQVlZv4rBwQtsDewSnh',$,'Pset_SpatialZoneCommon',$,.PSET_TYPEDRIVENOVERRIDE.,'IfcSpatialZone',(#1751,#1752));
#1751= IFCSIMPLEPROPERTYTEMPLATE('09uhUrGP96Dg7LCTKoeQZI',$,'Reference',$,.P_SINGLEVALUE.,$,$,$,$,$,$,.READWRITE.);
#1752= IFCSIMPLEPROPERTYTEMPLATE('0wumB732b2A8dsysfeuKf4',$,'IsExternal','Indication whether the element is designed for use in the exterior (TRUE) or not (FALSE). If (TRUE) it is an external zone at the outside of the building.',.P_SINGLEVALUE.,'IfcBoolean',$,$,$,$,$,.READWRITE.);
#1753= IFCPROPERTYSETTEMPLATE('3X3v_0qX4HuO00025QrE$V',$,'Pset_TransportElementCommon','Properties common to the definition of all occurrences of IfcTransportElement or IfcTransportElementType',.PSET_TYPEDRIVENOVERRIDE.,'IfcTransportElement',(#1762,#1773,#1797,#1806,#1815));
@@ -11327,7 +11325,7 @@ DATA;
#11319= IFCRELASSOCIATESLIBRARY('2lYH$TOOfC3PAmK0lZ0a6m',$,$,$,(#11302),#11318);
#11320= IFCLIBRARYREFERENCE($,'UNSET','(unset)','Value has not been specified.','en',$);
#11321= IFCRELASSOCIATESLIBRARY('2gGIJnDh9809qUyYb9$YmL',$,$,$,(#11302),#11320);
-#11322= IFCPROPERTYSETTEMPLATE('3pPX0Yyqz8w978GQpU2GcH',$,'Pset_ElectricFlowStorageDevicePHistory','Electric flow storage device performance history common attributes.',$,$,(#11323));
+#11322= IFCPROPERTYSETTEMPLATE('3pPX0Yyqz8w978GQpU2GcH',$,'Pset_ElectricFlowStorageDevicePHistory','Electric flow storage device performance history common attributes.',.PSET_PERFORMANCEDRIVEN.,'IfcElectricFlowStorageDevice',(#11323));
#11323= IFCSIMPLEPROPERTYTEMPLATE('2YT$iVpSfFp9mfXZHHYn1c',$,'Level','The fraction of usable energy stored.',.P_SINGLEVALUE.,'IfcNormalisedRatioMeasure',$,$,$,$,$,.READWRITE.);
#11324= IFCPROPERTYSETTEMPLATE('0BuG00qU0HuO00025QrE$V',$,'Pset_ElectricFlowStorageDeviceTypeCommon','The characteristics of the supply associated with an electrical device occurrence acting as a source of supply to an electrical distribution system NOTE: Properties within this property set should ONLY be used in circumstances when an electrical supply is applied. The property set, the properties contained and their values are not applicable to a circumstance where the sypply is not being applied to the eletrical system or is temporarily disconnected. All properties within this property set are considered to represent a steady state situation.',.PSET_TYPEDRIVENOVERRIDE.,'IfcElectricFlowStorageDevice',(#11329,#11336,#11356,#11363,#11370,#11377,#11403,#11410,#11417,#11424,#11431,#11438,#11445,#11452,#11459,#11466,#11473,#11480,#11487,#11488,#11489,#11490));
#11325= IFCLIBRARYREFERENCE($,$,'Electric Flow Storage Device Type Common',$,'en',$);
diff --git a/src/ifcopenshell-python/ifcopenshell/util/selector.py b/src/ifcopenshell-python/ifcopenshell/util/selector.py
index c8b7a2eb91..fd4b790350 100644
--- a/src/ifcopenshell-python/ifcopenshell/util/selector.py
+++ b/src/ifcopenshell-python/ifcopenshell/util/selector.py
@@ -27,7 +27,6 @@ class Selector:
def parse(cls, ifc_file, query, elements=None):
cls.file = ifc_file
cls.elements = elements
-
l = lark.Lark(
"""start: query (lfunction query)*
query: selector | group
@@ -38,7 +37,7 @@ class Selector:
filter: "[" filter_key (comparison filter_value)? "]"
filter_key: WORD | pset_or_qto
filter_value: ESCAPED_STRING | SIGNED_FLOAT | SIGNED_INT | BOOLEAN | NULL
- pset_or_qto: /[A-Za-z0-9_]+/ "." /[A-Za-z0-9_]+/
+ pset_or_qto: /[^\W][^.=<>]*[^\W]/ "." /[^\W][^.=<>]*[^\W]/
lfunction: and | or
inverse_relationship: types | decomposed_by | bounded_by
types: "*"
@@ -185,12 +184,12 @@ class Selector:
elif token_type == "SIGNED_FLOAT":
value = float(filter_rule.children[2].children[0])
elif token_type == "BOOLEAN":
- value = filter_rule.children[2].children[0].lower() == 'true'
+ value = filter_rule.children[2].children[0].lower() == "true"
elif token_type == "NULL":
value = None
for element in elements:
element_value = cls.get_element_value(element, key)
- if element_value is None and value is not None:
+ if element_value is None and value is not None and "not" not in comparison:
continue
if comparison and cls.filter_element(element, element_value, comparison, value):
results.append(element)
diff --git a/src/ifcopenshell-python/test/api/classification/test_add_classification.py b/src/ifcopenshell-python/test/api/classification/test_add_classification.py
new file mode 100644
index 0000000000..2c80cfb52f
--- /dev/null
+++ b/src/ifcopenshell-python/test/api/classification/test_add_classification.py
@@ -0,0 +1,34 @@
+# IfcOpenShell - IFC toolkit and geometry engine
+# Copyright (C) 2022 Dion Moult
+#
+# This file is part of IfcOpenShell.
+#
+# IfcOpenShell is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# IfcOpenShell is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with IfcOpenShell. If not, see .
+
+import test.bootstrap
+import ifcopenshell.api
+
+
+class TestAddClassification(test.bootstrap.IFC4):
+ def test_adding_a_classification(self):
+ ifcopenshell.api.run("root.create_entity", self.file, ifc_class="IfcProject")
+ ifcopenshell.api.run("classification.add_classification", self.file, classification="Name")
+ assert self.file.by_type("IfcClassification")[0].Name == "Name"
+
+ def test_adding_a_classification_from_a_library(self):
+ library = ifcopenshell.file()
+ classification = library.createIfcClassification(Name="Name")
+ ifcopenshell.api.run("root.create_entity", self.file, ifc_class="IfcProject")
+ ifcopenshell.api.run("classification.add_classification", self.file, classification=classification)
+ assert self.file.by_type("IfcClassification")[0].Name == "Name"
diff --git a/src/ifcopenshell-python/test/api/classification/test_add_classification_reference.py b/src/ifcopenshell-python/test/api/classification/test_add_classification_reference.py
new file mode 100644
index 0000000000..c357811e27
--- /dev/null
+++ b/src/ifcopenshell-python/test/api/classification/test_add_classification_reference.py
@@ -0,0 +1,74 @@
+# IfcOpenShell - IFC toolkit and geometry engine
+# Copyright (C) 2022 Dion Moult
+#
+# This file is part of IfcOpenShell.
+#
+# IfcOpenShell is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# IfcOpenShell is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with IfcOpenShell. If not, see .
+
+import test.bootstrap
+import ifcopenshell.api
+import ifcopenshell.util.classification
+
+
+class TestAddReference(test.bootstrap.IFC4):
+ def test_adding_a_reference(self):
+ ifcopenshell.api.run("root.create_entity", self.file, ifc_class="IfcProject")
+ element = ifcopenshell.api.run("root.create_entity", self.file, ifc_class="IfcWall")
+ result = ifcopenshell.api.run("classification.add_classification", self.file, classification="Name")
+ ifcopenshell.api.run(
+ "classification.add_reference",
+ self.file,
+ product=element,
+ identification="X",
+ name="Foobar",
+ classification=result,
+ )
+ references = list(ifcopenshell.util.classification.get_references(element))
+ assert len(references) == 1
+ assert references[0].Identification == "X"
+ assert references[0].Name == "Foobar"
+ assert references[0].ReferencedSource == self.file.by_type("IfcClassification")[0]
+
+ element2 = ifcopenshell.api.run("root.create_entity", self.file, ifc_class="IfcWall")
+ ifcopenshell.api.run(
+ "classification.add_reference",
+ self.file,
+ product=element2,
+ identification="X",
+ name="Foobar",
+ classification=result,
+ )
+ assert list(ifcopenshell.util.classification.get_references(element2))[0].Identification == "X"
+ assert list(ifcopenshell.util.classification.get_references(element2))[0].Name == "Foobar"
+ assert list(ifcopenshell.util.classification.get_references(element2))[0] == references[0]
+
+ def test_adding_a_reference_from_a_library(self):
+ library = ifcopenshell.file()
+ classification = library.createIfcClassification(Name="Name")
+ reference = library.createIfcClassificationReference(Identification="1", ReferencedSource=classification)
+
+ ifcopenshell.api.run("root.create_entity", self.file, ifc_class="IfcProject")
+ element = ifcopenshell.api.run("root.create_entity", self.file, ifc_class="IfcWall")
+ result = ifcopenshell.api.run("classification.add_classification", self.file, classification=classification)
+ ifcopenshell.api.run(
+ "classification.add_reference",
+ self.file,
+ product=element,
+ reference=reference,
+ classification=result,
+ )
+ references = list(ifcopenshell.util.classification.get_references(element))
+ assert len(references) == 1
+ assert references[0].Identification == "1"
+ assert references[0].ReferencedSource == self.file.by_type("IfcClassification")[0]
diff --git a/src/ifcopenshell-python/test/api/pset/test_remove_pset.py b/src/ifcopenshell-python/test/api/pset/test_remove_pset.py
index 4f5291a3ef..e06ebf1a86 100644
--- a/src/ifcopenshell-python/test/api/pset/test_remove_pset.py
+++ b/src/ifcopenshell-python/test/api/pset/test_remove_pset.py
@@ -29,6 +29,22 @@ class TestRemovePset(test.bootstrap.IFC4):
assert len(self.file.by_type("IfcRelDefinesByProperties")) == 0
assert len(self.file.by_type("IfcPropertySet")) == 0
+ def test_removing_material_psets(self):
+ element = self.file.createIfcMaterial()
+ pset = ifcopenshell.api.run("pset.add_pset", self.file, product=element, name="Foo_Bar")
+ assert len(element.HasProperties) == 1
+ ifcopenshell.api.run("pset.remove_pset", self.file, product=element, pset=pset)
+ assert len(element.HasProperties) == 0
+ assert len(self.file.by_type("IfcMaterialProperties")) == 0
+
+ def test_removing_profile_psets(self):
+ element = self.file.createIfcProfileDef()
+ pset = ifcopenshell.api.run("pset.add_pset", self.file, product=element, name="Foo_Bar")
+ assert len(element.HasProperties) == 1
+ ifcopenshell.api.run("pset.remove_pset", self.file, product=element, pset=pset)
+ assert len(element.HasProperties) == 0
+ assert len(self.file.by_type("IfcMaterialProperties")) == 0
+
def test_only_unassigning_if_pset_is_used_by_other_elements(self):
element = ifcopenshell.api.run("root.create_entity", self.file, ifc_class="IfcWall")
element2 = ifcopenshell.api.run("root.create_entity", self.file, ifc_class="IfcWall")
diff --git a/src/ifcopenshell-python/test/api/sequence/test_cascade_schedule.py b/src/ifcopenshell-python/test/api/sequence/test_cascade_schedule.py
index 48e101559b..9e5f8aa308 100644
--- a/src/ifcopenshell-python/test/api/sequence/test_cascade_schedule.py
+++ b/src/ifcopenshell-python/test/api/sequence/test_cascade_schedule.py
@@ -16,6 +16,7 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
+import pytest
import datetime
import test.bootstrap
import ifcopenshell.api
@@ -53,6 +54,14 @@ class TestCascadeSchedule(test.bootstrap.IFC4):
assert task3.TaskTime.ScheduleStart == "2000-01-02T09:00:00"
assert task3.TaskTime.ScheduleFinish == "2000-01-04T17:00:00"
+ def test_catching_cyclic_relationships(self):
+ task = self._create_task("P1D")
+ task2 = self._create_task("P2D")
+ self._create_sequence(task, task2, "FINISH_START")
+ with pytest.raises(RecursionError):
+ self._create_sequence(task2, task, "FINISH_START")
+ ifcopenshell.api.run("sequence.cascade_schedule", self.file, task=task)
+
def test_cascading_finish_to_start(self):
task = self._create_task("P1D")
task2 = self._create_task("P2D")
diff --git a/src/ifcopenshell-python/test/api/sequence/test_recalculate_schedule.py b/src/ifcopenshell-python/test/api/sequence/test_recalculate_schedule.py
index 399bd132cc..74ef955d66 100644
--- a/src/ifcopenshell-python/test/api/sequence/test_recalculate_schedule.py
+++ b/src/ifcopenshell-python/test/api/sequence/test_recalculate_schedule.py
@@ -16,6 +16,7 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
+import pytest
import datetime
import test.bootstrap
import ifcopenshell.api
@@ -29,6 +30,20 @@ class TestRecalculateSchedule(test.bootstrap.IFC4):
ifcopenshell.api.run("sequence.recalculate_schedule", self.file, work_schedule=self.work_schedule)
assert task.TaskTime is None
+ def test_catching_cyclic_relationships(self):
+ self._add_work_schedule()
+ task = self._create_task("P1D")
+ task2 = self._create_task("P2D")
+ task3 = self._create_task("P2D")
+ task4 = self._create_task("P2D")
+ self._create_sequence(task, task2, "FINISH_START")
+ self._create_sequence(task, task4, "FINISH_START")
+ self._create_sequence(task2, task3, "FINISH_START")
+ with pytest.raises(RecursionError):
+ self._create_sequence(task3, task2, "FINISH_START")
+ with pytest.raises(RecursionError):
+ ifcopenshell.api.run("sequence.recalculate_schedule", self.file, work_schedule=self.work_schedule)
+
def test_recalculating_for_a_single_task(self):
self._add_work_schedule()
task = self._create_task("P1D")
diff --git a/src/ifcopenshell-python/test/test_ids.py b/src/ifcopenshell-python/test/test_ids.py
deleted file mode 100644
index ccd7e20fac..0000000000
--- a/src/ifcopenshell-python/test/test_ids.py
+++ /dev/null
@@ -1,1381 +0,0 @@
-# IfcOpenShell - IFC toolkit and geometry engine
-# Copyright (C) 2021 Thomas Krijnen
-#
-# This file is part of IfcOpenShell.
-#
-# IfcOpenShell is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# IfcOpenShell is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public License
-# along with IfcOpenShell. If not, see .
-
-import os
-import pytest
-import logging
-import unittest
-import tempfile
-import xmlschema
-import ifcopenshell
-import ifcopenshell.api
-from bcf import bcfxml
-from ifcopenshell import ids
-
-IFC_URL = os.path.join(os.path.dirname(__file__), "Sample-BIM-Files/IFC/", "IFC4_Wall_3_with_properties.ifc")
-IDS_URL = os.path.join(os.path.dirname(__file__), "Sample-BIM-Files/IDS/", "IDS_Wall_needs_all_fields.xml")
-
-logger = logging.getLogger("IDS_Logger")
-# logging.basicConfig(level=logging.INFO, format="%(message)s")
-# logging.basicConfig(filename=os.path.join(os.path.dirname(__file__), "log.txt"), level=logging.INFO, format="%(message)s")
-
-file = open(os.path.join(tempfile.gettempdir(), "test.ifc"), "w")
-file.write(IFC_URL)
-file.close()
-ifc_file = ifcopenshell.open(IFC_URL)
-os.remove(os.path.join(tempfile.gettempdir(), "test.ifc"))
-
-
-def set_facet(facet):
- pass
-
-def run(name, *, facet, inst, expected):
- assert bool(facet(inst)) is expected
-
-
-class TestIdsParsing(unittest.TestCase):
- def test_parse_basic_ids(self):
- return # TODO
- IDS_URL = os.path.join(os.path.dirname(__file__), "Sample-BIM-Files/IDS/", "IDS_Wall_needs_all_fields.xml")
- ids_file = ids.ids.open(IDS_URL)
- self.assertEqual(type(ids_file).__name__, "ids")
-
- def test_parse_entity_facet(self):
- return # TODO
- IDS_URL = os.path.join(os.path.dirname(__file__), "Sample-BIM-Files/IDS/", "IDS_Wall_needs_entity.xml")
- ids_file = ids.ids.open(IDS_URL)
- self.assertEqual(ids_file.specifications[0].requirements.terms[0].node["name"]["simpleValue"], "IfcWall")
-
- def test_parse_predefinedType_facet(self):
- return # TODO
- IDS_URL = os.path.join(os.path.dirname(__file__), "Sample-BIM-Files/IDS/", "IDS_Wall_needs_predefinedtype.xml")
- ids_file = ids.ids.open(IDS_URL)
- self.assertEqual(
- ids_file.specifications[0].requirements.terms[0].node["predefinedType"]["simpleValue"], "CLADDING"
- )
-
- def test_parse_property_facet(self):
- return # TODO
- IDS_URL = os.path.join(os.path.dirname(__file__), "Sample-BIM-Files/IDS/", "IDS_Wall_needs_property.xml")
- ids_file = ids.ids.open(IDS_URL)
- self.assertEqual(
- ids_file.specifications[0].requirements.terms[0].node["propertySet"]["simpleValue"], "Test_PropertySet"
- )
- self.assertEqual(ids_file.specifications[0].requirements.terms[0].node["name"]["simpleValue"], "Test_Parameter")
- self.assertEqual(ids_file.specifications[0].requirements.terms[0].node["value"]["simpleValue"], "Test_Value")
-
- def test_parse_material_facet(self):
- return # TODO
- IDS_URL = os.path.join(os.path.dirname(__file__), "Sample-BIM-Files/IDS/", "IDS_Wall_needs_material.xml")
- ids_file = ids.ids.open(IDS_URL)
- self.assertEqual(ids_file.specifications[0].requirements.terms[0].node["value"]["simpleValue"], "Test_Material")
-
- def test_parse_classification_facet(self):
- return # TODO
- IDS_URL = os.path.join(os.path.dirname(__file__), "Sample-BIM-Files/IDS/", "IDS_Wall_needs_classification.xml")
- ids_file = ids.ids.open(IDS_URL)
- self.assertEqual(
- ids_file.specifications[0].requirements.terms[0].node["value"]["simpleValue"], "Test_Classification"
- )
- self.assertEqual(ids_file.specifications[0].requirements.terms[0].node["system"]["simpleValue"], "Test_System")
-
- def test_failing_on_opening_invalid_ids_data(self):
- with pytest.raises(xmlschema.validators.exceptions.XMLSchemaValidationError):
- ids.ids.open("""""")
-
- """ Saving parsed IDS to IDS.xml """
-
- def test_parsed_ids_to_xml(self):
- return # TODO
- IDS_URL = os.path.join(os.path.dirname(__file__), "Sample-BIM-Files", "IDS", "IDS_Wall_needs_all_fields.xml")
- ids_file = ids.ids.open(IDS_URL)
- fn = "output.xml"
- result = ids_file.to_xml(fn)
- assert os.path.isfile(fn)
- os.remove(fn)
- self.assertTrue(result)
-
- def test_parsed_ids_to_string(self):
- return # TODO
- IDS_URL = os.path.join(os.path.dirname(__file__), "Sample-BIM-Files", "IDS", "IDS_Wall_needs_all_fields.xml")
- ids_file = ids.ids.open(IDS_URL)
- output = ids_file.to_string()
- assert output and "http://standards.buildingsmart.org/IDS" in output
-
- """ Parsing IDS files with restrictions """
-
- def test_parse_restrictions_enumeration(self):
- return # TODO
- IDS_URL = os.path.join(
- os.path.dirname(__file__),
- "Sample-BIM-Files/IDS/",
- "IDS_Wall_needs_property_with_restriction_enumeration.xml",
- )
- ids_file = ids.ids.open(IDS_URL)
- self.assertEqual(ids_file.specifications[0].requirements.terms[0].node["name"]["simpleValue"], "Test_Parameter")
- self.assertEqual(
- [
- x["@value"]
- for x in ids_file.specifications[0].requirements.terms[0].node["value"]["restriction"][0]["enumeration"]
- ],
- ["testA", "testB"],
- )
-
- def test_parse_restrictions_bounds(self):
- return # TODO
- IDS_URL = os.path.join(
- os.path.dirname(__file__), "Sample-BIM-Files/IDS/", "IDS_Wall_needs_property_with_restriction_bounds.xml"
- )
- ids_file = ids.ids.open(IDS_URL)
- self.assertEqual(ids_file.specifications[0].requirements.terms[0].node["name"]["simpleValue"], "Test_Parameter")
- self.assertEqual(
- ids_file.specifications[0].requirements.terms[0].node["value"]["restriction"][0]["minInclusive"]["@value"],
- "0",
- )
-
- def test_parse_restrictions_pattern_simple(self):
- return # TODO
- IDS_URL = os.path.join(
- os.path.dirname(__file__), "Sample-BIM-Files/IDS/", "IDS_Wall_needs_property_with_restriction_pattern.xml"
- )
- ids_file = ids.ids.open(IDS_URL)
- self.assertEqual(ids_file.specifications[0].requirements.terms[0].node["name"]["simpleValue"], "Test_Parameter")
- self.assertEqual(
- ids_file.specifications[0].requirements.terms[0].node["value"]["restriction"][0]["pattern"]["@value"],
- "[A-Z]{2,4}",
- )
-
-
-class TestIdsAuthoring(unittest.TestCase):
- def test_create_an_ids_with_minimal_information(self):
- specs = ids.ids()
- assert specs.asdict() == {
- "@xmlns": "http://standards.buildingsmart.org/IDS",
- "@xmlns:xs": "http://www.w3.org/2001/XMLSchema",
- "@xmlns:xsi": "http://www.w3.org/2001/XMLSchema-instance",
- "@xsi:schemaLocation": "http://standards.buildingsmart.org/IDS/ids_05.xsd",
- "info": {"title": "Untitled"},
- "specifications": {"specification": []},
- }
-
- def test_create_an_ids_with_all_possible_information(self):
- specs = ids.ids(
- title="title",
- copyright="copyright",
- version="version",
- description="description",
- author="author@test.com",
- date="2020-01-01",
- purpose="purpose",
- milestone="milestone",
- )
- assert specs.asdict() == {
- "@xmlns": "http://standards.buildingsmart.org/IDS",
- "@xmlns:xs": "http://www.w3.org/2001/XMLSchema",
- "@xmlns:xsi": "http://www.w3.org/2001/XMLSchema-instance",
- "@xsi:schemaLocation": "http://standards.buildingsmart.org/IDS/ids_05.xsd",
- "info": {
- "title": "title",
- "copyright": "copyright",
- "version": "version",
- "description": "description",
- "author": "author@test.com",
- "date": "2020-01-01",
- "purpose": "purpose",
- "milestone": "milestone",
- },
- "specifications": {"specification": []},
- }
-
- def test_check_invalid_ids_information(self):
- specs = ids.ids(title=None, author="author", date="9999-99-99")
- assert specs.asdict() == {
- "@xmlns": "http://standards.buildingsmart.org/IDS",
- "@xmlns:xs": "http://www.w3.org/2001/XMLSchema",
- "@xmlns:xsi": "http://www.w3.org/2001/XMLSchema-instance",
- "@xsi:schemaLocation": "http://standards.buildingsmart.org/IDS/ids_05.xsd",
- "info": {"title": "Untitled"},
- "specifications": {"specification": []},
- }
-
- def test_authoring_an_ids_with_no_specifications_is_invalid(self):
- specs = ids.ids()
- with pytest.raises(xmlschema.validators.exceptions.XMLSchemaChildrenValidationError):
- specs.to_string()
-
- def test_create_specification_with_minimal_information(self):
- spec = ids.specification()
- assert spec.asdict() == {
- "@name": "Unnamed",
- "@ifcVersion": ["IFC2X3", "IFC4"],
- "applicability": {},
- "requirements": {},
- }
-
- def test_create_specification_with_all_possible_information(self):
- spec = ids.specification(
- name="name",
- minOccurs="0",
- maxOccurs="unbounded",
- ifcVersion="IFC4",
- identifier="identifier",
- description="description",
- instructions="instructions",
- )
- assert spec.asdict() == {
- "@name": "name",
- "@minOccurs": "0",
- "@maxOccurs": "unbounded",
- "@ifcVersion": "IFC4",
- "@identifier": "identifier",
- "@description": "description",
- "@instructions": "instructions",
- "applicability": {},
- "requirements": {},
- }
-
- def test_creating_an_entity_facet(self):
- facet = ids.entity.create(name="IfcName")
- assert facet.asdict() == {"name": {"simpleValue": "IfcName"}}
- facet = ids.entity.create(name="IfcName", predefinedType="predefinedType", instructions="instructions")
- assert facet.asdict() == {
- "name": {"simpleValue": "IfcName"},
- "predefinedType": {"simpleValue": "predefinedType"},
- "@instructions": "instructions",
- }
-
- def test_filtering_using_an_entity_facet(self):
- set_facet("entity")
-
- ifc = ifcopenshell.file()
- facet = ids.entity.create(name="IFCRABBIT")
- run("Invalid entities always fail", facet=facet, inst=ifc.createIfcWall(), expected=False)
-
- ifc = ifcopenshell.file()
- facet = ids.entity.create(name="IFCWALL")
- run("A matching entity should pass", facet=facet, inst=ifc.createIfcWall(), expected=True)
- ifc = ifcopenshell.file()
- run(
- "An matching entity should pass regardless of predefined type",
- facet=facet,
- inst=ifc.createIfcWall(PredefinedType="SOLIDWALL"),
- expected=True,
- )
- ifc = ifcopenshell.file()
- run(
- "An entity not matching the specified class should fail",
- facet=facet,
- inst=ifc.createIfcSlab(),
- expected=False,
- )
- # TODO: Some votes to prefer inheritance (For: Moult, Evandro, Artur)
- # Possible argument: CAD tools don't understand IFC
- ifc = ifcopenshell.file()
- run(
- "Subclasses are not considered as matching",
- facet=facet,
- inst=ifc.createIfcWallStandardCase(),
- expected=False,
- )
-
- # TODO But in that case why are the enumerations for things like partOf using the IFC capitalisation?
- facet = ids.entity.create(name="IfcWall")
- ifc = ifcopenshell.file()
- run(
- "Entities must be specified as uppercase strings",
- facet=facet,
- inst=ifc.createIfcWall(),
- expected=False,
- )
-
- facet = ids.entity.create(name="IFCWALL", predefinedType="SOLIDWALL")
- ifc = ifcopenshell.file()
- run(
- "A matching predefined type should pass",
- facet=facet,
- inst=ifc.createIfcWall(PredefinedType="SOLIDWALL"),
- expected=True,
- )
- ifc = ifcopenshell.file()
- run(
- "A null predefined type should always fail a specified predefined types",
- facet=facet,
- inst=ifc.createIfcWall(),
- expected=False,
- )
- ifc = ifcopenshell.file()
- run(
- "An entity not matching a specified predefined type will fail",
- facet=facet,
- inst=ifc.createIfcWall(PredefinedType="PARTITIONING"),
- expected=False,
- )
-
- facet = ids.entity.create(name="IFCWALL", predefinedType="solidwall")
- ifc = ifcopenshell.file()
- run(
- "A predefined type from an enumeration must be uppercase",
- facet=facet,
- inst=ifc.createIfcWall(PredefinedType="SOLIDWALL"),
- expected=False,
- )
-
- facet = ids.entity.create(name="IFCWALL", predefinedType="WALDO")
- ifc = ifcopenshell.file()
- run(
- "A predefined type may specify a user-defined object type",
- facet=facet,
- inst=ifc.createIfcWall(PredefinedType="USERDEFINED", ObjectType="WALDO"),
- expected=True,
- )
-
- facet = ids.entity.create(name="IFCWALL", predefinedType="WALDO")
- ifc = ifcopenshell.file()
- run(
- "User-defined types are checked case sensitively",
- facet=facet,
- inst=ifc.createIfcWall(PredefinedType="USERDEFINED", ObjectType="waldo"),
- expected=False,
- )
-
- facet = ids.entity.create(name="IFCWALLTYPE", predefinedType="WALDO")
- ifc = ifcopenshell.file()
- run(
- "A predefined type may specify a user-defined element type",
- facet=facet,
- inst=ifc.createIfcWallType(PredefinedType="USERDEFINED", ElementType="WALDO"),
- expected=True,
- )
-
- facet = ids.entity.create(name="IFCTASKTYPE", predefinedType="TASKY")
- ifc = ifcopenshell.file()
- run(
- "A predefined type may specify a user-defined process type",
- facet=facet,
- inst=ifc.createIfcTaskType(PredefinedType="USERDEFINED", ProcessType="TASKY"),
- expected=True,
- )
-
- facet = ids.entity.create(name="IFCWALL", predefinedType="USERDEFINED")
- ifc = ifcopenshell.file()
- run(
- "A predefined type must always specify a meaningful type, not USERDEFINED itself",
- facet=facet,
- inst=ifc.createIfcWall(PredefinedType="USERDEFINED", ObjectType="WALDO"),
- expected=False,
- )
-
- ifc = ifcopenshell.file()
- wall = ifcopenshell.api.run("root.create_entity", ifc, ifc_class="IfcWall")
- wall_type = ifcopenshell.api.run("root.create_entity", ifc, ifc_class="IfcWallType", predefined_type="X")
- ifcopenshell.api.run("type.assign_type", ifc, related_object=wall, relating_type=wall_type)
- facet = ids.entity.create(name="IFCWALL", predefinedType="X")
- run("Inherited predefined types should pass", facet=facet, inst=wall, expected=True)
-
- ifc = ifcopenshell.file()
- wall = ifcopenshell.api.run("root.create_entity", ifc, ifc_class="IfcWall", predefined_type="X")
- wall_type = ifcopenshell.api.run(
- "root.create_entity", ifc, ifc_class="IfcWallType", predefined_type="NOTDEFINED"
- )
- ifcopenshell.api.run("type.assign_type", ifc, related_object=wall, relating_type=wall_type)
- facet = ids.entity.create(name="IFCWALL", predefinedType="X")
- run("Overridden predefined types should pass", facet=facet, inst=wall, expected=True)
-
- restriction = ids.restriction.create(options=["IFCWALL", "IFCSLAB"], type="enumeration")
- facet = ids.entity.create(name=restriction)
- ifc = ifcopenshell.file()
- run("Entities can be specified as an enumeration 1/3", facet=facet, inst=ifc.createIfcWall(), expected=True)
- ifc = ifcopenshell.file()
- run("Entities can be specified as an enumeration 2/3", facet=facet, inst=ifc.createIfcSlab(), expected=True)
- ifc = ifcopenshell.file()
- run("Entities can be specified as an enumeration 3/3", facet=facet, inst=ifc.createIfcBeam(), expected=False)
-
- restriction = ids.restriction.create(options="IFC.*TYPE", type="pattern")
- facet = ids.entity.create(name=restriction)
- ifc = ifcopenshell.file()
- run("Entities can be specified as a XSD regex pattern 1/2", facet=facet, inst=ifc.createIfcWall(), expected=False)
- ifc = ifcopenshell.file()
- run("Entities can be specified as a XSD regex pattern 2/2", facet=facet, inst=ifc.createIfcWallType(), expected=True)
-
- restriction = ids.restriction.create(options="FOO.*", type="pattern")
- facet = ids.entity.create(name="IFCWALL", predefinedType=restriction)
- ifc = ifcopenshell.file()
- wall = ifcopenshell.api.run("root.create_entity", ifc, ifc_class="IfcWall", predefined_type="FOOBAR")
- run("Restrictions an be specified for the predefined type 1/3", facet=facet, inst=wall, expected=True)
- ifc = ifcopenshell.file()
- wall2 = ifcopenshell.api.run("root.create_entity", ifc, ifc_class="IfcWall", predefined_type="FOOBAZ")
- run("Restrictions an be specified for the predefined type 2/3", facet=facet, inst=wall2, expected=True)
- ifc = ifcopenshell.file()
- wall3 = ifcopenshell.api.run("root.create_entity", ifc, ifc_class="IfcWall", predefined_type="BAZFOO")
- run("Restrictions an be specified for the predefined type 3/3", facet=facet, inst=wall3, expected=False)
-
- def test_creating_an_attribute_facet(self):
- attribute = ids.attribute.create(name="name")
- assert attribute.asdict() == {"name": {"simpleValue": "name"}}
- attribute = ids.attribute.create(name="name", value="value")
- assert attribute.asdict() == {"name": {"simpleValue": "name"}, "value": {"simpleValue": "value"}}
- attribute = ids.attribute.create(
- name="name", value="value", minOccurs="0", maxOccurs="unbounded", instructions="instructions"
- )
- assert attribute.asdict() == {
- "name": {"simpleValue": "name"},
- "value": {"simpleValue": "value"},
- "@minOccurs": "0",
- "@maxOccurs": "unbounded",
- "@instructions": "instructions",
- }
-
- def test_filtering_using_an_attribute_facet(self):
- set_facet("attribute")
-
- ifc = ifcopenshell.file()
- facet = ids.attribute.create(name="Foobar")
- run("Invalid attribute names always fail", facet=facet, inst=ifc.createIfcWall(), expected=False)
-
- ifc = ifcopenshell.file()
- facet = ids.attribute.create(name="Name")
- run("Attributes with a string value should pass", facet=facet, inst=ifc.createIfcWall(Name="Foobar"), expected=True)
- ifc = ifcopenshell.file()
- run("Attributes with null values always fail", facet=facet, inst=ifc.createIfcWall(), expected=False)
- # The logic is that unfortunately most BIM users cannot differentiate between the two.
- ifc = ifcopenshell.file()
- run("Attributes with empty strings always fail", facet=facet, inst=ifc.createIfcWall(Name=""), expected=False)
- facet = ids.attribute.create(name="CountValue")
- ifc = ifcopenshell.file()
- run("Attributes with a zero number have meaning and should pass", facet=facet, inst=ifc.createIfcQuantityCount(Name="Foobar", CountValue=0), expected=True)
-
- facet = ids.attribute.create(name="IsCritical")
- ifc = ifcopenshell.file()
- element = ifc.createIfcTaskTime(IsCritical=True)
- run("Attributes with a boolean true should pass", facet=facet, inst=element, expected=True)
- element.IsCritical = False
- run("Attributes with a boolean false should pass", facet=facet, inst=element, expected=True)
-
- facet = ids.attribute.create(name="RelatingPriorities")
- ifc = ifcopenshell.file()
- run("Attributes with an empty list always fail", facet=facet, inst=ifc.createIfcRelConnectsPathElements(RelatingElement=ifc.createIfcWall(), RelatedElement=ifc.createIfcWall(), RelatingPriorities=[], RelatedPriorities=[], RelatedConnectionType="ATSTART", RelatingConnectionType="ATEND"), expected=False)
-
- facet = ids.attribute.create(name="LayerStyles")
- ifc = ifcopenshell.file()
- item = ifc.createIfcCartesianPoint([0., 0., 0.])
- layer = ifc.createIfcPresentationLayerWithStyle("Foo", None, [item], None, True, False, False, [])
- run("Attributes with an empty set always fail", facet=facet, inst=layer, expected=False)
-
- layer.LayerOn = "UNKNOWN"
- facet = ids.attribute.create(name="LayerOn")
- run("Attributes with a logical unknown always fail", facet=facet, inst=layer, expected=False)
-
- facet = ids.attribute.create(name="ScheduleDuration")
- ifc = ifcopenshell.file()
- element = ifc.createIfcTaskTime(ScheduleDuration="P0D")
- run("Attributes with a zero duration should pass", facet=facet, inst=element, expected=True)
-
- facet = ids.attribute.create(name="TaskTime")
- ifc = ifcopenshell.file()
- element = ifc.createIfcTask(IsMilestone=True, TaskTime=ifc.createIfcTaskTime())
- run("Attributes referencing an object should pass", facet=facet, inst=element, expected=True)
-
- facet = ids.attribute.create(name="DiffuseColour")
- ifc = ifcopenshell.file()
- rgb = ifc.createIfcColourRgb(None, 1, 1, 1)
- run("Attributes with a select referencing an object should pass", facet=facet, inst=ifc.createIfcSurfaceStyleRendering(SurfaceColour=rgb, ReflectanceMethod="FLAT", DiffuseColour=ifc.createIfcColourRgb(None, 1, 1, 1)), expected=True)
-
- ifc = ifcopenshell.file()
- rgb = ifc.createIfcColourRgb(None, 1, 1, 1)
- run("Attributes with a select referencing a primitive should pass", facet=facet, inst=ifc.createIfcSurfaceStyleRendering(SurfaceColour=rgb, ReflectanceMethod="FLAT", DiffuseColour=ifc.createIfcNormalisedRatioMeasure(0.5)), expected=True)
-
- ifc = ifcopenshell.file()
- facet = ids.attribute.create(name="EngagedIn")
- person = ifc.createIfcPerson()
- organisation = ifc.createIfcOrganization(Name="Foo")
- ifc.createIfcPersonAndOrganization(ThePerson=person, TheOrganization=organisation)
- run("Inverse attributes cannot be checked and always fail", facet=facet, inst=person, expected=False)
-
- ifc = ifcopenshell.file()
- facet = ids.attribute.create(name="Dim")
- run("Derived attributes cannot be checked and always fail", facet=facet, inst=ifc.createIfcCartesianPoint([0., 0., 0.]), expected=False)
-
- facet = ids.attribute.create(name="Name", value="Foobar")
- ifc = ifcopenshell.file()
- run("Attributes should check strings case sensitively 1/2", facet=facet, inst=ifc.createIfcWall(Name="Foobar"), expected=True)
- ifc = ifcopenshell.file()
- run("Attributes should check strings case sensitively 2/2", facet=facet, inst=ifc.createIfcWall(Name="foobar"), expected=False)
-
- facet = ids.attribute.create(name="TaskTime", value="Foobar")
- ifc = ifcopenshell.file()
- run("Value checks always fail for objects", facet=facet, inst=ifc.createIfcTask(IsMilestone=False, TaskTime=ifc.createIfcTaskTime()), expected=False)
-
- facet = ids.attribute.create(name="DiffuseColour", value="Foobar")
- ifc = ifcopenshell.file()
- rgb = ifc.createIfcColourRgb(None, 1, 1, 1)
- run("Value checks always fail for selects", facet=facet, inst=ifc.createIfcSurfaceStyleRendering(SurfaceColour=rgb, ReflectanceMethod="FLAT", DiffuseColour=ifc.createIfcNormalisedRatioMeasure(0.5)), expected=False)
-
- facet = ids.attribute.create(name="Coordinates", value="Foobar")
- ifc = ifcopenshell.file()
- run("Value checks always fail for lists", facet=facet, inst=ifc.createIfcCartesianPoint([0., 0., 0.]), expected=False)
-
- # TODO continue from here
-
- global_id = ifcopenshell.guid.new()
- facet = ids.attribute.create(name="GlobalId", value=global_id)
- ifc = ifcopenshell.file()
- run("GlobalIds are treated as strings and not expanded", facet=facet, inst=ifc.createIfcWall(GlobalId=global_id), expected=True)
-
- # 255 characters
- identifier = "123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345"
- facet = ids.attribute.create(name="Identification", value=identifier + "_extra_characters")
- ifc = ifcopenshell.file()
- run("IDS does not handle string truncation such as for identifiers", facet=facet, inst=ifc.createIfcPerson(Identification=identifier), expected=False)
-
- facet = ids.attribute.create(name="RefractionIndex", value="42")
- ifc = ifcopenshell.file()
- run("Numeric values are checked using type casting 1/4", facet=facet, inst=ifc.createIfcSurfaceStyleRefraction(RefractionIndex=42), expected=True)
- facet = ids.attribute.create(name="RefractionIndex", value="42.")
- ifc = ifcopenshell.file()
- run("Numeric values are checked using type casting 2/4", facet=facet, inst=ifc.createIfcSurfaceStyleRefraction(RefractionIndex=42.0), expected=True)
- facet = ids.attribute.create(name="RefractionIndex", value="42.0")
- ifc = ifcopenshell.file()
- run("Numeric values are checked using type casting 3/4", facet=facet, inst=ifc.createIfcSurfaceStyleRefraction(RefractionIndex=42.0), expected=True)
- facet = ids.attribute.create(name="RefractionIndex", value="42")
- ifc = ifcopenshell.file()
- run("Numeric values are checked using type casting 4/4", facet=facet, inst=ifc.createIfcSurfaceStyleRefraction(RefractionIndex=42.3), expected=False)
- facet = ids.attribute.create(name="RefractionIndex", value="42,3")
- ifc = ifcopenshell.file()
- run("Only specifically formatted numbers are allowed 1/4", facet=facet, inst=ifc.createIfcSurfaceStyleRefraction(RefractionIndex=42.3), expected=False)
- facet = ids.attribute.create(name="RefractionIndex", value="123,4.5")
- ifc = ifcopenshell.file()
- run("Only specifically formatted numbers are allowed 2/4", facet=facet, inst=ifc.createIfcSurfaceStyleRefraction(RefractionIndex=1234.5), expected=False)
- facet = ids.attribute.create(name="RefractionIndex", value="1.2345e3")
- ifc = ifcopenshell.file()
- run("Only specifically formatted numbers are allowed 3/4", facet=facet, inst=ifc.createIfcSurfaceStyleRefraction(RefractionIndex=1234.5), expected=True)
- facet = ids.attribute.create(name="RefractionIndex", value="1.2345E3")
- ifc = ifcopenshell.file()
- run("Only specifically formatted numbers are allowed 4/4", facet=facet, inst=ifc.createIfcSurfaceStyleRefraction(RefractionIndex=1234.5), expected=True)
-
- facet = ids.attribute.create(name="NumberOfRisers", value="42")
- ifc = ifcopenshell.file()
- run("Integers follow the same rules as numbers", facet=facet, inst=ifc.createIfcStairFlight(NumberOfRisers=42), expected=True)
- facet = ids.attribute.create(name="NumberOfRisers", value="42.0")
- ifc = ifcopenshell.file()
- run("Integers follow the same rules as numbers 2/2", facet=facet, inst=ifc.createIfcStairFlight(NumberOfRisers=42), expected=True)
-
- facet = ids.attribute.create(name="NumberOfRisers", value="42.3")
- ifc = ifcopenshell.file()
- run("Integers are always floored when cast 1/2", facet=facet, inst=ifc.createIfcStairFlight(NumberOfRisers=42), expected=True)
- facet = ids.attribute.create(name="NumberOfRisers", value="42.7")
- ifc = ifcopenshell.file()
- run("Integers are always floored when cast 2/2", facet=facet, inst=ifc.createIfcStairFlight(NumberOfRisers=42), expected=True)
-
- facet = ids.attribute.create(name="NumberOfRisers", value="42.7")
- ifc = ifcopenshell.file()
- run("Integers are always floored when cast 2/2", facet=facet, inst=ifc.createIfcStairFlight(NumberOfRisers=42), expected=True)
-
- facet = ids.attribute.create(name="IsMilestone", value="TRUE")
- ifc = ifcopenshell.file()
- element = ifc.createIfcTask(IsMilestone=False)
- run("Booleans must be specified as uppercase strings 1/3", facet=facet, inst=element, expected=False)
- facet = ids.attribute.create(name="IsMilestone", value="FALSE")
- run("Booleans must be specified as uppercase strings 2/3", facet=facet, inst=element, expected=True)
- facet = ids.attribute.create(name="IsMilestone", value="False")
- run("Booleans must be specified as uppercase strings 2/3", facet=facet, inst=element, expected=False)
-
- facet = ids.attribute.create(name="EditionDate", value="2022-01-01")
- ifc = ifcopenshell.file()
- run("Dates are treated as strings 1/2", facet=facet, inst=ifc.createIfcClassification(Name="Name", EditionDate="2022-01-01"), expected=True)
- ifc = ifcopenshell.file()
- run("Dates are treated as strings 1/2", facet=facet, inst=ifc.createIfcClassification(Name="Name", EditionDate="2022-01-01+00:00"), expected=False)
-
- facet = ids.attribute.create(name="ScheduleDuration", value="PT16H")
- ifc = ifcopenshell.file()
- run("Durations are treated as strings 1/2", facet=facet, inst=ifc.createIfcClassification(Name="Name", EditionDate="PT16H"), expected=False)
- ifc = ifcopenshell.file()
- run("Durations are treated as strings 2/2", facet=facet, inst=ifc.createIfcClassification(Name="Name", EditionDate="P2D"), expected=False)
-
- restriction = ids.restriction.create(options=".*Name.*", type="pattern")
- facet = ids.attribute.create(name=restriction)
- ifc = ifcopenshell.file()
- run("Name restrictions may be used 1/4", facet=facet, inst=ifc.createIfcMaterialLayerSet(MaterialLayers=[ifc.createIfcMaterialLayer(LayerThickness=1)], LayerSetName="Foo"), expected=True)
- ifc = ifcopenshell.file()
- run("Name restrictions may be used 2/4", facet=facet, inst=ifc.createIfcMaterialConstituentSet(Name="Foo"), expected=True)
-
- restriction = ids.restriction.create(options=["Name", "Description"], type="enumeration")
- facet = ids.attribute.create(name=restriction)
- ifc = ifcopenshell.file()
- run("Name restrictions may be used 3/4", facet=facet, inst=ifc.createIfcWall(Name="Foo"), expected=False)
- ifc = ifcopenshell.file()
- run("Name restrictions may be used 4/4", facet=facet, inst=ifc.createIfcWall(Name="Foo", Description="Bar"), expected=True)
-
- restriction = ids.restriction.create(options=["Foo", "Bar"], type="enumeration")
- facet = ids.attribute.create(name="Name", value=restriction)
- ifc = ifcopenshell.file()
- run("Value restrictions may be used 1/3", facet=facet, inst=ifc.createIfcWall(Name="Foo"), expected=True)
- ifc = ifcopenshell.file()
- run("Value restrictions may be used 2/3", facet=facet, inst=ifc.createIfcWall(Name="Bar"), expected=True)
- ifc = ifcopenshell.file()
- run("Value restrictions may be used 3/3", facet=facet, inst=ifc.createIfcWall(Name="Foobar"), expected=False)
-
- ifc = ifcopenshell.file()
- wall = ifcopenshell.api.run("root.create_entity", ifc, ifc_class="IfcWall")
- wall_type = ifcopenshell.api.run("root.create_entity", ifc, ifc_class="IfcWallType")
- ifcopenshell.api.run("type.assign_type", ifc, related_object=wall, relating_type=wall_type)
- wall_type.Description = "Foobar"
- run("Attributes are not inherited by the occurrence", facet=facet, inst=wall, expected=False)
-
- restriction = ids.restriction.create(options=["42"], type="enumeration", base="string")
- facet = ids.attribute.create(name="RefractionIndex", value=restriction)
- ifc = ifcopenshell.file()
- run("Typecast checking may also occur within enumeration restrictions", facet=facet, inst=ifc.createIfcSurfaceStyleRefraction(RefractionIndex=42), expected=True)
-
- restriction = ids.restriction.create(
- options={"minInclusive": 42, "maxInclusive": 42}, type="bounds", base="decimal"
- )
- facet = ids.attribute.create(name="RefractionIndex", value=restriction)
- ifc = ifcopenshell.file()
- run("Strict numeric checking may be done with a bounds restriction", facet=facet, inst=ifc.createIfcSurfaceStyleRefraction(RefractionIndex=42), expected=True)
-
- def test_creating_a_classification_facet(self):
- facet = ids.classification.create()
- assert facet.asdict() == {}
- facet = ids.classification.create(value="value", system="system")
- assert facet.asdict() == {"value": {"simpleValue": "value"}, "system": {"simpleValue": "system"}}
- facet = ids.classification.create(
- value="value",
- system="system",
- uri="https://test.com",
- minOccurs="0",
- maxOccurs="unbounded",
- instructions="instructions",
- )
- assert facet.asdict() == {
- "value": {"simpleValue": "value"},
- "system": {"simpleValue": "system"},
- "@uri": "https://test.com",
- "@minOccurs": "0",
- "@maxOccurs": "unbounded",
- "@instructions": "instructions",
- }
-
- def test_filtering_using_a_classification_facet(self):
- set_facet("classification")
-
- library = ifcopenshell.file()
- system_a = library.createIfcClassification(Name="Foobar")
- ref1 = library.createIfcClassificationReference(Identification="1", ReferencedSource=system_a)
- ref11 = library.createIfcClassificationReference(Identification="11", ReferencedSource=ref1)
- ref2 = library.createIfcClassificationReference(Identification="2", ReferencedSource=system_a)
- ref22 = library.createIfcClassificationReference(Identification="22", ReferencedSource=ref2)
- system_b = library.createIfcClassification(Name="Foobaz")
- refx = library.createIfcClassificationReference(Identification="X", ReferencedSource=system_b)
-
- ifc = ifcopenshell.file()
- project = ifc.createIfcProject()
- system_a = ifcopenshell.api.run("classification.add_classification", ifc, classification=system_a)
- element0 = ifcopenshell.api.run("root.create_entity", ifc, ifc_class="IfcWall")
- element1 = ifcopenshell.api.run("root.create_entity", ifc, ifc_class="IfcWall")
- ifcopenshell.api.run(
- "classification.add_reference", ifc, product=element1, reference=ref1, classification=system_a
- )
- element11 = ifcopenshell.api.run("root.create_entity", ifc, ifc_class="IfcWall")
- ifcopenshell.api.run(
- "classification.add_reference", ifc, product=element11, reference=ref11, classification=system_a
- )
- element22 = ifcopenshell.api.run("root.create_entity", ifc, ifc_class="IfcWall")
- ifcopenshell.api.run(
- "classification.add_reference",
- ifc,
- product=element22,
- reference=ref22,
- classification=system_a,
- is_lightweight=False,
- )
-
- facet = ids.classification.create()
- run("A classification facet with no data matches any classification 1/2", facet=facet, inst=element0, expected=False)
- run("A classification facet with no data matches any classification 2/2", facet=facet, inst=element1, expected=True)
-
- facet = ids.classification.create(value="1")
- run("Values should match exactly if lightweight classifications are used", facet=facet, inst=element1, expected=True)
-
- facet = ids.classification.create(value="2")
- run("Values match subreferences if full classifications are used (e.g. EF_25_10 should match EF_25_10_25, EF_25_10_30, etc)", facet=facet, inst=element22, expected=True)
-
- facet = ids.classification.create(system="Foobar")
- run("Systems should match exactly 1/5", facet=facet, inst=project, expected=True)
- run("Systems should match exactly 2/5", facet=facet, inst=element0, expected=False)
- run("Systems should match exactly 3/5", facet=facet, inst=element1, expected=True)
- run("Systems should match exactly 4/5", facet=facet, inst=element11, expected=True)
- run("Systems should match exactly 5/5", facet=facet, inst=element22, expected=True)
-
- restriction = ids.restriction.create(options="1.*", type="pattern")
- facet = ids.classification.create(value=restriction)
- run("Restrictions can be used for values 1/3", facet=facet, inst=element1, expected=True)
- run("Restrictions can be used for values 2/3", facet=facet, inst=element11, expected=True)
- run("Restrictions can be used for values 3/3", facet=facet, inst=element22, expected=False)
-
- restriction = ids.restriction.create(options="Foo.*", type="pattern")
- facet = ids.classification.create(system=restriction)
- run("Restrictions can be used for systems 1/2", facet=facet, inst=element0, expected=False)
- run("Restrictions can be used for systems 2/2", facet=facet, inst=element1, expected=True)
-
- facet = ids.classification.create(system="Foobar", value="1")
- run("Both system and value must match (all, not any) if specified 1/2", facet=facet, inst=element1, expected=True)
- run("Both system and value must match (all, not any) if specified 2/2", facet=facet, inst=element11, expected=False)
-
- # IFC doesn't yet formally specify how inheritance and overrides work here. We follow these rules:
- # https://github.com/buildingSMART/IFC4.3.x-development/issues/475
- wall = ifcopenshell.api.run("root.create_entity", ifc, ifc_class="IfcWall")
- wall_type = ifcopenshell.api.run("root.create_entity", ifc, ifc_class="IfcWallType")
- ifcopenshell.api.run("type.assign_type", ifc, related_object=wall, relating_type=wall_type)
- ifcopenshell.api.run("classification.add_reference", ifc, product=wall, reference=ref11, classification=system_a)
- ifcopenshell.api.run(
- "classification.add_reference", ifc, product=wall_type, reference=ref22, classification=system_a
- )
-
- system_b = ifcopenshell.api.run("classification.add_classification", ifc, classification=system_b)
- ifcopenshell.api.run(
- "classification.add_reference", ifc, product=wall_type, reference=refx, classification=system_b
- )
-
- facet = ids.classification.create(value="11")
- run("Occurrences override the type classification per system 1/3", facet=facet, inst=wall, expected=True)
- facet = ids.classification.create(value="22")
- run("Occurrences override the type classification per system 2/3", facet=facet, inst=wall, expected=False)
- facet = ids.classification.create(value="X")
- run("Occurrences override the type classification per system 3/3", facet=facet, inst=wall, expected=True)
-
- def test_creating_a_property_facet(self):
- facet = ids.property.create()
- assert facet.asdict() == {
- "propertySet": {"simpleValue": "Property_Set"},
- "name": {"simpleValue": "PropertyName"},
- }
- facet = ids.property.create(
- propertySet="propertySet",
- name="name",
- value="value",
- measure="String",
- uri="https://test.com",
- minOccurs="0",
- maxOccurs="unbounded",
- instructions="instructions",
- )
- assert facet.asdict() == {
- "propertySet": {"simpleValue": "propertySet"},
- "name": {"simpleValue": "name"},
- "value": {"simpleValue": "value"},
- "@measure": "String",
- "@uri": "https://test.com",
- "@minOccurs": "0",
- "@maxOccurs": "unbounded",
- "@instructions": "instructions",
- }
-
- def test_filtering_using_a_property_facet(self):
- ifc = ifcopenshell.file()
- ifc.createIfcProject()
- # Milli prefix used to check measurement conversions
- lengthunit = ifcopenshell.api.run("unit.add_si_unit", ifc, unit_type="LENGTHUNIT", name="METRE", prefix="MILLI")
- areaunit = ifcopenshell.api.run(
- "unit.add_si_unit", ifc, unit_type="AREAUNIT", name="SQUARE_METRE", prefix="MILLI"
- )
- volumeunit = ifcopenshell.api.run(
- "unit.add_si_unit", ifc, unit_type="VOLUMEUNIT", name="CUBIC_METRE", prefix="MILLI"
- )
- timeunit = ifcopenshell.api.run("unit.add_si_unit", ifc, unit_type="TIMEUNIT", name="SECOND")
- ifcopenshell.api.run("unit.assign_unit", ifc, units=[lengthunit, areaunit, volumeunit, timeunit])
-
- # A name check by itself only checks that a property is non-null and non empty string
- # The logic is that unfortunately most BIM users cannot differentiate between the two.
- facet = ids.property.create(propertySet="Foo_Bar", name="Foo")
- element = ifcopenshell.api.run("root.create_entity", ifc, ifc_class="IfcWall")
- run("", facet=facet, inst=element, expected=False)
- pset = ifcopenshell.api.run("pset.add_pset", ifc, product=element, name="Foo_Bar")
- run("", facet=facet, inst=element, expected=False)
- ifcopenshell.api.run("pset.edit_pset", ifc, pset=pset, properties={"Foo": None})
- run("", facet=facet, inst=element, expected=False)
- ifcopenshell.api.run("pset.edit_pset", ifc, pset=pset, properties={"Foo": "Bar"})
- run("", facet=facet, inst=element, expected=True)
-
- # A simple value checks an exact case-sensitive match
- facet = ids.property.create(propertySet="Foo_Bar", name="Foo", value="Bar")
- element = ifcopenshell.api.run("root.create_entity", ifc, ifc_class="IfcWall")
- pset = ifcopenshell.api.run("pset.add_pset", ifc, product=element, name="Foo_Bar")
- ifcopenshell.api.run("pset.edit_pset", ifc, pset=pset, properties={"Foo": "Bar"})
- run("", facet=facet, inst=element, expected=True)
- ifcopenshell.api.run("pset.edit_pset", ifc, pset=pset, properties={"Foo": "Baz"})
- run("", facet=facet, inst=element, expected=False)
-
- # Simple values only check string matches
- facet = ids.property.create(propertySet="Foo_Bar", name="Foo", value="1")
- element = ifcopenshell.api.run("root.create_entity", ifc, ifc_class="IfcWall")
- pset = ifcopenshell.api.run("pset.add_pset", ifc, product=element, name="Foo_Bar")
- ifcopenshell.api.run("pset.edit_pset", ifc, pset=pset, properties={"Foo": "1"})
- run("", facet=facet, inst=element, expected=True)
- ifcopenshell.api.run("pset.edit_pset", ifc, pset=pset, properties={"Foo": ifc.createIfcInteger(1)})
- run("", facet=facet, inst=element, expected=False)
-
- # Restrictions are supported for property sets. If multiple are matched, all must satisfy requirements.
- restriction = ids.restriction.create(options="Foo_.*", type="pattern")
- facet = ids.property.create(propertySet=restriction, name="Foo")
- element = ifcopenshell.api.run("root.create_entity", ifc, ifc_class="IfcWall")
- pset = ifcopenshell.api.run("pset.add_pset", ifc, product=element, name="Foo_Bar")
- ifcopenshell.api.run("pset.edit_pset", ifc, pset=pset, properties={"Foo": "Bar"})
- run("", facet=facet, inst=element, expected=True)
- pset = ifcopenshell.api.run("pset.add_pset", ifc, product=element, name="Foo_Baz")
- run("", facet=facet, inst=element, expected=False)
- ifcopenshell.api.run("pset.edit_pset", ifc, pset=pset, properties={"Foo": "Bar"})
- run("", facet=facet, inst=element, expected=True)
-
- # Restrictions are supported for names. If multiple are matched, all must satisfy requirements.
- restriction = ids.restriction.create(options="Foo.*", type="pattern")
- facet = ids.property.create(propertySet="Foo_Bar", name=restriction, value="x")
- element = ifcopenshell.api.run("root.create_entity", ifc, ifc_class="IfcWall")
- pset = ifcopenshell.api.run("pset.add_pset", ifc, product=element, name="Foo_Bar")
- ifcopenshell.api.run("pset.edit_pset", ifc, pset=pset, properties={"Foobar": "x"})
- run("", facet=facet, inst=element, expected=True)
- ifcopenshell.api.run("pset.edit_pset", ifc, pset=pset, properties={"Foobar": "x", "Foobaz": "x"})
- run("", facet=facet, inst=element, expected=True)
- ifcopenshell.api.run("pset.edit_pset", ifc, pset=pset, properties={"Foobar": "x", "Foobaz": "y"})
- run("", facet=facet, inst=element, expected=False)
-
- # Restrictions are supported for values. If multiple are matched, all must satisfy requirements.
- restriction1 = ids.restriction.create(options="Foo.*", type="pattern")
- restriction2 = ids.restriction.create(options=["x", "y"], type="enumeration")
- facet = ids.property.create(propertySet="Foo_Bar", name=restriction1, value=restriction2)
- element = ifcopenshell.api.run("root.create_entity", ifc, ifc_class="IfcWall")
- pset = ifcopenshell.api.run("pset.add_pset", ifc, product=element, name="Foo_Bar")
- ifcopenshell.api.run("pset.edit_pset", ifc, pset=pset, properties={"Foobar": "x", "Foobaz": "y"})
- run("", facet=facet, inst=element, expected=True)
- ifcopenshell.api.run("pset.edit_pset", ifc, pset=pset, properties={"Foobar": "x", "Foobaz": "z"})
- run("", facet=facet, inst=element, expected=False)
-
- # Restrictions may be used to check basic data primitives
- restriction = ids.restriction.create(options=[42.12], type="enumeration", base="decimal")
- facet = ids.property.create(propertySet="Foo_Bar", name="Foobar", value=restriction)
- element = ifcopenshell.api.run("root.create_entity", ifc, ifc_class="IfcWall")
- pset = ifcopenshell.api.run("pset.add_pset", ifc, product=element, name="Foo_Bar")
- ifcopenshell.api.run("pset.edit_pset", ifc, pset=pset, properties={"Foobar": 42.12})
- run("", facet=facet, inst=element, expected=True)
- restriction = ids.restriction.create(options=[42], type="enumeration", base="integer")
- facet = ids.property.create(propertySet="Foo_Bar", name="Foobar", value=restriction)
- run("", facet=facet, inst=element, expected=False)
- ifcopenshell.api.run("pset.edit_pset", ifc, pset=pset, properties={"Foobar": 42})
- run("", facet=facet, inst=element, expected=True)
- restriction = ids.restriction.create(options=[True], type="enumeration", base="boolean")
- facet = ids.property.create(propertySet="Foo_Bar", name="Foobar", value=restriction)
- run("", facet=facet, inst=element, expected=False)
- ifcopenshell.api.run("pset.edit_pset", ifc, pset=pset, properties={"Foobar": True})
- run("", facet=facet, inst=element, expected=True)
- ifcopenshell.api.run("pset.edit_pset", ifc, pset=pset, properties={"Foobar": False})
- run("", facet=facet, inst=element, expected=False)
-
- # When measure is not specified, no unit conversion is done and only primitives are checked
- restriction = ids.restriction.create(options=[42.12], type="enumeration", base="decimal")
- facet = ids.property.create(propertySet="Foo_Bar", name="Foobar", value=restriction)
- element = ifcopenshell.api.run("root.create_entity", ifc, ifc_class="IfcWall")
- pset = ifcopenshell.api.run("pset.add_pset", ifc, product=element, name="Foo_Bar")
- ifcopenshell.api.run("pset.edit_pset", ifc, pset=pset, properties={"Foobar": 42.12})
- run("", facet=facet, inst=element, expected=True)
-
- # Measure may be used to specify an IFC data type
- restriction = ids.restriction.create(options=[2], type="enumeration", base="decimal")
- facet = ids.property.create(propertySet="Foo_Bar", name="Foo", value=restriction, measure="Time")
- element = ifcopenshell.api.run("root.create_entity", ifc, ifc_class="IfcWall")
- pset = ifcopenshell.api.run("pset.add_pset", ifc, product=element, name="Foo_Bar")
- ifcopenshell.api.run("pset.edit_pset", ifc, pset=pset, properties={"Foo": ifc.createIfcMassMeasure(2)})
- run("", facet=facet, inst=element, expected=False)
- ifcopenshell.api.run("pset.edit_pset", ifc, pset=pset, properties={"Foo": ifc.createIfcTimeMeasure(2)})
- run("", facet=facet, inst=element, expected=True)
-
- # Measure also implies that a unit matters, and so a conversion shall take place to SI units
- restriction = ids.restriction.create(options=[2], type="enumeration", base="decimal")
- facet = ids.property.create(propertySet="Foo_Bar", name="Foo", value=restriction, measure="Length")
- element = ifcopenshell.api.run("root.create_entity", ifc, ifc_class="IfcWall")
- pset = ifcopenshell.api.run("pset.add_pset", ifc, product=element, name="Foo_Bar")
- ifcopenshell.api.run("pset.edit_pset", ifc, pset=pset, properties={"Foo": ifc.createIfcLengthMeasure(2)})
- run("", facet=facet, inst=element, expected=False)
- ifcopenshell.api.run("pset.edit_pset", ifc, pset=pset, properties={"Foo": ifc.createIfcLengthMeasure(2000)})
- run("", facet=facet, inst=element, expected=True)
-
- # The facet checks inherited properties from the type
- wall = ifcopenshell.api.run("root.create_entity", ifc, ifc_class="IfcWall")
- wall_type = ifcopenshell.api.run("root.create_entity", ifc, ifc_class="IfcWallType")
- ifcopenshell.api.run("type.assign_type", ifc, related_object=wall, relating_type=wall_type)
- pset = ifcopenshell.api.run("pset.add_pset", ifc, product=wall_type, name="Foo_Bar")
- ifcopenshell.api.run("pset.edit_pset", ifc, pset=pset, properties={"Foo": "Bar"})
- facet = ids.property.create(propertySet="Foo_Bar", name="Foo")
- run("", facet=facet, inst=wall, expected=True)
- run("", facet=facet, inst=wall_type, expected=True)
-
- # The facet checks overriden properties from the occurrence
- wall = ifcopenshell.api.run("root.create_entity", ifc, ifc_class="IfcWall")
- wall_type = ifcopenshell.api.run("root.create_entity", ifc, ifc_class="IfcWallType")
- ifcopenshell.api.run("type.assign_type", ifc, related_object=wall, relating_type=wall_type)
- pset = ifcopenshell.api.run("pset.add_pset", ifc, product=wall_type, name="Foo_Bar")
- ifcopenshell.api.run("pset.edit_pset", ifc, pset=pset, properties={"Foo": "Baz"})
- pset = ifcopenshell.api.run("pset.add_pset", ifc, product=wall, name="Foo_Bar")
- ifcopenshell.api.run("pset.edit_pset", ifc, pset=pset, properties={"Foo": "Bar"})
- facet = ids.property.create(propertySet="Foo_Bar", name="Foo", value="Bar")
- run("", facet=facet, inst=wall, expected=True)
- run("", facet=facet, inst=wall_type, expected=False)
-
- def test_creating_a_material_facet(self):
- facet = ids.material.create()
- assert facet.asdict() == {}
- facet = ids.material.create(
- value="value", uri="https://test.com", minOccurs="0", maxOccurs="unbounded", instructions="instructions"
- )
- assert facet.asdict() == {
- "value": {"simpleValue": "value"},
- "@uri": "https://test.com",
- "@minOccurs": "0",
- "@maxOccurs": "unbounded",
- "@instructions": "instructions",
- }
-
- def test_filtering_using_a_material_facet(self):
- ifc = ifcopenshell.file()
-
- # A material facet with no data matches any present material
- facet = ids.material.create()
- element = ifcopenshell.api.run("root.create_entity", ifc, ifc_class="IfcWall")
- run("", facet=facet, inst=element, expected=False)
- material = ifcopenshell.api.run("material.add_material", ifc)
- ifcopenshell.api.run("material.assign_material", ifc, product=element, material=material)
- run("", facet=facet, inst=element, expected=True)
-
- # A value will match a material name or category
- facet = ids.material.create(value="Foo")
- element = ifcopenshell.api.run("root.create_entity", ifc, ifc_class="IfcWall")
- material = ifcopenshell.api.run("material.add_material", ifc)
- ifcopenshell.api.run("material.assign_material", ifc, product=element, material=material)
- run("", facet=facet, inst=element, expected=False)
- material.Name = "Foo"
- run("", facet=facet, inst=element, expected=True)
- material.Name = "Bar"
- material.Category = "Foo"
- run("", facet=facet, inst=element, expected=True)
-
- # A value will match any material name or category in a material list
- facet = ids.material.create(value="Foo")
- element = ifcopenshell.api.run("root.create_entity", ifc, ifc_class="IfcWall")
- material_set = ifcopenshell.api.run("material.add_material_set", ifc, set_type="IfcMaterialList")
- ifcopenshell.api.run("material.assign_material", ifc, product=element, material=material_set)
- run("", facet=facet, inst=element, expected=False)
- material = ifcopenshell.api.run("material.add_material", ifc)
- ifcopenshell.api.run("material.add_list_item", ifc, material_list=material_set, material=material)
- material.Name = "Foo"
- run("", facet=facet, inst=element, expected=True)
- material.Name = "Bar"
- material.Category = "Foo"
- run("", facet=facet, inst=element, expected=True)
-
- # A value will match any material name or category, or layer name or category in a layer set
- facet = ids.material.create(value="Foo")
- element = ifcopenshell.api.run("root.create_entity", ifc, ifc_class="IfcWall")
- material_set = ifcopenshell.api.run("material.add_material_set", ifc, set_type="IfcMaterialLayerSet")
- ifcopenshell.api.run("material.assign_material", ifc, product=element, material=material_set)
- run("", facet=facet, inst=element, expected=False)
- material = ifcopenshell.api.run("material.add_material", ifc)
- layer = ifcopenshell.api.run("material.add_layer", ifc, layer_set=material_set, material=material)
- layer.Name = "Foo"
- run("", facet=facet, inst=element, expected=True)
- layer.Name = "Bar"
- layer.Category = "Foo"
- run("", facet=facet, inst=element, expected=True)
- layer.Category = "Bar"
- material.Name = "Foo"
- run("", facet=facet, inst=element, expected=True)
- material.Name = "Bar"
- material.Category = "Foo"
- run("", facet=facet, inst=element, expected=True)
-
- # A value will match any material name or category, or profile name or category in a profile set
- facet = ids.material.create(value="Foo")
- element = ifcopenshell.api.run("root.create_entity", ifc, ifc_class="IfcWall")
- material_set = ifcopenshell.api.run("material.add_material_set", ifc, set_type="IfcMaterialProfileSet")
- ifcopenshell.api.run("material.assign_material", ifc, product=element, material=material_set)
- run("", facet=facet, inst=element, expected=False)
- material = ifcopenshell.api.run("material.add_material", ifc)
- profile = ifcopenshell.api.run("material.add_profile", ifc, profile_set=material_set, material=material)
- profile.Name = "Foo"
- run("", facet=facet, inst=element, expected=True)
- profile.Name = "Bar"
- profile.Category = "Foo"
- run("", facet=facet, inst=element, expected=True)
- profile.Category = "Bar"
- material.Name = "Foo"
- run("", facet=facet, inst=element, expected=True)
- material.Name = "Bar"
- material.Category = "Foo"
- run("", facet=facet, inst=element, expected=True)
-
- # A value will match any material name or category, or constituent name or category in a constituent set
- facet = ids.material.create(value="Foo")
- element = ifcopenshell.api.run("root.create_entity", ifc, ifc_class="IfcWall")
- material_set = ifcopenshell.api.run("material.add_material_set", ifc, set_type="IfcMaterialConstituentSet")
- ifcopenshell.api.run("material.assign_material", ifc, product=element, material=material_set)
- run("", facet=facet, inst=element, expected=False)
- material = ifcopenshell.api.run("material.add_material", ifc)
- constituent = ifcopenshell.api.run(
- "material.add_constituent", ifc, constituent_set=material_set, material=material
- )
- constituent.Name = "Foo"
- run("", facet=facet, inst=element, expected=True)
- constituent.Name = "Bar"
- constituent.Category = "Foo"
- run("", facet=facet, inst=element, expected=True)
- constituent.Category = "Bar"
- material.Name = "Foo"
- run("", facet=facet, inst=element, expected=True)
- material.Name = "Bar"
- material.Category = "Foo"
- run("", facet=facet, inst=element, expected=True)
-
- # The facet will check for inherited materials
- element = ifcopenshell.api.run("root.create_entity", ifc, ifc_class="IfcWall")
- element_type = ifcopenshell.api.run("root.create_entity", ifc, ifc_class="IfcWallType")
- ifcopenshell.api.run("type.assign_type", ifc, related_object=element, relating_type=element_type)
- material = ifcopenshell.api.run("material.add_material", ifc)
- ifcopenshell.api.run("material.assign_material", ifc, product=element_type, material=material)
- material.Name = "Foo"
- facet = ids.material.create(value="Foo")
- run("", facet=facet, inst=element, expected=True)
- run("", facet=facet, inst=element_type, expected=True)
-
- # The facet will check for overriden materials
- element = ifcopenshell.api.run("root.create_entity", ifc, ifc_class="IfcWall")
- element_type = ifcopenshell.api.run("root.create_entity", ifc, ifc_class="IfcWallType")
- ifcopenshell.api.run("type.assign_type", ifc, related_object=element, relating_type=element_type)
- material = ifcopenshell.api.run("material.add_material", ifc)
- ifcopenshell.api.run("material.assign_material", ifc, product=element_type, material=material)
- material.Name = "Bar"
- material = ifcopenshell.api.run("material.add_material", ifc)
- ifcopenshell.api.run("material.assign_material", ifc, product=element, material=material)
- material.Name = "Foo"
- facet = ids.material.create(value="Foo")
- run("", facet=facet, inst=element, expected=True)
- run("", facet=facet, inst=element_type, expected=False)
-
- def test_creating_a_partof_facet(self):
- facet = ids.partOf.create()
- assert facet.asdict() == {"@entity": "IfcSystem"}
- facet = ids.partOf.create(entity="IfcGroup")
- assert facet.asdict() == {"@entity": "IfcGroup"}
-
- def test_filtering_using_a_partof_facet(self):
- ifc = ifcopenshell.file()
-
- # An IfcElementAssembly entity only passes those who are part of an assembly
- element = ifcopenshell.api.run("root.create_entity", ifc, ifc_class="IfcElementAssembly")
- subelement = ifcopenshell.api.run("root.create_entity", ifc, ifc_class="IfcWall")
- ifcopenshell.api.run("aggregate.assign_object", ifc, product=subelement, relating_object=element)
- facet = ids.partOf.create(entity="IfcElementAssembly")
- run("", facet=facet, inst=element, expected=False)
- run("", facet=facet, inst=subelement, expected=True)
-
- # An IfcElementAssembly strictly checks that the whole is an IfcElementAssembly class
- element = ifcopenshell.api.run("root.create_entity", ifc, ifc_class="IfcSlab")
- subelement = ifcopenshell.api.run("root.create_entity", ifc, ifc_class="IfcBeam")
- ifcopenshell.api.run("aggregate.assign_object", ifc, product=subelement, relating_object=element)
- facet = ids.partOf.create(entity="IfcElementAssembly")
- run("", facet=facet, inst=subelement, expected=False)
-
- # A nested subelement still passes so long as one of its parents is an IfcElementAssembly
- # TODO nononono
- element = ifcopenshell.api.run("root.create_entity", ifc, ifc_class="IfcElementAssembly")
- subelement = ifcopenshell.api.run("root.create_entity", ifc, ifc_class="IfcSlab")
- subsubelement = ifcopenshell.api.run("root.create_entity", ifc, ifc_class="IfcBeam")
- ifcopenshell.api.run("aggregate.assign_object", ifc, product=subelement, relating_object=element)
- ifcopenshell.api.run("aggregate.assign_object", ifc, product=subsubelement, relating_object=subelement)
- facet = ids.partOf.create(entity="IfcElementAssembly")
- run("", facet=facet, inst=subsubelement, expected=True)
-
- # An IfcGroup only checks that a group is assigned without any other logic
- element = ifcopenshell.api.run("root.create_entity", ifc, ifc_class="IfcElementAssembly")
- group = ifcopenshell.api.run("group.add_group", ifc)
- facet = ids.partOf.create(entity="IfcGroup")
- run("", facet=facet, inst=element, expected=False)
- ifcopenshell.api.run("group.assign_group", ifc, product=element, group=group)
- run("", facet=facet, inst=element, expected=True)
-
- # An IfcGroup can be passed by subtypes
- # TODO: wrong, subtypes should not be matched
- element = ifcopenshell.api.run("root.create_entity", ifc, ifc_class="IfcElementAssembly")
- group = ifc.createIfcInventory()
- facet = ids.partOf.create(entity="IfcGroup")
- ifcopenshell.api.run("group.assign_group", ifc, product=element, group=group)
- run("", facet=facet, inst=element, expected=True)
-
- # An IfcSystem only checks that a system is assigned without any other logic
- element = ifcopenshell.api.run("root.create_entity", ifc, ifc_class="IfcElementAssembly")
- system = ifcopenshell.api.run("system.add_system", ifc)
- facet = ids.partOf.create(entity="IfcSystem")
- run("", facet=facet, inst=element, expected=False)
- ifcopenshell.api.run("system.assign_system", ifc, product=element, system=system)
- run("", facet=facet, inst=element, expected=True)
-
- # An IfcSystem allows subtypes
- # TODO: wrong, subtypes should not be matched
- element = ifcopenshell.api.run("root.create_entity", ifc, ifc_class="IfcElementAssembly")
- system = ifcopenshell.api.run("system.add_system", ifc, ifc_class="IfcDistributionSystem")
- ifcopenshell.api.run("system.assign_system", ifc, product=element, system=system)
- facet = ids.partOf.create(entity="IfcSystem")
- run("", facet=facet, inst=element, expected=True)
-
- """ Creating IDS with restrictions """
-
- def test_create_restrictions_enumeration(self):
- i = ids.ids(title="My IDS")
- i.specifications.append(ids.specification(name="Test_Specification"))
- i.specifications[0].add_applicability(ids.entity.create(name="Test_Name"))
- r = ids.restriction.create(options=["testA", "testB"], type="enumeration")
- m = ids.material.create(value=r)
- i.specifications[0].add_requirement(m)
- self.assertEqual(i.specifications[0].requirements.terms[0].value, "testA")
- self.assertEqual(i.specifications[0].requirements.terms[0].value, "testB")
- self.assertNotEqual(i.specifications[0].requirements.terms[0].value, "testC")
-
- def test_create_restrictions_bounds(self):
- i = ids.ids(title="My IDS")
- i.specifications.append(ids.specification(name="Test_Specification"))
- i.specifications[0].add_applicability(ids.entity.create(name="Test_Name"))
- r = ids.restriction.create(options={"minInclusive": 0, "maxExclusive": 10}, type="bounds", base="integer")
- p = ids.property.create(propertySet="Test", name="Test", value=r)
- i.specifications[0].add_requirement(p)
- self.assertEqual(i.specifications[0].requirements.terms[0].value, 0)
- self.assertEqual(i.specifications[0].requirements.terms[0].value, 5)
- self.assertNotEqual(i.specifications[0].requirements.terms[0].value, -1)
- self.assertNotEqual(i.specifications[0].requirements.terms[0].value, 10)
-
- def test_create_restrictions_pattern_simple(self):
- i = ids.ids(title="My IDS")
- i.specifications.append(ids.specification(name="Test_Specification"))
- i.specifications[0].add_applicability(ids.entity.create(name="Test_Name"))
- r = ids.restriction.create(options="[A-Z]{2,4}", type="pattern")
- p = ids.property.create(propertySet="Test", name="Test", value=r)
- i.specifications[0].add_requirement(p)
- self.assertEqual(i.specifications[0].requirements.terms[0].value, "XYZ")
- self.assertNotEqual(i.specifications[0].requirements.terms[0].value, "abc")
- self.assertNotEqual(i.specifications[0].requirements.terms[0].value, "ABCDE")
- self.assertNotEqual(i.specifications[0].requirements.terms[0].value, "A")
-
- def test_create_restrictions_pattern_advanced(self):
- i = ids.ids(title="My IDS")
- i.specifications.append(ids.specification(name="Test_Specification"))
- i.specifications[0].add_applicability(ids.entity.create(name="Test_Name"))
- r = ids.restriction.create(options="(Wanddurchbruch|Deckendurchbruch).*", type="pattern")
- p = ids.property.create(propertySet="Test", name="Test", value=r)
- i.specifications[0].add_requirement(p)
- self.assertEqual(i.specifications[0].requirements.terms[0].value, "Wanddurchbruch")
- self.assertEqual(i.specifications[0].requirements.terms[0].value, "Deckendurchbruch")
- self.assertNotEqual(i.specifications[0].requirements.terms[0].value, "Deeckendurchbruch")
-
- def test_create_restrictions_pattern_utf(self):
- i = ids.ids(title="My IDS")
- i.specifications.append(ids.specification(name="Test_Specification"))
- i.specifications[0].add_applicability(ids.entity.create(name="Test_Name"))
- r = ids.restriction.create(options="èêóòâôæøåążźćęóʑʒʓʔʕʗʘʙʚʛʜʝʞ", type="pattern")
- p = ids.property.create(propertySet="Test", name="Test", value=r)
- i.specifications[0].add_requirement(p)
- self.assertEqual(i.specifications[0].requirements.terms[0].value, "èêóòâôæøåążźćęóʑʒʓʔʕʗʘʙʚʛʜʝʞ")
-
- def test_created_ids_to_xml(self):
- i = ids.ids(title="My IDS")
- i.specifications.append(ids.specification(name="Test_Specification"))
- e = ids.entity.create(name="Test_Name", predefinedType="Test_PredefinedType")
- c = ids.classification.create(value="Test_Value", system="Test_System")
- m = ids.material.create(value="Test_Value")
- re = ids.restriction.create(options=["testA", "testB"], type="enumeration")
- rb = ids.restriction.create(options={"minInclusive": 0, "maxExclusive": 10}, type="bounds", base="integer")
- rp1 = ids.restriction.create(options="[A-Z]{2,4}", type="pattern")
- rp2 = ids.restriction.create(options="èêóòâôæøåążźćęóʑʒʓʔʕʗʘʙʚʛʜʝʞ", type="pattern")
- p1 = ids.property.create(propertySet="Test_PropertySet", name="Test_Parameter", value=re)
- p2 = ids.property.create(propertySet="Test_PropertySet", name="Test_Parameter", value=rb)
- p3 = ids.property.create(propertySet="Test_PropertySet", name="Test_Parameter", value=rp1)
- p4 = ids.property.create(propertySet="Test_PropertySet", name="Test_Parameter", value=rp2)
- p5 = ids.property.create(propertySet="Test_PropertySet", name="Test_Parameter", value=[re, rb, rp1])
- i.specifications[0].add_applicability(e)
- i.specifications[0].add_applicability(m)
- i.specifications[0].add_requirement(c)
- i.specifications[0].add_requirement(p1)
- i.specifications[0].add_requirement(p2)
- i.specifications[0].add_requirement(p3)
- i.specifications[0].add_requirement(p4)
- i.specifications[0].add_requirement(p5)
- fn = "TEST_FILE.xml"
- result = i.to_xml(fn)
- os.remove(fn)
- self.assertTrue(result)
-
-
-class TestIfcValidation(unittest.TestCase):
- def test_creating_a_minimal_ids_and_validating(self):
- specs = ids.ids(title="Title")
- spec = ids.specification(name="Name")
- spec.add_applicability(ids.entity.create(name="IFCWALL"))
- spec.add_requirement(ids.attribute.create(name="Name", value="Waldo"))
- specs.specifications.append(spec)
- assert "http://standards.buildingsmart.org/IDS" in specs.to_string()
- assert spec.status == None
-
- model = ifcopenshell.file()
- wall = model.createIfcWall()
- waldo = model.createIfcWall(Name="Waldo")
- specs.validate2(model)
-
- assert spec.status == False
- assert set(spec.applicable_entities) == {wall, waldo}
- assert spec.failed_entities == [wall]
-
- def test_creating_multiple_specifications(self):
- specs = ids.ids(title="Title")
- spec = ids.specification(name="Name")
- spec.add_applicability(ids.entity.create(name="IFCWALL"))
- spec.add_requirement(ids.attribute.create(name="Name", value="Waldo"))
- specs.specifications.append(spec)
-
- spec2 = ids.specification(name="Name")
- spec2.add_applicability(ids.entity.create(name="IFCWALL"))
- spec2.add_requirement(ids.attribute.create(name="Name", value="Waldo"))
- specs.specifications.append(spec2)
-
- model = ifcopenshell.file()
- wall = model.createIfcWall()
- waldo = model.createIfcWall(Name="Waldo")
- specs.validate2(model)
-
- assert spec.status == False
- assert set(spec.applicable_entities) == {wall, waldo}
- assert spec.failed_entities == [wall]
- assert spec2.failed_entities == [wall]
-
- def test_validate_simple(self):
- return # TODO
- # Same test as in reporting...
- ids_file = ids.ids.open(IDS_URL)
- report = ids.SimpleHandler()
- logger.addHandler(report)
- ids_file.validate(ifc_file, logger)
- self.assertEqual(len(report.statements), 5)
- logger.handlers.pop()
-
- def test_validate_all_facets(self):
- # Those are true:
- e = ids.entity.create(name="IfcWall")
- p1 = ids.property.create(propertySet="MySet", name="Param1", value="banan")
- p2 = ids.property.create(propertySet="MySet", name="Param2", value=120.0)
- p3 = ids.property.create(propertySet="Pset_WallCommon", name="LoadBearing", value=False)
- # Those are false:
- p4 = ids.property.create(propertySet="MySet", name="Param1", value="orange")
- p5 = ids.property.create(propertySet="MySet", name="Param2", value=123.4)
- p6 = ids.property.create(propertySet="Pset_WallCommon", name="LoadBearing", value=True)
-
- i = ids.ids(title="My IDS")
- i.specifications.append(ids.specification(name="Test_Specification"))
- i.specifications[0].add_applicability(e)
- i.specifications[0].add_requirement(p1)
- i.specifications[0].add_requirement(p2)
- i.specifications[0].add_requirement(p3)
- i.specifications[0].add_requirement(p4)
- i.specifications[0].add_requirement(p5)
- i.specifications[0].add_requirement(p6)
-
- report = ids.SimpleHandler(report_valid=True)
- logger.addHandler(report)
-
- i.validate(ifc_file, logger)
- # TODO self.assertEqual(len(report.statements), 27) #there are 5 walls in the IFC, one passed 3 criteria, est should fail (27 failures)
- logger.handlers.pop()
-
- """ Validating IDS files with restrictions """
-
- def test_validate_restrictions_enumeration(self):
- return # TODO
- IDS_URL = os.path.join(
- os.path.dirname(__file__),
- "Sample-BIM-Files/IDS/",
- "IDS_Wall_needs_property_with_restriction_enumeration.xml",
- )
- ids_file = ids.ids.open(IDS_URL)
- self.assertEqual(ids_file.specifications[0].requirements.terms[0].node["name"]["simpleValue"], "Test_Parameter")
- self.assertEqual(
- [
- x["@value"]
- for x in ids_file.specifications[0].requirements.terms[0].node["value"]["restriction"][0]["enumeration"]
- ],
- ["testA", "testB"],
- )
- # TODO actual test of validation result
- # self.assertTrue( )
-
- def test_validate_restrictions_boundsInclusive(self):
- return # TODO
- IDS_URL = os.path.join(
- os.path.dirname(__file__), "Sample-BIM-Files/IDS/", "IDS_Wall_needs_property_with_restriction_bounds.xml"
- )
- ids_file = ids.ids.open(IDS_URL)
- self.assertEqual(ids_file.specifications[0].requirements.terms[0].node["name"]["simpleValue"], "Test_Parameter")
- self.assertEqual(
- ids_file.specifications[0].requirements.terms[0].node["value"]["restriction"][0]["minInclusive"]["@value"],
- "0",
- )
- # TODO actual test of validation result
- # self.assertTrue( )
-
- def test_validate_restrictions_boundsExclusive(self):
- # TODO
- pass
-
- def test_validate_restrictions_pattern_simple(self):
- return # TODO
- IDS_URL = os.path.join(
- os.path.dirname(__file__), "Sample-BIM-Files/IDS/", "IDS_Wall_needs_property_with_restriction_pattern.xml"
- )
- ids_file = ids.ids.open(IDS_URL)
- self.assertEqual(ids_file.specifications[0].requirements.terms[0].node["name"]["simpleValue"], "Test_Parameter")
- self.assertEqual(
- ids_file.specifications[0].requirements.terms[0].node["value"]["restriction"][0]["pattern"]["@value"],
- "[A-Z]{2,4}",
- )
- # TODO actual test of validation result
- # self.assertTrue( )
-
-
-class TestIdsReporting(unittest.TestCase):
- def test_simple_report(self):
- return # TODO
- # Same test as in validation...
- ids_file = ids.ids.open(IDS_URL)
- report = ids.SimpleHandler()
- logger.addHandler(report)
- ids_file.validate(ifc_file, logger)
- self.assertEqual(len(report.statements), 5)
- logger.handlers.pop()
-
- def test_bcf_report(self):
- return # TODO
- ids_file = ids.ids.open(IDS_URL)
- fn = os.path.join(tempfile.gettempdir(), "test.bcf")
- bcf_handler = ids.BcfHandler(project_name="Default IDS Project", author="your@email.com", filepath=fn)
- logger.addHandler(bcf_handler)
- ids_file.validate(ifc_file, logger)
- my_bcfxml = bcfxml.load(fn)
- topics = my_bcfxml.get_topics()
- self.assertEqual(len(topics), 5)
- logger.handlers.pop()
diff --git a/src/ifcopenshell-python/test/test_wall_opening.py b/src/ifcopenshell-python/test/test_wall_opening.py
index 71e6c945ea..f331297e73 100644
--- a/src/ifcopenshell-python/test/test_wall_opening.py
+++ b/src/ifcopenshell-python/test/test_wall_opening.py
@@ -145,6 +145,7 @@ def create_case(fn, openings):
class TestWallOpenings:
+ @pytest.mark.skipif(shutil.which("IfcConvert") is None, reason="Requires IfcConvert in path")
def test_all(self):
cases = [
@@ -244,4 +245,4 @@ class TestWallOpenings:
if __name__ == "__main__":
- TestWallOpenings().test_all()
+ pytest.main(["-x", __file__])
diff --git a/src/ifcopenshell-python/test/util/test_pset.py b/src/ifcopenshell-python/test/util/test_pset.py
index 61331d2724..9fefd61396 100644
--- a/src/ifcopenshell-python/test/util/test_pset.py
+++ b/src/ifcopenshell-python/test/util/test_pset.py
@@ -36,15 +36,15 @@ class TestPsetQto:
def test_getting_applicables_for_a_specific_predefined_type(self):
names = self.pset_qto.get_applicable_names("IfcAudioVisualAppliance")
- assert len(names) == 17
+ assert len(names) == 12
assert "Pset_AudioVisualApplianceTypeAmplifier" not in names
names = self.pset_qto.get_applicable_names("IfcAudioVisualAppliance", predefined_type="AMPLIFIER")
assert "Pset_AudioVisualApplianceTypeAmplifier" in names
- assert len(names) == 18
+ assert len(names) == 13
def test_getting_a_pset_of_a_type_where_the_type_class_is_not_explicitly_applicable(self):
names = self.pset_qto.get_applicable_names("IfcWall")
assert "Pset_WallCommon" in names
names = self.pset_qto.get_applicable_names("IfcWallType")
- assert len(names) == 9
+ assert len(names) == 5
assert "Pset_WallCommon" in names
diff --git a/src/ifcopenshell-python/test/util/test_selector.py b/src/ifcopenshell-python/test/util/test_selector.py
index 37a744e6e4..787b4b2b60 100644
--- a/src/ifcopenshell-python/test/util/test_selector.py
+++ b/src/ifcopenshell-python/test/util/test_selector.py
@@ -112,6 +112,27 @@ class TestSelector(test.bootstrap.IFC4):
assert subject.Selector.parse(self.file, '.IfcElement[Name*="oba"]') == [element]
assert subject.Selector.parse(self.file, '.IfcElement[Name*="abc"]') == []
+ def test_selecting_if_value_not_matching(self):
+ element_1 = ifcopenshell.api.run("root.create_entity", self.file, ifc_class="IfcWall")
+ element_2 = ifcopenshell.api.run("root.create_entity", self.file, ifc_class="IfcWall")
+ pset_1 = ifcopenshell.api.run("pset.add_pset", self.file, product=element_1, name="Foo_Bar")
+ pset_2 = ifcopenshell.api.run("pset.add_pset", self.file, product=element_2, name="Foo_Bar")
+ ifcopenshell.api.run("pset.edit_pset", self.file, pset=pset_1, properties={"Foo": "Bar"})
+ ifcopenshell.api.run("pset.edit_pset", self.file, pset=pset_2, properties={"Foo": "BOO"})
+ assert subject.Selector.parse(self.file, '.IfcElement[Foo_Bar.Foo != "Bar"]') == [element_2]
+ assert subject.Selector.parse(self.file, '.IfcElement[Foo_Bar.Foo != "BOO"]') == [element_1]
+
+
+ def test_selecting_when_attribute_is_none(self):
+ element = ifcopenshell.api.run("root.create_entity", self.file, ifc_class="IfcWall")
+ assert subject.Selector.parse(self.file, '.IfcElement[PredefinedType !="non-existent predefined type"]') == [element]
+
+ def test_selecting_a_property_which_includes_non_standard_characters(self):
+ element = ifcopenshell.api.run("root.create_entity", self.file, ifc_class="IfcWall")
+ pset = ifcopenshell.api.run("pset.add_pset", self.file, product=element, name="a !%$§&/()?|*-+,€~#@µ^°a")
+ ifcopenshell.api.run("pset.edit_pset", self.file, pset=pset, properties={"a !%$§&/()?|*-+,€~#@µ^°a": "Bar"})
+ assert subject.Selector.parse(self.file, '.IfcElement[a !%$§&/()?|*-+,€~#@µ^°a.a !%$§&/()?|*-+,€~#@µ^°a="Bar"]') == [element]
+
def test_comparing_if_value_is_in_a_list(self):
element = ifcopenshell.api.run("root.create_entity", self.file, ifc_class="IfcWall")
element.Name = "Foobar"
diff --git a/src/ifcparse/Ifc4x3-definitions.h b/src/ifcparse/Ifc4x3-definitions.h
new file mode 100644
index 0000000000..cfab4fc05e
--- /dev/null
+++ b/src/ifcparse/Ifc4x3-definitions.h
@@ -0,0 +1,4028 @@
+/********************************************************************************
+ * *
+ * This file is part of IfcOpenShell. *
+ * *
+ * IfcOpenShell is free software: you can redistribute it and/or modify *
+ * it under the terms of the Lesser GNU General Public License as published by *
+ * the Free Software Foundation, either version 3.0 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * IfcOpenShell is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * Lesser GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the Lesser GNU General Public License *
+ * along with this program. If not, see . *
+ * *
+ ********************************************************************************/
+
+/********************************************************************************
+ * *
+ * This file has been generated from IFC4x3_RC2.exp. Do not make modifications *
+ * but instead modify the python script that has been used to generate this. *
+ * *
+ ********************************************************************************/
+
+#define SCHEMA_HAS_IfcAbsorbedDoseMeasure
+#define SCHEMA_HAS_IfcAccelerationMeasure
+#define SCHEMA_HAS_IfcActionRequestTypeEnum
+#define SCHEMA_HAS_IfcActionSourceTypeEnum
+#define SCHEMA_HAS_IfcActionTypeEnum
+#define SCHEMA_HAS_IfcActorSelect
+#define SCHEMA_HAS_IfcActuatorTypeEnum
+#define SCHEMA_HAS_IfcAddressTypeEnum
+#define SCHEMA_HAS_IfcAirTerminalBoxTypeEnum
+#define SCHEMA_HAS_IfcAirTerminalTypeEnum
+#define SCHEMA_HAS_IfcAirToAirHeatRecoveryTypeEnum
+#define SCHEMA_HAS_IfcAlarmTypeEnum
+#define SCHEMA_HAS_IfcAlignmentCantSegmentTypeEnum
+#define SCHEMA_HAS_IfcAlignmentHorizontalSegmentTypeEnum
+#define SCHEMA_HAS_IfcAlignmentTypeEnum
+#define SCHEMA_HAS_IfcAlignmentVerticalSegmentTypeEnum
+#define SCHEMA_HAS_IfcAmountOfSubstanceMeasure
+#define SCHEMA_HAS_IfcAnalysisModelTypeEnum
+#define SCHEMA_HAS_IfcAnalysisTheoryTypeEnum
+#define SCHEMA_HAS_IfcAngularVelocityMeasure
+#define SCHEMA_HAS_IfcAnnotationTypeEnum
+#define SCHEMA_HAS_IfcAppliedValueSelect
+#define SCHEMA_HAS_IfcArcIndex
+#define SCHEMA_HAS_IfcAreaDensityMeasure
+#define SCHEMA_HAS_IfcAreaMeasure
+#define SCHEMA_HAS_IfcArithmeticOperatorEnum
+#define SCHEMA_HAS_IfcAssemblyPlaceEnum
+#define SCHEMA_HAS_IfcAudioVisualApplianceTypeEnum
+#define SCHEMA_HAS_IfcAxis2Placement
+#define SCHEMA_HAS_IfcBSplineCurveForm
+#define SCHEMA_HAS_IfcBSplineSurfaceForm
+#define SCHEMA_HAS_IfcBeamTypeEnum
+#define SCHEMA_HAS_IfcBearingTypeDisplacementEnum
+#define SCHEMA_HAS_IfcBearingTypeEnum
+#define SCHEMA_HAS_IfcBenchmarkEnum
+#define SCHEMA_HAS_IfcBendingParameterSelect
+#define SCHEMA_HAS_IfcBinary
+#define SCHEMA_HAS_IfcBoilerTypeEnum
+#define SCHEMA_HAS_IfcBoolean
+#define SCHEMA_HAS_IfcBooleanOperand
+#define SCHEMA_HAS_IfcBooleanOperator
+#define SCHEMA_HAS_IfcBoxAlignment
+#define SCHEMA_HAS_IfcBridgePartTypeEnum
+#define SCHEMA_HAS_IfcBridgeTypeEnum
+#define SCHEMA_HAS_IfcBuildingElementPartTypeEnum
+#define SCHEMA_HAS_IfcBuildingElementProxyTypeEnum
+#define SCHEMA_HAS_IfcBuildingSystemTypeEnum
+#define SCHEMA_HAS_IfcBuiltSystemTypeEnum
+#define SCHEMA_HAS_IfcBurnerTypeEnum
+#define SCHEMA_HAS_IfcCableCarrierFittingTypeEnum
+#define SCHEMA_HAS_IfcCableCarrierSegmentTypeEnum
+#define SCHEMA_HAS_IfcCableFittingTypeEnum
+#define SCHEMA_HAS_IfcCableSegmentTypeEnum
+#define SCHEMA_HAS_IfcCaissonFoundationTypeEnum
+#define SCHEMA_HAS_IfcCardinalPointReference
+#define SCHEMA_HAS_IfcChangeActionEnum
+#define SCHEMA_HAS_IfcChillerTypeEnum
+#define SCHEMA_HAS_IfcChimneyTypeEnum
+#define SCHEMA_HAS_IfcClassificationReferenceSelect
+#define SCHEMA_HAS_IfcClassificationSelect
+#define SCHEMA_HAS_IfcCoilTypeEnum
+#define SCHEMA_HAS_IfcColour
+#define SCHEMA_HAS_IfcColourOrFactor
+#define SCHEMA_HAS_IfcColumnTypeEnum
+#define SCHEMA_HAS_IfcCommunicationsApplianceTypeEnum
+#define SCHEMA_HAS_IfcComplexNumber
+#define SCHEMA_HAS_IfcComplexPropertyTemplateTypeEnum
+#define SCHEMA_HAS_IfcCompoundPlaneAngleMeasure
+#define SCHEMA_HAS_IfcCompressorTypeEnum
+#define SCHEMA_HAS_IfcCondenserTypeEnum
+#define SCHEMA_HAS_IfcConnectionTypeEnum
+#define SCHEMA_HAS_IfcConstraintEnum
+#define SCHEMA_HAS_IfcConstructionEquipmentResourceTypeEnum
+#define SCHEMA_HAS_IfcConstructionMaterialResourceTypeEnum
+#define SCHEMA_HAS_IfcConstructionProductResourceTypeEnum
+#define SCHEMA_HAS_IfcContextDependentMeasure
+#define SCHEMA_HAS_IfcControllerTypeEnum
+#define SCHEMA_HAS_IfcConveyorSegmentTypeEnum
+#define SCHEMA_HAS_IfcCooledBeamTypeEnum
+#define SCHEMA_HAS_IfcCoolingTowerTypeEnum
+#define SCHEMA_HAS_IfcCoordinateReferenceSystemSelect
+#define SCHEMA_HAS_IfcCostItemTypeEnum
+#define SCHEMA_HAS_IfcCostScheduleTypeEnum
+#define SCHEMA_HAS_IfcCountMeasure
+#define SCHEMA_HAS_IfcCourseTypeEnum
+#define SCHEMA_HAS_IfcCoveringTypeEnum
+#define SCHEMA_HAS_IfcCrewResourceTypeEnum
+#define SCHEMA_HAS_IfcCsgSelect
+#define SCHEMA_HAS_IfcCurtainWallTypeEnum
+#define SCHEMA_HAS_IfcCurvatureMeasure
+#define SCHEMA_HAS_IfcCurveFontOrScaledCurveFontSelect
+#define SCHEMA_HAS_IfcCurveInterpolationEnum
+#define SCHEMA_HAS_IfcCurveMeasureSelect
+#define SCHEMA_HAS_IfcCurveOnSurface
+#define SCHEMA_HAS_IfcCurveOrEdgeCurve
+#define SCHEMA_HAS_IfcCurveStyleFontSelect
+#define SCHEMA_HAS_IfcDamperTypeEnum
+#define SCHEMA_HAS_IfcDataOriginEnum
+#define SCHEMA_HAS_IfcDate
+#define SCHEMA_HAS_IfcDateTime
+#define SCHEMA_HAS_IfcDayInMonthNumber
+#define SCHEMA_HAS_IfcDayInWeekNumber
+#define SCHEMA_HAS_IfcDefinitionSelect
+#define SCHEMA_HAS_IfcDerivedMeasureValue
+#define SCHEMA_HAS_IfcDerivedUnitEnum
+#define SCHEMA_HAS_IfcDescriptiveMeasure
+#define SCHEMA_HAS_IfcDimensionCount
+#define SCHEMA_HAS_IfcDirectionSenseEnum
+#define SCHEMA_HAS_IfcDiscreteAccessoryTypeEnum
+#define SCHEMA_HAS_IfcDistributionBoardTypeEnum
+#define SCHEMA_HAS_IfcDistributionChamberElementTypeEnum
+#define SCHEMA_HAS_IfcDistributionPortTypeEnum
+#define SCHEMA_HAS_IfcDistributionSystemEnum
+#define SCHEMA_HAS_IfcDocumentConfidentialityEnum
+#define SCHEMA_HAS_IfcDocumentSelect
+#define SCHEMA_HAS_IfcDocumentStatusEnum
+#define SCHEMA_HAS_IfcDoorPanelOperationEnum
+#define SCHEMA_HAS_IfcDoorPanelPositionEnum
+#define SCHEMA_HAS_IfcDoorStyleConstructionEnum
+#define SCHEMA_HAS_IfcDoorStyleOperationEnum
+#define SCHEMA_HAS_IfcDoorTypeEnum
+#define SCHEMA_HAS_IfcDoorTypeOperationEnum
+#define SCHEMA_HAS_IfcDoseEquivalentMeasure
+#define SCHEMA_HAS_IfcDuctFittingTypeEnum
+#define SCHEMA_HAS_IfcDuctSegmentTypeEnum
+#define SCHEMA_HAS_IfcDuctSilencerTypeEnum
+#define SCHEMA_HAS_IfcDuration
+#define SCHEMA_HAS_IfcDynamicViscosityMeasure
+#define SCHEMA_HAS_IfcEarthworksCutTypeEnum
+#define SCHEMA_HAS_IfcEarthworksFillTypeEnum
+#define SCHEMA_HAS_IfcElectricApplianceTypeEnum
+#define SCHEMA_HAS_IfcElectricCapacitanceMeasure
+#define SCHEMA_HAS_IfcElectricChargeMeasure
+#define SCHEMA_HAS_IfcElectricConductanceMeasure
+#define SCHEMA_HAS_IfcElectricCurrentMeasure
+#define SCHEMA_HAS_IfcElectricDistributionBoardTypeEnum
+#define SCHEMA_HAS_IfcElectricFlowStorageDeviceTypeEnum
+#define SCHEMA_HAS_IfcElectricFlowTreatmentDeviceTypeEnum
+#define SCHEMA_HAS_IfcElectricGeneratorTypeEnum
+#define SCHEMA_HAS_IfcElectricMotorTypeEnum
+#define SCHEMA_HAS_IfcElectricResistanceMeasure
+#define SCHEMA_HAS_IfcElectricTimeControlTypeEnum
+#define SCHEMA_HAS_IfcElectricVoltageMeasure
+#define SCHEMA_HAS_IfcElementAssemblyTypeEnum
+#define SCHEMA_HAS_IfcElementCompositionEnum
+#define SCHEMA_HAS_IfcEnergyMeasure
+#define SCHEMA_HAS_IfcEngineTypeEnum
+#define SCHEMA_HAS_IfcEvaporativeCoolerTypeEnum
+#define SCHEMA_HAS_IfcEvaporatorTypeEnum
+#define SCHEMA_HAS_IfcEventTriggerTypeEnum
+#define SCHEMA_HAS_IfcEventTypeEnum
+#define SCHEMA_HAS_IfcExternalSpatialElementTypeEnum
+#define SCHEMA_HAS_IfcFacilityPartCommonTypeEnum
+#define SCHEMA_HAS_IfcFacilityUsageEnum
+#define SCHEMA_HAS_IfcFanTypeEnum
+#define SCHEMA_HAS_IfcFastenerTypeEnum
+#define SCHEMA_HAS_IfcFillStyleSelect
+#define SCHEMA_HAS_IfcFilterTypeEnum
+#define SCHEMA_HAS_IfcFireSuppressionTerminalTypeEnum
+#define SCHEMA_HAS_IfcFlowDirectionEnum
+#define SCHEMA_HAS_IfcFlowInstrumentTypeEnum
+#define SCHEMA_HAS_IfcFlowMeterTypeEnum
+#define SCHEMA_HAS_IfcFontStyle
+#define SCHEMA_HAS_IfcFontVariant
+#define SCHEMA_HAS_IfcFontWeight
+#define SCHEMA_HAS_IfcFootingTypeEnum
+#define SCHEMA_HAS_IfcForceMeasure
+#define SCHEMA_HAS_IfcFrequencyMeasure
+#define SCHEMA_HAS_IfcFurnitureTypeEnum
+#define SCHEMA_HAS_IfcGeographicElementTypeEnum
+#define SCHEMA_HAS_IfcGeometricProjectionEnum
+#define SCHEMA_HAS_IfcGeometricSetSelect
+#define SCHEMA_HAS_IfcGeotechnicalStratumTypeEnum
+#define SCHEMA_HAS_IfcGlobalOrLocalEnum
+#define SCHEMA_HAS_IfcGloballyUniqueId
+#define SCHEMA_HAS_IfcGridPlacementDirectionSelect
+#define SCHEMA_HAS_IfcGridTypeEnum
+#define SCHEMA_HAS_IfcHatchLineDistanceSelect
+#define SCHEMA_HAS_IfcHeatExchangerTypeEnum
+#define SCHEMA_HAS_IfcHeatFluxDensityMeasure
+#define SCHEMA_HAS_IfcHeatingValueMeasure
+#define SCHEMA_HAS_IfcHumidifierTypeEnum
+#define SCHEMA_HAS_IfcIdentifier
+#define SCHEMA_HAS_IfcIlluminanceMeasure
+#define SCHEMA_HAS_IfcImpactProtectionDeviceTypeEnum
+#define SCHEMA_HAS_IfcInductanceMeasure
+#define SCHEMA_HAS_IfcInteger
+#define SCHEMA_HAS_IfcIntegerCountRateMeasure
+#define SCHEMA_HAS_IfcInterceptorTypeEnum
+#define SCHEMA_HAS_IfcInterferenceSelect
+#define SCHEMA_HAS_IfcInternalOrExternalEnum
+#define SCHEMA_HAS_IfcInventoryTypeEnum
+#define SCHEMA_HAS_IfcIonConcentrationMeasure
+#define SCHEMA_HAS_IfcIsothermalMoistureCapacityMeasure
+#define SCHEMA_HAS_IfcJunctionBoxTypeEnum
+#define SCHEMA_HAS_IfcKinematicViscosityMeasure
+#define SCHEMA_HAS_IfcKnotType
+#define SCHEMA_HAS_IfcLabel
+#define SCHEMA_HAS_IfcLaborResourceTypeEnum
+#define SCHEMA_HAS_IfcLampTypeEnum
+#define SCHEMA_HAS_IfcLanguageId
+#define SCHEMA_HAS_IfcLayerSetDirectionEnum
+#define SCHEMA_HAS_IfcLayeredItem
+#define SCHEMA_HAS_IfcLengthMeasure
+#define SCHEMA_HAS_IfcLibrarySelect
+#define SCHEMA_HAS_IfcLightDistributionCurveEnum
+#define SCHEMA_HAS_IfcLightDistributionDataSourceSelect
+#define SCHEMA_HAS_IfcLightEmissionSourceEnum
+#define SCHEMA_HAS_IfcLightFixtureTypeEnum
+#define SCHEMA_HAS_IfcLineIndex
+#define SCHEMA_HAS_IfcLinearForceMeasure
+#define SCHEMA_HAS_IfcLinearMomentMeasure
+#define SCHEMA_HAS_IfcLinearStiffnessMeasure
+#define SCHEMA_HAS_IfcLinearVelocityMeasure
+#define SCHEMA_HAS_IfcLiquidTerminalTypeEnum
+#define SCHEMA_HAS_IfcLoadGroupTypeEnum
+#define SCHEMA_HAS_IfcLogical
+#define SCHEMA_HAS_IfcLogicalOperatorEnum
+#define SCHEMA_HAS_IfcLuminousFluxMeasure
+#define SCHEMA_HAS_IfcLuminousIntensityDistributionMeasure
+#define SCHEMA_HAS_IfcLuminousIntensityMeasure
+#define SCHEMA_HAS_IfcMagneticFluxDensityMeasure
+#define SCHEMA_HAS_IfcMagneticFluxMeasure
+#define SCHEMA_HAS_IfcMarineFacilityTypeEnum
+#define SCHEMA_HAS_IfcMarinePartTypeEnum
+#define SCHEMA_HAS_IfcMassDensityMeasure
+#define SCHEMA_HAS_IfcMassFlowRateMeasure
+#define SCHEMA_HAS_IfcMassMeasure
+#define SCHEMA_HAS_IfcMassPerLengthMeasure
+#define SCHEMA_HAS_IfcMaterialSelect
+#define SCHEMA_HAS_IfcMeasureValue
+#define SCHEMA_HAS_IfcMechanicalFastenerTypeEnum
+#define SCHEMA_HAS_IfcMedicalDeviceTypeEnum
+#define SCHEMA_HAS_IfcMemberTypeEnum
+#define SCHEMA_HAS_IfcMetricValueSelect
+#define SCHEMA_HAS_IfcMobileTelecommunicationsApplianceTypeEnum
+#define SCHEMA_HAS_IfcModulusOfElasticityMeasure
+#define SCHEMA_HAS_IfcModulusOfLinearSubgradeReactionMeasure
+#define SCHEMA_HAS_IfcModulusOfRotationalSubgradeReactionMeasure
+#define SCHEMA_HAS_IfcModulusOfRotationalSubgradeReactionSelect
+#define SCHEMA_HAS_IfcModulusOfSubgradeReactionMeasure
+#define SCHEMA_HAS_IfcModulusOfSubgradeReactionSelect
+#define SCHEMA_HAS_IfcModulusOfTranslationalSubgradeReactionSelect
+#define SCHEMA_HAS_IfcMoistureDiffusivityMeasure
+#define SCHEMA_HAS_IfcMolecularWeightMeasure
+#define SCHEMA_HAS_IfcMomentOfInertiaMeasure
+#define SCHEMA_HAS_IfcMonetaryMeasure
+#define SCHEMA_HAS_IfcMonthInYearNumber
+#define SCHEMA_HAS_IfcMooringDeviceTypeEnum
+#define SCHEMA_HAS_IfcMotorConnectionTypeEnum
+#define SCHEMA_HAS_IfcNavigationElementTypeEnum
+#define SCHEMA_HAS_IfcNonNegativeLengthMeasure
+#define SCHEMA_HAS_IfcNormalisedRatioMeasure
+#define SCHEMA_HAS_IfcNumericMeasure
+#define SCHEMA_HAS_IfcObjectReferenceSelect
+#define SCHEMA_HAS_IfcObjectTypeEnum
+#define SCHEMA_HAS_IfcObjectiveEnum
+#define SCHEMA_HAS_IfcOccupantTypeEnum
+#define SCHEMA_HAS_IfcOpeningElementTypeEnum
+#define SCHEMA_HAS_IfcOutletTypeEnum
+#define SCHEMA_HAS_IfcPHMeasure
+#define SCHEMA_HAS_IfcParameterValue
+#define SCHEMA_HAS_IfcPavementTypeEnum
+#define SCHEMA_HAS_IfcPerformanceHistoryTypeEnum
+#define SCHEMA_HAS_IfcPermeableCoveringOperationEnum
+#define SCHEMA_HAS_IfcPermitTypeEnum
+#define SCHEMA_HAS_IfcPhysicalOrVirtualEnum
+#define SCHEMA_HAS_IfcPileConstructionEnum
+#define SCHEMA_HAS_IfcPileTypeEnum
+#define SCHEMA_HAS_IfcPipeFittingTypeEnum
+#define SCHEMA_HAS_IfcPipeSegmentTypeEnum
+#define SCHEMA_HAS_IfcPlanarForceMeasure
+#define SCHEMA_HAS_IfcPlaneAngleMeasure
+#define SCHEMA_HAS_IfcPlateTypeEnum
+#define SCHEMA_HAS_IfcPointOrVertexPoint
+#define SCHEMA_HAS_IfcPositiveInteger
+#define SCHEMA_HAS_IfcPositiveLengthMeasure
+#define SCHEMA_HAS_IfcPositivePlaneAngleMeasure
+#define SCHEMA_HAS_IfcPositiveRatioMeasure
+#define SCHEMA_HAS_IfcPowerMeasure
+#define SCHEMA_HAS_IfcPreferredSurfaceCurveRepresentation
+#define SCHEMA_HAS_IfcPresentableText
+#define SCHEMA_HAS_IfcPressureMeasure
+#define SCHEMA_HAS_IfcProcedureTypeEnum
+#define SCHEMA_HAS_IfcProcessSelect
+#define SCHEMA_HAS_IfcProductRepresentationSelect
+#define SCHEMA_HAS_IfcProductSelect
+#define SCHEMA_HAS_IfcProfileTypeEnum
+#define SCHEMA_HAS_IfcProjectOrderTypeEnum
+#define SCHEMA_HAS_IfcProjectedOrTrueLengthEnum
+#define SCHEMA_HAS_IfcProjectionElementTypeEnum
+#define SCHEMA_HAS_IfcPropertySetDefinitionSelect
+#define SCHEMA_HAS_IfcPropertySetDefinitionSet
+#define SCHEMA_HAS_IfcPropertySetTemplateTypeEnum
+#define SCHEMA_HAS_IfcProtectiveDeviceTrippingUnitTypeEnum
+#define SCHEMA_HAS_IfcProtectiveDeviceTypeEnum
+#define SCHEMA_HAS_IfcPumpTypeEnum
+#define SCHEMA_HAS_IfcRadioActivityMeasure
+#define SCHEMA_HAS_IfcRailTypeEnum
+#define SCHEMA_HAS_IfcRailingTypeEnum
+#define SCHEMA_HAS_IfcRailwayPartTypeEnum
+#define SCHEMA_HAS_IfcRailwayTypeEnum
+#define SCHEMA_HAS_IfcRampFlightTypeEnum
+#define SCHEMA_HAS_IfcRampTypeEnum
+#define SCHEMA_HAS_IfcRatioMeasure
+#define SCHEMA_HAS_IfcReal
+#define SCHEMA_HAS_IfcRecurrenceTypeEnum
+#define SCHEMA_HAS_IfcReferentTypeEnum
+#define SCHEMA_HAS_IfcReflectanceMethodEnum
+#define SCHEMA_HAS_IfcReinforcedSoilTypeEnum
+#define SCHEMA_HAS_IfcReinforcingBarRoleEnum
+#define SCHEMA_HAS_IfcReinforcingBarSurfaceEnum
+#define SCHEMA_HAS_IfcReinforcingBarTypeEnum
+#define SCHEMA_HAS_IfcReinforcingMeshTypeEnum
+#define SCHEMA_HAS_IfcResourceObjectSelect
+#define SCHEMA_HAS_IfcResourceSelect
+#define SCHEMA_HAS_IfcRoadPartTypeEnum
+#define SCHEMA_HAS_IfcRoadTypeEnum
+#define SCHEMA_HAS_IfcRoleEnum
+#define SCHEMA_HAS_IfcRoofTypeEnum
+#define SCHEMA_HAS_IfcRotationalFrequencyMeasure
+#define SCHEMA_HAS_IfcRotationalMassMeasure
+#define SCHEMA_HAS_IfcRotationalStiffnessMeasure
+#define SCHEMA_HAS_IfcRotationalStiffnessSelect
+#define SCHEMA_HAS_IfcSIPrefix
+#define SCHEMA_HAS_IfcSIUnitName
+#define SCHEMA_HAS_IfcSanitaryTerminalTypeEnum
+#define SCHEMA_HAS_IfcSectionModulusMeasure
+#define SCHEMA_HAS_IfcSectionTypeEnum
+#define SCHEMA_HAS_IfcSectionalAreaIntegralMeasure
+#define SCHEMA_HAS_IfcSegmentIndexSelect
+#define SCHEMA_HAS_IfcSensorTypeEnum
+#define SCHEMA_HAS_IfcSequenceEnum
+#define SCHEMA_HAS_IfcShadingDeviceTypeEnum
+#define SCHEMA_HAS_IfcShearModulusMeasure
+#define SCHEMA_HAS_IfcShell
+#define SCHEMA_HAS_IfcSignTypeEnum
+#define SCHEMA_HAS_IfcSignalTypeEnum
+#define SCHEMA_HAS_IfcSimplePropertyTemplateTypeEnum
+#define SCHEMA_HAS_IfcSimpleValue
+#define SCHEMA_HAS_IfcSizeSelect
+#define SCHEMA_HAS_IfcSlabTypeEnum
+#define SCHEMA_HAS_IfcSolarDeviceTypeEnum
+#define SCHEMA_HAS_IfcSolidAngleMeasure
+#define SCHEMA_HAS_IfcSolidOrShell
+#define SCHEMA_HAS_IfcSoundPowerLevelMeasure
+#define SCHEMA_HAS_IfcSoundPowerMeasure
+#define SCHEMA_HAS_IfcSoundPressureLevelMeasure
+#define SCHEMA_HAS_IfcSoundPressureMeasure
+#define SCHEMA_HAS_IfcSpaceBoundarySelect
+#define SCHEMA_HAS_IfcSpaceHeaterTypeEnum
+#define SCHEMA_HAS_IfcSpaceTypeEnum
+#define SCHEMA_HAS_IfcSpatialReferenceSelect
+#define SCHEMA_HAS_IfcSpatialZoneTypeEnum
+#define SCHEMA_HAS_IfcSpecificHeatCapacityMeasure
+#define SCHEMA_HAS_IfcSpecularExponent
+#define SCHEMA_HAS_IfcSpecularHighlightSelect
+#define SCHEMA_HAS_IfcSpecularRoughness
+#define SCHEMA_HAS_IfcStackTerminalTypeEnum
+#define SCHEMA_HAS_IfcStairFlightTypeEnum
+#define SCHEMA_HAS_IfcStairTypeEnum
+#define SCHEMA_HAS_IfcStateEnum
+#define SCHEMA_HAS_IfcStructuralActivityAssignmentSelect
+#define SCHEMA_HAS_IfcStructuralCurveActivityTypeEnum
+#define SCHEMA_HAS_IfcStructuralCurveMemberTypeEnum
+#define SCHEMA_HAS_IfcStructuralSurfaceActivityTypeEnum
+#define SCHEMA_HAS_IfcStructuralSurfaceMemberTypeEnum
+#define SCHEMA_HAS_IfcSubContractResourceTypeEnum
+#define SCHEMA_HAS_IfcSurfaceFeatureTypeEnum
+#define SCHEMA_HAS_IfcSurfaceOrFaceSurface
+#define SCHEMA_HAS_IfcSurfaceSide
+#define SCHEMA_HAS_IfcSurfaceStyleElementSelect
+#define SCHEMA_HAS_IfcSwitchingDeviceTypeEnum
+#define SCHEMA_HAS_IfcSystemFurnitureElementTypeEnum
+#define SCHEMA_HAS_IfcTankTypeEnum
+#define SCHEMA_HAS_IfcTaskDurationEnum
+#define SCHEMA_HAS_IfcTaskTypeEnum
+#define SCHEMA_HAS_IfcTemperatureGradientMeasure
+#define SCHEMA_HAS_IfcTemperatureRateOfChangeMeasure
+#define SCHEMA_HAS_IfcTendonAnchorTypeEnum
+#define SCHEMA_HAS_IfcTendonConduitTypeEnum
+#define SCHEMA_HAS_IfcTendonTypeEnum
+#define SCHEMA_HAS_IfcText
+#define SCHEMA_HAS_IfcTextAlignment
+#define SCHEMA_HAS_IfcTextDecoration
+#define SCHEMA_HAS_IfcTextFontName
+#define SCHEMA_HAS_IfcTextFontSelect
+#define SCHEMA_HAS_IfcTextPath
+#define SCHEMA_HAS_IfcTextTransformation
+#define SCHEMA_HAS_IfcThermalAdmittanceMeasure
+#define SCHEMA_HAS_IfcThermalConductivityMeasure
+#define SCHEMA_HAS_IfcThermalExpansionCoefficientMeasure
+#define SCHEMA_HAS_IfcThermalResistanceMeasure
+#define SCHEMA_HAS_IfcThermalTransmittanceMeasure
+#define SCHEMA_HAS_IfcThermodynamicTemperatureMeasure
+#define SCHEMA_HAS_IfcTime
+#define SCHEMA_HAS_IfcTimeMeasure
+#define SCHEMA_HAS_IfcTimeOrRatioSelect
+#define SCHEMA_HAS_IfcTimeSeriesDataTypeEnum
+#define SCHEMA_HAS_IfcTimeStamp
+#define SCHEMA_HAS_IfcTorqueMeasure
+#define SCHEMA_HAS_IfcTrackElementTypeEnum
+#define SCHEMA_HAS_IfcTransformerTypeEnum
+#define SCHEMA_HAS_IfcTransitionCode
+#define SCHEMA_HAS_IfcTranslationalStiffnessSelect
+#define SCHEMA_HAS_IfcTransportElementTypeEnum
+#define SCHEMA_HAS_IfcTrimmingPreference
+#define SCHEMA_HAS_IfcTrimmingSelect
+#define SCHEMA_HAS_IfcTubeBundleTypeEnum
+#define SCHEMA_HAS_IfcURIReference
+#define SCHEMA_HAS_IfcUnit
+#define SCHEMA_HAS_IfcUnitEnum
+#define SCHEMA_HAS_IfcUnitaryControlElementTypeEnum
+#define SCHEMA_HAS_IfcUnitaryEquipmentTypeEnum
+#define SCHEMA_HAS_IfcValue
+#define SCHEMA_HAS_IfcValveTypeEnum
+#define SCHEMA_HAS_IfcVaporPermeabilityMeasure
+#define SCHEMA_HAS_IfcVectorOrDirection
+#define SCHEMA_HAS_IfcVehicleTypeEnum
+#define SCHEMA_HAS_IfcVibrationDamperTypeEnum
+#define SCHEMA_HAS_IfcVibrationIsolatorTypeEnum
+#define SCHEMA_HAS_IfcVirtualElementTypeEnum
+#define SCHEMA_HAS_IfcVoidingFeatureTypeEnum
+#define SCHEMA_HAS_IfcVolumeMeasure
+#define SCHEMA_HAS_IfcVolumetricFlowRateMeasure
+#define SCHEMA_HAS_IfcWallTypeEnum
+#define SCHEMA_HAS_IfcWarpingConstantMeasure
+#define SCHEMA_HAS_IfcWarpingMomentMeasure
+#define SCHEMA_HAS_IfcWarpingStiffnessSelect
+#define SCHEMA_HAS_IfcWasteTerminalTypeEnum
+#define SCHEMA_HAS_IfcWindowPanelOperationEnum
+#define SCHEMA_HAS_IfcWindowPanelPositionEnum
+#define SCHEMA_HAS_IfcWindowStyleConstructionEnum
+#define SCHEMA_HAS_IfcWindowStyleOperationEnum
+#define SCHEMA_HAS_IfcWindowTypeEnum
+#define SCHEMA_HAS_IfcWindowTypePartitioningEnum
+#define SCHEMA_HAS_IfcWorkCalendarTypeEnum
+#define SCHEMA_HAS_IfcWorkPlanTypeEnum
+#define SCHEMA_HAS_IfcWorkScheduleTypeEnum
+#define SCHEMA_HAS_IfcActionRequest
+#define SCHEMA_IfcActionRequest_HAS_PredefinedType
+#define SCHEMA_IfcActionRequest_PredefinedType_IS_OPTIONAL
+#define SCHEMA_IfcActionRequest_HAS_Status
+#define SCHEMA_IfcActionRequest_Status_IS_OPTIONAL
+#define SCHEMA_IfcActionRequest_HAS_LongDescription
+#define SCHEMA_IfcActionRequest_LongDescription_IS_OPTIONAL
+#define SCHEMA_HAS_IfcActor
+#define SCHEMA_IfcActor_HAS_TheActor
+#define SCHEMA_IfcActor_HAS_IsActingUpon
+#define SCHEMA_HAS_IfcActorRole
+#define SCHEMA_IfcActorRole_HAS_Role
+#define SCHEMA_IfcActorRole_HAS_UserDefinedRole
+#define SCHEMA_IfcActorRole_UserDefinedRole_IS_OPTIONAL
+#define SCHEMA_IfcActorRole_HAS_Description
+#define SCHEMA_IfcActorRole_Description_IS_OPTIONAL
+#define SCHEMA_IfcActorRole_HAS_HasExternalReference
+#define SCHEMA_HAS_IfcActuator
+#define SCHEMA_IfcActuator_HAS_PredefinedType
+#define SCHEMA_IfcActuator_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcActuatorType
+#define SCHEMA_IfcActuatorType_HAS_PredefinedType
+#define SCHEMA_HAS_IfcAddress
+#define SCHEMA_IfcAddress_HAS_Purpose
+#define SCHEMA_IfcAddress_Purpose_IS_OPTIONAL
+#define SCHEMA_IfcAddress_HAS_Description
+#define SCHEMA_IfcAddress_Description_IS_OPTIONAL
+#define SCHEMA_IfcAddress_HAS_UserDefinedPurpose
+#define SCHEMA_IfcAddress_UserDefinedPurpose_IS_OPTIONAL
+#define SCHEMA_IfcAddress_HAS_OfPerson
+#define SCHEMA_IfcAddress_HAS_OfOrganization
+#define SCHEMA_HAS_IfcAdvancedBrep
+#define SCHEMA_HAS_IfcAdvancedBrepWithVoids
+#define SCHEMA_IfcAdvancedBrepWithVoids_HAS_Voids
+#define SCHEMA_HAS_IfcAdvancedFace
+#define SCHEMA_HAS_IfcAirTerminal
+#define SCHEMA_IfcAirTerminal_HAS_PredefinedType
+#define SCHEMA_IfcAirTerminal_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcAirTerminalBox
+#define SCHEMA_IfcAirTerminalBox_HAS_PredefinedType
+#define SCHEMA_IfcAirTerminalBox_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcAirTerminalBoxType
+#define SCHEMA_IfcAirTerminalBoxType_HAS_PredefinedType
+#define SCHEMA_HAS_IfcAirTerminalType
+#define SCHEMA_IfcAirTerminalType_HAS_PredefinedType
+#define SCHEMA_HAS_IfcAirToAirHeatRecovery
+#define SCHEMA_IfcAirToAirHeatRecovery_HAS_PredefinedType
+#define SCHEMA_IfcAirToAirHeatRecovery_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcAirToAirHeatRecoveryType
+#define SCHEMA_IfcAirToAirHeatRecoveryType_HAS_PredefinedType
+#define SCHEMA_HAS_IfcAlarm
+#define SCHEMA_IfcAlarm_HAS_PredefinedType
+#define SCHEMA_IfcAlarm_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcAlarmType
+#define SCHEMA_IfcAlarmType_HAS_PredefinedType
+#define SCHEMA_HAS_IfcAlignment
+#define SCHEMA_IfcAlignment_HAS_PredefinedType
+#define SCHEMA_IfcAlignment_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcAlignmentCant
+#define SCHEMA_IfcAlignmentCant_HAS_RailHeadDistance
+#define SCHEMA_HAS_IfcAlignmentCantSegment
+#define SCHEMA_IfcAlignmentCantSegment_HAS_StartDistAlong
+#define SCHEMA_IfcAlignmentCantSegment_HAS_HorizontalLength
+#define SCHEMA_IfcAlignmentCantSegment_HAS_StartCantLeft
+#define SCHEMA_IfcAlignmentCantSegment_HAS_EndCantLeft
+#define SCHEMA_IfcAlignmentCantSegment_EndCantLeft_IS_OPTIONAL
+#define SCHEMA_IfcAlignmentCantSegment_HAS_StartCantRight
+#define SCHEMA_IfcAlignmentCantSegment_HAS_EndCantRight
+#define SCHEMA_IfcAlignmentCantSegment_EndCantRight_IS_OPTIONAL
+#define SCHEMA_IfcAlignmentCantSegment_HAS_PredefinedType
+#define SCHEMA_HAS_IfcAlignmentHorizontal
+#define SCHEMA_HAS_IfcAlignmentHorizontalSegment
+#define SCHEMA_IfcAlignmentHorizontalSegment_HAS_StartPoint
+#define SCHEMA_IfcAlignmentHorizontalSegment_HAS_StartDirection
+#define SCHEMA_IfcAlignmentHorizontalSegment_HAS_StartRadiusOfCurvature
+#define SCHEMA_IfcAlignmentHorizontalSegment_HAS_EndRadiusOfCurvature
+#define SCHEMA_IfcAlignmentHorizontalSegment_HAS_SegmentLength
+#define SCHEMA_IfcAlignmentHorizontalSegment_HAS_GravityCenterLineHeight
+#define SCHEMA_IfcAlignmentHorizontalSegment_GravityCenterLineHeight_IS_OPTIONAL
+#define SCHEMA_IfcAlignmentHorizontalSegment_HAS_PredefinedType
+#define SCHEMA_HAS_IfcAlignmentParameterSegment
+#define SCHEMA_IfcAlignmentParameterSegment_HAS_StartTag
+#define SCHEMA_IfcAlignmentParameterSegment_StartTag_IS_OPTIONAL
+#define SCHEMA_IfcAlignmentParameterSegment_HAS_EndTag
+#define SCHEMA_IfcAlignmentParameterSegment_EndTag_IS_OPTIONAL
+#define SCHEMA_HAS_IfcAlignmentSegment
+#define SCHEMA_IfcAlignmentSegment_HAS_DesignParameters
+#define SCHEMA_HAS_IfcAlignmentVertical
+#define SCHEMA_HAS_IfcAlignmentVerticalSegment
+#define SCHEMA_IfcAlignmentVerticalSegment_HAS_StartDistAlong
+#define SCHEMA_IfcAlignmentVerticalSegment_HAS_HorizontalLength
+#define SCHEMA_IfcAlignmentVerticalSegment_HAS_StartHeight
+#define SCHEMA_IfcAlignmentVerticalSegment_HAS_StartGradient
+#define SCHEMA_IfcAlignmentVerticalSegment_HAS_EndGradient
+#define SCHEMA_IfcAlignmentVerticalSegment_HAS_RadiusOfCurvature
+#define SCHEMA_IfcAlignmentVerticalSegment_RadiusOfCurvature_IS_OPTIONAL
+#define SCHEMA_IfcAlignmentVerticalSegment_HAS_PredefinedType
+#define SCHEMA_HAS_IfcAnnotation
+#define SCHEMA_IfcAnnotation_HAS_PredefinedType
+#define SCHEMA_IfcAnnotation_PredefinedType_IS_OPTIONAL
+#define SCHEMA_IfcAnnotation_HAS_ContainedInStructure
+#define SCHEMA_HAS_IfcAnnotationFillArea
+#define SCHEMA_IfcAnnotationFillArea_HAS_OuterBoundary
+#define SCHEMA_IfcAnnotationFillArea_HAS_InnerBoundaries
+#define SCHEMA_IfcAnnotationFillArea_InnerBoundaries_IS_OPTIONAL
+#define SCHEMA_HAS_IfcApplication
+#define SCHEMA_IfcApplication_HAS_ApplicationDeveloper
+#define SCHEMA_IfcApplication_HAS_Version
+#define SCHEMA_IfcApplication_HAS_ApplicationFullName
+#define SCHEMA_IfcApplication_HAS_ApplicationIdentifier
+#define SCHEMA_HAS_IfcAppliedValue
+#define SCHEMA_IfcAppliedValue_HAS_Name
+#define SCHEMA_IfcAppliedValue_Name_IS_OPTIONAL
+#define SCHEMA_IfcAppliedValue_HAS_Description
+#define SCHEMA_IfcAppliedValue_Description_IS_OPTIONAL
+#define SCHEMA_IfcAppliedValue_HAS_AppliedValue
+#define SCHEMA_IfcAppliedValue_AppliedValue_IS_OPTIONAL
+#define SCHEMA_IfcAppliedValue_HAS_UnitBasis
+#define SCHEMA_IfcAppliedValue_UnitBasis_IS_OPTIONAL
+#define SCHEMA_IfcAppliedValue_HAS_ApplicableDate
+#define SCHEMA_IfcAppliedValue_ApplicableDate_IS_OPTIONAL
+#define SCHEMA_IfcAppliedValue_HAS_FixedUntilDate
+#define SCHEMA_IfcAppliedValue_FixedUntilDate_IS_OPTIONAL
+#define SCHEMA_IfcAppliedValue_HAS_Category
+#define SCHEMA_IfcAppliedValue_Category_IS_OPTIONAL
+#define SCHEMA_IfcAppliedValue_HAS_Condition
+#define SCHEMA_IfcAppliedValue_Condition_IS_OPTIONAL
+#define SCHEMA_IfcAppliedValue_HAS_ArithmeticOperator
+#define SCHEMA_IfcAppliedValue_ArithmeticOperator_IS_OPTIONAL
+#define SCHEMA_IfcAppliedValue_HAS_Components
+#define SCHEMA_IfcAppliedValue_Components_IS_OPTIONAL
+#define SCHEMA_IfcAppliedValue_HAS_HasExternalReference
+#define SCHEMA_HAS_IfcApproval
+#define SCHEMA_IfcApproval_HAS_Identifier
+#define SCHEMA_IfcApproval_Identifier_IS_OPTIONAL
+#define SCHEMA_IfcApproval_HAS_Name
+#define SCHEMA_IfcApproval_Name_IS_OPTIONAL
+#define SCHEMA_IfcApproval_HAS_Description
+#define SCHEMA_IfcApproval_Description_IS_OPTIONAL
+#define SCHEMA_IfcApproval_HAS_TimeOfApproval
+#define SCHEMA_IfcApproval_TimeOfApproval_IS_OPTIONAL
+#define SCHEMA_IfcApproval_HAS_Status
+#define SCHEMA_IfcApproval_Status_IS_OPTIONAL
+#define SCHEMA_IfcApproval_HAS_Level
+#define SCHEMA_IfcApproval_Level_IS_OPTIONAL
+#define SCHEMA_IfcApproval_HAS_Qualifier
+#define SCHEMA_IfcApproval_Qualifier_IS_OPTIONAL
+#define SCHEMA_IfcApproval_HAS_RequestingApproval
+#define SCHEMA_IfcApproval_RequestingApproval_IS_OPTIONAL
+#define SCHEMA_IfcApproval_HAS_GivingApproval
+#define SCHEMA_IfcApproval_GivingApproval_IS_OPTIONAL
+#define SCHEMA_IfcApproval_HAS_HasExternalReferences
+#define SCHEMA_IfcApproval_HAS_ApprovedObjects
+#define SCHEMA_IfcApproval_HAS_ApprovedResources
+#define SCHEMA_IfcApproval_HAS_IsRelatedWith
+#define SCHEMA_IfcApproval_HAS_Relates
+#define SCHEMA_HAS_IfcApprovalRelationship
+#define SCHEMA_IfcApprovalRelationship_HAS_RelatingApproval
+#define SCHEMA_IfcApprovalRelationship_HAS_RelatedApprovals
+#define SCHEMA_HAS_IfcArbitraryClosedProfileDef
+#define SCHEMA_IfcArbitraryClosedProfileDef_HAS_OuterCurve
+#define SCHEMA_HAS_IfcArbitraryOpenProfileDef
+#define SCHEMA_IfcArbitraryOpenProfileDef_HAS_Curve
+#define SCHEMA_HAS_IfcArbitraryProfileDefWithVoids
+#define SCHEMA_IfcArbitraryProfileDefWithVoids_HAS_InnerCurves
+#define SCHEMA_HAS_IfcAsset
+#define SCHEMA_IfcAsset_HAS_Identification
+#define SCHEMA_IfcAsset_Identification_IS_OPTIONAL
+#define SCHEMA_IfcAsset_HAS_OriginalValue
+#define SCHEMA_IfcAsset_OriginalValue_IS_OPTIONAL
+#define SCHEMA_IfcAsset_HAS_CurrentValue
+#define SCHEMA_IfcAsset_CurrentValue_IS_OPTIONAL
+#define SCHEMA_IfcAsset_HAS_TotalReplacementCost
+#define SCHEMA_IfcAsset_TotalReplacementCost_IS_OPTIONAL
+#define SCHEMA_IfcAsset_HAS_Owner
+#define SCHEMA_IfcAsset_Owner_IS_OPTIONAL
+#define SCHEMA_IfcAsset_HAS_User
+#define SCHEMA_IfcAsset_User_IS_OPTIONAL
+#define SCHEMA_IfcAsset_HAS_ResponsiblePerson
+#define SCHEMA_IfcAsset_ResponsiblePerson_IS_OPTIONAL
+#define SCHEMA_IfcAsset_HAS_IncorporationDate
+#define SCHEMA_IfcAsset_IncorporationDate_IS_OPTIONAL
+#define SCHEMA_IfcAsset_HAS_DepreciatedValue
+#define SCHEMA_IfcAsset_DepreciatedValue_IS_OPTIONAL
+#define SCHEMA_HAS_IfcAsymmetricIShapeProfileDef
+#define SCHEMA_IfcAsymmetricIShapeProfileDef_HAS_BottomFlangeWidth
+#define SCHEMA_IfcAsymmetricIShapeProfileDef_HAS_OverallDepth
+#define SCHEMA_IfcAsymmetricIShapeProfileDef_HAS_WebThickness
+#define SCHEMA_IfcAsymmetricIShapeProfileDef_HAS_BottomFlangeThickness
+#define SCHEMA_IfcAsymmetricIShapeProfileDef_HAS_BottomFlangeFilletRadius
+#define SCHEMA_IfcAsymmetricIShapeProfileDef_BottomFlangeFilletRadius_IS_OPTIONAL
+#define SCHEMA_IfcAsymmetricIShapeProfileDef_HAS_TopFlangeWidth
+#define SCHEMA_IfcAsymmetricIShapeProfileDef_HAS_TopFlangeThickness
+#define SCHEMA_IfcAsymmetricIShapeProfileDef_TopFlangeThickness_IS_OPTIONAL
+#define SCHEMA_IfcAsymmetricIShapeProfileDef_HAS_TopFlangeFilletRadius
+#define SCHEMA_IfcAsymmetricIShapeProfileDef_TopFlangeFilletRadius_IS_OPTIONAL
+#define SCHEMA_IfcAsymmetricIShapeProfileDef_HAS_BottomFlangeEdgeRadius
+#define SCHEMA_IfcAsymmetricIShapeProfileDef_BottomFlangeEdgeRadius_IS_OPTIONAL
+#define SCHEMA_IfcAsymmetricIShapeProfileDef_HAS_BottomFlangeSlope
+#define SCHEMA_IfcAsymmetricIShapeProfileDef_BottomFlangeSlope_IS_OPTIONAL
+#define SCHEMA_IfcAsymmetricIShapeProfileDef_HAS_TopFlangeEdgeRadius
+#define SCHEMA_IfcAsymmetricIShapeProfileDef_TopFlangeEdgeRadius_IS_OPTIONAL
+#define SCHEMA_IfcAsymmetricIShapeProfileDef_HAS_TopFlangeSlope
+#define SCHEMA_IfcAsymmetricIShapeProfileDef_TopFlangeSlope_IS_OPTIONAL
+#define SCHEMA_HAS_IfcAudioVisualAppliance
+#define SCHEMA_IfcAudioVisualAppliance_HAS_PredefinedType
+#define SCHEMA_IfcAudioVisualAppliance_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcAudioVisualApplianceType
+#define SCHEMA_IfcAudioVisualApplianceType_HAS_PredefinedType
+#define SCHEMA_HAS_IfcAxis1Placement
+#define SCHEMA_IfcAxis1Placement_HAS_Axis
+#define SCHEMA_IfcAxis1Placement_Axis_IS_OPTIONAL
+#define SCHEMA_HAS_IfcAxis2Placement2D
+#define SCHEMA_IfcAxis2Placement2D_HAS_RefDirection
+#define SCHEMA_IfcAxis2Placement2D_RefDirection_IS_OPTIONAL
+#define SCHEMA_HAS_IfcAxis2Placement3D
+#define SCHEMA_IfcAxis2Placement3D_HAS_Axis
+#define SCHEMA_IfcAxis2Placement3D_Axis_IS_OPTIONAL
+#define SCHEMA_IfcAxis2Placement3D_HAS_RefDirection
+#define SCHEMA_IfcAxis2Placement3D_RefDirection_IS_OPTIONAL
+#define SCHEMA_HAS_IfcAxis2PlacementLinear
+#define SCHEMA_IfcAxis2PlacementLinear_HAS_Axis
+#define SCHEMA_IfcAxis2PlacementLinear_Axis_IS_OPTIONAL
+#define SCHEMA_IfcAxis2PlacementLinear_HAS_RefDirection
+#define SCHEMA_IfcAxis2PlacementLinear_RefDirection_IS_OPTIONAL
+#define SCHEMA_HAS_IfcBSplineCurve
+#define SCHEMA_IfcBSplineCurve_HAS_Degree
+#define SCHEMA_IfcBSplineCurve_HAS_ControlPointsList
+#define SCHEMA_IfcBSplineCurve_HAS_CurveForm
+#define SCHEMA_IfcBSplineCurve_HAS_ClosedCurve
+#define SCHEMA_IfcBSplineCurve_HAS_SelfIntersect
+#define SCHEMA_HAS_IfcBSplineCurveWithKnots
+#define SCHEMA_IfcBSplineCurveWithKnots_HAS_KnotMultiplicities
+#define SCHEMA_IfcBSplineCurveWithKnots_HAS_Knots
+#define SCHEMA_IfcBSplineCurveWithKnots_HAS_KnotSpec
+#define SCHEMA_HAS_IfcBSplineSurface
+#define SCHEMA_IfcBSplineSurface_HAS_UDegree
+#define SCHEMA_IfcBSplineSurface_HAS_VDegree
+#define SCHEMA_IfcBSplineSurface_HAS_ControlPointsList
+#define SCHEMA_IfcBSplineSurface_HAS_SurfaceForm
+#define SCHEMA_IfcBSplineSurface_HAS_UClosed
+#define SCHEMA_IfcBSplineSurface_HAS_VClosed
+#define SCHEMA_IfcBSplineSurface_HAS_SelfIntersect
+#define SCHEMA_HAS_IfcBSplineSurfaceWithKnots
+#define SCHEMA_IfcBSplineSurfaceWithKnots_HAS_UMultiplicities
+#define SCHEMA_IfcBSplineSurfaceWithKnots_HAS_VMultiplicities
+#define SCHEMA_IfcBSplineSurfaceWithKnots_HAS_UKnots
+#define SCHEMA_IfcBSplineSurfaceWithKnots_HAS_VKnots
+#define SCHEMA_IfcBSplineSurfaceWithKnots_HAS_KnotSpec
+#define SCHEMA_HAS_IfcBeam
+#define SCHEMA_IfcBeam_HAS_PredefinedType
+#define SCHEMA_IfcBeam_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcBeamType
+#define SCHEMA_IfcBeamType_HAS_PredefinedType
+#define SCHEMA_HAS_IfcBearing
+#define SCHEMA_IfcBearing_HAS_PredefinedType
+#define SCHEMA_IfcBearing_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcBearingType
+#define SCHEMA_IfcBearingType_HAS_PredefinedType
+#define SCHEMA_HAS_IfcBlobTexture
+#define SCHEMA_IfcBlobTexture_HAS_RasterFormat
+#define SCHEMA_IfcBlobTexture_HAS_RasterCode
+#define SCHEMA_HAS_IfcBlock
+#define SCHEMA_IfcBlock_HAS_XLength
+#define SCHEMA_IfcBlock_HAS_YLength
+#define SCHEMA_IfcBlock_HAS_ZLength
+#define SCHEMA_HAS_IfcBoiler
+#define SCHEMA_IfcBoiler_HAS_PredefinedType
+#define SCHEMA_IfcBoiler_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcBoilerType
+#define SCHEMA_IfcBoilerType_HAS_PredefinedType
+#define SCHEMA_HAS_IfcBooleanClippingResult
+#define SCHEMA_HAS_IfcBooleanResult
+#define SCHEMA_IfcBooleanResult_HAS_Operator
+#define SCHEMA_IfcBooleanResult_HAS_FirstOperand
+#define SCHEMA_IfcBooleanResult_HAS_SecondOperand
+#define SCHEMA_HAS_IfcBorehole
+#define SCHEMA_HAS_IfcBoundaryCondition
+#define SCHEMA_IfcBoundaryCondition_HAS_Name
+#define SCHEMA_IfcBoundaryCondition_Name_IS_OPTIONAL
+#define SCHEMA_HAS_IfcBoundaryCurve
+#define SCHEMA_HAS_IfcBoundaryEdgeCondition
+#define SCHEMA_IfcBoundaryEdgeCondition_HAS_TranslationalStiffnessByLengthX
+#define SCHEMA_IfcBoundaryEdgeCondition_TranslationalStiffnessByLengthX_IS_OPTIONAL
+#define SCHEMA_IfcBoundaryEdgeCondition_HAS_TranslationalStiffnessByLengthY
+#define SCHEMA_IfcBoundaryEdgeCondition_TranslationalStiffnessByLengthY_IS_OPTIONAL
+#define SCHEMA_IfcBoundaryEdgeCondition_HAS_TranslationalStiffnessByLengthZ
+#define SCHEMA_IfcBoundaryEdgeCondition_TranslationalStiffnessByLengthZ_IS_OPTIONAL
+#define SCHEMA_IfcBoundaryEdgeCondition_HAS_RotationalStiffnessByLengthX
+#define SCHEMA_IfcBoundaryEdgeCondition_RotationalStiffnessByLengthX_IS_OPTIONAL
+#define SCHEMA_IfcBoundaryEdgeCondition_HAS_RotationalStiffnessByLengthY
+#define SCHEMA_IfcBoundaryEdgeCondition_RotationalStiffnessByLengthY_IS_OPTIONAL
+#define SCHEMA_IfcBoundaryEdgeCondition_HAS_RotationalStiffnessByLengthZ
+#define SCHEMA_IfcBoundaryEdgeCondition_RotationalStiffnessByLengthZ_IS_OPTIONAL
+#define SCHEMA_HAS_IfcBoundaryFaceCondition
+#define SCHEMA_IfcBoundaryFaceCondition_HAS_TranslationalStiffnessByAreaX
+#define SCHEMA_IfcBoundaryFaceCondition_TranslationalStiffnessByAreaX_IS_OPTIONAL
+#define SCHEMA_IfcBoundaryFaceCondition_HAS_TranslationalStiffnessByAreaY
+#define SCHEMA_IfcBoundaryFaceCondition_TranslationalStiffnessByAreaY_IS_OPTIONAL
+#define SCHEMA_IfcBoundaryFaceCondition_HAS_TranslationalStiffnessByAreaZ
+#define SCHEMA_IfcBoundaryFaceCondition_TranslationalStiffnessByAreaZ_IS_OPTIONAL
+#define SCHEMA_HAS_IfcBoundaryNodeCondition
+#define SCHEMA_IfcBoundaryNodeCondition_HAS_TranslationalStiffnessX
+#define SCHEMA_IfcBoundaryNodeCondition_TranslationalStiffnessX_IS_OPTIONAL
+#define SCHEMA_IfcBoundaryNodeCondition_HAS_TranslationalStiffnessY
+#define SCHEMA_IfcBoundaryNodeCondition_TranslationalStiffnessY_IS_OPTIONAL
+#define SCHEMA_IfcBoundaryNodeCondition_HAS_TranslationalStiffnessZ
+#define SCHEMA_IfcBoundaryNodeCondition_TranslationalStiffnessZ_IS_OPTIONAL
+#define SCHEMA_IfcBoundaryNodeCondition_HAS_RotationalStiffnessX
+#define SCHEMA_IfcBoundaryNodeCondition_RotationalStiffnessX_IS_OPTIONAL
+#define SCHEMA_IfcBoundaryNodeCondition_HAS_RotationalStiffnessY
+#define SCHEMA_IfcBoundaryNodeCondition_RotationalStiffnessY_IS_OPTIONAL
+#define SCHEMA_IfcBoundaryNodeCondition_HAS_RotationalStiffnessZ
+#define SCHEMA_IfcBoundaryNodeCondition_RotationalStiffnessZ_IS_OPTIONAL
+#define SCHEMA_HAS_IfcBoundaryNodeConditionWarping
+#define SCHEMA_IfcBoundaryNodeConditionWarping_HAS_WarpingStiffness
+#define SCHEMA_IfcBoundaryNodeConditionWarping_WarpingStiffness_IS_OPTIONAL
+#define SCHEMA_HAS_IfcBoundedCurve
+#define SCHEMA_HAS_IfcBoundedSurface
+#define SCHEMA_HAS_IfcBoundingBox
+#define SCHEMA_IfcBoundingBox_HAS_Corner
+#define SCHEMA_IfcBoundingBox_HAS_XDim
+#define SCHEMA_IfcBoundingBox_HAS_YDim
+#define SCHEMA_IfcBoundingBox_HAS_ZDim
+#define SCHEMA_HAS_IfcBoxedHalfSpace
+#define SCHEMA_IfcBoxedHalfSpace_HAS_Enclosure
+#define SCHEMA_HAS_IfcBridge
+#define SCHEMA_IfcBridge_HAS_PredefinedType
+#define SCHEMA_IfcBridge_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcBridgePart
+#define SCHEMA_IfcBridgePart_HAS_PredefinedType
+#define SCHEMA_IfcBridgePart_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcBuilding
+#define SCHEMA_IfcBuilding_HAS_ElevationOfRefHeight
+#define SCHEMA_IfcBuilding_ElevationOfRefHeight_IS_OPTIONAL
+#define SCHEMA_IfcBuilding_HAS_ElevationOfTerrain
+#define SCHEMA_IfcBuilding_ElevationOfTerrain_IS_OPTIONAL
+#define SCHEMA_IfcBuilding_HAS_BuildingAddress
+#define SCHEMA_IfcBuilding_BuildingAddress_IS_OPTIONAL
+#define SCHEMA_HAS_IfcBuildingElementPart
+#define SCHEMA_IfcBuildingElementPart_HAS_PredefinedType
+#define SCHEMA_IfcBuildingElementPart_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcBuildingElementPartType
+#define SCHEMA_IfcBuildingElementPartType_HAS_PredefinedType
+#define SCHEMA_HAS_IfcBuildingElementProxy
+#define SCHEMA_IfcBuildingElementProxy_HAS_PredefinedType
+#define SCHEMA_IfcBuildingElementProxy_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcBuildingElementProxyType
+#define SCHEMA_IfcBuildingElementProxyType_HAS_PredefinedType
+#define SCHEMA_HAS_IfcBuildingStorey
+#define SCHEMA_IfcBuildingStorey_HAS_Elevation
+#define SCHEMA_IfcBuildingStorey_Elevation_IS_OPTIONAL
+#define SCHEMA_HAS_IfcBuildingSystem
+#define SCHEMA_IfcBuildingSystem_HAS_PredefinedType
+#define SCHEMA_IfcBuildingSystem_PredefinedType_IS_OPTIONAL
+#define SCHEMA_IfcBuildingSystem_HAS_LongName
+#define SCHEMA_IfcBuildingSystem_LongName_IS_OPTIONAL
+#define SCHEMA_HAS_IfcBuiltElement
+#define SCHEMA_HAS_IfcBuiltElementType
+#define SCHEMA_HAS_IfcBuiltSystem
+#define SCHEMA_IfcBuiltSystem_HAS_PredefinedType
+#define SCHEMA_IfcBuiltSystem_PredefinedType_IS_OPTIONAL
+#define SCHEMA_IfcBuiltSystem_HAS_LongName
+#define SCHEMA_IfcBuiltSystem_LongName_IS_OPTIONAL
+#define SCHEMA_HAS_IfcBurner
+#define SCHEMA_IfcBurner_HAS_PredefinedType
+#define SCHEMA_IfcBurner_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcBurnerType
+#define SCHEMA_IfcBurnerType_HAS_PredefinedType
+#define SCHEMA_HAS_IfcCShapeProfileDef
+#define SCHEMA_IfcCShapeProfileDef_HAS_Depth
+#define SCHEMA_IfcCShapeProfileDef_HAS_Width
+#define SCHEMA_IfcCShapeProfileDef_HAS_WallThickness
+#define SCHEMA_IfcCShapeProfileDef_HAS_Girth
+#define SCHEMA_IfcCShapeProfileDef_HAS_InternalFilletRadius
+#define SCHEMA_IfcCShapeProfileDef_InternalFilletRadius_IS_OPTIONAL
+#define SCHEMA_HAS_IfcCableCarrierFitting
+#define SCHEMA_IfcCableCarrierFitting_HAS_PredefinedType
+#define SCHEMA_IfcCableCarrierFitting_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcCableCarrierFittingType
+#define SCHEMA_IfcCableCarrierFittingType_HAS_PredefinedType
+#define SCHEMA_HAS_IfcCableCarrierSegment
+#define SCHEMA_IfcCableCarrierSegment_HAS_PredefinedType
+#define SCHEMA_IfcCableCarrierSegment_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcCableCarrierSegmentType
+#define SCHEMA_IfcCableCarrierSegmentType_HAS_PredefinedType
+#define SCHEMA_HAS_IfcCableFitting
+#define SCHEMA_IfcCableFitting_HAS_PredefinedType
+#define SCHEMA_IfcCableFitting_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcCableFittingType
+#define SCHEMA_IfcCableFittingType_HAS_PredefinedType
+#define SCHEMA_HAS_IfcCableSegment
+#define SCHEMA_IfcCableSegment_HAS_PredefinedType
+#define SCHEMA_IfcCableSegment_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcCableSegmentType
+#define SCHEMA_IfcCableSegmentType_HAS_PredefinedType
+#define SCHEMA_HAS_IfcCaissonFoundation
+#define SCHEMA_IfcCaissonFoundation_HAS_PredefinedType
+#define SCHEMA_IfcCaissonFoundation_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcCaissonFoundationType
+#define SCHEMA_IfcCaissonFoundationType_HAS_PredefinedType
+#define SCHEMA_HAS_IfcCartesianPoint
+#define SCHEMA_IfcCartesianPoint_HAS_Coordinates
+#define SCHEMA_HAS_IfcCartesianPointList
+#define SCHEMA_HAS_IfcCartesianPointList2D
+#define SCHEMA_IfcCartesianPointList2D_HAS_CoordList
+#define SCHEMA_IfcCartesianPointList2D_HAS_TagList
+#define SCHEMA_IfcCartesianPointList2D_TagList_IS_OPTIONAL
+#define SCHEMA_HAS_IfcCartesianPointList3D
+#define SCHEMA_IfcCartesianPointList3D_HAS_CoordList
+#define SCHEMA_IfcCartesianPointList3D_HAS_TagList
+#define SCHEMA_IfcCartesianPointList3D_TagList_IS_OPTIONAL
+#define SCHEMA_HAS_IfcCartesianTransformationOperator
+#define SCHEMA_IfcCartesianTransformationOperator_HAS_Axis1
+#define SCHEMA_IfcCartesianTransformationOperator_Axis1_IS_OPTIONAL
+#define SCHEMA_IfcCartesianTransformationOperator_HAS_Axis2
+#define SCHEMA_IfcCartesianTransformationOperator_Axis2_IS_OPTIONAL
+#define SCHEMA_IfcCartesianTransformationOperator_HAS_LocalOrigin
+#define SCHEMA_IfcCartesianTransformationOperator_HAS_Scale
+#define SCHEMA_IfcCartesianTransformationOperator_Scale_IS_OPTIONAL
+#define SCHEMA_HAS_IfcCartesianTransformationOperator2D
+#define SCHEMA_HAS_IfcCartesianTransformationOperator2DnonUniform
+#define SCHEMA_IfcCartesianTransformationOperator2DnonUniform_HAS_Scale2
+#define SCHEMA_IfcCartesianTransformationOperator2DnonUniform_Scale2_IS_OPTIONAL
+#define SCHEMA_HAS_IfcCartesianTransformationOperator3D
+#define SCHEMA_IfcCartesianTransformationOperator3D_HAS_Axis3
+#define SCHEMA_IfcCartesianTransformationOperator3D_Axis3_IS_OPTIONAL
+#define SCHEMA_HAS_IfcCartesianTransformationOperator3DnonUniform
+#define SCHEMA_IfcCartesianTransformationOperator3DnonUniform_HAS_Scale2
+#define SCHEMA_IfcCartesianTransformationOperator3DnonUniform_Scale2_IS_OPTIONAL
+#define SCHEMA_IfcCartesianTransformationOperator3DnonUniform_HAS_Scale3
+#define SCHEMA_IfcCartesianTransformationOperator3DnonUniform_Scale3_IS_OPTIONAL
+#define SCHEMA_HAS_IfcCenterLineProfileDef
+#define SCHEMA_IfcCenterLineProfileDef_HAS_Thickness
+#define SCHEMA_HAS_IfcChiller
+#define SCHEMA_IfcChiller_HAS_PredefinedType
+#define SCHEMA_IfcChiller_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcChillerType
+#define SCHEMA_IfcChillerType_HAS_PredefinedType
+#define SCHEMA_HAS_IfcChimney
+#define SCHEMA_IfcChimney_HAS_PredefinedType
+#define SCHEMA_IfcChimney_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcChimneyType
+#define SCHEMA_IfcChimneyType_HAS_PredefinedType
+#define SCHEMA_HAS_IfcCircle
+#define SCHEMA_IfcCircle_HAS_Radius
+#define SCHEMA_HAS_IfcCircleHollowProfileDef
+#define SCHEMA_IfcCircleHollowProfileDef_HAS_WallThickness
+#define SCHEMA_HAS_IfcCircleProfileDef
+#define SCHEMA_IfcCircleProfileDef_HAS_Radius
+#define SCHEMA_HAS_IfcCivilElement
+#define SCHEMA_HAS_IfcCivilElementType
+#define SCHEMA_HAS_IfcClassification
+#define SCHEMA_IfcClassification_HAS_Source
+#define SCHEMA_IfcClassification_Source_IS_OPTIONAL
+#define SCHEMA_IfcClassification_HAS_Edition
+#define SCHEMA_IfcClassification_Edition_IS_OPTIONAL
+#define SCHEMA_IfcClassification_HAS_EditionDate
+#define SCHEMA_IfcClassification_EditionDate_IS_OPTIONAL
+#define SCHEMA_IfcClassification_HAS_Name
+#define SCHEMA_IfcClassification_HAS_Description
+#define SCHEMA_IfcClassification_Description_IS_OPTIONAL
+#define SCHEMA_IfcClassification_HAS_Specification
+#define SCHEMA_IfcClassification_Specification_IS_OPTIONAL
+#define SCHEMA_IfcClassification_HAS_ReferenceTokens
+#define SCHEMA_IfcClassification_ReferenceTokens_IS_OPTIONAL
+#define SCHEMA_IfcClassification_HAS_ClassificationForObjects
+#define SCHEMA_IfcClassification_HAS_HasReferences
+#define SCHEMA_HAS_IfcClassificationReference
+#define SCHEMA_IfcClassificationReference_HAS_ReferencedSource
+#define SCHEMA_IfcClassificationReference_ReferencedSource_IS_OPTIONAL
+#define SCHEMA_IfcClassificationReference_HAS_Description
+#define SCHEMA_IfcClassificationReference_Description_IS_OPTIONAL
+#define SCHEMA_IfcClassificationReference_HAS_Sort
+#define SCHEMA_IfcClassificationReference_Sort_IS_OPTIONAL
+#define SCHEMA_IfcClassificationReference_HAS_ClassificationRefForObjects
+#define SCHEMA_IfcClassificationReference_HAS_HasReferences
+#define SCHEMA_HAS_IfcClosedShell
+#define SCHEMA_HAS_IfcClothoid
+#define SCHEMA_IfcClothoid_HAS_ClothoidConstant
+#define SCHEMA_HAS_IfcCoil
+#define SCHEMA_IfcCoil_HAS_PredefinedType
+#define SCHEMA_IfcCoil_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcCoilType
+#define SCHEMA_IfcCoilType_HAS_PredefinedType
+#define SCHEMA_HAS_IfcColourRgb
+#define SCHEMA_IfcColourRgb_HAS_Red
+#define SCHEMA_IfcColourRgb_HAS_Green
+#define SCHEMA_IfcColourRgb_HAS_Blue
+#define SCHEMA_HAS_IfcColourRgbList
+#define SCHEMA_IfcColourRgbList_HAS_ColourList
+#define SCHEMA_HAS_IfcColourSpecification
+#define SCHEMA_IfcColourSpecification_HAS_Name
+#define SCHEMA_IfcColourSpecification_Name_IS_OPTIONAL
+#define SCHEMA_HAS_IfcColumn
+#define SCHEMA_IfcColumn_HAS_PredefinedType
+#define SCHEMA_IfcColumn_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcColumnType
+#define SCHEMA_IfcColumnType_HAS_PredefinedType
+#define SCHEMA_HAS_IfcCommunicationsAppliance
+#define SCHEMA_IfcCommunicationsAppliance_HAS_PredefinedType
+#define SCHEMA_IfcCommunicationsAppliance_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcCommunicationsApplianceType
+#define SCHEMA_IfcCommunicationsApplianceType_HAS_PredefinedType
+#define SCHEMA_HAS_IfcComplexProperty
+#define SCHEMA_IfcComplexProperty_HAS_UsageName
+#define SCHEMA_IfcComplexProperty_HAS_HasProperties
+#define SCHEMA_HAS_IfcComplexPropertyTemplate
+#define SCHEMA_IfcComplexPropertyTemplate_HAS_UsageName
+#define SCHEMA_IfcComplexPropertyTemplate_UsageName_IS_OPTIONAL
+#define SCHEMA_IfcComplexPropertyTemplate_HAS_TemplateType
+#define SCHEMA_IfcComplexPropertyTemplate_TemplateType_IS_OPTIONAL
+#define SCHEMA_IfcComplexPropertyTemplate_HAS_HasPropertyTemplates
+#define SCHEMA_IfcComplexPropertyTemplate_HasPropertyTemplates_IS_OPTIONAL
+#define SCHEMA_HAS_IfcCompositeCurve
+#define SCHEMA_IfcCompositeCurve_HAS_Segments
+#define SCHEMA_IfcCompositeCurve_HAS_SelfIntersect
+#define SCHEMA_HAS_IfcCompositeCurveOnSurface
+#define SCHEMA_HAS_IfcCompositeCurveSegment
+#define SCHEMA_IfcCompositeCurveSegment_HAS_SameSense
+#define SCHEMA_IfcCompositeCurveSegment_HAS_ParentCurve
+#define SCHEMA_HAS_IfcCompositeProfileDef
+#define SCHEMA_IfcCompositeProfileDef_HAS_Profiles
+#define SCHEMA_IfcCompositeProfileDef_HAS_Label
+#define SCHEMA_IfcCompositeProfileDef_Label_IS_OPTIONAL
+#define SCHEMA_HAS_IfcCompressor
+#define SCHEMA_IfcCompressor_HAS_PredefinedType
+#define SCHEMA_IfcCompressor_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcCompressorType
+#define SCHEMA_IfcCompressorType_HAS_PredefinedType
+#define SCHEMA_HAS_IfcCondenser
+#define SCHEMA_IfcCondenser_HAS_PredefinedType
+#define SCHEMA_IfcCondenser_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcCondenserType
+#define SCHEMA_IfcCondenserType_HAS_PredefinedType
+#define SCHEMA_HAS_IfcConic
+#define SCHEMA_IfcConic_HAS_Position
+#define SCHEMA_HAS_IfcConnectedFaceSet
+#define SCHEMA_IfcConnectedFaceSet_HAS_CfsFaces
+#define SCHEMA_HAS_IfcConnectionCurveGeometry
+#define SCHEMA_IfcConnectionCurveGeometry_HAS_CurveOnRelatingElement
+#define SCHEMA_IfcConnectionCurveGeometry_HAS_CurveOnRelatedElement
+#define SCHEMA_IfcConnectionCurveGeometry_CurveOnRelatedElement_IS_OPTIONAL
+#define SCHEMA_HAS_IfcConnectionGeometry
+#define SCHEMA_HAS_IfcConnectionPointEccentricity
+#define SCHEMA_IfcConnectionPointEccentricity_HAS_EccentricityInX
+#define SCHEMA_IfcConnectionPointEccentricity_EccentricityInX_IS_OPTIONAL
+#define SCHEMA_IfcConnectionPointEccentricity_HAS_EccentricityInY
+#define SCHEMA_IfcConnectionPointEccentricity_EccentricityInY_IS_OPTIONAL
+#define SCHEMA_IfcConnectionPointEccentricity_HAS_EccentricityInZ
+#define SCHEMA_IfcConnectionPointEccentricity_EccentricityInZ_IS_OPTIONAL
+#define SCHEMA_HAS_IfcConnectionPointGeometry
+#define SCHEMA_IfcConnectionPointGeometry_HAS_PointOnRelatingElement
+#define SCHEMA_IfcConnectionPointGeometry_HAS_PointOnRelatedElement
+#define SCHEMA_IfcConnectionPointGeometry_PointOnRelatedElement_IS_OPTIONAL
+#define SCHEMA_HAS_IfcConnectionSurfaceGeometry
+#define SCHEMA_IfcConnectionSurfaceGeometry_HAS_SurfaceOnRelatingElement
+#define SCHEMA_IfcConnectionSurfaceGeometry_HAS_SurfaceOnRelatedElement
+#define SCHEMA_IfcConnectionSurfaceGeometry_SurfaceOnRelatedElement_IS_OPTIONAL
+#define SCHEMA_HAS_IfcConnectionVolumeGeometry
+#define SCHEMA_IfcConnectionVolumeGeometry_HAS_VolumeOnRelatingElement
+#define SCHEMA_IfcConnectionVolumeGeometry_HAS_VolumeOnRelatedElement
+#define SCHEMA_IfcConnectionVolumeGeometry_VolumeOnRelatedElement_IS_OPTIONAL
+#define SCHEMA_HAS_IfcConstraint
+#define SCHEMA_IfcConstraint_HAS_Name
+#define SCHEMA_IfcConstraint_HAS_Description
+#define SCHEMA_IfcConstraint_Description_IS_OPTIONAL
+#define SCHEMA_IfcConstraint_HAS_ConstraintGrade
+#define SCHEMA_IfcConstraint_HAS_ConstraintSource
+#define SCHEMA_IfcConstraint_ConstraintSource_IS_OPTIONAL
+#define SCHEMA_IfcConstraint_HAS_CreatingActor
+#define SCHEMA_IfcConstraint_CreatingActor_IS_OPTIONAL
+#define SCHEMA_IfcConstraint_HAS_CreationTime
+#define SCHEMA_IfcConstraint_CreationTime_IS_OPTIONAL
+#define SCHEMA_IfcConstraint_HAS_UserDefinedGrade
+#define SCHEMA_IfcConstraint_UserDefinedGrade_IS_OPTIONAL
+#define SCHEMA_IfcConstraint_HAS_HasExternalReferences
+#define SCHEMA_IfcConstraint_HAS_PropertiesForConstraint
+#define SCHEMA_HAS_IfcConstructionEquipmentResource
+#define SCHEMA_IfcConstructionEquipmentResource_HAS_PredefinedType
+#define SCHEMA_IfcConstructionEquipmentResource_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcConstructionEquipmentResourceType
+#define SCHEMA_IfcConstructionEquipmentResourceType_HAS_PredefinedType
+#define SCHEMA_HAS_IfcConstructionMaterialResource
+#define SCHEMA_IfcConstructionMaterialResource_HAS_PredefinedType
+#define SCHEMA_IfcConstructionMaterialResource_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcConstructionMaterialResourceType
+#define SCHEMA_IfcConstructionMaterialResourceType_HAS_PredefinedType
+#define SCHEMA_HAS_IfcConstructionProductResource
+#define SCHEMA_IfcConstructionProductResource_HAS_PredefinedType
+#define SCHEMA_IfcConstructionProductResource_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcConstructionProductResourceType
+#define SCHEMA_IfcConstructionProductResourceType_HAS_PredefinedType
+#define SCHEMA_HAS_IfcConstructionResource
+#define SCHEMA_IfcConstructionResource_HAS_Usage
+#define SCHEMA_IfcConstructionResource_Usage_IS_OPTIONAL
+#define SCHEMA_IfcConstructionResource_HAS_BaseCosts
+#define SCHEMA_IfcConstructionResource_BaseCosts_IS_OPTIONAL
+#define SCHEMA_IfcConstructionResource_HAS_BaseQuantity
+#define SCHEMA_IfcConstructionResource_BaseQuantity_IS_OPTIONAL
+#define SCHEMA_HAS_IfcConstructionResourceType
+#define SCHEMA_IfcConstructionResourceType_HAS_BaseCosts
+#define SCHEMA_IfcConstructionResourceType_BaseCosts_IS_OPTIONAL
+#define SCHEMA_IfcConstructionResourceType_HAS_BaseQuantity
+#define SCHEMA_IfcConstructionResourceType_BaseQuantity_IS_OPTIONAL
+#define SCHEMA_HAS_IfcContext
+#define SCHEMA_IfcContext_HAS_ObjectType
+#define SCHEMA_IfcContext_ObjectType_IS_OPTIONAL
+#define SCHEMA_IfcContext_HAS_LongName
+#define SCHEMA_IfcContext_LongName_IS_OPTIONAL
+#define SCHEMA_IfcContext_HAS_Phase
+#define SCHEMA_IfcContext_Phase_IS_OPTIONAL
+#define SCHEMA_IfcContext_HAS_RepresentationContexts
+#define SCHEMA_IfcContext_RepresentationContexts_IS_OPTIONAL
+#define SCHEMA_IfcContext_HAS_UnitsInContext
+#define SCHEMA_IfcContext_UnitsInContext_IS_OPTIONAL
+#define SCHEMA_IfcContext_HAS_IsDefinedBy
+#define SCHEMA_IfcContext_HAS_Declares
+#define SCHEMA_HAS_IfcContextDependentUnit
+#define SCHEMA_IfcContextDependentUnit_HAS_Name
+#define SCHEMA_IfcContextDependentUnit_HAS_HasExternalReference
+#define SCHEMA_HAS_IfcControl
+#define SCHEMA_IfcControl_HAS_Identification
+#define SCHEMA_IfcControl_Identification_IS_OPTIONAL
+#define SCHEMA_IfcControl_HAS_Controls
+#define SCHEMA_HAS_IfcController
+#define SCHEMA_IfcController_HAS_PredefinedType
+#define SCHEMA_IfcController_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcControllerType
+#define SCHEMA_IfcControllerType_HAS_PredefinedType
+#define SCHEMA_HAS_IfcConversionBasedUnit
+#define SCHEMA_IfcConversionBasedUnit_HAS_Name
+#define SCHEMA_IfcConversionBasedUnit_HAS_ConversionFactor
+#define SCHEMA_IfcConversionBasedUnit_HAS_HasExternalReference
+#define SCHEMA_HAS_IfcConversionBasedUnitWithOffset
+#define SCHEMA_IfcConversionBasedUnitWithOffset_HAS_ConversionOffset
+#define SCHEMA_HAS_IfcConveyorSegment
+#define SCHEMA_IfcConveyorSegment_HAS_PredefinedType
+#define SCHEMA_IfcConveyorSegment_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcConveyorSegmentType
+#define SCHEMA_IfcConveyorSegmentType_HAS_PredefinedType
+#define SCHEMA_HAS_IfcCooledBeam
+#define SCHEMA_IfcCooledBeam_HAS_PredefinedType
+#define SCHEMA_IfcCooledBeam_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcCooledBeamType
+#define SCHEMA_IfcCooledBeamType_HAS_PredefinedType
+#define SCHEMA_HAS_IfcCoolingTower
+#define SCHEMA_IfcCoolingTower_HAS_PredefinedType
+#define SCHEMA_IfcCoolingTower_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcCoolingTowerType
+#define SCHEMA_IfcCoolingTowerType_HAS_PredefinedType
+#define SCHEMA_HAS_IfcCoordinateOperation
+#define SCHEMA_IfcCoordinateOperation_HAS_SourceCRS
+#define SCHEMA_IfcCoordinateOperation_HAS_TargetCRS
+#define SCHEMA_HAS_IfcCoordinateReferenceSystem
+#define SCHEMA_IfcCoordinateReferenceSystem_HAS_Name
+#define SCHEMA_IfcCoordinateReferenceSystem_HAS_Description
+#define SCHEMA_IfcCoordinateReferenceSystem_Description_IS_OPTIONAL
+#define SCHEMA_IfcCoordinateReferenceSystem_HAS_GeodeticDatum
+#define SCHEMA_IfcCoordinateReferenceSystem_GeodeticDatum_IS_OPTIONAL
+#define SCHEMA_IfcCoordinateReferenceSystem_HAS_VerticalDatum
+#define SCHEMA_IfcCoordinateReferenceSystem_VerticalDatum_IS_OPTIONAL
+#define SCHEMA_IfcCoordinateReferenceSystem_HAS_HasCoordinateOperation
+#define SCHEMA_HAS_IfcCosineSpiral
+#define SCHEMA_IfcCosineSpiral_HAS_CosineTerm
+#define SCHEMA_IfcCosineSpiral_HAS_ConstantTerm
+#define SCHEMA_IfcCosineSpiral_ConstantTerm_IS_OPTIONAL
+#define SCHEMA_HAS_IfcCostItem
+#define SCHEMA_IfcCostItem_HAS_PredefinedType
+#define SCHEMA_IfcCostItem_PredefinedType_IS_OPTIONAL
+#define SCHEMA_IfcCostItem_HAS_CostValues
+#define SCHEMA_IfcCostItem_CostValues_IS_OPTIONAL
+#define SCHEMA_IfcCostItem_HAS_CostQuantities
+#define SCHEMA_IfcCostItem_CostQuantities_IS_OPTIONAL
+#define SCHEMA_HAS_IfcCostSchedule
+#define SCHEMA_IfcCostSchedule_HAS_PredefinedType
+#define SCHEMA_IfcCostSchedule_PredefinedType_IS_OPTIONAL
+#define SCHEMA_IfcCostSchedule_HAS_Status
+#define SCHEMA_IfcCostSchedule_Status_IS_OPTIONAL
+#define SCHEMA_IfcCostSchedule_HAS_SubmittedOn
+#define SCHEMA_IfcCostSchedule_SubmittedOn_IS_OPTIONAL
+#define SCHEMA_IfcCostSchedule_HAS_UpdateDate
+#define SCHEMA_IfcCostSchedule_UpdateDate_IS_OPTIONAL
+#define SCHEMA_HAS_IfcCostValue
+#define SCHEMA_HAS_IfcCourse
+#define SCHEMA_IfcCourse_HAS_PredefinedType
+#define SCHEMA_IfcCourse_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcCourseType
+#define SCHEMA_IfcCourseType_HAS_PredefinedType
+#define SCHEMA_HAS_IfcCovering
+#define SCHEMA_IfcCovering_HAS_PredefinedType
+#define SCHEMA_IfcCovering_PredefinedType_IS_OPTIONAL
+#define SCHEMA_IfcCovering_HAS_CoversSpaces
+#define SCHEMA_IfcCovering_HAS_CoversElements
+#define SCHEMA_HAS_IfcCoveringType
+#define SCHEMA_IfcCoveringType_HAS_PredefinedType
+#define SCHEMA_HAS_IfcCrewResource
+#define SCHEMA_IfcCrewResource_HAS_PredefinedType
+#define SCHEMA_IfcCrewResource_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcCrewResourceType
+#define SCHEMA_IfcCrewResourceType_HAS_PredefinedType
+#define SCHEMA_HAS_IfcCsgPrimitive3D
+#define SCHEMA_IfcCsgPrimitive3D_HAS_Position
+#define SCHEMA_HAS_IfcCsgSolid
+#define SCHEMA_IfcCsgSolid_HAS_TreeRootExpression
+#define SCHEMA_HAS_IfcCurrencyRelationship
+#define SCHEMA_IfcCurrencyRelationship_HAS_RelatingMonetaryUnit
+#define SCHEMA_IfcCurrencyRelationship_HAS_RelatedMonetaryUnit
+#define SCHEMA_IfcCurrencyRelationship_HAS_ExchangeRate
+#define SCHEMA_IfcCurrencyRelationship_HAS_RateDateTime
+#define SCHEMA_IfcCurrencyRelationship_RateDateTime_IS_OPTIONAL
+#define SCHEMA_IfcCurrencyRelationship_HAS_RateSource
+#define SCHEMA_IfcCurrencyRelationship_RateSource_IS_OPTIONAL
+#define SCHEMA_HAS_IfcCurtainWall
+#define SCHEMA_IfcCurtainWall_HAS_PredefinedType
+#define SCHEMA_IfcCurtainWall_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcCurtainWallType
+#define SCHEMA_IfcCurtainWallType_HAS_PredefinedType
+#define SCHEMA_HAS_IfcCurve
+#define SCHEMA_HAS_IfcCurveBoundedPlane
+#define SCHEMA_IfcCurveBoundedPlane_HAS_BasisSurface
+#define SCHEMA_IfcCurveBoundedPlane_HAS_OuterBoundary
+#define SCHEMA_IfcCurveBoundedPlane_HAS_InnerBoundaries
+#define SCHEMA_HAS_IfcCurveBoundedSurface
+#define SCHEMA_IfcCurveBoundedSurface_HAS_BasisSurface
+#define SCHEMA_IfcCurveBoundedSurface_HAS_Boundaries
+#define SCHEMA_IfcCurveBoundedSurface_HAS_ImplicitOuter
+#define SCHEMA_HAS_IfcCurveSegment
+#define SCHEMA_IfcCurveSegment_HAS_Placement
+#define SCHEMA_IfcCurveSegment_HAS_SegmentStart
+#define SCHEMA_IfcCurveSegment_HAS_SegmentLength
+#define SCHEMA_IfcCurveSegment_HAS_ParentCurve
+#define SCHEMA_HAS_IfcCurveStyle
+#define SCHEMA_IfcCurveStyle_HAS_CurveFont
+#define SCHEMA_IfcCurveStyle_CurveFont_IS_OPTIONAL
+#define SCHEMA_IfcCurveStyle_HAS_CurveWidth
+#define SCHEMA_IfcCurveStyle_CurveWidth_IS_OPTIONAL
+#define SCHEMA_IfcCurveStyle_HAS_CurveColour
+#define SCHEMA_IfcCurveStyle_CurveColour_IS_OPTIONAL
+#define SCHEMA_IfcCurveStyle_HAS_ModelOrDraughting
+#define SCHEMA_IfcCurveStyle_ModelOrDraughting_IS_OPTIONAL
+#define SCHEMA_HAS_IfcCurveStyleFont
+#define SCHEMA_IfcCurveStyleFont_HAS_Name
+#define SCHEMA_IfcCurveStyleFont_Name_IS_OPTIONAL
+#define SCHEMA_IfcCurveStyleFont_HAS_PatternList
+#define SCHEMA_HAS_IfcCurveStyleFontAndScaling
+#define SCHEMA_IfcCurveStyleFontAndScaling_HAS_Name
+#define SCHEMA_IfcCurveStyleFontAndScaling_Name_IS_OPTIONAL
+#define SCHEMA_IfcCurveStyleFontAndScaling_HAS_CurveStyleFont
+#define SCHEMA_IfcCurveStyleFontAndScaling_HAS_CurveFontScaling
+#define SCHEMA_HAS_IfcCurveStyleFontPattern
+#define SCHEMA_IfcCurveStyleFontPattern_HAS_VisibleSegmentLength
+#define SCHEMA_IfcCurveStyleFontPattern_HAS_InvisibleSegmentLength
+#define SCHEMA_HAS_IfcCylindricalSurface
+#define SCHEMA_IfcCylindricalSurface_HAS_Radius
+#define SCHEMA_HAS_IfcDamper
+#define SCHEMA_IfcDamper_HAS_PredefinedType
+#define SCHEMA_IfcDamper_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcDamperType
+#define SCHEMA_IfcDamperType_HAS_PredefinedType
+#define SCHEMA_HAS_IfcDeepFoundation
+#define SCHEMA_HAS_IfcDeepFoundationType
+#define SCHEMA_HAS_IfcDerivedProfileDef
+#define SCHEMA_IfcDerivedProfileDef_HAS_ParentProfile
+#define SCHEMA_IfcDerivedProfileDef_HAS_Operator
+#define SCHEMA_IfcDerivedProfileDef_HAS_Label
+#define SCHEMA_IfcDerivedProfileDef_Label_IS_OPTIONAL
+#define SCHEMA_HAS_IfcDerivedUnit
+#define SCHEMA_IfcDerivedUnit_HAS_Elements
+#define SCHEMA_IfcDerivedUnit_HAS_UnitType
+#define SCHEMA_IfcDerivedUnit_HAS_UserDefinedType
+#define SCHEMA_IfcDerivedUnit_UserDefinedType_IS_OPTIONAL
+#define SCHEMA_IfcDerivedUnit_HAS_Name
+#define SCHEMA_IfcDerivedUnit_Name_IS_OPTIONAL
+#define SCHEMA_HAS_IfcDerivedUnitElement
+#define SCHEMA_IfcDerivedUnitElement_HAS_Unit
+#define SCHEMA_IfcDerivedUnitElement_HAS_Exponent
+#define SCHEMA_HAS_IfcDimensionalExponents
+#define SCHEMA_IfcDimensionalExponents_HAS_LengthExponent
+#define SCHEMA_IfcDimensionalExponents_HAS_MassExponent
+#define SCHEMA_IfcDimensionalExponents_HAS_TimeExponent
+#define SCHEMA_IfcDimensionalExponents_HAS_ElectricCurrentExponent
+#define SCHEMA_IfcDimensionalExponents_HAS_ThermodynamicTemperatureExponent
+#define SCHEMA_IfcDimensionalExponents_HAS_AmountOfSubstanceExponent
+#define SCHEMA_IfcDimensionalExponents_HAS_LuminousIntensityExponent
+#define SCHEMA_HAS_IfcDirection
+#define SCHEMA_IfcDirection_HAS_DirectionRatios
+#define SCHEMA_HAS_IfcDirectrixCurveSweptAreaSolid
+#define SCHEMA_IfcDirectrixCurveSweptAreaSolid_HAS_Directrix
+#define SCHEMA_IfcDirectrixCurveSweptAreaSolid_HAS_StartParam
+#define SCHEMA_IfcDirectrixCurveSweptAreaSolid_StartParam_IS_OPTIONAL
+#define SCHEMA_IfcDirectrixCurveSweptAreaSolid_HAS_EndParam
+#define SCHEMA_IfcDirectrixCurveSweptAreaSolid_EndParam_IS_OPTIONAL
+#define SCHEMA_HAS_IfcDirectrixDerivedReferenceSweptAreaSolid
+#define SCHEMA_HAS_IfcDiscreteAccessory
+#define SCHEMA_IfcDiscreteAccessory_HAS_PredefinedType
+#define SCHEMA_IfcDiscreteAccessory_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcDiscreteAccessoryType
+#define SCHEMA_IfcDiscreteAccessoryType_HAS_PredefinedType
+#define SCHEMA_HAS_IfcDistributionBoard
+#define SCHEMA_IfcDistributionBoard_HAS_PredefinedType
+#define SCHEMA_IfcDistributionBoard_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcDistributionBoardType
+#define SCHEMA_IfcDistributionBoardType_HAS_PredefinedType
+#define SCHEMA_HAS_IfcDistributionChamberElement
+#define SCHEMA_IfcDistributionChamberElement_HAS_PredefinedType
+#define SCHEMA_IfcDistributionChamberElement_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcDistributionChamberElementType
+#define SCHEMA_IfcDistributionChamberElementType_HAS_PredefinedType
+#define SCHEMA_HAS_IfcDistributionCircuit
+#define SCHEMA_HAS_IfcDistributionControlElement
+#define SCHEMA_IfcDistributionControlElement_HAS_AssignedToFlowElement
+#define SCHEMA_HAS_IfcDistributionControlElementType
+#define SCHEMA_HAS_IfcDistributionElement
+#define SCHEMA_IfcDistributionElement_HAS_HasPorts
+#define SCHEMA_HAS_IfcDistributionElementType
+#define SCHEMA_HAS_IfcDistributionFlowElement
+#define SCHEMA_IfcDistributionFlowElement_HAS_HasControlElements
+#define SCHEMA_HAS_IfcDistributionFlowElementType
+#define SCHEMA_HAS_IfcDistributionPort
+#define SCHEMA_IfcDistributionPort_HAS_FlowDirection
+#define SCHEMA_IfcDistributionPort_FlowDirection_IS_OPTIONAL
+#define SCHEMA_IfcDistributionPort_HAS_PredefinedType
+#define SCHEMA_IfcDistributionPort_PredefinedType_IS_OPTIONAL
+#define SCHEMA_IfcDistributionPort_HAS_SystemType
+#define SCHEMA_IfcDistributionPort_SystemType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcDistributionSystem
+#define SCHEMA_IfcDistributionSystem_HAS_LongName
+#define SCHEMA_IfcDistributionSystem_LongName_IS_OPTIONAL
+#define SCHEMA_IfcDistributionSystem_HAS_PredefinedType
+#define SCHEMA_IfcDistributionSystem_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcDocumentInformation
+#define SCHEMA_IfcDocumentInformation_HAS_Identification
+#define SCHEMA_IfcDocumentInformation_HAS_Name
+#define SCHEMA_IfcDocumentInformation_HAS_Description
+#define SCHEMA_IfcDocumentInformation_Description_IS_OPTIONAL
+#define SCHEMA_IfcDocumentInformation_HAS_Location
+#define SCHEMA_IfcDocumentInformation_Location_IS_OPTIONAL
+#define SCHEMA_IfcDocumentInformation_HAS_Purpose
+#define SCHEMA_IfcDocumentInformation_Purpose_IS_OPTIONAL
+#define SCHEMA_IfcDocumentInformation_HAS_IntendedUse
+#define SCHEMA_IfcDocumentInformation_IntendedUse_IS_OPTIONAL
+#define SCHEMA_IfcDocumentInformation_HAS_Scope
+#define SCHEMA_IfcDocumentInformation_Scope_IS_OPTIONAL
+#define SCHEMA_IfcDocumentInformation_HAS_Revision
+#define SCHEMA_IfcDocumentInformation_Revision_IS_OPTIONAL
+#define SCHEMA_IfcDocumentInformation_HAS_DocumentOwner
+#define SCHEMA_IfcDocumentInformation_DocumentOwner_IS_OPTIONAL
+#define SCHEMA_IfcDocumentInformation_HAS_Editors
+#define SCHEMA_IfcDocumentInformation_Editors_IS_OPTIONAL
+#define SCHEMA_IfcDocumentInformation_HAS_CreationTime
+#define SCHEMA_IfcDocumentInformation_CreationTime_IS_OPTIONAL
+#define SCHEMA_IfcDocumentInformation_HAS_LastRevisionTime
+#define SCHEMA_IfcDocumentInformation_LastRevisionTime_IS_OPTIONAL
+#define SCHEMA_IfcDocumentInformation_HAS_ElectronicFormat
+#define SCHEMA_IfcDocumentInformation_ElectronicFormat_IS_OPTIONAL
+#define SCHEMA_IfcDocumentInformation_HAS_ValidFrom
+#define SCHEMA_IfcDocumentInformation_ValidFrom_IS_OPTIONAL
+#define SCHEMA_IfcDocumentInformation_HAS_ValidUntil
+#define SCHEMA_IfcDocumentInformation_ValidUntil_IS_OPTIONAL
+#define SCHEMA_IfcDocumentInformation_HAS_Confidentiality
+#define SCHEMA_IfcDocumentInformation_Confidentiality_IS_OPTIONAL
+#define SCHEMA_IfcDocumentInformation_HAS_Status
+#define SCHEMA_IfcDocumentInformation_Status_IS_OPTIONAL
+#define SCHEMA_IfcDocumentInformation_HAS_DocumentInfoForObjects
+#define SCHEMA_IfcDocumentInformation_HAS_HasDocumentReferences
+#define SCHEMA_IfcDocumentInformation_HAS_IsPointedTo
+#define SCHEMA_IfcDocumentInformation_HAS_IsPointer
+#define SCHEMA_HAS_IfcDocumentInformationRelationship
+#define SCHEMA_IfcDocumentInformationRelationship_HAS_RelatingDocument
+#define SCHEMA_IfcDocumentInformationRelationship_HAS_RelatedDocuments
+#define SCHEMA_IfcDocumentInformationRelationship_HAS_RelationshipType
+#define SCHEMA_IfcDocumentInformationRelationship_RelationshipType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcDocumentReference
+#define SCHEMA_IfcDocumentReference_HAS_Description
+#define SCHEMA_IfcDocumentReference_Description_IS_OPTIONAL
+#define SCHEMA_IfcDocumentReference_HAS_ReferencedDocument
+#define SCHEMA_IfcDocumentReference_ReferencedDocument_IS_OPTIONAL
+#define SCHEMA_IfcDocumentReference_HAS_DocumentRefForObjects
+#define SCHEMA_HAS_IfcDoor
+#define SCHEMA_IfcDoor_HAS_OverallHeight
+#define SCHEMA_IfcDoor_OverallHeight_IS_OPTIONAL
+#define SCHEMA_IfcDoor_HAS_OverallWidth
+#define SCHEMA_IfcDoor_OverallWidth_IS_OPTIONAL
+#define SCHEMA_IfcDoor_HAS_PredefinedType
+#define SCHEMA_IfcDoor_PredefinedType_IS_OPTIONAL
+#define SCHEMA_IfcDoor_HAS_OperationType
+#define SCHEMA_IfcDoor_OperationType_IS_OPTIONAL
+#define SCHEMA_IfcDoor_HAS_UserDefinedOperationType
+#define SCHEMA_IfcDoor_UserDefinedOperationType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcDoorLiningProperties
+#define SCHEMA_IfcDoorLiningProperties_HAS_LiningDepth
+#define SCHEMA_IfcDoorLiningProperties_LiningDepth_IS_OPTIONAL
+#define SCHEMA_IfcDoorLiningProperties_HAS_LiningThickness
+#define SCHEMA_IfcDoorLiningProperties_LiningThickness_IS_OPTIONAL
+#define SCHEMA_IfcDoorLiningProperties_HAS_ThresholdDepth
+#define SCHEMA_IfcDoorLiningProperties_ThresholdDepth_IS_OPTIONAL
+#define SCHEMA_IfcDoorLiningProperties_HAS_ThresholdThickness
+#define SCHEMA_IfcDoorLiningProperties_ThresholdThickness_IS_OPTIONAL
+#define SCHEMA_IfcDoorLiningProperties_HAS_TransomThickness
+#define SCHEMA_IfcDoorLiningProperties_TransomThickness_IS_OPTIONAL
+#define SCHEMA_IfcDoorLiningProperties_HAS_TransomOffset
+#define SCHEMA_IfcDoorLiningProperties_TransomOffset_IS_OPTIONAL
+#define SCHEMA_IfcDoorLiningProperties_HAS_LiningOffset
+#define SCHEMA_IfcDoorLiningProperties_LiningOffset_IS_OPTIONAL
+#define SCHEMA_IfcDoorLiningProperties_HAS_ThresholdOffset
+#define SCHEMA_IfcDoorLiningProperties_ThresholdOffset_IS_OPTIONAL
+#define SCHEMA_IfcDoorLiningProperties_HAS_CasingThickness
+#define SCHEMA_IfcDoorLiningProperties_CasingThickness_IS_OPTIONAL
+#define SCHEMA_IfcDoorLiningProperties_HAS_CasingDepth
+#define SCHEMA_IfcDoorLiningProperties_CasingDepth_IS_OPTIONAL
+#define SCHEMA_IfcDoorLiningProperties_HAS_ShapeAspectStyle
+#define SCHEMA_IfcDoorLiningProperties_ShapeAspectStyle_IS_OPTIONAL
+#define SCHEMA_IfcDoorLiningProperties_HAS_LiningToPanelOffsetX
+#define SCHEMA_IfcDoorLiningProperties_LiningToPanelOffsetX_IS_OPTIONAL
+#define SCHEMA_IfcDoorLiningProperties_HAS_LiningToPanelOffsetY
+#define SCHEMA_IfcDoorLiningProperties_LiningToPanelOffsetY_IS_OPTIONAL
+#define SCHEMA_HAS_IfcDoorPanelProperties
+#define SCHEMA_IfcDoorPanelProperties_HAS_PanelDepth
+#define SCHEMA_IfcDoorPanelProperties_PanelDepth_IS_OPTIONAL
+#define SCHEMA_IfcDoorPanelProperties_HAS_PanelOperation
+#define SCHEMA_IfcDoorPanelProperties_HAS_PanelWidth
+#define SCHEMA_IfcDoorPanelProperties_PanelWidth_IS_OPTIONAL
+#define SCHEMA_IfcDoorPanelProperties_HAS_PanelPosition
+#define SCHEMA_IfcDoorPanelProperties_HAS_ShapeAspectStyle
+#define SCHEMA_IfcDoorPanelProperties_ShapeAspectStyle_IS_OPTIONAL
+#define SCHEMA_HAS_IfcDoorType
+#define SCHEMA_IfcDoorType_HAS_PredefinedType
+#define SCHEMA_IfcDoorType_HAS_OperationType
+#define SCHEMA_IfcDoorType_HAS_ParameterTakesPrecedence
+#define SCHEMA_IfcDoorType_ParameterTakesPrecedence_IS_OPTIONAL
+#define SCHEMA_IfcDoorType_HAS_UserDefinedOperationType
+#define SCHEMA_IfcDoorType_UserDefinedOperationType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcDraughtingPreDefinedColour
+#define SCHEMA_HAS_IfcDraughtingPreDefinedCurveFont
+#define SCHEMA_HAS_IfcDuctFitting
+#define SCHEMA_IfcDuctFitting_HAS_PredefinedType
+#define SCHEMA_IfcDuctFitting_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcDuctFittingType
+#define SCHEMA_IfcDuctFittingType_HAS_PredefinedType
+#define SCHEMA_HAS_IfcDuctSegment
+#define SCHEMA_IfcDuctSegment_HAS_PredefinedType
+#define SCHEMA_IfcDuctSegment_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcDuctSegmentType
+#define SCHEMA_IfcDuctSegmentType_HAS_PredefinedType
+#define SCHEMA_HAS_IfcDuctSilencer
+#define SCHEMA_IfcDuctSilencer_HAS_PredefinedType
+#define SCHEMA_IfcDuctSilencer_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcDuctSilencerType
+#define SCHEMA_IfcDuctSilencerType_HAS_PredefinedType
+#define SCHEMA_HAS_IfcEarthworksCut
+#define SCHEMA_IfcEarthworksCut_HAS_PredefinedType
+#define SCHEMA_IfcEarthworksCut_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcEarthworksElement
+#define SCHEMA_HAS_IfcEarthworksFill
+#define SCHEMA_IfcEarthworksFill_HAS_PredefinedType
+#define SCHEMA_IfcEarthworksFill_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcEdge
+#define SCHEMA_IfcEdge_HAS_EdgeStart
+#define SCHEMA_IfcEdge_HAS_EdgeEnd
+#define SCHEMA_HAS_IfcEdgeCurve
+#define SCHEMA_IfcEdgeCurve_HAS_EdgeGeometry
+#define SCHEMA_IfcEdgeCurve_HAS_SameSense
+#define SCHEMA_HAS_IfcEdgeLoop
+#define SCHEMA_IfcEdgeLoop_HAS_EdgeList
+#define SCHEMA_HAS_IfcElectricAppliance
+#define SCHEMA_IfcElectricAppliance_HAS_PredefinedType
+#define SCHEMA_IfcElectricAppliance_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcElectricApplianceType
+#define SCHEMA_IfcElectricApplianceType_HAS_PredefinedType
+#define SCHEMA_HAS_IfcElectricDistributionBoard
+#define SCHEMA_IfcElectricDistributionBoard_HAS_PredefinedType
+#define SCHEMA_IfcElectricDistributionBoard_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcElectricDistributionBoardType
+#define SCHEMA_IfcElectricDistributionBoardType_HAS_PredefinedType
+#define SCHEMA_HAS_IfcElectricFlowStorageDevice
+#define SCHEMA_IfcElectricFlowStorageDevice_HAS_PredefinedType
+#define SCHEMA_IfcElectricFlowStorageDevice_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcElectricFlowStorageDeviceType
+#define SCHEMA_IfcElectricFlowStorageDeviceType_HAS_PredefinedType
+#define SCHEMA_HAS_IfcElectricFlowTreatmentDevice
+#define SCHEMA_IfcElectricFlowTreatmentDevice_HAS_PredefinedType
+#define SCHEMA_IfcElectricFlowTreatmentDevice_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcElectricFlowTreatmentDeviceType
+#define SCHEMA_IfcElectricFlowTreatmentDeviceType_HAS_PredefinedType
+#define SCHEMA_HAS_IfcElectricGenerator
+#define SCHEMA_IfcElectricGenerator_HAS_PredefinedType
+#define SCHEMA_IfcElectricGenerator_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcElectricGeneratorType
+#define SCHEMA_IfcElectricGeneratorType_HAS_PredefinedType
+#define SCHEMA_HAS_IfcElectricMotor
+#define SCHEMA_IfcElectricMotor_HAS_PredefinedType
+#define SCHEMA_IfcElectricMotor_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcElectricMotorType
+#define SCHEMA_IfcElectricMotorType_HAS_PredefinedType
+#define SCHEMA_HAS_IfcElectricTimeControl
+#define SCHEMA_IfcElectricTimeControl_HAS_PredefinedType
+#define SCHEMA_IfcElectricTimeControl_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcElectricTimeControlType
+#define SCHEMA_IfcElectricTimeControlType_HAS_PredefinedType
+#define SCHEMA_HAS_IfcElement
+#define SCHEMA_IfcElement_HAS_Tag
+#define SCHEMA_IfcElement_Tag_IS_OPTIONAL
+#define SCHEMA_IfcElement_HAS_FillsVoids
+#define SCHEMA_IfcElement_HAS_ConnectedTo
+#define SCHEMA_IfcElement_HAS_IsInterferedByElements
+#define SCHEMA_IfcElement_HAS_InterferesElements
+#define SCHEMA_IfcElement_HAS_HasProjections
+#define SCHEMA_IfcElement_HAS_HasOpenings
+#define SCHEMA_IfcElement_HAS_IsConnectionRealization
+#define SCHEMA_IfcElement_HAS_ProvidesBoundaries
+#define SCHEMA_IfcElement_HAS_ConnectedFrom
+#define SCHEMA_IfcElement_HAS_ContainedInStructure
+#define SCHEMA_IfcElement_HAS_HasCoverings
+#define SCHEMA_IfcElement_HAS_HasSurfaceFeatures
+#define SCHEMA_HAS_IfcElementAssembly
+#define SCHEMA_IfcElementAssembly_HAS_AssemblyPlace
+#define SCHEMA_IfcElementAssembly_AssemblyPlace_IS_OPTIONAL
+#define SCHEMA_IfcElementAssembly_HAS_PredefinedType
+#define SCHEMA_IfcElementAssembly_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcElementAssemblyType
+#define SCHEMA_IfcElementAssemblyType_HAS_PredefinedType
+#define SCHEMA_HAS_IfcElementComponent
+#define SCHEMA_HAS_IfcElementComponentType
+#define SCHEMA_HAS_IfcElementQuantity
+#define SCHEMA_IfcElementQuantity_HAS_MethodOfMeasurement
+#define SCHEMA_IfcElementQuantity_MethodOfMeasurement_IS_OPTIONAL
+#define SCHEMA_IfcElementQuantity_HAS_Quantities
+#define SCHEMA_HAS_IfcElementType
+#define SCHEMA_IfcElementType_HAS_ElementType
+#define SCHEMA_IfcElementType_ElementType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcElementarySurface
+#define SCHEMA_IfcElementarySurface_HAS_Position
+#define SCHEMA_HAS_IfcEllipse
+#define SCHEMA_IfcEllipse_HAS_SemiAxis1
+#define SCHEMA_IfcEllipse_HAS_SemiAxis2
+#define SCHEMA_HAS_IfcEllipseProfileDef
+#define SCHEMA_IfcEllipseProfileDef_HAS_SemiAxis1
+#define SCHEMA_IfcEllipseProfileDef_HAS_SemiAxis2
+#define SCHEMA_HAS_IfcEnergyConversionDevice
+#define SCHEMA_HAS_IfcEnergyConversionDeviceType
+#define SCHEMA_HAS_IfcEngine
+#define SCHEMA_IfcEngine_HAS_PredefinedType
+#define SCHEMA_IfcEngine_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcEngineType
+#define SCHEMA_IfcEngineType_HAS_PredefinedType
+#define SCHEMA_HAS_IfcEvaporativeCooler
+#define SCHEMA_IfcEvaporativeCooler_HAS_PredefinedType
+#define SCHEMA_IfcEvaporativeCooler_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcEvaporativeCoolerType
+#define SCHEMA_IfcEvaporativeCoolerType_HAS_PredefinedType
+#define SCHEMA_HAS_IfcEvaporator
+#define SCHEMA_IfcEvaporator_HAS_PredefinedType
+#define SCHEMA_IfcEvaporator_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcEvaporatorType
+#define SCHEMA_IfcEvaporatorType_HAS_PredefinedType
+#define SCHEMA_HAS_IfcEvent
+#define SCHEMA_IfcEvent_HAS_PredefinedType
+#define SCHEMA_IfcEvent_PredefinedType_IS_OPTIONAL
+#define SCHEMA_IfcEvent_HAS_EventTriggerType
+#define SCHEMA_IfcEvent_EventTriggerType_IS_OPTIONAL
+#define SCHEMA_IfcEvent_HAS_UserDefinedEventTriggerType
+#define SCHEMA_IfcEvent_UserDefinedEventTriggerType_IS_OPTIONAL
+#define SCHEMA_IfcEvent_HAS_EventOccurenceTime
+#define SCHEMA_IfcEvent_EventOccurenceTime_IS_OPTIONAL
+#define SCHEMA_HAS_IfcEventTime
+#define SCHEMA_IfcEventTime_HAS_ActualDate
+#define SCHEMA_IfcEventTime_ActualDate_IS_OPTIONAL
+#define SCHEMA_IfcEventTime_HAS_EarlyDate
+#define SCHEMA_IfcEventTime_EarlyDate_IS_OPTIONAL
+#define SCHEMA_IfcEventTime_HAS_LateDate
+#define SCHEMA_IfcEventTime_LateDate_IS_OPTIONAL
+#define SCHEMA_IfcEventTime_HAS_ScheduleDate
+#define SCHEMA_IfcEventTime_ScheduleDate_IS_OPTIONAL
+#define SCHEMA_HAS_IfcEventType
+#define SCHEMA_IfcEventType_HAS_PredefinedType
+#define SCHEMA_IfcEventType_HAS_EventTriggerType
+#define SCHEMA_IfcEventType_HAS_UserDefinedEventTriggerType
+#define SCHEMA_IfcEventType_UserDefinedEventTriggerType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcExtendedProperties
+#define SCHEMA_IfcExtendedProperties_HAS_Name
+#define SCHEMA_IfcExtendedProperties_Name_IS_OPTIONAL
+#define SCHEMA_IfcExtendedProperties_HAS_Description
+#define SCHEMA_IfcExtendedProperties_Description_IS_OPTIONAL
+#define SCHEMA_IfcExtendedProperties_HAS_Properties
+#define SCHEMA_HAS_IfcExternalInformation
+#define SCHEMA_HAS_IfcExternalReference
+#define SCHEMA_IfcExternalReference_HAS_Location
+#define SCHEMA_IfcExternalReference_Location_IS_OPTIONAL
+#define SCHEMA_IfcExternalReference_HAS_Identification
+#define SCHEMA_IfcExternalReference_Identification_IS_OPTIONAL
+#define SCHEMA_IfcExternalReference_HAS_Name
+#define SCHEMA_IfcExternalReference_Name_IS_OPTIONAL
+#define SCHEMA_IfcExternalReference_HAS_ExternalReferenceForResources
+#define SCHEMA_HAS_IfcExternalReferenceRelationship
+#define SCHEMA_IfcExternalReferenceRelationship_HAS_RelatingReference
+#define SCHEMA_IfcExternalReferenceRelationship_HAS_RelatedResourceObjects
+#define SCHEMA_HAS_IfcExternalSpatialElement
+#define SCHEMA_IfcExternalSpatialElement_HAS_PredefinedType
+#define SCHEMA_IfcExternalSpatialElement_PredefinedType_IS_OPTIONAL
+#define SCHEMA_IfcExternalSpatialElement_HAS_BoundedBy
+#define SCHEMA_HAS_IfcExternalSpatialStructureElement
+#define SCHEMA_HAS_IfcExternallyDefinedHatchStyle
+#define SCHEMA_HAS_IfcExternallyDefinedSurfaceStyle
+#define SCHEMA_HAS_IfcExternallyDefinedTextFont
+#define SCHEMA_HAS_IfcExtrudedAreaSolid
+#define SCHEMA_IfcExtrudedAreaSolid_HAS_ExtrudedDirection
+#define SCHEMA_IfcExtrudedAreaSolid_HAS_Depth
+#define SCHEMA_HAS_IfcExtrudedAreaSolidTapered
+#define SCHEMA_IfcExtrudedAreaSolidTapered_HAS_EndSweptArea
+#define SCHEMA_HAS_IfcFace
+#define SCHEMA_IfcFace_HAS_Bounds
+#define SCHEMA_IfcFace_HAS_HasTextureMaps
+#define SCHEMA_HAS_IfcFaceBasedSurfaceModel
+#define SCHEMA_IfcFaceBasedSurfaceModel_HAS_FbsmFaces
+#define SCHEMA_HAS_IfcFaceBound
+#define SCHEMA_IfcFaceBound_HAS_Bound
+#define SCHEMA_IfcFaceBound_HAS_Orientation
+#define SCHEMA_HAS_IfcFaceOuterBound
+#define SCHEMA_HAS_IfcFaceSurface
+#define SCHEMA_IfcFaceSurface_HAS_FaceSurface
+#define SCHEMA_IfcFaceSurface_HAS_SameSense
+#define SCHEMA_HAS_IfcFacetedBrep
+#define SCHEMA_HAS_IfcFacetedBrepWithVoids
+#define SCHEMA_IfcFacetedBrepWithVoids_HAS_Voids
+#define SCHEMA_HAS_IfcFacility
+#define SCHEMA_HAS_IfcFacilityPart
+#define SCHEMA_IfcFacilityPart_HAS_UsageType
+#define SCHEMA_HAS_IfcFacilityPartCommon
+#define SCHEMA_IfcFacilityPartCommon_HAS_PredefinedType
+#define SCHEMA_IfcFacilityPartCommon_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcFailureConnectionCondition
+#define SCHEMA_IfcFailureConnectionCondition_HAS_TensionFailureX
+#define SCHEMA_IfcFailureConnectionCondition_TensionFailureX_IS_OPTIONAL
+#define SCHEMA_IfcFailureConnectionCondition_HAS_TensionFailureY
+#define SCHEMA_IfcFailureConnectionCondition_TensionFailureY_IS_OPTIONAL
+#define SCHEMA_IfcFailureConnectionCondition_HAS_TensionFailureZ
+#define SCHEMA_IfcFailureConnectionCondition_TensionFailureZ_IS_OPTIONAL
+#define SCHEMA_IfcFailureConnectionCondition_HAS_CompressionFailureX
+#define SCHEMA_IfcFailureConnectionCondition_CompressionFailureX_IS_OPTIONAL
+#define SCHEMA_IfcFailureConnectionCondition_HAS_CompressionFailureY
+#define SCHEMA_IfcFailureConnectionCondition_CompressionFailureY_IS_OPTIONAL
+#define SCHEMA_IfcFailureConnectionCondition_HAS_CompressionFailureZ
+#define SCHEMA_IfcFailureConnectionCondition_CompressionFailureZ_IS_OPTIONAL
+#define SCHEMA_HAS_IfcFan
+#define SCHEMA_IfcFan_HAS_PredefinedType
+#define SCHEMA_IfcFan_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcFanType
+#define SCHEMA_IfcFanType_HAS_PredefinedType
+#define SCHEMA_HAS_IfcFastener
+#define SCHEMA_IfcFastener_HAS_PredefinedType
+#define SCHEMA_IfcFastener_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcFastenerType
+#define SCHEMA_IfcFastenerType_HAS_PredefinedType
+#define SCHEMA_HAS_IfcFeatureElement
+#define SCHEMA_HAS_IfcFeatureElementAddition
+#define SCHEMA_IfcFeatureElementAddition_HAS_ProjectsElements
+#define SCHEMA_HAS_IfcFeatureElementSubtraction
+#define SCHEMA_IfcFeatureElementSubtraction_HAS_VoidsElements
+#define SCHEMA_HAS_IfcFillAreaStyle
+#define SCHEMA_IfcFillAreaStyle_HAS_FillStyles
+#define SCHEMA_IfcFillAreaStyle_HAS_ModelOrDraughting
+#define SCHEMA_IfcFillAreaStyle_ModelOrDraughting_IS_OPTIONAL
+#define SCHEMA_HAS_IfcFillAreaStyleHatching
+#define SCHEMA_IfcFillAreaStyleHatching_HAS_HatchLineAppearance
+#define SCHEMA_IfcFillAreaStyleHatching_HAS_StartOfNextHatchLine
+#define SCHEMA_IfcFillAreaStyleHatching_HAS_PointOfReferenceHatchLine
+#define SCHEMA_IfcFillAreaStyleHatching_PointOfReferenceHatchLine_IS_OPTIONAL
+#define SCHEMA_IfcFillAreaStyleHatching_HAS_PatternStart
+#define SCHEMA_IfcFillAreaStyleHatching_PatternStart_IS_OPTIONAL
+#define SCHEMA_IfcFillAreaStyleHatching_HAS_HatchLineAngle
+#define SCHEMA_HAS_IfcFillAreaStyleTiles
+#define SCHEMA_IfcFillAreaStyleTiles_HAS_TilingPattern
+#define SCHEMA_IfcFillAreaStyleTiles_HAS_Tiles
+#define SCHEMA_IfcFillAreaStyleTiles_HAS_TilingScale
+#define SCHEMA_HAS_IfcFilter
+#define SCHEMA_IfcFilter_HAS_PredefinedType
+#define SCHEMA_IfcFilter_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcFilterType
+#define SCHEMA_IfcFilterType_HAS_PredefinedType
+#define SCHEMA_HAS_IfcFireSuppressionTerminal
+#define SCHEMA_IfcFireSuppressionTerminal_HAS_PredefinedType
+#define SCHEMA_IfcFireSuppressionTerminal_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcFireSuppressionTerminalType
+#define SCHEMA_IfcFireSuppressionTerminalType_HAS_PredefinedType
+#define SCHEMA_HAS_IfcFixedReferenceSweptAreaSolid
+#define SCHEMA_IfcFixedReferenceSweptAreaSolid_HAS_FixedReference
+#define SCHEMA_HAS_IfcFlowController
+#define SCHEMA_HAS_IfcFlowControllerType
+#define SCHEMA_HAS_IfcFlowFitting
+#define SCHEMA_HAS_IfcFlowFittingType
+#define SCHEMA_HAS_IfcFlowInstrument
+#define SCHEMA_IfcFlowInstrument_HAS_PredefinedType
+#define SCHEMA_IfcFlowInstrument_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcFlowInstrumentType
+#define SCHEMA_IfcFlowInstrumentType_HAS_PredefinedType
+#define SCHEMA_HAS_IfcFlowMeter
+#define SCHEMA_IfcFlowMeter_HAS_PredefinedType
+#define SCHEMA_IfcFlowMeter_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcFlowMeterType
+#define SCHEMA_IfcFlowMeterType_HAS_PredefinedType
+#define SCHEMA_HAS_IfcFlowMovingDevice
+#define SCHEMA_HAS_IfcFlowMovingDeviceType
+#define SCHEMA_HAS_IfcFlowSegment
+#define SCHEMA_HAS_IfcFlowSegmentType
+#define SCHEMA_HAS_IfcFlowStorageDevice
+#define SCHEMA_HAS_IfcFlowStorageDeviceType
+#define SCHEMA_HAS_IfcFlowTerminal
+#define SCHEMA_HAS_IfcFlowTerminalType
+#define SCHEMA_HAS_IfcFlowTreatmentDevice
+#define SCHEMA_HAS_IfcFlowTreatmentDeviceType
+#define SCHEMA_HAS_IfcFooting
+#define SCHEMA_IfcFooting_HAS_PredefinedType
+#define SCHEMA_IfcFooting_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcFootingType
+#define SCHEMA_IfcFootingType_HAS_PredefinedType
+#define SCHEMA_HAS_IfcFurnishingElement
+#define SCHEMA_HAS_IfcFurnishingElementType
+#define SCHEMA_HAS_IfcFurniture
+#define SCHEMA_IfcFurniture_HAS_PredefinedType
+#define SCHEMA_IfcFurniture_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcFurnitureType
+#define SCHEMA_IfcFurnitureType_HAS_AssemblyPlace
+#define SCHEMA_IfcFurnitureType_HAS_PredefinedType
+#define SCHEMA_IfcFurnitureType_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcGeographicElement
+#define SCHEMA_IfcGeographicElement_HAS_PredefinedType
+#define SCHEMA_IfcGeographicElement_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcGeographicElementType
+#define SCHEMA_IfcGeographicElementType_HAS_PredefinedType
+#define SCHEMA_HAS_IfcGeometricCurveSet
+#define SCHEMA_HAS_IfcGeometricRepresentationContext
+#define SCHEMA_IfcGeometricRepresentationContext_HAS_CoordinateSpaceDimension
+#define SCHEMA_IfcGeometricRepresentationContext_HAS_Precision
+#define SCHEMA_IfcGeometricRepresentationContext_Precision_IS_OPTIONAL
+#define SCHEMA_IfcGeometricRepresentationContext_HAS_WorldCoordinateSystem
+#define SCHEMA_IfcGeometricRepresentationContext_HAS_TrueNorth
+#define SCHEMA_IfcGeometricRepresentationContext_TrueNorth_IS_OPTIONAL
+#define SCHEMA_IfcGeometricRepresentationContext_HAS_HasSubContexts
+#define SCHEMA_IfcGeometricRepresentationContext_HAS_HasCoordinateOperation
+#define SCHEMA_HAS_IfcGeometricRepresentationItem
+#define SCHEMA_HAS_IfcGeometricRepresentationSubContext
+#define SCHEMA_IfcGeometricRepresentationSubContext_HAS_ParentContext
+#define SCHEMA_IfcGeometricRepresentationSubContext_HAS_TargetScale
+#define SCHEMA_IfcGeometricRepresentationSubContext_TargetScale_IS_OPTIONAL
+#define SCHEMA_IfcGeometricRepresentationSubContext_HAS_TargetView
+#define SCHEMA_IfcGeometricRepresentationSubContext_HAS_UserDefinedTargetView
+#define SCHEMA_IfcGeometricRepresentationSubContext_UserDefinedTargetView_IS_OPTIONAL
+#define SCHEMA_HAS_IfcGeometricSet
+#define SCHEMA_IfcGeometricSet_HAS_Elements
+#define SCHEMA_HAS_IfcGeomodel
+#define SCHEMA_HAS_IfcGeoslice
+#define SCHEMA_HAS_IfcGeotechnicalAssembly
+#define SCHEMA_HAS_IfcGeotechnicalElement
+#define SCHEMA_HAS_IfcGeotechnicalStratum
+#define SCHEMA_IfcGeotechnicalStratum_HAS_PredefinedType
+#define SCHEMA_IfcGeotechnicalStratum_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcGradientCurve
+#define SCHEMA_IfcGradientCurve_HAS_BaseCurve
+#define SCHEMA_IfcGradientCurve_HAS_EndPoint
+#define SCHEMA_IfcGradientCurve_EndPoint_IS_OPTIONAL
+#define SCHEMA_HAS_IfcGrid
+#define SCHEMA_IfcGrid_HAS_UAxes
+#define SCHEMA_IfcGrid_HAS_VAxes
+#define SCHEMA_IfcGrid_HAS_WAxes
+#define SCHEMA_IfcGrid_WAxes_IS_OPTIONAL
+#define SCHEMA_IfcGrid_HAS_PredefinedType
+#define SCHEMA_IfcGrid_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcGridAxis
+#define SCHEMA_IfcGridAxis_HAS_AxisTag
+#define SCHEMA_IfcGridAxis_AxisTag_IS_OPTIONAL
+#define SCHEMA_IfcGridAxis_HAS_AxisCurve
+#define SCHEMA_IfcGridAxis_HAS_SameSense
+#define SCHEMA_IfcGridAxis_HAS_PartOfW
+#define SCHEMA_IfcGridAxis_HAS_PartOfV
+#define SCHEMA_IfcGridAxis_HAS_PartOfU
+#define SCHEMA_IfcGridAxis_HAS_HasIntersections
+#define SCHEMA_HAS_IfcGridPlacement
+#define SCHEMA_IfcGridPlacement_HAS_PlacementLocation
+#define SCHEMA_IfcGridPlacement_HAS_PlacementRefDirection
+#define SCHEMA_IfcGridPlacement_PlacementRefDirection_IS_OPTIONAL
+#define SCHEMA_HAS_IfcGroup
+#define SCHEMA_IfcGroup_HAS_IsGroupedBy
+#define SCHEMA_IfcGroup_HAS_ReferencedInStructures
+#define SCHEMA_HAS_IfcHalfSpaceSolid
+#define SCHEMA_IfcHalfSpaceSolid_HAS_BaseSurface
+#define SCHEMA_IfcHalfSpaceSolid_HAS_AgreementFlag
+#define SCHEMA_HAS_IfcHeatExchanger
+#define SCHEMA_IfcHeatExchanger_HAS_PredefinedType
+#define SCHEMA_IfcHeatExchanger_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcHeatExchangerType
+#define SCHEMA_IfcHeatExchangerType_HAS_PredefinedType
+#define SCHEMA_HAS_IfcHumidifier
+#define SCHEMA_IfcHumidifier_HAS_PredefinedType
+#define SCHEMA_IfcHumidifier_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcHumidifierType
+#define SCHEMA_IfcHumidifierType_HAS_PredefinedType
+#define SCHEMA_HAS_IfcIShapeProfileDef
+#define SCHEMA_IfcIShapeProfileDef_HAS_OverallWidth
+#define SCHEMA_IfcIShapeProfileDef_HAS_OverallDepth
+#define SCHEMA_IfcIShapeProfileDef_HAS_WebThickness
+#define SCHEMA_IfcIShapeProfileDef_HAS_FlangeThickness
+#define SCHEMA_IfcIShapeProfileDef_HAS_FilletRadius
+#define SCHEMA_IfcIShapeProfileDef_FilletRadius_IS_OPTIONAL
+#define SCHEMA_IfcIShapeProfileDef_HAS_FlangeEdgeRadius
+#define SCHEMA_IfcIShapeProfileDef_FlangeEdgeRadius_IS_OPTIONAL
+#define SCHEMA_IfcIShapeProfileDef_HAS_FlangeSlope
+#define SCHEMA_IfcIShapeProfileDef_FlangeSlope_IS_OPTIONAL
+#define SCHEMA_HAS_IfcImageTexture
+#define SCHEMA_IfcImageTexture_HAS_URLReference
+#define SCHEMA_HAS_IfcImpactProtectionDevice
+#define SCHEMA_IfcImpactProtectionDevice_HAS_PredefinedType
+#define SCHEMA_IfcImpactProtectionDevice_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcImpactProtectionDeviceType
+#define SCHEMA_IfcImpactProtectionDeviceType_HAS_PredefinedType
+#define SCHEMA_HAS_IfcIndexedColourMap
+#define SCHEMA_IfcIndexedColourMap_HAS_MappedTo
+#define SCHEMA_IfcIndexedColourMap_HAS_Opacity
+#define SCHEMA_IfcIndexedColourMap_Opacity_IS_OPTIONAL
+#define SCHEMA_IfcIndexedColourMap_HAS_Colours
+#define SCHEMA_IfcIndexedColourMap_HAS_ColourIndex
+#define SCHEMA_HAS_IfcIndexedPolyCurve
+#define SCHEMA_IfcIndexedPolyCurve_HAS_Points
+#define SCHEMA_IfcIndexedPolyCurve_HAS_Segments
+#define SCHEMA_IfcIndexedPolyCurve_Segments_IS_OPTIONAL
+#define SCHEMA_IfcIndexedPolyCurve_HAS_SelfIntersect
+#define SCHEMA_HAS_IfcIndexedPolygonalFace
+#define SCHEMA_IfcIndexedPolygonalFace_HAS_CoordIndex
+#define SCHEMA_IfcIndexedPolygonalFace_HAS_ToFaceSet
+#define SCHEMA_IfcIndexedPolygonalFace_HAS_HasTexCoords
+#define SCHEMA_HAS_IfcIndexedPolygonalFaceWithVoids
+#define SCHEMA_IfcIndexedPolygonalFaceWithVoids_HAS_InnerCoordIndices
+#define SCHEMA_HAS_IfcIndexedPolygonalTextureMap
+#define SCHEMA_IfcIndexedPolygonalTextureMap_HAS_TexCoordIndices
+#define SCHEMA_HAS_IfcIndexedTextureMap
+#define SCHEMA_IfcIndexedTextureMap_HAS_MappedTo
+#define SCHEMA_IfcIndexedTextureMap_HAS_TexCoords
+#define SCHEMA_HAS_IfcIndexedTriangleTextureMap
+#define SCHEMA_IfcIndexedTriangleTextureMap_HAS_TexCoordIndex
+#define SCHEMA_IfcIndexedTriangleTextureMap_TexCoordIndex_IS_OPTIONAL
+#define SCHEMA_HAS_IfcInterceptor
+#define SCHEMA_IfcInterceptor_HAS_PredefinedType
+#define SCHEMA_IfcInterceptor_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcInterceptorType
+#define SCHEMA_IfcInterceptorType_HAS_PredefinedType
+#define SCHEMA_HAS_IfcIntersectionCurve
+#define SCHEMA_HAS_IfcInventory
+#define SCHEMA_IfcInventory_HAS_PredefinedType
+#define SCHEMA_IfcInventory_PredefinedType_IS_OPTIONAL
+#define SCHEMA_IfcInventory_HAS_Jurisdiction
+#define SCHEMA_IfcInventory_Jurisdiction_IS_OPTIONAL
+#define SCHEMA_IfcInventory_HAS_ResponsiblePersons
+#define SCHEMA_IfcInventory_ResponsiblePersons_IS_OPTIONAL
+#define SCHEMA_IfcInventory_HAS_LastUpdateDate
+#define SCHEMA_IfcInventory_LastUpdateDate_IS_OPTIONAL
+#define SCHEMA_IfcInventory_HAS_CurrentValue
+#define SCHEMA_IfcInventory_CurrentValue_IS_OPTIONAL
+#define SCHEMA_IfcInventory_HAS_OriginalValue
+#define SCHEMA_IfcInventory_OriginalValue_IS_OPTIONAL
+#define SCHEMA_HAS_IfcIrregularTimeSeries
+#define SCHEMA_IfcIrregularTimeSeries_HAS_Values
+#define SCHEMA_HAS_IfcIrregularTimeSeriesValue
+#define SCHEMA_IfcIrregularTimeSeriesValue_HAS_TimeStamp
+#define SCHEMA_IfcIrregularTimeSeriesValue_HAS_ListValues
+#define SCHEMA_HAS_IfcJunctionBox
+#define SCHEMA_IfcJunctionBox_HAS_PredefinedType
+#define SCHEMA_IfcJunctionBox_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcJunctionBoxType
+#define SCHEMA_IfcJunctionBoxType_HAS_PredefinedType
+#define SCHEMA_HAS_IfcKerb
+#define SCHEMA_IfcKerb_HAS_Mountable
+#define SCHEMA_HAS_IfcKerbType
+#define SCHEMA_IfcKerbType_HAS_Mountable
+#define SCHEMA_HAS_IfcLShapeProfileDef
+#define SCHEMA_IfcLShapeProfileDef_HAS_Depth
+#define SCHEMA_IfcLShapeProfileDef_HAS_Width
+#define SCHEMA_IfcLShapeProfileDef_Width_IS_OPTIONAL
+#define SCHEMA_IfcLShapeProfileDef_HAS_Thickness
+#define SCHEMA_IfcLShapeProfileDef_HAS_FilletRadius
+#define SCHEMA_IfcLShapeProfileDef_FilletRadius_IS_OPTIONAL
+#define SCHEMA_IfcLShapeProfileDef_HAS_EdgeRadius
+#define SCHEMA_IfcLShapeProfileDef_EdgeRadius_IS_OPTIONAL
+#define SCHEMA_IfcLShapeProfileDef_HAS_LegSlope
+#define SCHEMA_IfcLShapeProfileDef_LegSlope_IS_OPTIONAL
+#define SCHEMA_HAS_IfcLaborResource
+#define SCHEMA_IfcLaborResource_HAS_PredefinedType
+#define SCHEMA_IfcLaborResource_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcLaborResourceType
+#define SCHEMA_IfcLaborResourceType_HAS_PredefinedType
+#define SCHEMA_HAS_IfcLagTime
+#define SCHEMA_IfcLagTime_HAS_LagValue
+#define SCHEMA_IfcLagTime_HAS_DurationType
+#define SCHEMA_HAS_IfcLamp
+#define SCHEMA_IfcLamp_HAS_PredefinedType
+#define SCHEMA_IfcLamp_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcLampType
+#define SCHEMA_IfcLampType_HAS_PredefinedType
+#define SCHEMA_HAS_IfcLibraryInformation
+#define SCHEMA_IfcLibraryInformation_HAS_Name
+#define SCHEMA_IfcLibraryInformation_HAS_Version
+#define SCHEMA_IfcLibraryInformation_Version_IS_OPTIONAL
+#define SCHEMA_IfcLibraryInformation_HAS_Publisher
+#define SCHEMA_IfcLibraryInformation_Publisher_IS_OPTIONAL
+#define SCHEMA_IfcLibraryInformation_HAS_VersionDate
+#define SCHEMA_IfcLibraryInformation_VersionDate_IS_OPTIONAL
+#define SCHEMA_IfcLibraryInformation_HAS_Location
+#define SCHEMA_IfcLibraryInformation_Location_IS_OPTIONAL
+#define SCHEMA_IfcLibraryInformation_HAS_Description
+#define SCHEMA_IfcLibraryInformation_Description_IS_OPTIONAL
+#define SCHEMA_IfcLibraryInformation_HAS_LibraryInfoForObjects
+#define SCHEMA_IfcLibraryInformation_HAS_HasLibraryReferences
+#define SCHEMA_HAS_IfcLibraryReference
+#define SCHEMA_IfcLibraryReference_HAS_Description
+#define SCHEMA_IfcLibraryReference_Description_IS_OPTIONAL
+#define SCHEMA_IfcLibraryReference_HAS_Language
+#define SCHEMA_IfcLibraryReference_Language_IS_OPTIONAL
+#define SCHEMA_IfcLibraryReference_HAS_ReferencedLibrary
+#define SCHEMA_IfcLibraryReference_ReferencedLibrary_IS_OPTIONAL
+#define SCHEMA_IfcLibraryReference_HAS_LibraryRefForObjects
+#define SCHEMA_HAS_IfcLightDistributionData
+#define SCHEMA_IfcLightDistributionData_HAS_MainPlaneAngle
+#define SCHEMA_IfcLightDistributionData_HAS_SecondaryPlaneAngle
+#define SCHEMA_IfcLightDistributionData_HAS_LuminousIntensity
+#define SCHEMA_HAS_IfcLightFixture
+#define SCHEMA_IfcLightFixture_HAS_PredefinedType
+#define SCHEMA_IfcLightFixture_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcLightFixtureType
+#define SCHEMA_IfcLightFixtureType_HAS_PredefinedType
+#define SCHEMA_HAS_IfcLightIntensityDistribution
+#define SCHEMA_IfcLightIntensityDistribution_HAS_LightDistributionCurve
+#define SCHEMA_IfcLightIntensityDistribution_HAS_DistributionData
+#define SCHEMA_HAS_IfcLightSource
+#define SCHEMA_IfcLightSource_HAS_Name
+#define SCHEMA_IfcLightSource_Name_IS_OPTIONAL
+#define SCHEMA_IfcLightSource_HAS_LightColour
+#define SCHEMA_IfcLightSource_HAS_AmbientIntensity
+#define SCHEMA_IfcLightSource_AmbientIntensity_IS_OPTIONAL
+#define SCHEMA_IfcLightSource_HAS_Intensity
+#define SCHEMA_IfcLightSource_Intensity_IS_OPTIONAL
+#define SCHEMA_HAS_IfcLightSourceAmbient
+#define SCHEMA_HAS_IfcLightSourceDirectional
+#define SCHEMA_IfcLightSourceDirectional_HAS_Orientation
+#define SCHEMA_HAS_IfcLightSourceGoniometric
+#define SCHEMA_IfcLightSourceGoniometric_HAS_Position
+#define SCHEMA_IfcLightSourceGoniometric_HAS_ColourAppearance
+#define SCHEMA_IfcLightSourceGoniometric_ColourAppearance_IS_OPTIONAL
+#define SCHEMA_IfcLightSourceGoniometric_HAS_ColourTemperature
+#define SCHEMA_IfcLightSourceGoniometric_HAS_LuminousFlux
+#define SCHEMA_IfcLightSourceGoniometric_HAS_LightEmissionSource
+#define SCHEMA_IfcLightSourceGoniometric_HAS_LightDistributionDataSource
+#define SCHEMA_HAS_IfcLightSourcePositional
+#define SCHEMA_IfcLightSourcePositional_HAS_Position
+#define SCHEMA_IfcLightSourcePositional_HAS_Radius
+#define SCHEMA_IfcLightSourcePositional_HAS_ConstantAttenuation
+#define SCHEMA_IfcLightSourcePositional_HAS_DistanceAttenuation
+#define SCHEMA_IfcLightSourcePositional_HAS_QuadricAttenuation
+#define SCHEMA_HAS_IfcLightSourceSpot
+#define SCHEMA_IfcLightSourceSpot_HAS_Orientation
+#define SCHEMA_IfcLightSourceSpot_HAS_ConcentrationExponent
+#define SCHEMA_IfcLightSourceSpot_ConcentrationExponent_IS_OPTIONAL
+#define SCHEMA_IfcLightSourceSpot_HAS_SpreadAngle
+#define SCHEMA_IfcLightSourceSpot_HAS_BeamWidthAngle
+#define SCHEMA_HAS_IfcLine
+#define SCHEMA_IfcLine_HAS_Pnt
+#define SCHEMA_IfcLine_HAS_Dir
+#define SCHEMA_HAS_IfcLinearElement
+#define SCHEMA_HAS_IfcLinearPlacement
+#define SCHEMA_IfcLinearPlacement_HAS_RelativePlacement
+#define SCHEMA_IfcLinearPlacement_HAS_CartesianPosition
+#define SCHEMA_IfcLinearPlacement_CartesianPosition_IS_OPTIONAL
+#define SCHEMA_HAS_IfcLinearPositioningElement
+#define SCHEMA_HAS_IfcLiquidTerminal
+#define SCHEMA_IfcLiquidTerminal_HAS_PredefinedType
+#define SCHEMA_IfcLiquidTerminal_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcLiquidTerminalType
+#define SCHEMA_IfcLiquidTerminalType_HAS_PredefinedType
+#define SCHEMA_HAS_IfcLocalPlacement
+#define SCHEMA_IfcLocalPlacement_HAS_RelativePlacement
+#define SCHEMA_HAS_IfcLoop
+#define SCHEMA_HAS_IfcManifoldSolidBrep
+#define SCHEMA_IfcManifoldSolidBrep_HAS_Outer
+#define SCHEMA_HAS_IfcMapConversion
+#define SCHEMA_IfcMapConversion_HAS_Eastings
+#define SCHEMA_IfcMapConversion_HAS_Northings
+#define SCHEMA_IfcMapConversion_HAS_OrthogonalHeight
+#define SCHEMA_IfcMapConversion_HAS_XAxisAbscissa
+#define SCHEMA_IfcMapConversion_XAxisAbscissa_IS_OPTIONAL
+#define SCHEMA_IfcMapConversion_HAS_XAxisOrdinate
+#define SCHEMA_IfcMapConversion_XAxisOrdinate_IS_OPTIONAL
+#define SCHEMA_IfcMapConversion_HAS_Scale
+#define SCHEMA_IfcMapConversion_Scale_IS_OPTIONAL
+#define SCHEMA_IfcMapConversion_HAS_ScaleY
+#define SCHEMA_IfcMapConversion_ScaleY_IS_OPTIONAL
+#define SCHEMA_IfcMapConversion_HAS_ScaleZ
+#define SCHEMA_IfcMapConversion_ScaleZ_IS_OPTIONAL
+#define SCHEMA_HAS_IfcMappedItem
+#define SCHEMA_IfcMappedItem_HAS_MappingSource
+#define SCHEMA_IfcMappedItem_HAS_MappingTarget
+#define SCHEMA_HAS_IfcMarineFacility
+#define SCHEMA_IfcMarineFacility_HAS_PredefinedType
+#define SCHEMA_IfcMarineFacility_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcMarinePart
+#define SCHEMA_IfcMarinePart_HAS_PredefinedType
+#define SCHEMA_IfcMarinePart_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcMaterial
+#define SCHEMA_IfcMaterial_HAS_Name
+#define SCHEMA_IfcMaterial_HAS_Description
+#define SCHEMA_IfcMaterial_Description_IS_OPTIONAL
+#define SCHEMA_IfcMaterial_HAS_Category
+#define SCHEMA_IfcMaterial_Category_IS_OPTIONAL
+#define SCHEMA_IfcMaterial_HAS_HasRepresentation
+#define SCHEMA_IfcMaterial_HAS_IsRelatedWith
+#define SCHEMA_IfcMaterial_HAS_RelatesTo
+#define SCHEMA_HAS_IfcMaterialClassificationRelationship
+#define SCHEMA_IfcMaterialClassificationRelationship_HAS_MaterialClassifications
+#define SCHEMA_IfcMaterialClassificationRelationship_HAS_ClassifiedMaterial
+#define SCHEMA_HAS_IfcMaterialConstituent
+#define SCHEMA_IfcMaterialConstituent_HAS_Name
+#define SCHEMA_IfcMaterialConstituent_Name_IS_OPTIONAL
+#define SCHEMA_IfcMaterialConstituent_HAS_Description
+#define SCHEMA_IfcMaterialConstituent_Description_IS_OPTIONAL
+#define SCHEMA_IfcMaterialConstituent_HAS_Material
+#define SCHEMA_IfcMaterialConstituent_HAS_Fraction
+#define SCHEMA_IfcMaterialConstituent_Fraction_IS_OPTIONAL
+#define SCHEMA_IfcMaterialConstituent_HAS_Category
+#define SCHEMA_IfcMaterialConstituent_Category_IS_OPTIONAL
+#define SCHEMA_IfcMaterialConstituent_HAS_ToMaterialConstituentSet
+#define SCHEMA_HAS_IfcMaterialConstituentSet
+#define SCHEMA_IfcMaterialConstituentSet_HAS_Name
+#define SCHEMA_IfcMaterialConstituentSet_Name_IS_OPTIONAL
+#define SCHEMA_IfcMaterialConstituentSet_HAS_Description
+#define SCHEMA_IfcMaterialConstituentSet_Description_IS_OPTIONAL
+#define SCHEMA_IfcMaterialConstituentSet_HAS_MaterialConstituents
+#define SCHEMA_IfcMaterialConstituentSet_MaterialConstituents_IS_OPTIONAL
+#define SCHEMA_HAS_IfcMaterialDefinition
+#define SCHEMA_IfcMaterialDefinition_HAS_AssociatedTo
+#define SCHEMA_IfcMaterialDefinition_HAS_HasExternalReferences
+#define SCHEMA_IfcMaterialDefinition_HAS_HasProperties
+#define SCHEMA_HAS_IfcMaterialDefinitionRepresentation
+#define SCHEMA_IfcMaterialDefinitionRepresentation_HAS_RepresentedMaterial
+#define SCHEMA_HAS_IfcMaterialLayer
+#define SCHEMA_IfcMaterialLayer_HAS_Material
+#define SCHEMA_IfcMaterialLayer_Material_IS_OPTIONAL
+#define SCHEMA_IfcMaterialLayer_HAS_LayerThickness
+#define SCHEMA_IfcMaterialLayer_HAS_IsVentilated
+#define SCHEMA_IfcMaterialLayer_IsVentilated_IS_OPTIONAL
+#define SCHEMA_IfcMaterialLayer_HAS_Name
+#define SCHEMA_IfcMaterialLayer_Name_IS_OPTIONAL
+#define SCHEMA_IfcMaterialLayer_HAS_Description
+#define SCHEMA_IfcMaterialLayer_Description_IS_OPTIONAL
+#define SCHEMA_IfcMaterialLayer_HAS_Category
+#define SCHEMA_IfcMaterialLayer_Category_IS_OPTIONAL
+#define SCHEMA_IfcMaterialLayer_HAS_Priority
+#define SCHEMA_IfcMaterialLayer_Priority_IS_OPTIONAL
+#define SCHEMA_IfcMaterialLayer_HAS_ToMaterialLayerSet
+#define SCHEMA_HAS_IfcMaterialLayerSet
+#define SCHEMA_IfcMaterialLayerSet_HAS_MaterialLayers
+#define SCHEMA_IfcMaterialLayerSet_HAS_LayerSetName
+#define SCHEMA_IfcMaterialLayerSet_LayerSetName_IS_OPTIONAL
+#define SCHEMA_IfcMaterialLayerSet_HAS_Description
+#define SCHEMA_IfcMaterialLayerSet_Description_IS_OPTIONAL
+#define SCHEMA_HAS_IfcMaterialLayerSetUsage
+#define SCHEMA_IfcMaterialLayerSetUsage_HAS_ForLayerSet
+#define SCHEMA_IfcMaterialLayerSetUsage_HAS_LayerSetDirection
+#define SCHEMA_IfcMaterialLayerSetUsage_HAS_DirectionSense
+#define SCHEMA_IfcMaterialLayerSetUsage_HAS_OffsetFromReferenceLine
+#define SCHEMA_IfcMaterialLayerSetUsage_HAS_ReferenceExtent
+#define SCHEMA_IfcMaterialLayerSetUsage_ReferenceExtent_IS_OPTIONAL
+#define SCHEMA_HAS_IfcMaterialLayerWithOffsets
+#define SCHEMA_IfcMaterialLayerWithOffsets_HAS_OffsetDirection
+#define SCHEMA_IfcMaterialLayerWithOffsets_HAS_OffsetValues
+#define SCHEMA_HAS_IfcMaterialList
+#define SCHEMA_IfcMaterialList_HAS_Materials
+#define SCHEMA_HAS_IfcMaterialProfile
+#define SCHEMA_IfcMaterialProfile_HAS_Name
+#define SCHEMA_IfcMaterialProfile_Name_IS_OPTIONAL
+#define SCHEMA_IfcMaterialProfile_HAS_Description
+#define SCHEMA_IfcMaterialProfile_Description_IS_OPTIONAL
+#define SCHEMA_IfcMaterialProfile_HAS_Material
+#define SCHEMA_IfcMaterialProfile_Material_IS_OPTIONAL
+#define SCHEMA_IfcMaterialProfile_HAS_Profile
+#define SCHEMA_IfcMaterialProfile_HAS_Priority
+#define SCHEMA_IfcMaterialProfile_Priority_IS_OPTIONAL
+#define SCHEMA_IfcMaterialProfile_HAS_Category
+#define SCHEMA_IfcMaterialProfile_Category_IS_OPTIONAL
+#define SCHEMA_IfcMaterialProfile_HAS_ToMaterialProfileSet
+#define SCHEMA_HAS_IfcMaterialProfileSet
+#define SCHEMA_IfcMaterialProfileSet_HAS_Name
+#define SCHEMA_IfcMaterialProfileSet_Name_IS_OPTIONAL
+#define SCHEMA_IfcMaterialProfileSet_HAS_Description
+#define SCHEMA_IfcMaterialProfileSet_Description_IS_OPTIONAL
+#define SCHEMA_IfcMaterialProfileSet_HAS_MaterialProfiles
+#define SCHEMA_IfcMaterialProfileSet_HAS_CompositeProfile
+#define SCHEMA_IfcMaterialProfileSet_CompositeProfile_IS_OPTIONAL
+#define SCHEMA_HAS_IfcMaterialProfileSetUsage
+#define SCHEMA_IfcMaterialProfileSetUsage_HAS_ForProfileSet
+#define SCHEMA_IfcMaterialProfileSetUsage_HAS_CardinalPoint
+#define SCHEMA_IfcMaterialProfileSetUsage_CardinalPoint_IS_OPTIONAL
+#define SCHEMA_IfcMaterialProfileSetUsage_HAS_ReferenceExtent
+#define SCHEMA_IfcMaterialProfileSetUsage_ReferenceExtent_IS_OPTIONAL
+#define SCHEMA_HAS_IfcMaterialProfileSetUsageTapering
+#define SCHEMA_IfcMaterialProfileSetUsageTapering_HAS_ForProfileEndSet
+#define SCHEMA_IfcMaterialProfileSetUsageTapering_HAS_CardinalEndPoint
+#define SCHEMA_IfcMaterialProfileSetUsageTapering_CardinalEndPoint_IS_OPTIONAL
+#define SCHEMA_HAS_IfcMaterialProfileWithOffsets
+#define SCHEMA_IfcMaterialProfileWithOffsets_HAS_OffsetValues
+#define SCHEMA_HAS_IfcMaterialProperties
+#define SCHEMA_IfcMaterialProperties_HAS_Material
+#define SCHEMA_HAS_IfcMaterialRelationship
+#define SCHEMA_IfcMaterialRelationship_HAS_RelatingMaterial
+#define SCHEMA_IfcMaterialRelationship_HAS_RelatedMaterials
+#define SCHEMA_IfcMaterialRelationship_HAS_MaterialExpression
+#define SCHEMA_IfcMaterialRelationship_MaterialExpression_IS_OPTIONAL
+#define SCHEMA_HAS_IfcMaterialUsageDefinition
+#define SCHEMA_IfcMaterialUsageDefinition_HAS_AssociatedTo
+#define SCHEMA_HAS_IfcMeasureWithUnit
+#define SCHEMA_IfcMeasureWithUnit_HAS_ValueComponent
+#define SCHEMA_IfcMeasureWithUnit_HAS_UnitComponent
+#define SCHEMA_HAS_IfcMechanicalFastener
+#define SCHEMA_IfcMechanicalFastener_HAS_NominalDiameter
+#define SCHEMA_IfcMechanicalFastener_NominalDiameter_IS_OPTIONAL
+#define SCHEMA_IfcMechanicalFastener_HAS_NominalLength
+#define SCHEMA_IfcMechanicalFastener_NominalLength_IS_OPTIONAL
+#define SCHEMA_IfcMechanicalFastener_HAS_PredefinedType
+#define SCHEMA_IfcMechanicalFastener_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcMechanicalFastenerType
+#define SCHEMA_IfcMechanicalFastenerType_HAS_PredefinedType
+#define SCHEMA_IfcMechanicalFastenerType_HAS_NominalDiameter
+#define SCHEMA_IfcMechanicalFastenerType_NominalDiameter_IS_OPTIONAL
+#define SCHEMA_IfcMechanicalFastenerType_HAS_NominalLength
+#define SCHEMA_IfcMechanicalFastenerType_NominalLength_IS_OPTIONAL
+#define SCHEMA_HAS_IfcMedicalDevice
+#define SCHEMA_IfcMedicalDevice_HAS_PredefinedType
+#define SCHEMA_IfcMedicalDevice_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcMedicalDeviceType
+#define SCHEMA_IfcMedicalDeviceType_HAS_PredefinedType
+#define SCHEMA_HAS_IfcMember
+#define SCHEMA_IfcMember_HAS_PredefinedType
+#define SCHEMA_IfcMember_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcMemberType
+#define SCHEMA_IfcMemberType_HAS_PredefinedType
+#define SCHEMA_HAS_IfcMetric
+#define SCHEMA_IfcMetric_HAS_Benchmark
+#define SCHEMA_IfcMetric_HAS_ValueSource
+#define SCHEMA_IfcMetric_ValueSource_IS_OPTIONAL
+#define SCHEMA_IfcMetric_HAS_DataValue
+#define SCHEMA_IfcMetric_DataValue_IS_OPTIONAL
+#define SCHEMA_IfcMetric_HAS_ReferencePath
+#define SCHEMA_IfcMetric_ReferencePath_IS_OPTIONAL
+#define SCHEMA_HAS_IfcMirroredProfileDef
+#define SCHEMA_HAS_IfcMobileTelecommunicationsAppliance
+#define SCHEMA_IfcMobileTelecommunicationsAppliance_HAS_PredefinedType
+#define SCHEMA_IfcMobileTelecommunicationsAppliance_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcMobileTelecommunicationsApplianceType
+#define SCHEMA_IfcMobileTelecommunicationsApplianceType_HAS_PredefinedType
+#define SCHEMA_HAS_IfcMonetaryUnit
+#define SCHEMA_IfcMonetaryUnit_HAS_Currency
+#define SCHEMA_HAS_IfcMooringDevice
+#define SCHEMA_IfcMooringDevice_HAS_PredefinedType
+#define SCHEMA_IfcMooringDevice_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcMooringDeviceType
+#define SCHEMA_IfcMooringDeviceType_HAS_PredefinedType
+#define SCHEMA_HAS_IfcMotorConnection
+#define SCHEMA_IfcMotorConnection_HAS_PredefinedType
+#define SCHEMA_IfcMotorConnection_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcMotorConnectionType
+#define SCHEMA_IfcMotorConnectionType_HAS_PredefinedType
+#define SCHEMA_HAS_IfcNamedUnit
+#define SCHEMA_IfcNamedUnit_HAS_Dimensions
+#define SCHEMA_IfcNamedUnit_HAS_UnitType
+#define SCHEMA_HAS_IfcNavigationElement
+#define SCHEMA_IfcNavigationElement_HAS_PredefinedType
+#define SCHEMA_IfcNavigationElement_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcNavigationElementType
+#define SCHEMA_IfcNavigationElementType_HAS_PredefinedType
+#define SCHEMA_HAS_IfcObject
+#define SCHEMA_IfcObject_HAS_ObjectType
+#define SCHEMA_IfcObject_ObjectType_IS_OPTIONAL
+#define SCHEMA_IfcObject_HAS_IsDeclaredBy
+#define SCHEMA_IfcObject_HAS_Declares
+#define SCHEMA_IfcObject_HAS_IsTypedBy
+#define SCHEMA_IfcObject_HAS_IsDefinedBy
+#define SCHEMA_HAS_IfcObjectDefinition
+#define SCHEMA_IfcObjectDefinition_HAS_HasAssignments
+#define SCHEMA_IfcObjectDefinition_HAS_Nests
+#define SCHEMA_IfcObjectDefinition_HAS_IsNestedBy
+#define SCHEMA_IfcObjectDefinition_HAS_HasContext
+#define SCHEMA_IfcObjectDefinition_HAS_IsDecomposedBy
+#define SCHEMA_IfcObjectDefinition_HAS_Decomposes
+#define SCHEMA_IfcObjectDefinition_HAS_HasAssociations
+#define SCHEMA_HAS_IfcObjectPlacement
+#define SCHEMA_IfcObjectPlacement_HAS_PlacementRelTo
+#define SCHEMA_IfcObjectPlacement_PlacementRelTo_IS_OPTIONAL
+#define SCHEMA_IfcObjectPlacement_HAS_PlacesObject
+#define SCHEMA_IfcObjectPlacement_HAS_ReferencedByPlacements
+#define SCHEMA_HAS_IfcObjective
+#define SCHEMA_IfcObjective_HAS_BenchmarkValues
+#define SCHEMA_IfcObjective_BenchmarkValues_IS_OPTIONAL
+#define SCHEMA_IfcObjective_HAS_LogicalAggregator
+#define SCHEMA_IfcObjective_LogicalAggregator_IS_OPTIONAL
+#define SCHEMA_IfcObjective_HAS_ObjectiveQualifier
+#define SCHEMA_IfcObjective_HAS_UserDefinedQualifier
+#define SCHEMA_IfcObjective_UserDefinedQualifier_IS_OPTIONAL
+#define SCHEMA_HAS_IfcOccupant
+#define SCHEMA_IfcOccupant_HAS_PredefinedType
+#define SCHEMA_IfcOccupant_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcOffsetCurve
+#define SCHEMA_IfcOffsetCurve_HAS_BasisCurve
+#define SCHEMA_HAS_IfcOffsetCurve2D
+#define SCHEMA_IfcOffsetCurve2D_HAS_Distance
+#define SCHEMA_IfcOffsetCurve2D_HAS_SelfIntersect
+#define SCHEMA_HAS_IfcOffsetCurve3D
+#define SCHEMA_IfcOffsetCurve3D_HAS_Distance
+#define SCHEMA_IfcOffsetCurve3D_HAS_SelfIntersect
+#define SCHEMA_IfcOffsetCurve3D_HAS_RefDirection
+#define SCHEMA_HAS_IfcOffsetCurveByDistances
+#define SCHEMA_IfcOffsetCurveByDistances_HAS_OffsetValues
+#define SCHEMA_IfcOffsetCurveByDistances_HAS_Tag
+#define SCHEMA_IfcOffsetCurveByDistances_Tag_IS_OPTIONAL
+#define SCHEMA_HAS_IfcOpenCrossProfileDef
+#define SCHEMA_IfcOpenCrossProfileDef_HAS_HorizontalWidths
+#define SCHEMA_IfcOpenCrossProfileDef_HAS_Widths
+#define SCHEMA_IfcOpenCrossProfileDef_HAS_Slopes
+#define SCHEMA_IfcOpenCrossProfileDef_HAS_Tags
+#define SCHEMA_IfcOpenCrossProfileDef_Tags_IS_OPTIONAL
+#define SCHEMA_IfcOpenCrossProfileDef_HAS_OffsetPoint
+#define SCHEMA_IfcOpenCrossProfileDef_OffsetPoint_IS_OPTIONAL
+#define SCHEMA_HAS_IfcOpenShell
+#define SCHEMA_HAS_IfcOpeningElement
+#define SCHEMA_IfcOpeningElement_HAS_PredefinedType
+#define SCHEMA_IfcOpeningElement_PredefinedType_IS_OPTIONAL
+#define SCHEMA_IfcOpeningElement_HAS_HasFillings
+#define SCHEMA_HAS_IfcOrganization
+#define SCHEMA_IfcOrganization_HAS_Identification
+#define SCHEMA_IfcOrganization_Identification_IS_OPTIONAL
+#define SCHEMA_IfcOrganization_HAS_Name
+#define SCHEMA_IfcOrganization_HAS_Description
+#define SCHEMA_IfcOrganization_Description_IS_OPTIONAL
+#define SCHEMA_IfcOrganization_HAS_Roles
+#define SCHEMA_IfcOrganization_Roles_IS_OPTIONAL
+#define SCHEMA_IfcOrganization_HAS_Addresses
+#define SCHEMA_IfcOrganization_Addresses_IS_OPTIONAL
+#define SCHEMA_IfcOrganization_HAS_IsRelatedBy
+#define SCHEMA_IfcOrganization_HAS_Relates
+#define SCHEMA_IfcOrganization_HAS_Engages
+#define SCHEMA_HAS_IfcOrganizationRelationship
+#define SCHEMA_IfcOrganizationRelationship_HAS_RelatingOrganization
+#define SCHEMA_IfcOrganizationRelationship_HAS_RelatedOrganizations
+#define SCHEMA_HAS_IfcOrientedEdge
+#define SCHEMA_IfcOrientedEdge_HAS_EdgeElement
+#define SCHEMA_IfcOrientedEdge_HAS_Orientation
+#define SCHEMA_HAS_IfcOuterBoundaryCurve
+#define SCHEMA_HAS_IfcOutlet
+#define SCHEMA_IfcOutlet_HAS_PredefinedType
+#define SCHEMA_IfcOutlet_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcOutletType
+#define SCHEMA_IfcOutletType_HAS_PredefinedType
+#define SCHEMA_HAS_IfcOwnerHistory
+#define SCHEMA_IfcOwnerHistory_HAS_OwningUser
+#define SCHEMA_IfcOwnerHistory_HAS_OwningApplication
+#define SCHEMA_IfcOwnerHistory_HAS_State
+#define SCHEMA_IfcOwnerHistory_State_IS_OPTIONAL
+#define SCHEMA_IfcOwnerHistory_HAS_ChangeAction
+#define SCHEMA_IfcOwnerHistory_ChangeAction_IS_OPTIONAL
+#define SCHEMA_IfcOwnerHistory_HAS_LastModifiedDate
+#define SCHEMA_IfcOwnerHistory_LastModifiedDate_IS_OPTIONAL
+#define SCHEMA_IfcOwnerHistory_HAS_LastModifyingUser
+#define SCHEMA_IfcOwnerHistory_LastModifyingUser_IS_OPTIONAL
+#define SCHEMA_IfcOwnerHistory_HAS_LastModifyingApplication
+#define SCHEMA_IfcOwnerHistory_LastModifyingApplication_IS_OPTIONAL
+#define SCHEMA_IfcOwnerHistory_HAS_CreationDate
+#define SCHEMA_HAS_IfcParameterizedProfileDef
+#define SCHEMA_IfcParameterizedProfileDef_HAS_Position
+#define SCHEMA_IfcParameterizedProfileDef_Position_IS_OPTIONAL
+#define SCHEMA_HAS_IfcPath
+#define SCHEMA_IfcPath_HAS_EdgeList
+#define SCHEMA_HAS_IfcPavement
+#define SCHEMA_IfcPavement_HAS_PredefinedType
+#define SCHEMA_IfcPavement_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcPavementType
+#define SCHEMA_IfcPavementType_HAS_PredefinedType
+#define SCHEMA_HAS_IfcPcurve
+#define SCHEMA_IfcPcurve_HAS_BasisSurface
+#define SCHEMA_IfcPcurve_HAS_ReferenceCurve
+#define SCHEMA_HAS_IfcPerformanceHistory
+#define SCHEMA_IfcPerformanceHistory_HAS_LifeCyclePhase
+#define SCHEMA_IfcPerformanceHistory_HAS_PredefinedType
+#define SCHEMA_IfcPerformanceHistory_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcPermeableCoveringProperties
+#define SCHEMA_IfcPermeableCoveringProperties_HAS_OperationType
+#define SCHEMA_IfcPermeableCoveringProperties_HAS_PanelPosition
+#define SCHEMA_IfcPermeableCoveringProperties_HAS_FrameDepth
+#define SCHEMA_IfcPermeableCoveringProperties_FrameDepth_IS_OPTIONAL
+#define SCHEMA_IfcPermeableCoveringProperties_HAS_FrameThickness
+#define SCHEMA_IfcPermeableCoveringProperties_FrameThickness_IS_OPTIONAL
+#define SCHEMA_IfcPermeableCoveringProperties_HAS_ShapeAspectStyle
+#define SCHEMA_IfcPermeableCoveringProperties_ShapeAspectStyle_IS_OPTIONAL
+#define SCHEMA_HAS_IfcPermit
+#define SCHEMA_IfcPermit_HAS_PredefinedType
+#define SCHEMA_IfcPermit_PredefinedType_IS_OPTIONAL
+#define SCHEMA_IfcPermit_HAS_Status
+#define SCHEMA_IfcPermit_Status_IS_OPTIONAL
+#define SCHEMA_IfcPermit_HAS_LongDescription
+#define SCHEMA_IfcPermit_LongDescription_IS_OPTIONAL
+#define SCHEMA_HAS_IfcPerson
+#define SCHEMA_IfcPerson_HAS_Identification
+#define SCHEMA_IfcPerson_Identification_IS_OPTIONAL
+#define SCHEMA_IfcPerson_HAS_FamilyName
+#define SCHEMA_IfcPerson_FamilyName_IS_OPTIONAL
+#define SCHEMA_IfcPerson_HAS_GivenName
+#define SCHEMA_IfcPerson_GivenName_IS_OPTIONAL
+#define SCHEMA_IfcPerson_HAS_MiddleNames
+#define SCHEMA_IfcPerson_MiddleNames_IS_OPTIONAL
+#define SCHEMA_IfcPerson_HAS_PrefixTitles
+#define SCHEMA_IfcPerson_PrefixTitles_IS_OPTIONAL
+#define SCHEMA_IfcPerson_HAS_SuffixTitles
+#define SCHEMA_IfcPerson_SuffixTitles_IS_OPTIONAL
+#define SCHEMA_IfcPerson_HAS_Roles
+#define SCHEMA_IfcPerson_Roles_IS_OPTIONAL
+#define SCHEMA_IfcPerson_HAS_Addresses
+#define SCHEMA_IfcPerson_Addresses_IS_OPTIONAL
+#define SCHEMA_IfcPerson_HAS_EngagedIn
+#define SCHEMA_HAS_IfcPersonAndOrganization
+#define SCHEMA_IfcPersonAndOrganization_HAS_ThePerson
+#define SCHEMA_IfcPersonAndOrganization_HAS_TheOrganization
+#define SCHEMA_IfcPersonAndOrganization_HAS_Roles
+#define SCHEMA_IfcPersonAndOrganization_Roles_IS_OPTIONAL
+#define SCHEMA_HAS_IfcPhysicalComplexQuantity
+#define SCHEMA_IfcPhysicalComplexQuantity_HAS_HasQuantities
+#define SCHEMA_IfcPhysicalComplexQuantity_HAS_Discrimination
+#define SCHEMA_IfcPhysicalComplexQuantity_HAS_Quality
+#define SCHEMA_IfcPhysicalComplexQuantity_Quality_IS_OPTIONAL
+#define SCHEMA_IfcPhysicalComplexQuantity_HAS_Usage
+#define SCHEMA_IfcPhysicalComplexQuantity_Usage_IS_OPTIONAL
+#define SCHEMA_HAS_IfcPhysicalQuantity
+#define SCHEMA_IfcPhysicalQuantity_HAS_Name
+#define SCHEMA_IfcPhysicalQuantity_HAS_Description
+#define SCHEMA_IfcPhysicalQuantity_Description_IS_OPTIONAL
+#define SCHEMA_IfcPhysicalQuantity_HAS_HasExternalReferences
+#define SCHEMA_IfcPhysicalQuantity_HAS_PartOfComplex
+#define SCHEMA_HAS_IfcPhysicalSimpleQuantity
+#define SCHEMA_IfcPhysicalSimpleQuantity_HAS_Unit
+#define SCHEMA_IfcPhysicalSimpleQuantity_Unit_IS_OPTIONAL
+#define SCHEMA_HAS_IfcPile
+#define SCHEMA_IfcPile_HAS_PredefinedType
+#define SCHEMA_IfcPile_PredefinedType_IS_OPTIONAL
+#define SCHEMA_IfcPile_HAS_ConstructionType
+#define SCHEMA_IfcPile_ConstructionType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcPileType
+#define SCHEMA_IfcPileType_HAS_PredefinedType
+#define SCHEMA_HAS_IfcPipeFitting
+#define SCHEMA_IfcPipeFitting_HAS_PredefinedType
+#define SCHEMA_IfcPipeFitting_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcPipeFittingType
+#define SCHEMA_IfcPipeFittingType_HAS_PredefinedType
+#define SCHEMA_HAS_IfcPipeSegment
+#define SCHEMA_IfcPipeSegment_HAS_PredefinedType
+#define SCHEMA_IfcPipeSegment_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcPipeSegmentType
+#define SCHEMA_IfcPipeSegmentType_HAS_PredefinedType
+#define SCHEMA_HAS_IfcPixelTexture
+#define SCHEMA_IfcPixelTexture_HAS_Width
+#define SCHEMA_IfcPixelTexture_HAS_Height
+#define SCHEMA_IfcPixelTexture_HAS_ColourComponents
+#define SCHEMA_IfcPixelTexture_HAS_Pixel
+#define SCHEMA_HAS_IfcPlacement
+#define SCHEMA_IfcPlacement_HAS_Location
+#define SCHEMA_HAS_IfcPlanarBox
+#define SCHEMA_IfcPlanarBox_HAS_Placement
+#define SCHEMA_HAS_IfcPlanarExtent
+#define SCHEMA_IfcPlanarExtent_HAS_SizeInX
+#define SCHEMA_IfcPlanarExtent_HAS_SizeInY
+#define SCHEMA_HAS_IfcPlane
+#define SCHEMA_HAS_IfcPlate
+#define SCHEMA_IfcPlate_HAS_PredefinedType
+#define SCHEMA_IfcPlate_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcPlateType
+#define SCHEMA_IfcPlateType_HAS_PredefinedType
+#define SCHEMA_HAS_IfcPoint
+#define SCHEMA_HAS_IfcPointByDistanceExpression
+#define SCHEMA_IfcPointByDistanceExpression_HAS_DistanceAlong
+#define SCHEMA_IfcPointByDistanceExpression_HAS_OffsetLateral
+#define SCHEMA_IfcPointByDistanceExpression_OffsetLateral_IS_OPTIONAL
+#define SCHEMA_IfcPointByDistanceExpression_HAS_OffsetVertical
+#define SCHEMA_IfcPointByDistanceExpression_OffsetVertical_IS_OPTIONAL
+#define SCHEMA_IfcPointByDistanceExpression_HAS_OffsetLongitudinal
+#define SCHEMA_IfcPointByDistanceExpression_OffsetLongitudinal_IS_OPTIONAL
+#define SCHEMA_IfcPointByDistanceExpression_HAS_BasisCurve
+#define SCHEMA_HAS_IfcPointOnCurve
+#define SCHEMA_IfcPointOnCurve_HAS_BasisCurve
+#define SCHEMA_IfcPointOnCurve_HAS_PointParameter
+#define SCHEMA_HAS_IfcPointOnSurface
+#define SCHEMA_IfcPointOnSurface_HAS_BasisSurface
+#define SCHEMA_IfcPointOnSurface_HAS_PointParameterU
+#define SCHEMA_IfcPointOnSurface_HAS_PointParameterV
+#define SCHEMA_HAS_IfcPolyLoop
+#define SCHEMA_IfcPolyLoop_HAS_Polygon
+#define SCHEMA_HAS_IfcPolygonalBoundedHalfSpace
+#define SCHEMA_IfcPolygonalBoundedHalfSpace_HAS_Position
+#define SCHEMA_IfcPolygonalBoundedHalfSpace_HAS_PolygonalBoundary
+#define SCHEMA_HAS_IfcPolygonalFaceSet
+#define SCHEMA_IfcPolygonalFaceSet_HAS_Faces
+#define SCHEMA_IfcPolygonalFaceSet_HAS_PnIndex
+#define SCHEMA_IfcPolygonalFaceSet_PnIndex_IS_OPTIONAL
+#define SCHEMA_HAS_IfcPolyline
+#define SCHEMA_IfcPolyline_HAS_Points
+#define SCHEMA_HAS_IfcPolynomialCurve
+#define SCHEMA_IfcPolynomialCurve_HAS_Position
+#define SCHEMA_IfcPolynomialCurve_HAS_CoefficientsX
+#define SCHEMA_IfcPolynomialCurve_CoefficientsX_IS_OPTIONAL
+#define SCHEMA_IfcPolynomialCurve_HAS_CoefficientsY
+#define SCHEMA_IfcPolynomialCurve_CoefficientsY_IS_OPTIONAL
+#define SCHEMA_IfcPolynomialCurve_HAS_CoefficientsZ
+#define SCHEMA_IfcPolynomialCurve_CoefficientsZ_IS_OPTIONAL
+#define SCHEMA_HAS_IfcPort
+#define SCHEMA_IfcPort_HAS_ContainedIn
+#define SCHEMA_IfcPort_HAS_ConnectedFrom
+#define SCHEMA_IfcPort_HAS_ConnectedTo
+#define SCHEMA_HAS_IfcPositioningElement
+#define SCHEMA_IfcPositioningElement_HAS_ContainedInStructure
+#define SCHEMA_IfcPositioningElement_HAS_Positions
+#define SCHEMA_HAS_IfcPostalAddress
+#define SCHEMA_IfcPostalAddress_HAS_InternalLocation
+#define SCHEMA_IfcPostalAddress_InternalLocation_IS_OPTIONAL
+#define SCHEMA_IfcPostalAddress_HAS_AddressLines
+#define SCHEMA_IfcPostalAddress_AddressLines_IS_OPTIONAL
+#define SCHEMA_IfcPostalAddress_HAS_PostalBox
+#define SCHEMA_IfcPostalAddress_PostalBox_IS_OPTIONAL
+#define SCHEMA_IfcPostalAddress_HAS_Town
+#define SCHEMA_IfcPostalAddress_Town_IS_OPTIONAL
+#define SCHEMA_IfcPostalAddress_HAS_Region
+#define SCHEMA_IfcPostalAddress_Region_IS_OPTIONAL
+#define SCHEMA_IfcPostalAddress_HAS_PostalCode
+#define SCHEMA_IfcPostalAddress_PostalCode_IS_OPTIONAL
+#define SCHEMA_IfcPostalAddress_HAS_Country
+#define SCHEMA_IfcPostalAddress_Country_IS_OPTIONAL
+#define SCHEMA_HAS_IfcPreDefinedColour
+#define SCHEMA_HAS_IfcPreDefinedCurveFont
+#define SCHEMA_HAS_IfcPreDefinedItem
+#define SCHEMA_IfcPreDefinedItem_HAS_Name
+#define SCHEMA_HAS_IfcPreDefinedProperties
+#define SCHEMA_HAS_IfcPreDefinedPropertySet
+#define SCHEMA_HAS_IfcPreDefinedTextFont
+#define SCHEMA_HAS_IfcPresentationItem
+#define SCHEMA_HAS_IfcPresentationLayerAssignment
+#define SCHEMA_IfcPresentationLayerAssignment_HAS_Name
+#define SCHEMA_IfcPresentationLayerAssignment_HAS_Description
+#define SCHEMA_IfcPresentationLayerAssignment_Description_IS_OPTIONAL
+#define SCHEMA_IfcPresentationLayerAssignment_HAS_AssignedItems
+#define SCHEMA_IfcPresentationLayerAssignment_HAS_Identifier
+#define SCHEMA_IfcPresentationLayerAssignment_Identifier_IS_OPTIONAL
+#define SCHEMA_HAS_IfcPresentationLayerWithStyle
+#define SCHEMA_IfcPresentationLayerWithStyle_HAS_LayerOn
+#define SCHEMA_IfcPresentationLayerWithStyle_HAS_LayerFrozen
+#define SCHEMA_IfcPresentationLayerWithStyle_HAS_LayerBlocked
+#define SCHEMA_IfcPresentationLayerWithStyle_HAS_LayerStyles
+#define SCHEMA_HAS_IfcPresentationStyle
+#define SCHEMA_IfcPresentationStyle_HAS_Name
+#define SCHEMA_IfcPresentationStyle_Name_IS_OPTIONAL
+#define SCHEMA_HAS_IfcProcedure
+#define SCHEMA_IfcProcedure_HAS_PredefinedType
+#define SCHEMA_IfcProcedure_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcProcedureType
+#define SCHEMA_IfcProcedureType_HAS_PredefinedType
+#define SCHEMA_HAS_IfcProcess
+#define SCHEMA_IfcProcess_HAS_Identification
+#define SCHEMA_IfcProcess_Identification_IS_OPTIONAL
+#define SCHEMA_IfcProcess_HAS_LongDescription
+#define SCHEMA_IfcProcess_LongDescription_IS_OPTIONAL
+#define SCHEMA_IfcProcess_HAS_IsPredecessorTo
+#define SCHEMA_IfcProcess_HAS_IsSuccessorFrom
+#define SCHEMA_IfcProcess_HAS_OperatesOn
+#define SCHEMA_HAS_IfcProduct
+#define SCHEMA_IfcProduct_HAS_ObjectPlacement
+#define SCHEMA_IfcProduct_ObjectPlacement_IS_OPTIONAL
+#define SCHEMA_IfcProduct_HAS_Representation
+#define SCHEMA_IfcProduct_Representation_IS_OPTIONAL
+#define SCHEMA_IfcProduct_HAS_ReferencedBy
+#define SCHEMA_IfcProduct_HAS_PositionedRelativeTo
+#define SCHEMA_IfcProduct_HAS_ReferencedInStructures
+#define SCHEMA_HAS_IfcProductDefinitionShape
+#define SCHEMA_IfcProductDefinitionShape_HAS_ShapeOfProduct
+#define SCHEMA_IfcProductDefinitionShape_HAS_HasShapeAspects
+#define SCHEMA_HAS_IfcProductRepresentation
+#define SCHEMA_IfcProductRepresentation_HAS_Name
+#define SCHEMA_IfcProductRepresentation_Name_IS_OPTIONAL
+#define SCHEMA_IfcProductRepresentation_HAS_Description
+#define SCHEMA_IfcProductRepresentation_Description_IS_OPTIONAL
+#define SCHEMA_IfcProductRepresentation_HAS_Representations
+#define SCHEMA_HAS_IfcProfileDef
+#define SCHEMA_IfcProfileDef_HAS_ProfileType
+#define SCHEMA_IfcProfileDef_HAS_ProfileName
+#define SCHEMA_IfcProfileDef_ProfileName_IS_OPTIONAL
+#define SCHEMA_IfcProfileDef_HAS_HasExternalReference
+#define SCHEMA_IfcProfileDef_HAS_HasProperties
+#define SCHEMA_HAS_IfcProfileProperties
+#define SCHEMA_IfcProfileProperties_HAS_ProfileDefinition
+#define SCHEMA_HAS_IfcProject
+#define SCHEMA_HAS_IfcProjectLibrary
+#define SCHEMA_HAS_IfcProjectOrder
+#define SCHEMA_IfcProjectOrder_HAS_PredefinedType
+#define SCHEMA_IfcProjectOrder_PredefinedType_IS_OPTIONAL
+#define SCHEMA_IfcProjectOrder_HAS_Status
+#define SCHEMA_IfcProjectOrder_Status_IS_OPTIONAL
+#define SCHEMA_IfcProjectOrder_HAS_LongDescription
+#define SCHEMA_IfcProjectOrder_LongDescription_IS_OPTIONAL
+#define SCHEMA_HAS_IfcProjectedCRS
+#define SCHEMA_IfcProjectedCRS_HAS_MapProjection
+#define SCHEMA_IfcProjectedCRS_MapProjection_IS_OPTIONAL
+#define SCHEMA_IfcProjectedCRS_HAS_MapZone
+#define SCHEMA_IfcProjectedCRS_MapZone_IS_OPTIONAL
+#define SCHEMA_IfcProjectedCRS_HAS_MapUnit
+#define SCHEMA_IfcProjectedCRS_MapUnit_IS_OPTIONAL
+#define SCHEMA_HAS_IfcProjectionElement
+#define SCHEMA_IfcProjectionElement_HAS_PredefinedType
+#define SCHEMA_IfcProjectionElement_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcProperty
+#define SCHEMA_IfcProperty_HAS_Name
+#define SCHEMA_IfcProperty_HAS_Specification
+#define SCHEMA_IfcProperty_Specification_IS_OPTIONAL
+#define SCHEMA_IfcProperty_HAS_PartOfPset
+#define SCHEMA_IfcProperty_HAS_PropertyForDependance
+#define SCHEMA_IfcProperty_HAS_PropertyDependsOn
+#define SCHEMA_IfcProperty_HAS_PartOfComplex
+#define SCHEMA_IfcProperty_HAS_HasConstraints
+#define SCHEMA_IfcProperty_HAS_HasApprovals
+#define SCHEMA_HAS_IfcPropertyAbstraction
+#define SCHEMA_IfcPropertyAbstraction_HAS_HasExternalReferences
+#define SCHEMA_HAS_IfcPropertyBoundedValue
+#define SCHEMA_IfcPropertyBoundedValue_HAS_UpperBoundValue
+#define SCHEMA_IfcPropertyBoundedValue_UpperBoundValue_IS_OPTIONAL
+#define SCHEMA_IfcPropertyBoundedValue_HAS_LowerBoundValue
+#define SCHEMA_IfcPropertyBoundedValue_LowerBoundValue_IS_OPTIONAL
+#define SCHEMA_IfcPropertyBoundedValue_HAS_Unit
+#define SCHEMA_IfcPropertyBoundedValue_Unit_IS_OPTIONAL
+#define SCHEMA_IfcPropertyBoundedValue_HAS_SetPointValue
+#define SCHEMA_IfcPropertyBoundedValue_SetPointValue_IS_OPTIONAL
+#define SCHEMA_HAS_IfcPropertyDefinition
+#define SCHEMA_IfcPropertyDefinition_HAS_HasContext
+#define SCHEMA_IfcPropertyDefinition_HAS_HasAssociations
+#define SCHEMA_HAS_IfcPropertyDependencyRelationship
+#define SCHEMA_IfcPropertyDependencyRelationship_HAS_DependingProperty
+#define SCHEMA_IfcPropertyDependencyRelationship_HAS_DependantProperty
+#define SCHEMA_IfcPropertyDependencyRelationship_HAS_Expression
+#define SCHEMA_IfcPropertyDependencyRelationship_Expression_IS_OPTIONAL
+#define SCHEMA_HAS_IfcPropertyEnumeratedValue
+#define SCHEMA_IfcPropertyEnumeratedValue_HAS_EnumerationValues
+#define SCHEMA_IfcPropertyEnumeratedValue_EnumerationValues_IS_OPTIONAL
+#define SCHEMA_IfcPropertyEnumeratedValue_HAS_EnumerationReference
+#define SCHEMA_IfcPropertyEnumeratedValue_EnumerationReference_IS_OPTIONAL
+#define SCHEMA_HAS_IfcPropertyEnumeration
+#define SCHEMA_IfcPropertyEnumeration_HAS_Name
+#define SCHEMA_IfcPropertyEnumeration_HAS_EnumerationValues
+#define SCHEMA_IfcPropertyEnumeration_HAS_Unit
+#define SCHEMA_IfcPropertyEnumeration_Unit_IS_OPTIONAL
+#define SCHEMA_HAS_IfcPropertyListValue
+#define SCHEMA_IfcPropertyListValue_HAS_ListValues
+#define SCHEMA_IfcPropertyListValue_ListValues_IS_OPTIONAL
+#define SCHEMA_IfcPropertyListValue_HAS_Unit
+#define SCHEMA_IfcPropertyListValue_Unit_IS_OPTIONAL
+#define SCHEMA_HAS_IfcPropertyReferenceValue
+#define SCHEMA_IfcPropertyReferenceValue_HAS_UsageName
+#define SCHEMA_IfcPropertyReferenceValue_UsageName_IS_OPTIONAL
+#define SCHEMA_IfcPropertyReferenceValue_HAS_PropertyReference
+#define SCHEMA_IfcPropertyReferenceValue_PropertyReference_IS_OPTIONAL
+#define SCHEMA_HAS_IfcPropertySet
+#define SCHEMA_IfcPropertySet_HAS_HasProperties
+#define SCHEMA_HAS_IfcPropertySetDefinition
+#define SCHEMA_IfcPropertySetDefinition_HAS_DefinesType
+#define SCHEMA_IfcPropertySetDefinition_HAS_IsDefinedBy
+#define SCHEMA_IfcPropertySetDefinition_HAS_DefinesOccurrence
+#define SCHEMA_HAS_IfcPropertySetTemplate
+#define SCHEMA_IfcPropertySetTemplate_HAS_TemplateType
+#define SCHEMA_IfcPropertySetTemplate_TemplateType_IS_OPTIONAL
+#define SCHEMA_IfcPropertySetTemplate_HAS_ApplicableEntity
+#define SCHEMA_IfcPropertySetTemplate_ApplicableEntity_IS_OPTIONAL
+#define SCHEMA_IfcPropertySetTemplate_HAS_HasPropertyTemplates
+#define SCHEMA_IfcPropertySetTemplate_HAS_Defines
+#define SCHEMA_HAS_IfcPropertySingleValue
+#define SCHEMA_IfcPropertySingleValue_HAS_NominalValue
+#define SCHEMA_IfcPropertySingleValue_NominalValue_IS_OPTIONAL
+#define SCHEMA_IfcPropertySingleValue_HAS_Unit
+#define SCHEMA_IfcPropertySingleValue_Unit_IS_OPTIONAL
+#define SCHEMA_HAS_IfcPropertyTableValue
+#define SCHEMA_IfcPropertyTableValue_HAS_DefiningValues
+#define SCHEMA_IfcPropertyTableValue_DefiningValues_IS_OPTIONAL
+#define SCHEMA_IfcPropertyTableValue_HAS_DefinedValues
+#define SCHEMA_IfcPropertyTableValue_DefinedValues_IS_OPTIONAL
+#define SCHEMA_IfcPropertyTableValue_HAS_Expression
+#define SCHEMA_IfcPropertyTableValue_Expression_IS_OPTIONAL
+#define SCHEMA_IfcPropertyTableValue_HAS_DefiningUnit
+#define SCHEMA_IfcPropertyTableValue_DefiningUnit_IS_OPTIONAL
+#define SCHEMA_IfcPropertyTableValue_HAS_DefinedUnit
+#define SCHEMA_IfcPropertyTableValue_DefinedUnit_IS_OPTIONAL
+#define SCHEMA_IfcPropertyTableValue_HAS_CurveInterpolation
+#define SCHEMA_IfcPropertyTableValue_CurveInterpolation_IS_OPTIONAL
+#define SCHEMA_HAS_IfcPropertyTemplate
+#define SCHEMA_IfcPropertyTemplate_HAS_PartOfComplexTemplate
+#define SCHEMA_IfcPropertyTemplate_HAS_PartOfPsetTemplate
+#define SCHEMA_HAS_IfcPropertyTemplateDefinition
+#define SCHEMA_HAS_IfcProtectiveDevice
+#define SCHEMA_IfcProtectiveDevice_HAS_PredefinedType
+#define SCHEMA_IfcProtectiveDevice_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcProtectiveDeviceTrippingUnit
+#define SCHEMA_IfcProtectiveDeviceTrippingUnit_HAS_PredefinedType
+#define SCHEMA_IfcProtectiveDeviceTrippingUnit_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcProtectiveDeviceTrippingUnitType
+#define SCHEMA_IfcProtectiveDeviceTrippingUnitType_HAS_PredefinedType
+#define SCHEMA_HAS_IfcProtectiveDeviceType
+#define SCHEMA_IfcProtectiveDeviceType_HAS_PredefinedType
+#define SCHEMA_HAS_IfcPump
+#define SCHEMA_IfcPump_HAS_PredefinedType
+#define SCHEMA_IfcPump_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcPumpType
+#define SCHEMA_IfcPumpType_HAS_PredefinedType
+#define SCHEMA_HAS_IfcQuantityArea
+#define SCHEMA_IfcQuantityArea_HAS_AreaValue
+#define SCHEMA_IfcQuantityArea_HAS_Formula
+#define SCHEMA_IfcQuantityArea_Formula_IS_OPTIONAL
+#define SCHEMA_HAS_IfcQuantityCount
+#define SCHEMA_IfcQuantityCount_HAS_CountValue
+#define SCHEMA_IfcQuantityCount_HAS_Formula
+#define SCHEMA_IfcQuantityCount_Formula_IS_OPTIONAL
+#define SCHEMA_HAS_IfcQuantityLength
+#define SCHEMA_IfcQuantityLength_HAS_LengthValue
+#define SCHEMA_IfcQuantityLength_HAS_Formula
+#define SCHEMA_IfcQuantityLength_Formula_IS_OPTIONAL
+#define SCHEMA_HAS_IfcQuantityNumber
+#define SCHEMA_IfcQuantityNumber_HAS_NumberValue
+#define SCHEMA_IfcQuantityNumber_HAS_Formula
+#define SCHEMA_IfcQuantityNumber_Formula_IS_OPTIONAL
+#define SCHEMA_HAS_IfcQuantitySet
+#define SCHEMA_HAS_IfcQuantityTime
+#define SCHEMA_IfcQuantityTime_HAS_TimeValue
+#define SCHEMA_IfcQuantityTime_HAS_Formula
+#define SCHEMA_IfcQuantityTime_Formula_IS_OPTIONAL
+#define SCHEMA_HAS_IfcQuantityVolume
+#define SCHEMA_IfcQuantityVolume_HAS_VolumeValue
+#define SCHEMA_IfcQuantityVolume_HAS_Formula
+#define SCHEMA_IfcQuantityVolume_Formula_IS_OPTIONAL
+#define SCHEMA_HAS_IfcQuantityWeight
+#define SCHEMA_IfcQuantityWeight_HAS_WeightValue
+#define SCHEMA_IfcQuantityWeight_HAS_Formula
+#define SCHEMA_IfcQuantityWeight_Formula_IS_OPTIONAL
+#define SCHEMA_HAS_IfcRail
+#define SCHEMA_IfcRail_HAS_PredefinedType
+#define SCHEMA_IfcRail_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcRailType
+#define SCHEMA_IfcRailType_HAS_PredefinedType
+#define SCHEMA_HAS_IfcRailing
+#define SCHEMA_IfcRailing_HAS_PredefinedType
+#define SCHEMA_IfcRailing_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcRailingType
+#define SCHEMA_IfcRailingType_HAS_PredefinedType
+#define SCHEMA_HAS_IfcRailway
+#define SCHEMA_IfcRailway_HAS_PredefinedType
+#define SCHEMA_IfcRailway_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcRailwayPart
+#define SCHEMA_IfcRailwayPart_HAS_PredefinedType
+#define SCHEMA_IfcRailwayPart_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcRamp
+#define SCHEMA_IfcRamp_HAS_PredefinedType
+#define SCHEMA_IfcRamp_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcRampFlight
+#define SCHEMA_IfcRampFlight_HAS_PredefinedType
+#define SCHEMA_IfcRampFlight_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcRampFlightType
+#define SCHEMA_IfcRampFlightType_HAS_PredefinedType
+#define SCHEMA_HAS_IfcRampType
+#define SCHEMA_IfcRampType_HAS_PredefinedType
+#define SCHEMA_HAS_IfcRationalBSplineCurveWithKnots
+#define SCHEMA_IfcRationalBSplineCurveWithKnots_HAS_WeightsData
+#define SCHEMA_HAS_IfcRationalBSplineSurfaceWithKnots
+#define SCHEMA_IfcRationalBSplineSurfaceWithKnots_HAS_WeightsData
+#define SCHEMA_HAS_IfcRectangleHollowProfileDef
+#define SCHEMA_IfcRectangleHollowProfileDef_HAS_WallThickness
+#define SCHEMA_IfcRectangleHollowProfileDef_HAS_InnerFilletRadius
+#define SCHEMA_IfcRectangleHollowProfileDef_InnerFilletRadius_IS_OPTIONAL
+#define SCHEMA_IfcRectangleHollowProfileDef_HAS_OuterFilletRadius
+#define SCHEMA_IfcRectangleHollowProfileDef_OuterFilletRadius_IS_OPTIONAL
+#define SCHEMA_HAS_IfcRectangleProfileDef
+#define SCHEMA_IfcRectangleProfileDef_HAS_XDim
+#define SCHEMA_IfcRectangleProfileDef_HAS_YDim
+#define SCHEMA_HAS_IfcRectangularPyramid
+#define SCHEMA_IfcRectangularPyramid_HAS_XLength
+#define SCHEMA_IfcRectangularPyramid_HAS_YLength
+#define SCHEMA_IfcRectangularPyramid_HAS_Height
+#define SCHEMA_HAS_IfcRectangularTrimmedSurface
+#define SCHEMA_IfcRectangularTrimmedSurface_HAS_BasisSurface
+#define SCHEMA_IfcRectangularTrimmedSurface_HAS_U1
+#define SCHEMA_IfcRectangularTrimmedSurface_HAS_V1
+#define SCHEMA_IfcRectangularTrimmedSurface_HAS_U2
+#define SCHEMA_IfcRectangularTrimmedSurface_HAS_V2
+#define SCHEMA_IfcRectangularTrimmedSurface_HAS_Usense
+#define SCHEMA_IfcRectangularTrimmedSurface_HAS_Vsense
+#define SCHEMA_HAS_IfcRecurrencePattern
+#define SCHEMA_IfcRecurrencePattern_HAS_RecurrenceType
+#define SCHEMA_IfcRecurrencePattern_HAS_DayComponent
+#define SCHEMA_IfcRecurrencePattern_DayComponent_IS_OPTIONAL
+#define SCHEMA_IfcRecurrencePattern_HAS_WeekdayComponent
+#define SCHEMA_IfcRecurrencePattern_WeekdayComponent_IS_OPTIONAL
+#define SCHEMA_IfcRecurrencePattern_HAS_MonthComponent
+#define SCHEMA_IfcRecurrencePattern_MonthComponent_IS_OPTIONAL
+#define SCHEMA_IfcRecurrencePattern_HAS_Position
+#define SCHEMA_IfcRecurrencePattern_Position_IS_OPTIONAL
+#define SCHEMA_IfcRecurrencePattern_HAS_Interval
+#define SCHEMA_IfcRecurrencePattern_Interval_IS_OPTIONAL
+#define SCHEMA_IfcRecurrencePattern_HAS_Occurrences
+#define SCHEMA_IfcRecurrencePattern_Occurrences_IS_OPTIONAL
+#define SCHEMA_IfcRecurrencePattern_HAS_TimePeriods
+#define SCHEMA_IfcRecurrencePattern_TimePeriods_IS_OPTIONAL
+#define SCHEMA_HAS_IfcReference
+#define SCHEMA_IfcReference_HAS_TypeIdentifier
+#define SCHEMA_IfcReference_TypeIdentifier_IS_OPTIONAL
+#define SCHEMA_IfcReference_HAS_AttributeIdentifier
+#define SCHEMA_IfcReference_AttributeIdentifier_IS_OPTIONAL
+#define SCHEMA_IfcReference_HAS_InstanceName
+#define SCHEMA_IfcReference_InstanceName_IS_OPTIONAL
+#define SCHEMA_IfcReference_HAS_ListPositions
+#define SCHEMA_IfcReference_ListPositions_IS_OPTIONAL
+#define SCHEMA_IfcReference_HAS_InnerReference
+#define SCHEMA_IfcReference_InnerReference_IS_OPTIONAL
+#define SCHEMA_HAS_IfcReferent
+#define SCHEMA_IfcReferent_HAS_PredefinedType
+#define SCHEMA_IfcReferent_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcRegularTimeSeries
+#define SCHEMA_IfcRegularTimeSeries_HAS_TimeStep
+#define SCHEMA_IfcRegularTimeSeries_HAS_Values
+#define SCHEMA_HAS_IfcReinforcedSoil
+#define SCHEMA_IfcReinforcedSoil_HAS_PredefinedType
+#define SCHEMA_IfcReinforcedSoil_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcReinforcementBarProperties
+#define SCHEMA_IfcReinforcementBarProperties_HAS_TotalCrossSectionArea
+#define SCHEMA_IfcReinforcementBarProperties_HAS_SteelGrade
+#define SCHEMA_IfcReinforcementBarProperties_HAS_BarSurface
+#define SCHEMA_IfcReinforcementBarProperties_BarSurface_IS_OPTIONAL
+#define SCHEMA_IfcReinforcementBarProperties_HAS_EffectiveDepth
+#define SCHEMA_IfcReinforcementBarProperties_EffectiveDepth_IS_OPTIONAL
+#define SCHEMA_IfcReinforcementBarProperties_HAS_NominalBarDiameter
+#define SCHEMA_IfcReinforcementBarProperties_NominalBarDiameter_IS_OPTIONAL
+#define SCHEMA_IfcReinforcementBarProperties_HAS_BarCount
+#define SCHEMA_IfcReinforcementBarProperties_BarCount_IS_OPTIONAL
+#define SCHEMA_HAS_IfcReinforcementDefinitionProperties
+#define SCHEMA_IfcReinforcementDefinitionProperties_HAS_DefinitionType
+#define SCHEMA_IfcReinforcementDefinitionProperties_DefinitionType_IS_OPTIONAL
+#define SCHEMA_IfcReinforcementDefinitionProperties_HAS_ReinforcementSectionDefinitions
+#define SCHEMA_HAS_IfcReinforcingBar
+#define SCHEMA_IfcReinforcingBar_HAS_NominalDiameter
+#define SCHEMA_IfcReinforcingBar_NominalDiameter_IS_OPTIONAL
+#define SCHEMA_IfcReinforcingBar_HAS_CrossSectionArea
+#define SCHEMA_IfcReinforcingBar_CrossSectionArea_IS_OPTIONAL
+#define SCHEMA_IfcReinforcingBar_HAS_BarLength
+#define SCHEMA_IfcReinforcingBar_BarLength_IS_OPTIONAL
+#define SCHEMA_IfcReinforcingBar_HAS_PredefinedType
+#define SCHEMA_IfcReinforcingBar_PredefinedType_IS_OPTIONAL
+#define SCHEMA_IfcReinforcingBar_HAS_BarSurface
+#define SCHEMA_IfcReinforcingBar_BarSurface_IS_OPTIONAL
+#define SCHEMA_HAS_IfcReinforcingBarType
+#define SCHEMA_IfcReinforcingBarType_HAS_PredefinedType
+#define SCHEMA_IfcReinforcingBarType_HAS_NominalDiameter
+#define SCHEMA_IfcReinforcingBarType_NominalDiameter_IS_OPTIONAL
+#define SCHEMA_IfcReinforcingBarType_HAS_CrossSectionArea
+#define SCHEMA_IfcReinforcingBarType_CrossSectionArea_IS_OPTIONAL
+#define SCHEMA_IfcReinforcingBarType_HAS_BarLength
+#define SCHEMA_IfcReinforcingBarType_BarLength_IS_OPTIONAL
+#define SCHEMA_IfcReinforcingBarType_HAS_BarSurface
+#define SCHEMA_IfcReinforcingBarType_BarSurface_IS_OPTIONAL
+#define SCHEMA_IfcReinforcingBarType_HAS_BendingShapeCode
+#define SCHEMA_IfcReinforcingBarType_BendingShapeCode_IS_OPTIONAL
+#define SCHEMA_IfcReinforcingBarType_HAS_BendingParameters
+#define SCHEMA_IfcReinforcingBarType_BendingParameters_IS_OPTIONAL
+#define SCHEMA_HAS_IfcReinforcingElement
+#define SCHEMA_IfcReinforcingElement_HAS_SteelGrade
+#define SCHEMA_IfcReinforcingElement_SteelGrade_IS_OPTIONAL
+#define SCHEMA_HAS_IfcReinforcingElementType
+#define SCHEMA_HAS_IfcReinforcingMesh
+#define SCHEMA_IfcReinforcingMesh_HAS_MeshLength
+#define SCHEMA_IfcReinforcingMesh_MeshLength_IS_OPTIONAL
+#define SCHEMA_IfcReinforcingMesh_HAS_MeshWidth
+#define SCHEMA_IfcReinforcingMesh_MeshWidth_IS_OPTIONAL
+#define SCHEMA_IfcReinforcingMesh_HAS_LongitudinalBarNominalDiameter
+#define SCHEMA_IfcReinforcingMesh_LongitudinalBarNominalDiameter_IS_OPTIONAL
+#define SCHEMA_IfcReinforcingMesh_HAS_TransverseBarNominalDiameter
+#define SCHEMA_IfcReinforcingMesh_TransverseBarNominalDiameter_IS_OPTIONAL
+#define SCHEMA_IfcReinforcingMesh_HAS_LongitudinalBarCrossSectionArea
+#define SCHEMA_IfcReinforcingMesh_LongitudinalBarCrossSectionArea_IS_OPTIONAL
+#define SCHEMA_IfcReinforcingMesh_HAS_TransverseBarCrossSectionArea
+#define SCHEMA_IfcReinforcingMesh_TransverseBarCrossSectionArea_IS_OPTIONAL
+#define SCHEMA_IfcReinforcingMesh_HAS_LongitudinalBarSpacing
+#define SCHEMA_IfcReinforcingMesh_LongitudinalBarSpacing_IS_OPTIONAL
+#define SCHEMA_IfcReinforcingMesh_HAS_TransverseBarSpacing
+#define SCHEMA_IfcReinforcingMesh_TransverseBarSpacing_IS_OPTIONAL
+#define SCHEMA_IfcReinforcingMesh_HAS_PredefinedType
+#define SCHEMA_IfcReinforcingMesh_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcReinforcingMeshType
+#define SCHEMA_IfcReinforcingMeshType_HAS_PredefinedType
+#define SCHEMA_IfcReinforcingMeshType_HAS_MeshLength
+#define SCHEMA_IfcReinforcingMeshType_MeshLength_IS_OPTIONAL
+#define SCHEMA_IfcReinforcingMeshType_HAS_MeshWidth
+#define SCHEMA_IfcReinforcingMeshType_MeshWidth_IS_OPTIONAL
+#define SCHEMA_IfcReinforcingMeshType_HAS_LongitudinalBarNominalDiameter
+#define SCHEMA_IfcReinforcingMeshType_LongitudinalBarNominalDiameter_IS_OPTIONAL
+#define SCHEMA_IfcReinforcingMeshType_HAS_TransverseBarNominalDiameter
+#define SCHEMA_IfcReinforcingMeshType_TransverseBarNominalDiameter_IS_OPTIONAL
+#define SCHEMA_IfcReinforcingMeshType_HAS_LongitudinalBarCrossSectionArea
+#define SCHEMA_IfcReinforcingMeshType_LongitudinalBarCrossSectionArea_IS_OPTIONAL
+#define SCHEMA_IfcReinforcingMeshType_HAS_TransverseBarCrossSectionArea
+#define SCHEMA_IfcReinforcingMeshType_TransverseBarCrossSectionArea_IS_OPTIONAL
+#define SCHEMA_IfcReinforcingMeshType_HAS_LongitudinalBarSpacing
+#define SCHEMA_IfcReinforcingMeshType_LongitudinalBarSpacing_IS_OPTIONAL
+#define SCHEMA_IfcReinforcingMeshType_HAS_TransverseBarSpacing
+#define SCHEMA_IfcReinforcingMeshType_TransverseBarSpacing_IS_OPTIONAL
+#define SCHEMA_IfcReinforcingMeshType_HAS_BendingShapeCode
+#define SCHEMA_IfcReinforcingMeshType_BendingShapeCode_IS_OPTIONAL
+#define SCHEMA_IfcReinforcingMeshType_HAS_BendingParameters
+#define SCHEMA_IfcReinforcingMeshType_BendingParameters_IS_OPTIONAL
+#define SCHEMA_HAS_IfcRelAdheresToElement
+#define SCHEMA_IfcRelAdheresToElement_HAS_RelatingElement
+#define SCHEMA_IfcRelAdheresToElement_HAS_RelatedSurfaceFeatures
+#define SCHEMA_HAS_IfcRelAggregates
+#define SCHEMA_IfcRelAggregates_HAS_RelatingObject
+#define SCHEMA_IfcRelAggregates_HAS_RelatedObjects
+#define SCHEMA_HAS_IfcRelAssigns
+#define SCHEMA_IfcRelAssigns_HAS_RelatedObjects
+#define SCHEMA_IfcRelAssigns_HAS_RelatedObjectsType
+#define SCHEMA_IfcRelAssigns_RelatedObjectsType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcRelAssignsToActor
+#define SCHEMA_IfcRelAssignsToActor_HAS_RelatingActor
+#define SCHEMA_IfcRelAssignsToActor_HAS_ActingRole
+#define SCHEMA_IfcRelAssignsToActor_ActingRole_IS_OPTIONAL
+#define SCHEMA_HAS_IfcRelAssignsToControl
+#define SCHEMA_IfcRelAssignsToControl_HAS_RelatingControl
+#define SCHEMA_HAS_IfcRelAssignsToGroup
+#define SCHEMA_IfcRelAssignsToGroup_HAS_RelatingGroup
+#define SCHEMA_HAS_IfcRelAssignsToGroupByFactor
+#define SCHEMA_IfcRelAssignsToGroupByFactor_HAS_Factor
+#define SCHEMA_HAS_IfcRelAssignsToProcess
+#define SCHEMA_IfcRelAssignsToProcess_HAS_RelatingProcess
+#define SCHEMA_IfcRelAssignsToProcess_HAS_QuantityInProcess
+#define SCHEMA_IfcRelAssignsToProcess_QuantityInProcess_IS_OPTIONAL
+#define SCHEMA_HAS_IfcRelAssignsToProduct
+#define SCHEMA_IfcRelAssignsToProduct_HAS_RelatingProduct
+#define SCHEMA_HAS_IfcRelAssignsToResource
+#define SCHEMA_IfcRelAssignsToResource_HAS_RelatingResource
+#define SCHEMA_HAS_IfcRelAssociates
+#define SCHEMA_IfcRelAssociates_HAS_RelatedObjects
+#define SCHEMA_HAS_IfcRelAssociatesApproval
+#define SCHEMA_IfcRelAssociatesApproval_HAS_RelatingApproval
+#define SCHEMA_HAS_IfcRelAssociatesClassification
+#define SCHEMA_IfcRelAssociatesClassification_HAS_RelatingClassification
+#define SCHEMA_HAS_IfcRelAssociatesConstraint
+#define SCHEMA_IfcRelAssociatesConstraint_HAS_Intent
+#define SCHEMA_IfcRelAssociatesConstraint_Intent_IS_OPTIONAL
+#define SCHEMA_IfcRelAssociatesConstraint_HAS_RelatingConstraint
+#define SCHEMA_HAS_IfcRelAssociatesDocument
+#define SCHEMA_IfcRelAssociatesDocument_HAS_RelatingDocument
+#define SCHEMA_HAS_IfcRelAssociatesLibrary
+#define SCHEMA_IfcRelAssociatesLibrary_HAS_RelatingLibrary
+#define SCHEMA_HAS_IfcRelAssociatesMaterial
+#define SCHEMA_IfcRelAssociatesMaterial_HAS_RelatingMaterial
+#define SCHEMA_HAS_IfcRelAssociatesProfileDef
+#define SCHEMA_IfcRelAssociatesProfileDef_HAS_RelatingProfileDef
+#define SCHEMA_HAS_IfcRelConnects
+#define SCHEMA_HAS_IfcRelConnectsElements
+#define SCHEMA_IfcRelConnectsElements_HAS_ConnectionGeometry
+#define SCHEMA_IfcRelConnectsElements_ConnectionGeometry_IS_OPTIONAL
+#define SCHEMA_IfcRelConnectsElements_HAS_RelatingElement
+#define SCHEMA_IfcRelConnectsElements_HAS_RelatedElement
+#define SCHEMA_HAS_IfcRelConnectsPathElements
+#define SCHEMA_IfcRelConnectsPathElements_HAS_RelatingPriorities
+#define SCHEMA_IfcRelConnectsPathElements_HAS_RelatedPriorities
+#define SCHEMA_IfcRelConnectsPathElements_HAS_RelatedConnectionType
+#define SCHEMA_IfcRelConnectsPathElements_HAS_RelatingConnectionType
+#define SCHEMA_HAS_IfcRelConnectsPortToElement
+#define SCHEMA_IfcRelConnectsPortToElement_HAS_RelatingPort
+#define SCHEMA_IfcRelConnectsPortToElement_HAS_RelatedElement
+#define SCHEMA_HAS_IfcRelConnectsPorts
+#define SCHEMA_IfcRelConnectsPorts_HAS_RelatingPort
+#define SCHEMA_IfcRelConnectsPorts_HAS_RelatedPort
+#define SCHEMA_IfcRelConnectsPorts_HAS_RealizingElement
+#define SCHEMA_IfcRelConnectsPorts_RealizingElement_IS_OPTIONAL
+#define SCHEMA_HAS_IfcRelConnectsStructuralActivity
+#define SCHEMA_IfcRelConnectsStructuralActivity_HAS_RelatingElement
+#define SCHEMA_IfcRelConnectsStructuralActivity_HAS_RelatedStructuralActivity
+#define SCHEMA_HAS_IfcRelConnectsStructuralMember
+#define SCHEMA_IfcRelConnectsStructuralMember_HAS_RelatingStructuralMember
+#define SCHEMA_IfcRelConnectsStructuralMember_HAS_RelatedStructuralConnection
+#define SCHEMA_IfcRelConnectsStructuralMember_HAS_AppliedCondition
+#define SCHEMA_IfcRelConnectsStructuralMember_AppliedCondition_IS_OPTIONAL
+#define SCHEMA_IfcRelConnectsStructuralMember_HAS_AdditionalConditions
+#define SCHEMA_IfcRelConnectsStructuralMember_AdditionalConditions_IS_OPTIONAL
+#define SCHEMA_IfcRelConnectsStructuralMember_HAS_SupportedLength
+#define SCHEMA_IfcRelConnectsStructuralMember_SupportedLength_IS_OPTIONAL
+#define SCHEMA_IfcRelConnectsStructuralMember_HAS_ConditionCoordinateSystem
+#define SCHEMA_IfcRelConnectsStructuralMember_ConditionCoordinateSystem_IS_OPTIONAL
+#define SCHEMA_HAS_IfcRelConnectsWithEccentricity
+#define SCHEMA_IfcRelConnectsWithEccentricity_HAS_ConnectionConstraint
+#define SCHEMA_HAS_IfcRelConnectsWithRealizingElements
+#define SCHEMA_IfcRelConnectsWithRealizingElements_HAS_RealizingElements
+#define SCHEMA_IfcRelConnectsWithRealizingElements_HAS_ConnectionType
+#define SCHEMA_IfcRelConnectsWithRealizingElements_ConnectionType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcRelContainedInSpatialStructure
+#define SCHEMA_IfcRelContainedInSpatialStructure_HAS_RelatedElements
+#define SCHEMA_IfcRelContainedInSpatialStructure_HAS_RelatingStructure
+#define SCHEMA_HAS_IfcRelCoversBldgElements
+#define SCHEMA_IfcRelCoversBldgElements_HAS_RelatingBuildingElement
+#define SCHEMA_IfcRelCoversBldgElements_HAS_RelatedCoverings
+#define SCHEMA_HAS_IfcRelCoversSpaces
+#define SCHEMA_IfcRelCoversSpaces_HAS_RelatingSpace
+#define SCHEMA_IfcRelCoversSpaces_HAS_RelatedCoverings
+#define SCHEMA_HAS_IfcRelDeclares
+#define SCHEMA_IfcRelDeclares_HAS_RelatingContext
+#define SCHEMA_IfcRelDeclares_HAS_RelatedDefinitions
+#define SCHEMA_HAS_IfcRelDecomposes
+#define SCHEMA_HAS_IfcRelDefines
+#define SCHEMA_HAS_IfcRelDefinesByObject
+#define SCHEMA_IfcRelDefinesByObject_HAS_RelatedObjects
+#define SCHEMA_IfcRelDefinesByObject_HAS_RelatingObject
+#define SCHEMA_HAS_IfcRelDefinesByProperties
+#define SCHEMA_IfcRelDefinesByProperties_HAS_RelatedObjects
+#define SCHEMA_IfcRelDefinesByProperties_HAS_RelatingPropertyDefinition
+#define SCHEMA_HAS_IfcRelDefinesByTemplate
+#define SCHEMA_IfcRelDefinesByTemplate_HAS_RelatedPropertySets
+#define SCHEMA_IfcRelDefinesByTemplate_HAS_RelatingTemplate
+#define SCHEMA_HAS_IfcRelDefinesByType
+#define SCHEMA_IfcRelDefinesByType_HAS_RelatedObjects
+#define SCHEMA_IfcRelDefinesByType_HAS_RelatingType
+#define SCHEMA_HAS_IfcRelFillsElement
+#define SCHEMA_IfcRelFillsElement_HAS_RelatingOpeningElement
+#define SCHEMA_IfcRelFillsElement_HAS_RelatedBuildingElement
+#define SCHEMA_HAS_IfcRelFlowControlElements
+#define SCHEMA_IfcRelFlowControlElements_HAS_RelatedControlElements
+#define SCHEMA_IfcRelFlowControlElements_HAS_RelatingFlowElement
+#define SCHEMA_HAS_IfcRelInterferesElements
+#define SCHEMA_IfcRelInterferesElements_HAS_RelatingElement
+#define SCHEMA_IfcRelInterferesElements_HAS_RelatedElement
+#define SCHEMA_IfcRelInterferesElements_HAS_InterferenceGeometry
+#define SCHEMA_IfcRelInterferesElements_InterferenceGeometry_IS_OPTIONAL
+#define SCHEMA_IfcRelInterferesElements_HAS_InterferenceSpace
+#define SCHEMA_IfcRelInterferesElements_InterferenceSpace_IS_OPTIONAL
+#define SCHEMA_IfcRelInterferesElements_HAS_InterferenceType
+#define SCHEMA_IfcRelInterferesElements_InterferenceType_IS_OPTIONAL
+#define SCHEMA_IfcRelInterferesElements_HAS_ImpliedOrder
+#define SCHEMA_HAS_IfcRelNests
+#define SCHEMA_IfcRelNests_HAS_RelatingObject
+#define SCHEMA_IfcRelNests_HAS_RelatedObjects
+#define SCHEMA_HAS_IfcRelPositions
+#define SCHEMA_IfcRelPositions_HAS_RelatingPositioningElement
+#define SCHEMA_IfcRelPositions_HAS_RelatedProducts
+#define SCHEMA_HAS_IfcRelProjectsElement
+#define SCHEMA_IfcRelProjectsElement_HAS_RelatingElement
+#define SCHEMA_IfcRelProjectsElement_HAS_RelatedFeatureElement
+#define SCHEMA_HAS_IfcRelReferencedInSpatialStructure
+#define SCHEMA_IfcRelReferencedInSpatialStructure_HAS_RelatedElements
+#define SCHEMA_IfcRelReferencedInSpatialStructure_HAS_RelatingStructure
+#define SCHEMA_HAS_IfcRelSequence
+#define SCHEMA_IfcRelSequence_HAS_RelatingProcess
+#define SCHEMA_IfcRelSequence_HAS_RelatedProcess
+#define SCHEMA_IfcRelSequence_HAS_TimeLag
+#define SCHEMA_IfcRelSequence_TimeLag_IS_OPTIONAL
+#define SCHEMA_IfcRelSequence_HAS_SequenceType
+#define SCHEMA_IfcRelSequence_SequenceType_IS_OPTIONAL
+#define SCHEMA_IfcRelSequence_HAS_UserDefinedSequenceType
+#define SCHEMA_IfcRelSequence_UserDefinedSequenceType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcRelServicesBuildings
+#define SCHEMA_IfcRelServicesBuildings_HAS_RelatingSystem
+#define SCHEMA_IfcRelServicesBuildings_HAS_RelatedBuildings
+#define SCHEMA_HAS_IfcRelSpaceBoundary
+#define SCHEMA_IfcRelSpaceBoundary_HAS_RelatingSpace
+#define SCHEMA_IfcRelSpaceBoundary_HAS_RelatedBuildingElement
+#define SCHEMA_IfcRelSpaceBoundary_HAS_ConnectionGeometry
+#define SCHEMA_IfcRelSpaceBoundary_ConnectionGeometry_IS_OPTIONAL
+#define SCHEMA_IfcRelSpaceBoundary_HAS_PhysicalOrVirtualBoundary
+#define SCHEMA_IfcRelSpaceBoundary_HAS_InternalOrExternalBoundary
+#define SCHEMA_HAS_IfcRelSpaceBoundary1stLevel
+#define SCHEMA_IfcRelSpaceBoundary1stLevel_HAS_ParentBoundary
+#define SCHEMA_IfcRelSpaceBoundary1stLevel_ParentBoundary_IS_OPTIONAL
+#define SCHEMA_IfcRelSpaceBoundary1stLevel_HAS_InnerBoundaries
+#define SCHEMA_HAS_IfcRelSpaceBoundary2ndLevel
+#define SCHEMA_IfcRelSpaceBoundary2ndLevel_HAS_CorrespondingBoundary
+#define SCHEMA_IfcRelSpaceBoundary2ndLevel_CorrespondingBoundary_IS_OPTIONAL
+#define SCHEMA_IfcRelSpaceBoundary2ndLevel_HAS_Corresponds
+#define SCHEMA_HAS_IfcRelVoidsElement
+#define SCHEMA_IfcRelVoidsElement_HAS_RelatingBuildingElement
+#define SCHEMA_IfcRelVoidsElement_HAS_RelatedOpeningElement
+#define SCHEMA_HAS_IfcRelationship
+#define SCHEMA_HAS_IfcReparametrisedCompositeCurveSegment
+#define SCHEMA_IfcReparametrisedCompositeCurveSegment_HAS_ParamLength
+#define SCHEMA_HAS_IfcRepresentation
+#define SCHEMA_IfcRepresentation_HAS_ContextOfItems
+#define SCHEMA_IfcRepresentation_HAS_RepresentationIdentifier
+#define SCHEMA_IfcRepresentation_RepresentationIdentifier_IS_OPTIONAL
+#define SCHEMA_IfcRepresentation_HAS_RepresentationType
+#define SCHEMA_IfcRepresentation_RepresentationType_IS_OPTIONAL
+#define SCHEMA_IfcRepresentation_HAS_Items
+#define SCHEMA_IfcRepresentation_HAS_RepresentationMap
+#define SCHEMA_IfcRepresentation_HAS_LayerAssignments
+#define SCHEMA_IfcRepresentation_HAS_OfProductRepresentation
+#define SCHEMA_HAS_IfcRepresentationContext
+#define SCHEMA_IfcRepresentationContext_HAS_ContextIdentifier
+#define SCHEMA_IfcRepresentationContext_ContextIdentifier_IS_OPTIONAL
+#define SCHEMA_IfcRepresentationContext_HAS_ContextType
+#define SCHEMA_IfcRepresentationContext_ContextType_IS_OPTIONAL
+#define SCHEMA_IfcRepresentationContext_HAS_RepresentationsInContext
+#define SCHEMA_HAS_IfcRepresentationItem
+#define SCHEMA_IfcRepresentationItem_HAS_LayerAssignment
+#define SCHEMA_IfcRepresentationItem_HAS_StyledByItem
+#define SCHEMA_HAS_IfcRepresentationMap
+#define SCHEMA_IfcRepresentationMap_HAS_MappingOrigin
+#define SCHEMA_IfcRepresentationMap_HAS_MappedRepresentation
+#define SCHEMA_IfcRepresentationMap_HAS_HasShapeAspects
+#define SCHEMA_IfcRepresentationMap_HAS_MapUsage
+#define SCHEMA_HAS_IfcResource
+#define SCHEMA_IfcResource_HAS_Identification
+#define SCHEMA_IfcResource_Identification_IS_OPTIONAL
+#define SCHEMA_IfcResource_HAS_LongDescription
+#define SCHEMA_IfcResource_LongDescription_IS_OPTIONAL
+#define SCHEMA_IfcResource_HAS_ResourceOf
+#define SCHEMA_HAS_IfcResourceApprovalRelationship
+#define SCHEMA_IfcResourceApprovalRelationship_HAS_RelatedResourceObjects
+#define SCHEMA_IfcResourceApprovalRelationship_HAS_RelatingApproval
+#define SCHEMA_HAS_IfcResourceConstraintRelationship
+#define SCHEMA_IfcResourceConstraintRelationship_HAS_RelatingConstraint
+#define SCHEMA_IfcResourceConstraintRelationship_HAS_RelatedResourceObjects
+#define SCHEMA_HAS_IfcResourceLevelRelationship
+#define SCHEMA_IfcResourceLevelRelationship_HAS_Name
+#define SCHEMA_IfcResourceLevelRelationship_Name_IS_OPTIONAL
+#define SCHEMA_IfcResourceLevelRelationship_HAS_Description
+#define SCHEMA_IfcResourceLevelRelationship_Description_IS_OPTIONAL
+#define SCHEMA_HAS_IfcResourceTime
+#define SCHEMA_IfcResourceTime_HAS_ScheduleWork
+#define SCHEMA_IfcResourceTime_ScheduleWork_IS_OPTIONAL
+#define SCHEMA_IfcResourceTime_HAS_ScheduleUsage
+#define SCHEMA_IfcResourceTime_ScheduleUsage_IS_OPTIONAL
+#define SCHEMA_IfcResourceTime_HAS_ScheduleStart
+#define SCHEMA_IfcResourceTime_ScheduleStart_IS_OPTIONAL
+#define SCHEMA_IfcResourceTime_HAS_ScheduleFinish
+#define SCHEMA_IfcResourceTime_ScheduleFinish_IS_OPTIONAL
+#define SCHEMA_IfcResourceTime_HAS_ScheduleContour
+#define SCHEMA_IfcResourceTime_ScheduleContour_IS_OPTIONAL
+#define SCHEMA_IfcResourceTime_HAS_LevelingDelay
+#define SCHEMA_IfcResourceTime_LevelingDelay_IS_OPTIONAL
+#define SCHEMA_IfcResourceTime_HAS_IsOverAllocated
+#define SCHEMA_IfcResourceTime_IsOverAllocated_IS_OPTIONAL
+#define SCHEMA_IfcResourceTime_HAS_StatusTime
+#define SCHEMA_IfcResourceTime_StatusTime_IS_OPTIONAL
+#define SCHEMA_IfcResourceTime_HAS_ActualWork
+#define SCHEMA_IfcResourceTime_ActualWork_IS_OPTIONAL
+#define SCHEMA_IfcResourceTime_HAS_ActualUsage
+#define SCHEMA_IfcResourceTime_ActualUsage_IS_OPTIONAL
+#define SCHEMA_IfcResourceTime_HAS_ActualStart
+#define SCHEMA_IfcResourceTime_ActualStart_IS_OPTIONAL
+#define SCHEMA_IfcResourceTime_HAS_ActualFinish
+#define SCHEMA_IfcResourceTime_ActualFinish_IS_OPTIONAL
+#define SCHEMA_IfcResourceTime_HAS_RemainingWork
+#define SCHEMA_IfcResourceTime_RemainingWork_IS_OPTIONAL
+#define SCHEMA_IfcResourceTime_HAS_RemainingUsage
+#define SCHEMA_IfcResourceTime_RemainingUsage_IS_OPTIONAL
+#define SCHEMA_IfcResourceTime_HAS_Completion
+#define SCHEMA_IfcResourceTime_Completion_IS_OPTIONAL
+#define SCHEMA_HAS_IfcRevolvedAreaSolid
+#define SCHEMA_IfcRevolvedAreaSolid_HAS_Axis
+#define SCHEMA_IfcRevolvedAreaSolid_HAS_Angle
+#define SCHEMA_HAS_IfcRevolvedAreaSolidTapered
+#define SCHEMA_IfcRevolvedAreaSolidTapered_HAS_EndSweptArea
+#define SCHEMA_HAS_IfcRightCircularCone
+#define SCHEMA_IfcRightCircularCone_HAS_Height
+#define SCHEMA_IfcRightCircularCone_HAS_BottomRadius
+#define SCHEMA_HAS_IfcRightCircularCylinder
+#define SCHEMA_IfcRightCircularCylinder_HAS_Height
+#define SCHEMA_IfcRightCircularCylinder_HAS_Radius
+#define SCHEMA_HAS_IfcRoad
+#define SCHEMA_IfcRoad_HAS_PredefinedType
+#define SCHEMA_IfcRoad_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcRoadPart
+#define SCHEMA_IfcRoadPart_HAS_PredefinedType
+#define SCHEMA_IfcRoadPart_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcRoof
+#define SCHEMA_IfcRoof_HAS_PredefinedType
+#define SCHEMA_IfcRoof_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcRoofType
+#define SCHEMA_IfcRoofType_HAS_PredefinedType
+#define SCHEMA_HAS_IfcRoot
+#define SCHEMA_IfcRoot_HAS_GlobalId
+#define SCHEMA_IfcRoot_HAS_OwnerHistory
+#define SCHEMA_IfcRoot_OwnerHistory_IS_OPTIONAL
+#define SCHEMA_IfcRoot_HAS_Name
+#define SCHEMA_IfcRoot_Name_IS_OPTIONAL
+#define SCHEMA_IfcRoot_HAS_Description
+#define SCHEMA_IfcRoot_Description_IS_OPTIONAL
+#define SCHEMA_HAS_IfcRoundedRectangleProfileDef
+#define SCHEMA_IfcRoundedRectangleProfileDef_HAS_RoundingRadius
+#define SCHEMA_HAS_IfcSIUnit
+#define SCHEMA_IfcSIUnit_HAS_Prefix
+#define SCHEMA_IfcSIUnit_Prefix_IS_OPTIONAL
+#define SCHEMA_IfcSIUnit_HAS_Name
+#define SCHEMA_HAS_IfcSanitaryTerminal
+#define SCHEMA_IfcSanitaryTerminal_HAS_PredefinedType
+#define SCHEMA_IfcSanitaryTerminal_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcSanitaryTerminalType
+#define SCHEMA_IfcSanitaryTerminalType_HAS_PredefinedType
+#define SCHEMA_HAS_IfcSchedulingTime
+#define SCHEMA_IfcSchedulingTime_HAS_Name
+#define SCHEMA_IfcSchedulingTime_Name_IS_OPTIONAL
+#define SCHEMA_IfcSchedulingTime_HAS_DataOrigin
+#define SCHEMA_IfcSchedulingTime_DataOrigin_IS_OPTIONAL
+#define SCHEMA_IfcSchedulingTime_HAS_UserDefinedDataOrigin
+#define SCHEMA_IfcSchedulingTime_UserDefinedDataOrigin_IS_OPTIONAL
+#define SCHEMA_HAS_IfcSeamCurve
+#define SCHEMA_HAS_IfcSecondOrderPolynomialSpiral
+#define SCHEMA_IfcSecondOrderPolynomialSpiral_HAS_QuadraticTerm
+#define SCHEMA_IfcSecondOrderPolynomialSpiral_HAS_LinearTerm
+#define SCHEMA_IfcSecondOrderPolynomialSpiral_LinearTerm_IS_OPTIONAL
+#define SCHEMA_IfcSecondOrderPolynomialSpiral_HAS_ConstantTerm
+#define SCHEMA_IfcSecondOrderPolynomialSpiral_ConstantTerm_IS_OPTIONAL
+#define SCHEMA_HAS_IfcSectionProperties
+#define SCHEMA_IfcSectionProperties_HAS_SectionType
+#define SCHEMA_IfcSectionProperties_HAS_StartProfile
+#define SCHEMA_IfcSectionProperties_HAS_EndProfile
+#define SCHEMA_IfcSectionProperties_EndProfile_IS_OPTIONAL
+#define SCHEMA_HAS_IfcSectionReinforcementProperties
+#define SCHEMA_IfcSectionReinforcementProperties_HAS_LongitudinalStartPosition
+#define SCHEMA_IfcSectionReinforcementProperties_HAS_LongitudinalEndPosition
+#define SCHEMA_IfcSectionReinforcementProperties_HAS_TransversePosition
+#define SCHEMA_IfcSectionReinforcementProperties_TransversePosition_IS_OPTIONAL
+#define SCHEMA_IfcSectionReinforcementProperties_HAS_ReinforcementRole
+#define SCHEMA_IfcSectionReinforcementProperties_HAS_SectionDefinition
+#define SCHEMA_IfcSectionReinforcementProperties_HAS_CrossSectionReinforcementDefinitions
+#define SCHEMA_HAS_IfcSectionedSolid
+#define SCHEMA_IfcSectionedSolid_HAS_Directrix
+#define SCHEMA_IfcSectionedSolid_HAS_CrossSections
+#define SCHEMA_HAS_IfcSectionedSolidHorizontal
+#define SCHEMA_IfcSectionedSolidHorizontal_HAS_CrossSectionPositions
+#define SCHEMA_HAS_IfcSectionedSpine
+#define SCHEMA_IfcSectionedSpine_HAS_SpineCurve
+#define SCHEMA_IfcSectionedSpine_HAS_CrossSections
+#define SCHEMA_IfcSectionedSpine_HAS_CrossSectionPositions
+#define SCHEMA_HAS_IfcSectionedSurface
+#define SCHEMA_IfcSectionedSurface_HAS_Directrix
+#define SCHEMA_IfcSectionedSurface_HAS_CrossSectionPositions
+#define SCHEMA_IfcSectionedSurface_HAS_CrossSections
+#define SCHEMA_HAS_IfcSegment
+#define SCHEMA_IfcSegment_HAS_Transition
+#define SCHEMA_IfcSegment_HAS_UsingCurves
+#define SCHEMA_HAS_IfcSegmentedReferenceCurve
+#define SCHEMA_IfcSegmentedReferenceCurve_HAS_BaseCurve
+#define SCHEMA_IfcSegmentedReferenceCurve_HAS_EndPoint
+#define SCHEMA_IfcSegmentedReferenceCurve_EndPoint_IS_OPTIONAL
+#define SCHEMA_HAS_IfcSensor
+#define SCHEMA_IfcSensor_HAS_PredefinedType
+#define SCHEMA_IfcSensor_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcSensorType
+#define SCHEMA_IfcSensorType_HAS_PredefinedType
+#define SCHEMA_HAS_IfcSeventhOrderPolynomialSpiral
+#define SCHEMA_IfcSeventhOrderPolynomialSpiral_HAS_SepticTerm
+#define SCHEMA_IfcSeventhOrderPolynomialSpiral_HAS_SexticTerm
+#define SCHEMA_IfcSeventhOrderPolynomialSpiral_SexticTerm_IS_OPTIONAL
+#define SCHEMA_IfcSeventhOrderPolynomialSpiral_HAS_QuinticTerm
+#define SCHEMA_IfcSeventhOrderPolynomialSpiral_QuinticTerm_IS_OPTIONAL
+#define SCHEMA_IfcSeventhOrderPolynomialSpiral_HAS_QuarticTerm
+#define SCHEMA_IfcSeventhOrderPolynomialSpiral_QuarticTerm_IS_OPTIONAL
+#define SCHEMA_IfcSeventhOrderPolynomialSpiral_HAS_CubicTerm
+#define SCHEMA_IfcSeventhOrderPolynomialSpiral_CubicTerm_IS_OPTIONAL
+#define SCHEMA_IfcSeventhOrderPolynomialSpiral_HAS_QuadraticTerm
+#define SCHEMA_IfcSeventhOrderPolynomialSpiral_QuadraticTerm_IS_OPTIONAL
+#define SCHEMA_IfcSeventhOrderPolynomialSpiral_HAS_LinearTerm
+#define SCHEMA_IfcSeventhOrderPolynomialSpiral_LinearTerm_IS_OPTIONAL
+#define SCHEMA_IfcSeventhOrderPolynomialSpiral_HAS_ConstantTerm
+#define SCHEMA_IfcSeventhOrderPolynomialSpiral_ConstantTerm_IS_OPTIONAL
+#define SCHEMA_HAS_IfcShadingDevice
+#define SCHEMA_IfcShadingDevice_HAS_PredefinedType
+#define SCHEMA_IfcShadingDevice_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcShadingDeviceType
+#define SCHEMA_IfcShadingDeviceType_HAS_PredefinedType
+#define SCHEMA_HAS_IfcShapeAspect
+#define SCHEMA_IfcShapeAspect_HAS_ShapeRepresentations
+#define SCHEMA_IfcShapeAspect_HAS_Name
+#define SCHEMA_IfcShapeAspect_Name_IS_OPTIONAL
+#define SCHEMA_IfcShapeAspect_HAS_Description
+#define SCHEMA_IfcShapeAspect_Description_IS_OPTIONAL
+#define SCHEMA_IfcShapeAspect_HAS_ProductDefinitional
+#define SCHEMA_IfcShapeAspect_HAS_PartOfProductDefinitionShape
+#define SCHEMA_IfcShapeAspect_PartOfProductDefinitionShape_IS_OPTIONAL
+#define SCHEMA_IfcShapeAspect_HAS_HasExternalReferences
+#define SCHEMA_HAS_IfcShapeModel
+#define SCHEMA_IfcShapeModel_HAS_OfShapeAspect
+#define SCHEMA_HAS_IfcShapeRepresentation
+#define SCHEMA_HAS_IfcShellBasedSurfaceModel
+#define SCHEMA_IfcShellBasedSurfaceModel_HAS_SbsmBoundary
+#define SCHEMA_HAS_IfcSign
+#define SCHEMA_IfcSign_HAS_PredefinedType
+#define SCHEMA_IfcSign_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcSignType
+#define SCHEMA_IfcSignType_HAS_PredefinedType
+#define SCHEMA_HAS_IfcSignal
+#define SCHEMA_IfcSignal_HAS_PredefinedType
+#define SCHEMA_IfcSignal_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcSignalType
+#define SCHEMA_IfcSignalType_HAS_PredefinedType
+#define SCHEMA_HAS_IfcSimpleProperty
+#define SCHEMA_HAS_IfcSimplePropertyTemplate
+#define SCHEMA_IfcSimplePropertyTemplate_HAS_TemplateType
+#define SCHEMA_IfcSimplePropertyTemplate_TemplateType_IS_OPTIONAL
+#define SCHEMA_IfcSimplePropertyTemplate_HAS_PrimaryMeasureType
+#define SCHEMA_IfcSimplePropertyTemplate_PrimaryMeasureType_IS_OPTIONAL
+#define SCHEMA_IfcSimplePropertyTemplate_HAS_SecondaryMeasureType
+#define SCHEMA_IfcSimplePropertyTemplate_SecondaryMeasureType_IS_OPTIONAL
+#define SCHEMA_IfcSimplePropertyTemplate_HAS_Enumerators
+#define SCHEMA_IfcSimplePropertyTemplate_Enumerators_IS_OPTIONAL
+#define SCHEMA_IfcSimplePropertyTemplate_HAS_PrimaryUnit
+#define SCHEMA_IfcSimplePropertyTemplate_PrimaryUnit_IS_OPTIONAL
+#define SCHEMA_IfcSimplePropertyTemplate_HAS_SecondaryUnit
+#define SCHEMA_IfcSimplePropertyTemplate_SecondaryUnit_IS_OPTIONAL
+#define SCHEMA_IfcSimplePropertyTemplate_HAS_Expression
+#define SCHEMA_IfcSimplePropertyTemplate_Expression_IS_OPTIONAL
+#define SCHEMA_IfcSimplePropertyTemplate_HAS_AccessState
+#define SCHEMA_IfcSimplePropertyTemplate_AccessState_IS_OPTIONAL
+#define SCHEMA_HAS_IfcSineSpiral
+#define SCHEMA_IfcSineSpiral_HAS_SineTerm
+#define SCHEMA_IfcSineSpiral_HAS_LinearTerm
+#define SCHEMA_IfcSineSpiral_LinearTerm_IS_OPTIONAL
+#define SCHEMA_IfcSineSpiral_HAS_ConstantTerm
+#define SCHEMA_IfcSineSpiral_ConstantTerm_IS_OPTIONAL
+#define SCHEMA_HAS_IfcSite
+#define SCHEMA_IfcSite_HAS_RefLatitude
+#define SCHEMA_IfcSite_RefLatitude_IS_OPTIONAL
+#define SCHEMA_IfcSite_HAS_RefLongitude
+#define SCHEMA_IfcSite_RefLongitude_IS_OPTIONAL
+#define SCHEMA_IfcSite_HAS_RefElevation
+#define SCHEMA_IfcSite_RefElevation_IS_OPTIONAL
+#define SCHEMA_IfcSite_HAS_LandTitleNumber
+#define SCHEMA_IfcSite_LandTitleNumber_IS_OPTIONAL
+#define SCHEMA_IfcSite_HAS_SiteAddress
+#define SCHEMA_IfcSite_SiteAddress_IS_OPTIONAL
+#define SCHEMA_HAS_IfcSlab
+#define SCHEMA_IfcSlab_HAS_PredefinedType
+#define SCHEMA_IfcSlab_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcSlabType
+#define SCHEMA_IfcSlabType_HAS_PredefinedType
+#define SCHEMA_HAS_IfcSlippageConnectionCondition
+#define SCHEMA_IfcSlippageConnectionCondition_HAS_SlippageX
+#define SCHEMA_IfcSlippageConnectionCondition_SlippageX_IS_OPTIONAL
+#define SCHEMA_IfcSlippageConnectionCondition_HAS_SlippageY
+#define SCHEMA_IfcSlippageConnectionCondition_SlippageY_IS_OPTIONAL
+#define SCHEMA_IfcSlippageConnectionCondition_HAS_SlippageZ
+#define SCHEMA_IfcSlippageConnectionCondition_SlippageZ_IS_OPTIONAL
+#define SCHEMA_HAS_IfcSolarDevice
+#define SCHEMA_IfcSolarDevice_HAS_PredefinedType
+#define SCHEMA_IfcSolarDevice_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcSolarDeviceType
+#define SCHEMA_IfcSolarDeviceType_HAS_PredefinedType
+#define SCHEMA_HAS_IfcSolidModel
+#define SCHEMA_HAS_IfcSpace
+#define SCHEMA_IfcSpace_HAS_PredefinedType
+#define SCHEMA_IfcSpace_PredefinedType_IS_OPTIONAL
+#define SCHEMA_IfcSpace_HAS_ElevationWithFlooring
+#define SCHEMA_IfcSpace_ElevationWithFlooring_IS_OPTIONAL
+#define SCHEMA_IfcSpace_HAS_HasCoverings
+#define SCHEMA_IfcSpace_HAS_BoundedBy
+#define SCHEMA_HAS_IfcSpaceHeater
+#define SCHEMA_IfcSpaceHeater_HAS_PredefinedType
+#define SCHEMA_IfcSpaceHeater_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcSpaceHeaterType
+#define SCHEMA_IfcSpaceHeaterType_HAS_PredefinedType
+#define SCHEMA_HAS_IfcSpaceType
+#define SCHEMA_IfcSpaceType_HAS_PredefinedType
+#define SCHEMA_IfcSpaceType_HAS_LongName
+#define SCHEMA_IfcSpaceType_LongName_IS_OPTIONAL
+#define SCHEMA_HAS_IfcSpatialElement
+#define SCHEMA_IfcSpatialElement_HAS_LongName
+#define SCHEMA_IfcSpatialElement_LongName_IS_OPTIONAL
+#define SCHEMA_IfcSpatialElement_HAS_ContainsElements
+#define SCHEMA_IfcSpatialElement_HAS_ServicedBySystems
+#define SCHEMA_IfcSpatialElement_HAS_ReferencesElements
+#define SCHEMA_IfcSpatialElement_HAS_IsInterferedByElements
+#define SCHEMA_IfcSpatialElement_HAS_InterferesElements
+#define SCHEMA_HAS_IfcSpatialElementType
+#define SCHEMA_IfcSpatialElementType_HAS_ElementType
+#define SCHEMA_IfcSpatialElementType_ElementType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcSpatialStructureElement
+#define SCHEMA_IfcSpatialStructureElement_HAS_CompositionType
+#define SCHEMA_IfcSpatialStructureElement_CompositionType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcSpatialStructureElementType
+#define SCHEMA_HAS_IfcSpatialZone
+#define SCHEMA_IfcSpatialZone_HAS_PredefinedType
+#define SCHEMA_IfcSpatialZone_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcSpatialZoneType
+#define SCHEMA_IfcSpatialZoneType_HAS_PredefinedType
+#define SCHEMA_IfcSpatialZoneType_HAS_LongName
+#define SCHEMA_IfcSpatialZoneType_LongName_IS_OPTIONAL
+#define SCHEMA_HAS_IfcSphere
+#define SCHEMA_IfcSphere_HAS_Radius
+#define SCHEMA_HAS_IfcSphericalSurface
+#define SCHEMA_IfcSphericalSurface_HAS_Radius
+#define SCHEMA_HAS_IfcSpiral
+#define SCHEMA_IfcSpiral_HAS_Position
+#define SCHEMA_IfcSpiral_Position_IS_OPTIONAL
+#define SCHEMA_HAS_IfcStackTerminal
+#define SCHEMA_IfcStackTerminal_HAS_PredefinedType
+#define SCHEMA_IfcStackTerminal_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcStackTerminalType
+#define SCHEMA_IfcStackTerminalType_HAS_PredefinedType
+#define SCHEMA_HAS_IfcStair
+#define SCHEMA_IfcStair_HAS_PredefinedType
+#define SCHEMA_IfcStair_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcStairFlight
+#define SCHEMA_IfcStairFlight_HAS_NumberOfRisers
+#define SCHEMA_IfcStairFlight_NumberOfRisers_IS_OPTIONAL
+#define SCHEMA_IfcStairFlight_HAS_NumberOfTreads
+#define SCHEMA_IfcStairFlight_NumberOfTreads_IS_OPTIONAL
+#define SCHEMA_IfcStairFlight_HAS_RiserHeight
+#define SCHEMA_IfcStairFlight_RiserHeight_IS_OPTIONAL
+#define SCHEMA_IfcStairFlight_HAS_TreadLength
+#define SCHEMA_IfcStairFlight_TreadLength_IS_OPTIONAL
+#define SCHEMA_IfcStairFlight_HAS_PredefinedType
+#define SCHEMA_IfcStairFlight_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcStairFlightType
+#define SCHEMA_IfcStairFlightType_HAS_PredefinedType
+#define SCHEMA_HAS_IfcStairType
+#define SCHEMA_IfcStairType_HAS_PredefinedType
+#define SCHEMA_HAS_IfcStructuralAction
+#define SCHEMA_IfcStructuralAction_HAS_DestabilizingLoad
+#define SCHEMA_IfcStructuralAction_DestabilizingLoad_IS_OPTIONAL
+#define SCHEMA_HAS_IfcStructuralActivity
+#define SCHEMA_IfcStructuralActivity_HAS_AppliedLoad
+#define SCHEMA_IfcStructuralActivity_HAS_GlobalOrLocal
+#define SCHEMA_IfcStructuralActivity_HAS_AssignedToStructuralItem
+#define SCHEMA_HAS_IfcStructuralAnalysisModel
+#define SCHEMA_IfcStructuralAnalysisModel_HAS_PredefinedType
+#define SCHEMA_IfcStructuralAnalysisModel_HAS_OrientationOf2DPlane
+#define SCHEMA_IfcStructuralAnalysisModel_OrientationOf2DPlane_IS_OPTIONAL
+#define SCHEMA_IfcStructuralAnalysisModel_HAS_LoadedBy
+#define SCHEMA_IfcStructuralAnalysisModel_LoadedBy_IS_OPTIONAL
+#define SCHEMA_IfcStructuralAnalysisModel_HAS_HasResults
+#define SCHEMA_IfcStructuralAnalysisModel_HasResults_IS_OPTIONAL
+#define SCHEMA_IfcStructuralAnalysisModel_HAS_SharedPlacement
+#define SCHEMA_IfcStructuralAnalysisModel_SharedPlacement_IS_OPTIONAL
+#define SCHEMA_HAS_IfcStructuralConnection
+#define SCHEMA_IfcStructuralConnection_HAS_AppliedCondition
+#define SCHEMA_IfcStructuralConnection_AppliedCondition_IS_OPTIONAL
+#define SCHEMA_IfcStructuralConnection_HAS_ConnectsStructuralMembers
+#define SCHEMA_HAS_IfcStructuralConnectionCondition
+#define SCHEMA_IfcStructuralConnectionCondition_HAS_Name
+#define SCHEMA_IfcStructuralConnectionCondition_Name_IS_OPTIONAL
+#define SCHEMA_HAS_IfcStructuralCurveAction
+#define SCHEMA_IfcStructuralCurveAction_HAS_ProjectedOrTrue
+#define SCHEMA_IfcStructuralCurveAction_ProjectedOrTrue_IS_OPTIONAL
+#define SCHEMA_IfcStructuralCurveAction_HAS_PredefinedType
+#define SCHEMA_HAS_IfcStructuralCurveConnection
+#define SCHEMA_IfcStructuralCurveConnection_HAS_AxisDirection
+#define SCHEMA_HAS_IfcStructuralCurveMember
+#define SCHEMA_IfcStructuralCurveMember_HAS_PredefinedType
+#define SCHEMA_IfcStructuralCurveMember_HAS_Axis
+#define SCHEMA_HAS_IfcStructuralCurveMemberVarying
+#define SCHEMA_HAS_IfcStructuralCurveReaction
+#define SCHEMA_IfcStructuralCurveReaction_HAS_PredefinedType
+#define SCHEMA_HAS_IfcStructuralItem
+#define SCHEMA_IfcStructuralItem_HAS_AssignedStructuralActivity
+#define SCHEMA_HAS_IfcStructuralLinearAction
+#define SCHEMA_HAS_IfcStructuralLoad
+#define SCHEMA_IfcStructuralLoad_HAS_Name
+#define SCHEMA_IfcStructuralLoad_Name_IS_OPTIONAL
+#define SCHEMA_HAS_IfcStructuralLoadCase
+#define SCHEMA_IfcStructuralLoadCase_HAS_SelfWeightCoefficients
+#define SCHEMA_IfcStructuralLoadCase_SelfWeightCoefficients_IS_OPTIONAL
+#define SCHEMA_HAS_IfcStructuralLoadConfiguration
+#define SCHEMA_IfcStructuralLoadConfiguration_HAS_Values
+#define SCHEMA_IfcStructuralLoadConfiguration_HAS_Locations
+#define SCHEMA_IfcStructuralLoadConfiguration_Locations_IS_OPTIONAL
+#define SCHEMA_HAS_IfcStructuralLoadGroup
+#define SCHEMA_IfcStructuralLoadGroup_HAS_PredefinedType
+#define SCHEMA_IfcStructuralLoadGroup_HAS_ActionType
+#define SCHEMA_IfcStructuralLoadGroup_HAS_ActionSource
+#define SCHEMA_IfcStructuralLoadGroup_HAS_Coefficient
+#define SCHEMA_IfcStructuralLoadGroup_Coefficient_IS_OPTIONAL
+#define SCHEMA_IfcStructuralLoadGroup_HAS_Purpose
+#define SCHEMA_IfcStructuralLoadGroup_Purpose_IS_OPTIONAL
+#define SCHEMA_IfcStructuralLoadGroup_HAS_SourceOfResultGroup
+#define SCHEMA_IfcStructuralLoadGroup_HAS_LoadGroupFor
+#define SCHEMA_HAS_IfcStructuralLoadLinearForce
+#define SCHEMA_IfcStructuralLoadLinearForce_HAS_LinearForceX
+#define SCHEMA_IfcStructuralLoadLinearForce_LinearForceX_IS_OPTIONAL
+#define SCHEMA_IfcStructuralLoadLinearForce_HAS_LinearForceY
+#define SCHEMA_IfcStructuralLoadLinearForce_LinearForceY_IS_OPTIONAL
+#define SCHEMA_IfcStructuralLoadLinearForce_HAS_LinearForceZ
+#define SCHEMA_IfcStructuralLoadLinearForce_LinearForceZ_IS_OPTIONAL
+#define SCHEMA_IfcStructuralLoadLinearForce_HAS_LinearMomentX
+#define SCHEMA_IfcStructuralLoadLinearForce_LinearMomentX_IS_OPTIONAL
+#define SCHEMA_IfcStructuralLoadLinearForce_HAS_LinearMomentY
+#define SCHEMA_IfcStructuralLoadLinearForce_LinearMomentY_IS_OPTIONAL
+#define SCHEMA_IfcStructuralLoadLinearForce_HAS_LinearMomentZ
+#define SCHEMA_IfcStructuralLoadLinearForce_LinearMomentZ_IS_OPTIONAL
+#define SCHEMA_HAS_IfcStructuralLoadOrResult
+#define SCHEMA_HAS_IfcStructuralLoadPlanarForce
+#define SCHEMA_IfcStructuralLoadPlanarForce_HAS_PlanarForceX
+#define SCHEMA_IfcStructuralLoadPlanarForce_PlanarForceX_IS_OPTIONAL
+#define SCHEMA_IfcStructuralLoadPlanarForce_HAS_PlanarForceY
+#define SCHEMA_IfcStructuralLoadPlanarForce_PlanarForceY_IS_OPTIONAL
+#define SCHEMA_IfcStructuralLoadPlanarForce_HAS_PlanarForceZ
+#define SCHEMA_IfcStructuralLoadPlanarForce_PlanarForceZ_IS_OPTIONAL
+#define SCHEMA_HAS_IfcStructuralLoadSingleDisplacement
+#define SCHEMA_IfcStructuralLoadSingleDisplacement_HAS_DisplacementX
+#define SCHEMA_IfcStructuralLoadSingleDisplacement_DisplacementX_IS_OPTIONAL
+#define SCHEMA_IfcStructuralLoadSingleDisplacement_HAS_DisplacementY
+#define SCHEMA_IfcStructuralLoadSingleDisplacement_DisplacementY_IS_OPTIONAL
+#define SCHEMA_IfcStructuralLoadSingleDisplacement_HAS_DisplacementZ
+#define SCHEMA_IfcStructuralLoadSingleDisplacement_DisplacementZ_IS_OPTIONAL
+#define SCHEMA_IfcStructuralLoadSingleDisplacement_HAS_RotationalDisplacementRX
+#define SCHEMA_IfcStructuralLoadSingleDisplacement_RotationalDisplacementRX_IS_OPTIONAL
+#define SCHEMA_IfcStructuralLoadSingleDisplacement_HAS_RotationalDisplacementRY
+#define SCHEMA_IfcStructuralLoadSingleDisplacement_RotationalDisplacementRY_IS_OPTIONAL
+#define SCHEMA_IfcStructuralLoadSingleDisplacement_HAS_RotationalDisplacementRZ
+#define SCHEMA_IfcStructuralLoadSingleDisplacement_RotationalDisplacementRZ_IS_OPTIONAL
+#define SCHEMA_HAS_IfcStructuralLoadSingleDisplacementDistortion
+#define SCHEMA_IfcStructuralLoadSingleDisplacementDistortion_HAS_Distortion
+#define SCHEMA_IfcStructuralLoadSingleDisplacementDistortion_Distortion_IS_OPTIONAL
+#define SCHEMA_HAS_IfcStructuralLoadSingleForce
+#define SCHEMA_IfcStructuralLoadSingleForce_HAS_ForceX
+#define SCHEMA_IfcStructuralLoadSingleForce_ForceX_IS_OPTIONAL
+#define SCHEMA_IfcStructuralLoadSingleForce_HAS_ForceY
+#define SCHEMA_IfcStructuralLoadSingleForce_ForceY_IS_OPTIONAL
+#define SCHEMA_IfcStructuralLoadSingleForce_HAS_ForceZ
+#define SCHEMA_IfcStructuralLoadSingleForce_ForceZ_IS_OPTIONAL
+#define SCHEMA_IfcStructuralLoadSingleForce_HAS_MomentX
+#define SCHEMA_IfcStructuralLoadSingleForce_MomentX_IS_OPTIONAL
+#define SCHEMA_IfcStructuralLoadSingleForce_HAS_MomentY
+#define SCHEMA_IfcStructuralLoadSingleForce_MomentY_IS_OPTIONAL
+#define SCHEMA_IfcStructuralLoadSingleForce_HAS_MomentZ
+#define SCHEMA_IfcStructuralLoadSingleForce_MomentZ_IS_OPTIONAL
+#define SCHEMA_HAS_IfcStructuralLoadSingleForceWarping
+#define SCHEMA_IfcStructuralLoadSingleForceWarping_HAS_WarpingMoment
+#define SCHEMA_IfcStructuralLoadSingleForceWarping_WarpingMoment_IS_OPTIONAL
+#define SCHEMA_HAS_IfcStructuralLoadStatic
+#define SCHEMA_HAS_IfcStructuralLoadTemperature
+#define SCHEMA_IfcStructuralLoadTemperature_HAS_DeltaTConstant
+#define SCHEMA_IfcStructuralLoadTemperature_DeltaTConstant_IS_OPTIONAL
+#define SCHEMA_IfcStructuralLoadTemperature_HAS_DeltaTY
+#define SCHEMA_IfcStructuralLoadTemperature_DeltaTY_IS_OPTIONAL
+#define SCHEMA_IfcStructuralLoadTemperature_HAS_DeltaTZ
+#define SCHEMA_IfcStructuralLoadTemperature_DeltaTZ_IS_OPTIONAL
+#define SCHEMA_HAS_IfcStructuralMember
+#define SCHEMA_IfcStructuralMember_HAS_ConnectedBy
+#define SCHEMA_HAS_IfcStructuralPlanarAction
+#define SCHEMA_HAS_IfcStructuralPointAction
+#define SCHEMA_HAS_IfcStructuralPointConnection
+#define SCHEMA_IfcStructuralPointConnection_HAS_ConditionCoordinateSystem
+#define SCHEMA_IfcStructuralPointConnection_ConditionCoordinateSystem_IS_OPTIONAL
+#define SCHEMA_HAS_IfcStructuralPointReaction
+#define SCHEMA_HAS_IfcStructuralReaction
+#define SCHEMA_HAS_IfcStructuralResultGroup
+#define SCHEMA_IfcStructuralResultGroup_HAS_TheoryType
+#define SCHEMA_IfcStructuralResultGroup_HAS_ResultForLoadGroup
+#define SCHEMA_IfcStructuralResultGroup_ResultForLoadGroup_IS_OPTIONAL
+#define SCHEMA_IfcStructuralResultGroup_HAS_IsLinear
+#define SCHEMA_IfcStructuralResultGroup_HAS_ResultGroupFor
+#define SCHEMA_HAS_IfcStructuralSurfaceAction
+#define SCHEMA_IfcStructuralSurfaceAction_HAS_ProjectedOrTrue
+#define SCHEMA_IfcStructuralSurfaceAction_ProjectedOrTrue_IS_OPTIONAL
+#define SCHEMA_IfcStructuralSurfaceAction_HAS_PredefinedType
+#define SCHEMA_HAS_IfcStructuralSurfaceConnection
+#define SCHEMA_HAS_IfcStructuralSurfaceMember
+#define SCHEMA_IfcStructuralSurfaceMember_HAS_PredefinedType
+#define SCHEMA_IfcStructuralSurfaceMember_HAS_Thickness
+#define SCHEMA_IfcStructuralSurfaceMember_Thickness_IS_OPTIONAL
+#define SCHEMA_HAS_IfcStructuralSurfaceMemberVarying
+#define SCHEMA_HAS_IfcStructuralSurfaceReaction
+#define SCHEMA_IfcStructuralSurfaceReaction_HAS_PredefinedType
+#define SCHEMA_HAS_IfcStyleModel
+#define SCHEMA_HAS_IfcStyledItem
+#define SCHEMA_IfcStyledItem_HAS_Item
+#define SCHEMA_IfcStyledItem_Item_IS_OPTIONAL
+#define SCHEMA_IfcStyledItem_HAS_Styles
+#define SCHEMA_IfcStyledItem_HAS_Name
+#define SCHEMA_IfcStyledItem_Name_IS_OPTIONAL
+#define SCHEMA_HAS_IfcStyledRepresentation
+#define SCHEMA_HAS_IfcSubContractResource
+#define SCHEMA_IfcSubContractResource_HAS_PredefinedType
+#define SCHEMA_IfcSubContractResource_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcSubContractResourceType
+#define SCHEMA_IfcSubContractResourceType_HAS_PredefinedType
+#define SCHEMA_HAS_IfcSubedge
+#define SCHEMA_IfcSubedge_HAS_ParentEdge
+#define SCHEMA_HAS_IfcSurface
+#define SCHEMA_HAS_IfcSurfaceCurve
+#define SCHEMA_IfcSurfaceCurve_HAS_Curve3D
+#define SCHEMA_IfcSurfaceCurve_HAS_AssociatedGeometry
+#define SCHEMA_IfcSurfaceCurve_HAS_MasterRepresentation
+#define SCHEMA_HAS_IfcSurfaceCurveSweptAreaSolid
+#define SCHEMA_IfcSurfaceCurveSweptAreaSolid_HAS_ReferenceSurface
+#define SCHEMA_HAS_IfcSurfaceFeature
+#define SCHEMA_IfcSurfaceFeature_HAS_PredefinedType
+#define SCHEMA_IfcSurfaceFeature_PredefinedType_IS_OPTIONAL
+#define SCHEMA_IfcSurfaceFeature_HAS_AdheresToElement
+#define SCHEMA_HAS_IfcSurfaceOfLinearExtrusion
+#define SCHEMA_IfcSurfaceOfLinearExtrusion_HAS_ExtrudedDirection
+#define SCHEMA_IfcSurfaceOfLinearExtrusion_HAS_Depth
+#define SCHEMA_HAS_IfcSurfaceOfRevolution
+#define SCHEMA_IfcSurfaceOfRevolution_HAS_AxisPosition
+#define SCHEMA_HAS_IfcSurfaceReinforcementArea
+#define SCHEMA_IfcSurfaceReinforcementArea_HAS_SurfaceReinforcement1
+#define SCHEMA_IfcSurfaceReinforcementArea_SurfaceReinforcement1_IS_OPTIONAL
+#define SCHEMA_IfcSurfaceReinforcementArea_HAS_SurfaceReinforcement2
+#define SCHEMA_IfcSurfaceReinforcementArea_SurfaceReinforcement2_IS_OPTIONAL
+#define SCHEMA_IfcSurfaceReinforcementArea_HAS_ShearReinforcement
+#define SCHEMA_IfcSurfaceReinforcementArea_ShearReinforcement_IS_OPTIONAL
+#define SCHEMA_HAS_IfcSurfaceStyle
+#define SCHEMA_IfcSurfaceStyle_HAS_Side
+#define SCHEMA_IfcSurfaceStyle_HAS_Styles
+#define SCHEMA_HAS_IfcSurfaceStyleLighting
+#define SCHEMA_IfcSurfaceStyleLighting_HAS_DiffuseTransmissionColour
+#define SCHEMA_IfcSurfaceStyleLighting_HAS_DiffuseReflectionColour
+#define SCHEMA_IfcSurfaceStyleLighting_HAS_TransmissionColour
+#define SCHEMA_IfcSurfaceStyleLighting_HAS_ReflectanceColour
+#define SCHEMA_HAS_IfcSurfaceStyleRefraction
+#define SCHEMA_IfcSurfaceStyleRefraction_HAS_RefractionIndex
+#define SCHEMA_IfcSurfaceStyleRefraction_RefractionIndex_IS_OPTIONAL
+#define SCHEMA_IfcSurfaceStyleRefraction_HAS_DispersionFactor
+#define SCHEMA_IfcSurfaceStyleRefraction_DispersionFactor_IS_OPTIONAL
+#define SCHEMA_HAS_IfcSurfaceStyleRendering
+#define SCHEMA_IfcSurfaceStyleRendering_HAS_DiffuseColour
+#define SCHEMA_IfcSurfaceStyleRendering_DiffuseColour_IS_OPTIONAL
+#define SCHEMA_IfcSurfaceStyleRendering_HAS_TransmissionColour
+#define SCHEMA_IfcSurfaceStyleRendering_TransmissionColour_IS_OPTIONAL
+#define SCHEMA_IfcSurfaceStyleRendering_HAS_DiffuseTransmissionColour
+#define SCHEMA_IfcSurfaceStyleRendering_DiffuseTransmissionColour_IS_OPTIONAL
+#define SCHEMA_IfcSurfaceStyleRendering_HAS_ReflectionColour
+#define SCHEMA_IfcSurfaceStyleRendering_ReflectionColour_IS_OPTIONAL
+#define SCHEMA_IfcSurfaceStyleRendering_HAS_SpecularColour
+#define SCHEMA_IfcSurfaceStyleRendering_SpecularColour_IS_OPTIONAL
+#define SCHEMA_IfcSurfaceStyleRendering_HAS_SpecularHighlight
+#define SCHEMA_IfcSurfaceStyleRendering_SpecularHighlight_IS_OPTIONAL
+#define SCHEMA_IfcSurfaceStyleRendering_HAS_ReflectanceMethod
+#define SCHEMA_HAS_IfcSurfaceStyleShading
+#define SCHEMA_IfcSurfaceStyleShading_HAS_SurfaceColour
+#define SCHEMA_IfcSurfaceStyleShading_HAS_Transparency
+#define SCHEMA_IfcSurfaceStyleShading_Transparency_IS_OPTIONAL
+#define SCHEMA_HAS_IfcSurfaceStyleWithTextures
+#define SCHEMA_IfcSurfaceStyleWithTextures_HAS_Textures
+#define SCHEMA_HAS_IfcSurfaceTexture
+#define SCHEMA_IfcSurfaceTexture_HAS_RepeatS
+#define SCHEMA_IfcSurfaceTexture_HAS_RepeatT
+#define SCHEMA_IfcSurfaceTexture_HAS_Mode
+#define SCHEMA_IfcSurfaceTexture_Mode_IS_OPTIONAL
+#define SCHEMA_IfcSurfaceTexture_HAS_TextureTransform
+#define SCHEMA_IfcSurfaceTexture_TextureTransform_IS_OPTIONAL
+#define SCHEMA_IfcSurfaceTexture_HAS_Parameter
+#define SCHEMA_IfcSurfaceTexture_Parameter_IS_OPTIONAL
+#define SCHEMA_IfcSurfaceTexture_HAS_IsMappedBy
+#define SCHEMA_IfcSurfaceTexture_HAS_UsedInStyles
+#define SCHEMA_HAS_IfcSweptAreaSolid
+#define SCHEMA_IfcSweptAreaSolid_HAS_SweptArea
+#define SCHEMA_IfcSweptAreaSolid_HAS_Position
+#define SCHEMA_IfcSweptAreaSolid_Position_IS_OPTIONAL
+#define SCHEMA_HAS_IfcSweptDiskSolid
+#define SCHEMA_IfcSweptDiskSolid_HAS_Directrix
+#define SCHEMA_IfcSweptDiskSolid_HAS_Radius
+#define SCHEMA_IfcSweptDiskSolid_HAS_InnerRadius
+#define SCHEMA_IfcSweptDiskSolid_InnerRadius_IS_OPTIONAL
+#define SCHEMA_IfcSweptDiskSolid_HAS_StartParam
+#define SCHEMA_IfcSweptDiskSolid_StartParam_IS_OPTIONAL
+#define SCHEMA_IfcSweptDiskSolid_HAS_EndParam
+#define SCHEMA_IfcSweptDiskSolid_EndParam_IS_OPTIONAL
+#define SCHEMA_HAS_IfcSweptDiskSolidPolygonal
+#define SCHEMA_IfcSweptDiskSolidPolygonal_HAS_FilletRadius
+#define SCHEMA_IfcSweptDiskSolidPolygonal_FilletRadius_IS_OPTIONAL
+#define SCHEMA_HAS_IfcSweptSurface
+#define SCHEMA_IfcSweptSurface_HAS_SweptCurve
+#define SCHEMA_IfcSweptSurface_HAS_Position
+#define SCHEMA_IfcSweptSurface_Position_IS_OPTIONAL
+#define SCHEMA_HAS_IfcSwitchingDevice
+#define SCHEMA_IfcSwitchingDevice_HAS_PredefinedType
+#define SCHEMA_IfcSwitchingDevice_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcSwitchingDeviceType
+#define SCHEMA_IfcSwitchingDeviceType_HAS_PredefinedType
+#define SCHEMA_HAS_IfcSystem
+#define SCHEMA_IfcSystem_HAS_ServicesBuildings
+#define SCHEMA_IfcSystem_HAS_ServicesFacilities
+#define SCHEMA_HAS_IfcSystemFurnitureElement
+#define SCHEMA_IfcSystemFurnitureElement_HAS_PredefinedType
+#define SCHEMA_IfcSystemFurnitureElement_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcSystemFurnitureElementType
+#define SCHEMA_IfcSystemFurnitureElementType_HAS_PredefinedType
+#define SCHEMA_IfcSystemFurnitureElementType_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcTShapeProfileDef
+#define SCHEMA_IfcTShapeProfileDef_HAS_Depth
+#define SCHEMA_IfcTShapeProfileDef_HAS_FlangeWidth
+#define SCHEMA_IfcTShapeProfileDef_HAS_WebThickness
+#define SCHEMA_IfcTShapeProfileDef_HAS_FlangeThickness
+#define SCHEMA_IfcTShapeProfileDef_HAS_FilletRadius
+#define SCHEMA_IfcTShapeProfileDef_FilletRadius_IS_OPTIONAL
+#define SCHEMA_IfcTShapeProfileDef_HAS_FlangeEdgeRadius
+#define SCHEMA_IfcTShapeProfileDef_FlangeEdgeRadius_IS_OPTIONAL
+#define SCHEMA_IfcTShapeProfileDef_HAS_WebEdgeRadius
+#define SCHEMA_IfcTShapeProfileDef_WebEdgeRadius_IS_OPTIONAL
+#define SCHEMA_IfcTShapeProfileDef_HAS_WebSlope
+#define SCHEMA_IfcTShapeProfileDef_WebSlope_IS_OPTIONAL
+#define SCHEMA_IfcTShapeProfileDef_HAS_FlangeSlope
+#define SCHEMA_IfcTShapeProfileDef_FlangeSlope_IS_OPTIONAL
+#define SCHEMA_HAS_IfcTable
+#define SCHEMA_IfcTable_HAS_Name
+#define SCHEMA_IfcTable_Name_IS_OPTIONAL
+#define SCHEMA_IfcTable_HAS_Rows
+#define SCHEMA_IfcTable_Rows_IS_OPTIONAL
+#define SCHEMA_IfcTable_HAS_Columns
+#define SCHEMA_IfcTable_Columns_IS_OPTIONAL
+#define SCHEMA_HAS_IfcTableColumn
+#define SCHEMA_IfcTableColumn_HAS_Identifier
+#define SCHEMA_IfcTableColumn_Identifier_IS_OPTIONAL
+#define SCHEMA_IfcTableColumn_HAS_Name
+#define SCHEMA_IfcTableColumn_Name_IS_OPTIONAL
+#define SCHEMA_IfcTableColumn_HAS_Description
+#define SCHEMA_IfcTableColumn_Description_IS_OPTIONAL
+#define SCHEMA_IfcTableColumn_HAS_Unit
+#define SCHEMA_IfcTableColumn_Unit_IS_OPTIONAL
+#define SCHEMA_IfcTableColumn_HAS_ReferencePath
+#define SCHEMA_IfcTableColumn_ReferencePath_IS_OPTIONAL
+#define SCHEMA_HAS_IfcTableRow
+#define SCHEMA_IfcTableRow_HAS_RowCells
+#define SCHEMA_IfcTableRow_RowCells_IS_OPTIONAL
+#define SCHEMA_IfcTableRow_HAS_IsHeading
+#define SCHEMA_IfcTableRow_IsHeading_IS_OPTIONAL
+#define SCHEMA_HAS_IfcTank
+#define SCHEMA_IfcTank_HAS_PredefinedType
+#define SCHEMA_IfcTank_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcTankType
+#define SCHEMA_IfcTankType_HAS_PredefinedType
+#define SCHEMA_HAS_IfcTask
+#define SCHEMA_IfcTask_HAS_Status
+#define SCHEMA_IfcTask_Status_IS_OPTIONAL
+#define SCHEMA_IfcTask_HAS_WorkMethod
+#define SCHEMA_IfcTask_WorkMethod_IS_OPTIONAL
+#define SCHEMA_IfcTask_HAS_IsMilestone
+#define SCHEMA_IfcTask_HAS_Priority
+#define SCHEMA_IfcTask_Priority_IS_OPTIONAL
+#define SCHEMA_IfcTask_HAS_TaskTime
+#define SCHEMA_IfcTask_TaskTime_IS_OPTIONAL
+#define SCHEMA_IfcTask_HAS_PredefinedType
+#define SCHEMA_IfcTask_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcTaskTime
+#define SCHEMA_IfcTaskTime_HAS_DurationType
+#define SCHEMA_IfcTaskTime_DurationType_IS_OPTIONAL
+#define SCHEMA_IfcTaskTime_HAS_ScheduleDuration
+#define SCHEMA_IfcTaskTime_ScheduleDuration_IS_OPTIONAL
+#define SCHEMA_IfcTaskTime_HAS_ScheduleStart
+#define SCHEMA_IfcTaskTime_ScheduleStart_IS_OPTIONAL
+#define SCHEMA_IfcTaskTime_HAS_ScheduleFinish
+#define SCHEMA_IfcTaskTime_ScheduleFinish_IS_OPTIONAL
+#define SCHEMA_IfcTaskTime_HAS_EarlyStart
+#define SCHEMA_IfcTaskTime_EarlyStart_IS_OPTIONAL
+#define SCHEMA_IfcTaskTime_HAS_EarlyFinish
+#define SCHEMA_IfcTaskTime_EarlyFinish_IS_OPTIONAL
+#define SCHEMA_IfcTaskTime_HAS_LateStart
+#define SCHEMA_IfcTaskTime_LateStart_IS_OPTIONAL
+#define SCHEMA_IfcTaskTime_HAS_LateFinish
+#define SCHEMA_IfcTaskTime_LateFinish_IS_OPTIONAL
+#define SCHEMA_IfcTaskTime_HAS_FreeFloat
+#define SCHEMA_IfcTaskTime_FreeFloat_IS_OPTIONAL
+#define SCHEMA_IfcTaskTime_HAS_TotalFloat
+#define SCHEMA_IfcTaskTime_TotalFloat_IS_OPTIONAL
+#define SCHEMA_IfcTaskTime_HAS_IsCritical
+#define SCHEMA_IfcTaskTime_IsCritical_IS_OPTIONAL
+#define SCHEMA_IfcTaskTime_HAS_StatusTime
+#define SCHEMA_IfcTaskTime_StatusTime_IS_OPTIONAL
+#define SCHEMA_IfcTaskTime_HAS_ActualDuration
+#define SCHEMA_IfcTaskTime_ActualDuration_IS_OPTIONAL
+#define SCHEMA_IfcTaskTime_HAS_ActualStart
+#define SCHEMA_IfcTaskTime_ActualStart_IS_OPTIONAL
+#define SCHEMA_IfcTaskTime_HAS_ActualFinish
+#define SCHEMA_IfcTaskTime_ActualFinish_IS_OPTIONAL
+#define SCHEMA_IfcTaskTime_HAS_RemainingTime
+#define SCHEMA_IfcTaskTime_RemainingTime_IS_OPTIONAL
+#define SCHEMA_IfcTaskTime_HAS_Completion
+#define SCHEMA_IfcTaskTime_Completion_IS_OPTIONAL
+#define SCHEMA_HAS_IfcTaskTimeRecurring
+#define SCHEMA_IfcTaskTimeRecurring_HAS_Recurrence
+#define SCHEMA_HAS_IfcTaskType
+#define SCHEMA_IfcTaskType_HAS_PredefinedType
+#define SCHEMA_IfcTaskType_HAS_WorkMethod
+#define SCHEMA_IfcTaskType_WorkMethod_IS_OPTIONAL
+#define SCHEMA_HAS_IfcTelecomAddress
+#define SCHEMA_IfcTelecomAddress_HAS_TelephoneNumbers
+#define SCHEMA_IfcTelecomAddress_TelephoneNumbers_IS_OPTIONAL
+#define SCHEMA_IfcTelecomAddress_HAS_FacsimileNumbers
+#define SCHEMA_IfcTelecomAddress_FacsimileNumbers_IS_OPTIONAL
+#define SCHEMA_IfcTelecomAddress_HAS_PagerNumber
+#define SCHEMA_IfcTelecomAddress_PagerNumber_IS_OPTIONAL
+#define SCHEMA_IfcTelecomAddress_HAS_ElectronicMailAddresses
+#define SCHEMA_IfcTelecomAddress_ElectronicMailAddresses_IS_OPTIONAL
+#define SCHEMA_IfcTelecomAddress_HAS_WWWHomePageURL
+#define SCHEMA_IfcTelecomAddress_WWWHomePageURL_IS_OPTIONAL
+#define SCHEMA_IfcTelecomAddress_HAS_MessagingIDs
+#define SCHEMA_IfcTelecomAddress_MessagingIDs_IS_OPTIONAL
+#define SCHEMA_HAS_IfcTendon
+#define SCHEMA_IfcTendon_HAS_PredefinedType
+#define SCHEMA_IfcTendon_PredefinedType_IS_OPTIONAL
+#define SCHEMA_IfcTendon_HAS_NominalDiameter
+#define SCHEMA_IfcTendon_NominalDiameter_IS_OPTIONAL
+#define SCHEMA_IfcTendon_HAS_CrossSectionArea
+#define SCHEMA_IfcTendon_CrossSectionArea_IS_OPTIONAL
+#define SCHEMA_IfcTendon_HAS_TensionForce
+#define SCHEMA_IfcTendon_TensionForce_IS_OPTIONAL
+#define SCHEMA_IfcTendon_HAS_PreStress
+#define SCHEMA_IfcTendon_PreStress_IS_OPTIONAL
+#define SCHEMA_IfcTendon_HAS_FrictionCoefficient
+#define SCHEMA_IfcTendon_FrictionCoefficient_IS_OPTIONAL
+#define SCHEMA_IfcTendon_HAS_AnchorageSlip
+#define SCHEMA_IfcTendon_AnchorageSlip_IS_OPTIONAL
+#define SCHEMA_IfcTendon_HAS_MinCurvatureRadius
+#define SCHEMA_IfcTendon_MinCurvatureRadius_IS_OPTIONAL
+#define SCHEMA_HAS_IfcTendonAnchor
+#define SCHEMA_IfcTendonAnchor_HAS_PredefinedType
+#define SCHEMA_IfcTendonAnchor_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcTendonAnchorType
+#define SCHEMA_IfcTendonAnchorType_HAS_PredefinedType
+#define SCHEMA_HAS_IfcTendonConduit
+#define SCHEMA_IfcTendonConduit_HAS_PredefinedType
+#define SCHEMA_HAS_IfcTendonConduitType
+#define SCHEMA_IfcTendonConduitType_HAS_PredefinedType
+#define SCHEMA_HAS_IfcTendonType
+#define SCHEMA_IfcTendonType_HAS_PredefinedType
+#define SCHEMA_IfcTendonType_HAS_NominalDiameter
+#define SCHEMA_IfcTendonType_NominalDiameter_IS_OPTIONAL
+#define SCHEMA_IfcTendonType_HAS_CrossSectionArea
+#define SCHEMA_IfcTendonType_CrossSectionArea_IS_OPTIONAL
+#define SCHEMA_IfcTendonType_HAS_SheathDiameter
+#define SCHEMA_IfcTendonType_SheathDiameter_IS_OPTIONAL
+#define SCHEMA_HAS_IfcTessellatedFaceSet
+#define SCHEMA_IfcTessellatedFaceSet_HAS_Coordinates
+#define SCHEMA_IfcTessellatedFaceSet_HAS_Closed
+#define SCHEMA_IfcTessellatedFaceSet_Closed_IS_OPTIONAL
+#define SCHEMA_IfcTessellatedFaceSet_HAS_HasColours
+#define SCHEMA_IfcTessellatedFaceSet_HAS_HasTextures
+#define SCHEMA_HAS_IfcTessellatedItem
+#define SCHEMA_HAS_IfcTextLiteral
+#define SCHEMA_IfcTextLiteral_HAS_Literal
+#define SCHEMA_IfcTextLiteral_HAS_Placement
+#define SCHEMA_IfcTextLiteral_HAS_Path
+#define SCHEMA_HAS_IfcTextLiteralWithExtent
+#define SCHEMA_IfcTextLiteralWithExtent_HAS_Extent
+#define SCHEMA_IfcTextLiteralWithExtent_HAS_BoxAlignment
+#define SCHEMA_HAS_IfcTextStyle
+#define SCHEMA_IfcTextStyle_HAS_TextCharacterAppearance
+#define SCHEMA_IfcTextStyle_TextCharacterAppearance_IS_OPTIONAL
+#define SCHEMA_IfcTextStyle_HAS_TextStyle
+#define SCHEMA_IfcTextStyle_TextStyle_IS_OPTIONAL
+#define SCHEMA_IfcTextStyle_HAS_TextFontStyle
+#define SCHEMA_IfcTextStyle_HAS_ModelOrDraughting
+#define SCHEMA_IfcTextStyle_ModelOrDraughting_IS_OPTIONAL
+#define SCHEMA_HAS_IfcTextStyleFontModel
+#define SCHEMA_IfcTextStyleFontModel_HAS_FontFamily
+#define SCHEMA_IfcTextStyleFontModel_HAS_FontStyle
+#define SCHEMA_IfcTextStyleFontModel_FontStyle_IS_OPTIONAL
+#define SCHEMA_IfcTextStyleFontModel_HAS_FontVariant
+#define SCHEMA_IfcTextStyleFontModel_FontVariant_IS_OPTIONAL
+#define SCHEMA_IfcTextStyleFontModel_HAS_FontWeight
+#define SCHEMA_IfcTextStyleFontModel_FontWeight_IS_OPTIONAL
+#define SCHEMA_IfcTextStyleFontModel_HAS_FontSize
+#define SCHEMA_HAS_IfcTextStyleForDefinedFont
+#define SCHEMA_IfcTextStyleForDefinedFont_HAS_Colour
+#define SCHEMA_IfcTextStyleForDefinedFont_HAS_BackgroundColour
+#define SCHEMA_IfcTextStyleForDefinedFont_BackgroundColour_IS_OPTIONAL
+#define SCHEMA_HAS_IfcTextStyleTextModel
+#define SCHEMA_IfcTextStyleTextModel_HAS_TextIndent
+#define SCHEMA_IfcTextStyleTextModel_TextIndent_IS_OPTIONAL
+#define SCHEMA_IfcTextStyleTextModel_HAS_TextAlign
+#define SCHEMA_IfcTextStyleTextModel_TextAlign_IS_OPTIONAL
+#define SCHEMA_IfcTextStyleTextModel_HAS_TextDecoration
+#define SCHEMA_IfcTextStyleTextModel_TextDecoration_IS_OPTIONAL
+#define SCHEMA_IfcTextStyleTextModel_HAS_LetterSpacing
+#define SCHEMA_IfcTextStyleTextModel_LetterSpacing_IS_OPTIONAL
+#define SCHEMA_IfcTextStyleTextModel_HAS_WordSpacing
+#define SCHEMA_IfcTextStyleTextModel_WordSpacing_IS_OPTIONAL
+#define SCHEMA_IfcTextStyleTextModel_HAS_TextTransform
+#define SCHEMA_IfcTextStyleTextModel_TextTransform_IS_OPTIONAL
+#define SCHEMA_IfcTextStyleTextModel_HAS_LineHeight
+#define SCHEMA_IfcTextStyleTextModel_LineHeight_IS_OPTIONAL
+#define SCHEMA_HAS_IfcTextureCoordinate
+#define SCHEMA_IfcTextureCoordinate_HAS_Maps
+#define SCHEMA_HAS_IfcTextureCoordinateGenerator
+#define SCHEMA_IfcTextureCoordinateGenerator_HAS_Mode
+#define SCHEMA_IfcTextureCoordinateGenerator_HAS_Parameter
+#define SCHEMA_IfcTextureCoordinateGenerator_Parameter_IS_OPTIONAL
+#define SCHEMA_HAS_IfcTextureCoordinateIndices
+#define SCHEMA_IfcTextureCoordinateIndices_HAS_TexCoordIndex
+#define SCHEMA_IfcTextureCoordinateIndices_HAS_TexCoordsOf
+#define SCHEMA_IfcTextureCoordinateIndices_HAS_ToTexMap
+#define SCHEMA_HAS_IfcTextureCoordinateIndicesWithVoids
+#define SCHEMA_IfcTextureCoordinateIndicesWithVoids_HAS_InnerTexCoordIndices
+#define SCHEMA_HAS_IfcTextureMap
+#define SCHEMA_IfcTextureMap_HAS_Vertices
+#define SCHEMA_IfcTextureMap_HAS_MappedTo
+#define SCHEMA_HAS_IfcTextureVertex
+#define SCHEMA_IfcTextureVertex_HAS_Coordinates
+#define SCHEMA_HAS_IfcTextureVertexList
+#define SCHEMA_IfcTextureVertexList_HAS_TexCoordsList
+#define SCHEMA_HAS_IfcThirdOrderPolynomialSpiral
+#define SCHEMA_IfcThirdOrderPolynomialSpiral_HAS_CubicTerm
+#define SCHEMA_IfcThirdOrderPolynomialSpiral_HAS_QuadraticTerm
+#define SCHEMA_IfcThirdOrderPolynomialSpiral_QuadraticTerm_IS_OPTIONAL
+#define SCHEMA_IfcThirdOrderPolynomialSpiral_HAS_LinearTerm
+#define SCHEMA_IfcThirdOrderPolynomialSpiral_LinearTerm_IS_OPTIONAL
+#define SCHEMA_IfcThirdOrderPolynomialSpiral_HAS_ConstantTerm
+#define SCHEMA_IfcThirdOrderPolynomialSpiral_ConstantTerm_IS_OPTIONAL
+#define SCHEMA_HAS_IfcTimePeriod
+#define SCHEMA_IfcTimePeriod_HAS_StartTime
+#define SCHEMA_IfcTimePeriod_HAS_EndTime
+#define SCHEMA_HAS_IfcTimeSeries
+#define SCHEMA_IfcTimeSeries_HAS_Name
+#define SCHEMA_IfcTimeSeries_HAS_Description
+#define SCHEMA_IfcTimeSeries_Description_IS_OPTIONAL
+#define SCHEMA_IfcTimeSeries_HAS_StartTime
+#define SCHEMA_IfcTimeSeries_HAS_EndTime
+#define SCHEMA_IfcTimeSeries_HAS_TimeSeriesDataType
+#define SCHEMA_IfcTimeSeries_HAS_DataOrigin
+#define SCHEMA_IfcTimeSeries_HAS_UserDefinedDataOrigin
+#define SCHEMA_IfcTimeSeries_UserDefinedDataOrigin_IS_OPTIONAL
+#define SCHEMA_IfcTimeSeries_HAS_Unit
+#define SCHEMA_IfcTimeSeries_Unit_IS_OPTIONAL
+#define SCHEMA_IfcTimeSeries_HAS_HasExternalReference
+#define SCHEMA_HAS_IfcTimeSeriesValue
+#define SCHEMA_IfcTimeSeriesValue_HAS_ListValues
+#define SCHEMA_HAS_IfcTopologicalRepresentationItem
+#define SCHEMA_HAS_IfcTopologyRepresentation
+#define SCHEMA_HAS_IfcToroidalSurface
+#define SCHEMA_IfcToroidalSurface_HAS_MajorRadius
+#define SCHEMA_IfcToroidalSurface_HAS_MinorRadius
+#define SCHEMA_HAS_IfcTrackElement
+#define SCHEMA_IfcTrackElement_HAS_PredefinedType
+#define SCHEMA_IfcTrackElement_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcTrackElementType
+#define SCHEMA_IfcTrackElementType_HAS_PredefinedType
+#define SCHEMA_HAS_IfcTransformer
+#define SCHEMA_IfcTransformer_HAS_PredefinedType
+#define SCHEMA_IfcTransformer_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcTransformerType
+#define SCHEMA_IfcTransformerType_HAS_PredefinedType
+#define SCHEMA_HAS_IfcTransportElement
+#define SCHEMA_IfcTransportElement_HAS_PredefinedType
+#define SCHEMA_IfcTransportElement_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcTransportElementType
+#define SCHEMA_IfcTransportElementType_HAS_PredefinedType
+#define SCHEMA_HAS_IfcTransportationDevice
+#define SCHEMA_HAS_IfcTransportationDeviceType
+#define SCHEMA_HAS_IfcTrapeziumProfileDef
+#define SCHEMA_IfcTrapeziumProfileDef_HAS_BottomXDim
+#define SCHEMA_IfcTrapeziumProfileDef_HAS_TopXDim
+#define SCHEMA_IfcTrapeziumProfileDef_HAS_YDim
+#define SCHEMA_IfcTrapeziumProfileDef_HAS_TopXOffset
+#define SCHEMA_HAS_IfcTriangulatedFaceSet
+#define SCHEMA_IfcTriangulatedFaceSet_HAS_Normals
+#define SCHEMA_IfcTriangulatedFaceSet_Normals_IS_OPTIONAL
+#define SCHEMA_IfcTriangulatedFaceSet_HAS_CoordIndex
+#define SCHEMA_IfcTriangulatedFaceSet_HAS_PnIndex
+#define SCHEMA_IfcTriangulatedFaceSet_PnIndex_IS_OPTIONAL
+#define SCHEMA_HAS_IfcTriangulatedIrregularNetwork
+#define SCHEMA_IfcTriangulatedIrregularNetwork_HAS_Flags
+#define SCHEMA_HAS_IfcTrimmedCurve
+#define SCHEMA_IfcTrimmedCurve_HAS_BasisCurve
+#define SCHEMA_IfcTrimmedCurve_HAS_Trim1
+#define SCHEMA_IfcTrimmedCurve_HAS_Trim2
+#define SCHEMA_IfcTrimmedCurve_HAS_SenseAgreement
+#define SCHEMA_IfcTrimmedCurve_HAS_MasterRepresentation
+#define SCHEMA_HAS_IfcTubeBundle
+#define SCHEMA_IfcTubeBundle_HAS_PredefinedType
+#define SCHEMA_IfcTubeBundle_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcTubeBundleType
+#define SCHEMA_IfcTubeBundleType_HAS_PredefinedType
+#define SCHEMA_HAS_IfcTypeObject
+#define SCHEMA_IfcTypeObject_HAS_ApplicableOccurrence
+#define SCHEMA_IfcTypeObject_ApplicableOccurrence_IS_OPTIONAL
+#define SCHEMA_IfcTypeObject_HAS_HasPropertySets
+#define SCHEMA_IfcTypeObject_HasPropertySets_IS_OPTIONAL
+#define SCHEMA_IfcTypeObject_HAS_Types
+#define SCHEMA_HAS_IfcTypeProcess
+#define SCHEMA_IfcTypeProcess_HAS_Identification
+#define SCHEMA_IfcTypeProcess_Identification_IS_OPTIONAL
+#define SCHEMA_IfcTypeProcess_HAS_LongDescription
+#define SCHEMA_IfcTypeProcess_LongDescription_IS_OPTIONAL
+#define SCHEMA_IfcTypeProcess_HAS_ProcessType
+#define SCHEMA_IfcTypeProcess_ProcessType_IS_OPTIONAL
+#define SCHEMA_IfcTypeProcess_HAS_OperatesOn
+#define SCHEMA_HAS_IfcTypeProduct
+#define SCHEMA_IfcTypeProduct_HAS_RepresentationMaps
+#define SCHEMA_IfcTypeProduct_RepresentationMaps_IS_OPTIONAL
+#define SCHEMA_IfcTypeProduct_HAS_Tag
+#define SCHEMA_IfcTypeProduct_Tag_IS_OPTIONAL
+#define SCHEMA_IfcTypeProduct_HAS_ReferencedBy
+#define SCHEMA_HAS_IfcTypeResource
+#define SCHEMA_IfcTypeResource_HAS_Identification
+#define SCHEMA_IfcTypeResource_Identification_IS_OPTIONAL
+#define SCHEMA_IfcTypeResource_HAS_LongDescription
+#define SCHEMA_IfcTypeResource_LongDescription_IS_OPTIONAL
+#define SCHEMA_IfcTypeResource_HAS_ResourceType
+#define SCHEMA_IfcTypeResource_ResourceType_IS_OPTIONAL
+#define SCHEMA_IfcTypeResource_HAS_ResourceOf
+#define SCHEMA_HAS_IfcUShapeProfileDef
+#define SCHEMA_IfcUShapeProfileDef_HAS_Depth
+#define SCHEMA_IfcUShapeProfileDef_HAS_FlangeWidth
+#define SCHEMA_IfcUShapeProfileDef_HAS_WebThickness
+#define SCHEMA_IfcUShapeProfileDef_HAS_FlangeThickness
+#define SCHEMA_IfcUShapeProfileDef_HAS_FilletRadius
+#define SCHEMA_IfcUShapeProfileDef_FilletRadius_IS_OPTIONAL
+#define SCHEMA_IfcUShapeProfileDef_HAS_EdgeRadius
+#define SCHEMA_IfcUShapeProfileDef_EdgeRadius_IS_OPTIONAL
+#define SCHEMA_IfcUShapeProfileDef_HAS_FlangeSlope
+#define SCHEMA_IfcUShapeProfileDef_FlangeSlope_IS_OPTIONAL
+#define SCHEMA_HAS_IfcUnitAssignment
+#define SCHEMA_IfcUnitAssignment_HAS_Units
+#define SCHEMA_HAS_IfcUnitaryControlElement
+#define SCHEMA_IfcUnitaryControlElement_HAS_PredefinedType
+#define SCHEMA_IfcUnitaryControlElement_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcUnitaryControlElementType
+#define SCHEMA_IfcUnitaryControlElementType_HAS_PredefinedType
+#define SCHEMA_HAS_IfcUnitaryEquipment
+#define SCHEMA_IfcUnitaryEquipment_HAS_PredefinedType
+#define SCHEMA_IfcUnitaryEquipment_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcUnitaryEquipmentType
+#define SCHEMA_IfcUnitaryEquipmentType_HAS_PredefinedType
+#define SCHEMA_HAS_IfcValve
+#define SCHEMA_IfcValve_HAS_PredefinedType
+#define SCHEMA_IfcValve_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcValveType
+#define SCHEMA_IfcValveType_HAS_PredefinedType
+#define SCHEMA_HAS_IfcVector
+#define SCHEMA_IfcVector_HAS_Orientation
+#define SCHEMA_IfcVector_HAS_Magnitude
+#define SCHEMA_HAS_IfcVehicle
+#define SCHEMA_IfcVehicle_HAS_PredefinedType
+#define SCHEMA_IfcVehicle_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcVehicleType
+#define SCHEMA_IfcVehicleType_HAS_PredefinedType
+#define SCHEMA_HAS_IfcVertex
+#define SCHEMA_HAS_IfcVertexLoop
+#define SCHEMA_IfcVertexLoop_HAS_LoopVertex
+#define SCHEMA_HAS_IfcVertexPoint
+#define SCHEMA_IfcVertexPoint_HAS_VertexGeometry
+#define SCHEMA_HAS_IfcVibrationDamper
+#define SCHEMA_IfcVibrationDamper_HAS_PredefinedType
+#define SCHEMA_IfcVibrationDamper_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcVibrationDamperType
+#define SCHEMA_IfcVibrationDamperType_HAS_PredefinedType
+#define SCHEMA_HAS_IfcVibrationIsolator
+#define SCHEMA_IfcVibrationIsolator_HAS_PredefinedType
+#define SCHEMA_IfcVibrationIsolator_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcVibrationIsolatorType
+#define SCHEMA_IfcVibrationIsolatorType_HAS_PredefinedType
+#define SCHEMA_HAS_IfcVirtualElement
+#define SCHEMA_IfcVirtualElement_HAS_PredefinedType
+#define SCHEMA_IfcVirtualElement_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcVirtualGridIntersection
+#define SCHEMA_IfcVirtualGridIntersection_HAS_IntersectingAxes
+#define SCHEMA_IfcVirtualGridIntersection_HAS_OffsetDistances
+#define SCHEMA_HAS_IfcVoidingFeature
+#define SCHEMA_IfcVoidingFeature_HAS_PredefinedType
+#define SCHEMA_IfcVoidingFeature_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcWall
+#define SCHEMA_IfcWall_HAS_PredefinedType
+#define SCHEMA_IfcWall_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcWallStandardCase
+#define SCHEMA_HAS_IfcWallType
+#define SCHEMA_IfcWallType_HAS_PredefinedType
+#define SCHEMA_HAS_IfcWasteTerminal
+#define SCHEMA_IfcWasteTerminal_HAS_PredefinedType
+#define SCHEMA_IfcWasteTerminal_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcWasteTerminalType
+#define SCHEMA_IfcWasteTerminalType_HAS_PredefinedType
+#define SCHEMA_HAS_IfcWindow
+#define SCHEMA_IfcWindow_HAS_OverallHeight
+#define SCHEMA_IfcWindow_OverallHeight_IS_OPTIONAL
+#define SCHEMA_IfcWindow_HAS_OverallWidth
+#define SCHEMA_IfcWindow_OverallWidth_IS_OPTIONAL
+#define SCHEMA_IfcWindow_HAS_PredefinedType
+#define SCHEMA_IfcWindow_PredefinedType_IS_OPTIONAL
+#define SCHEMA_IfcWindow_HAS_PartitioningType
+#define SCHEMA_IfcWindow_PartitioningType_IS_OPTIONAL
+#define SCHEMA_IfcWindow_HAS_UserDefinedPartitioningType
+#define SCHEMA_IfcWindow_UserDefinedPartitioningType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcWindowLiningProperties
+#define SCHEMA_IfcWindowLiningProperties_HAS_LiningDepth
+#define SCHEMA_IfcWindowLiningProperties_LiningDepth_IS_OPTIONAL
+#define SCHEMA_IfcWindowLiningProperties_HAS_LiningThickness
+#define SCHEMA_IfcWindowLiningProperties_LiningThickness_IS_OPTIONAL
+#define SCHEMA_IfcWindowLiningProperties_HAS_TransomThickness
+#define SCHEMA_IfcWindowLiningProperties_TransomThickness_IS_OPTIONAL
+#define SCHEMA_IfcWindowLiningProperties_HAS_MullionThickness
+#define SCHEMA_IfcWindowLiningProperties_MullionThickness_IS_OPTIONAL
+#define SCHEMA_IfcWindowLiningProperties_HAS_FirstTransomOffset
+#define SCHEMA_IfcWindowLiningProperties_FirstTransomOffset_IS_OPTIONAL
+#define SCHEMA_IfcWindowLiningProperties_HAS_SecondTransomOffset
+#define SCHEMA_IfcWindowLiningProperties_SecondTransomOffset_IS_OPTIONAL
+#define SCHEMA_IfcWindowLiningProperties_HAS_FirstMullionOffset
+#define SCHEMA_IfcWindowLiningProperties_FirstMullionOffset_IS_OPTIONAL
+#define SCHEMA_IfcWindowLiningProperties_HAS_SecondMullionOffset
+#define SCHEMA_IfcWindowLiningProperties_SecondMullionOffset_IS_OPTIONAL
+#define SCHEMA_IfcWindowLiningProperties_HAS_ShapeAspectStyle
+#define SCHEMA_IfcWindowLiningProperties_ShapeAspectStyle_IS_OPTIONAL
+#define SCHEMA_IfcWindowLiningProperties_HAS_LiningOffset
+#define SCHEMA_IfcWindowLiningProperties_LiningOffset_IS_OPTIONAL
+#define SCHEMA_IfcWindowLiningProperties_HAS_LiningToPanelOffsetX
+#define SCHEMA_IfcWindowLiningProperties_LiningToPanelOffsetX_IS_OPTIONAL
+#define SCHEMA_IfcWindowLiningProperties_HAS_LiningToPanelOffsetY
+#define SCHEMA_IfcWindowLiningProperties_LiningToPanelOffsetY_IS_OPTIONAL
+#define SCHEMA_HAS_IfcWindowPanelProperties
+#define SCHEMA_IfcWindowPanelProperties_HAS_OperationType
+#define SCHEMA_IfcWindowPanelProperties_HAS_PanelPosition
+#define SCHEMA_IfcWindowPanelProperties_HAS_FrameDepth
+#define SCHEMA_IfcWindowPanelProperties_FrameDepth_IS_OPTIONAL
+#define SCHEMA_IfcWindowPanelProperties_HAS_FrameThickness
+#define SCHEMA_IfcWindowPanelProperties_FrameThickness_IS_OPTIONAL
+#define SCHEMA_IfcWindowPanelProperties_HAS_ShapeAspectStyle
+#define SCHEMA_IfcWindowPanelProperties_ShapeAspectStyle_IS_OPTIONAL
+#define SCHEMA_HAS_IfcWindowType
+#define SCHEMA_IfcWindowType_HAS_PredefinedType
+#define SCHEMA_IfcWindowType_HAS_PartitioningType
+#define SCHEMA_IfcWindowType_HAS_ParameterTakesPrecedence
+#define SCHEMA_IfcWindowType_ParameterTakesPrecedence_IS_OPTIONAL
+#define SCHEMA_IfcWindowType_HAS_UserDefinedPartitioningType
+#define SCHEMA_IfcWindowType_UserDefinedPartitioningType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcWorkCalendar
+#define SCHEMA_IfcWorkCalendar_HAS_WorkingTimes
+#define SCHEMA_IfcWorkCalendar_WorkingTimes_IS_OPTIONAL
+#define SCHEMA_IfcWorkCalendar_HAS_ExceptionTimes
+#define SCHEMA_IfcWorkCalendar_ExceptionTimes_IS_OPTIONAL
+#define SCHEMA_IfcWorkCalendar_HAS_PredefinedType
+#define SCHEMA_IfcWorkCalendar_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcWorkControl
+#define SCHEMA_IfcWorkControl_HAS_CreationDate
+#define SCHEMA_IfcWorkControl_HAS_Creators
+#define SCHEMA_IfcWorkControl_Creators_IS_OPTIONAL
+#define SCHEMA_IfcWorkControl_HAS_Purpose
+#define SCHEMA_IfcWorkControl_Purpose_IS_OPTIONAL
+#define SCHEMA_IfcWorkControl_HAS_Duration
+#define SCHEMA_IfcWorkControl_Duration_IS_OPTIONAL
+#define SCHEMA_IfcWorkControl_HAS_TotalFloat
+#define SCHEMA_IfcWorkControl_TotalFloat_IS_OPTIONAL
+#define SCHEMA_IfcWorkControl_HAS_StartTime
+#define SCHEMA_IfcWorkControl_HAS_FinishTime
+#define SCHEMA_IfcWorkControl_FinishTime_IS_OPTIONAL
+#define SCHEMA_HAS_IfcWorkPlan
+#define SCHEMA_IfcWorkPlan_HAS_PredefinedType
+#define SCHEMA_IfcWorkPlan_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcWorkSchedule
+#define SCHEMA_IfcWorkSchedule_HAS_PredefinedType
+#define SCHEMA_IfcWorkSchedule_PredefinedType_IS_OPTIONAL
+#define SCHEMA_HAS_IfcWorkTime
+#define SCHEMA_IfcWorkTime_HAS_RecurrencePattern
+#define SCHEMA_IfcWorkTime_RecurrencePattern_IS_OPTIONAL
+#define SCHEMA_IfcWorkTime_HAS_StartDate
+#define SCHEMA_IfcWorkTime_StartDate_IS_OPTIONAL
+#define SCHEMA_IfcWorkTime_HAS_FinishDate
+#define SCHEMA_IfcWorkTime_FinishDate_IS_OPTIONAL
+#define SCHEMA_HAS_IfcZShapeProfileDef
+#define SCHEMA_IfcZShapeProfileDef_HAS_Depth
+#define SCHEMA_IfcZShapeProfileDef_HAS_FlangeWidth
+#define SCHEMA_IfcZShapeProfileDef_HAS_WebThickness
+#define SCHEMA_IfcZShapeProfileDef_HAS_FlangeThickness
+#define SCHEMA_IfcZShapeProfileDef_HAS_FilletRadius
+#define SCHEMA_IfcZShapeProfileDef_FilletRadius_IS_OPTIONAL
+#define SCHEMA_IfcZShapeProfileDef_HAS_EdgeRadius
+#define SCHEMA_IfcZShapeProfileDef_EdgeRadius_IS_OPTIONAL
+#define SCHEMA_HAS_IfcZone
+#define SCHEMA_IfcZone_HAS_LongName
+#define SCHEMA_IfcZone_LongName_IS_OPTIONAL
diff --git a/src/ifcparse/Ifc4x3-schema.cpp b/src/ifcparse/Ifc4x3-schema.cpp
new file mode 100644
index 0000000000..762f7c4598
--- /dev/null
+++ b/src/ifcparse/Ifc4x3-schema.cpp
@@ -0,0 +1,17108 @@
+/********************************************************************************
+ * *
+ * This file is part of IfcOpenShell. *
+ * *
+ * IfcOpenShell is free software: you can redistribute it and/or modify *
+ * it under the terms of the Lesser GNU General Public License as published by *
+ * the Free Software Foundation, either version 3.0 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * IfcOpenShell is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * Lesser GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the Lesser GNU General Public License *
+ * along with this program. If not, see . *
+ * *
+ ********************************************************************************/
+
+/********************************************************************************
+ * *
+ * This file has been generated from IFC4x3_RC2.exp. Do not make modifications *
+ * but instead modify the python script that has been used to generate this. *
+ * *
+ ********************************************************************************/
+
+#include "../ifcparse/IfcSchema.h"
+#include "../ifcparse/Ifc4x3.h"
+
+using namespace IfcParse;
+
+entity* IFC4X3_IfcActionRequest_type = 0;
+entity* IFC4X3_IfcActor_type = 0;
+entity* IFC4X3_IfcActorRole_type = 0;
+entity* IFC4X3_IfcActuator_type = 0;
+entity* IFC4X3_IfcActuatorType_type = 0;
+entity* IFC4X3_IfcAddress_type = 0;
+entity* IFC4X3_IfcAdvancedBrep_type = 0;
+entity* IFC4X3_IfcAdvancedBrepWithVoids_type = 0;
+entity* IFC4X3_IfcAdvancedFace_type = 0;
+entity* IFC4X3_IfcAirTerminal_type = 0;
+entity* IFC4X3_IfcAirTerminalBox_type = 0;
+entity* IFC4X3_IfcAirTerminalBoxType_type = 0;
+entity* IFC4X3_IfcAirTerminalType_type = 0;
+entity* IFC4X3_IfcAirToAirHeatRecovery_type = 0;
+entity* IFC4X3_IfcAirToAirHeatRecoveryType_type = 0;
+entity* IFC4X3_IfcAlarm_type = 0;
+entity* IFC4X3_IfcAlarmType_type = 0;
+entity* IFC4X3_IfcAlignment_type = 0;
+entity* IFC4X3_IfcAlignmentCant_type = 0;
+entity* IFC4X3_IfcAlignmentCantSegment_type = 0;
+entity* IFC4X3_IfcAlignmentHorizontal_type = 0;
+entity* IFC4X3_IfcAlignmentHorizontalSegment_type = 0;
+entity* IFC4X3_IfcAlignmentParameterSegment_type = 0;
+entity* IFC4X3_IfcAlignmentSegment_type = 0;
+entity* IFC4X3_IfcAlignmentVertical_type = 0;
+entity* IFC4X3_IfcAlignmentVerticalSegment_type = 0;
+entity* IFC4X3_IfcAnnotation_type = 0;
+entity* IFC4X3_IfcAnnotationFillArea_type = 0;
+entity* IFC4X3_IfcApplication_type = 0;
+entity* IFC4X3_IfcAppliedValue_type = 0;
+entity* IFC4X3_IfcApproval_type = 0;
+entity* IFC4X3_IfcApprovalRelationship_type = 0;
+entity* IFC4X3_IfcArbitraryClosedProfileDef_type = 0;
+entity* IFC4X3_IfcArbitraryOpenProfileDef_type = 0;
+entity* IFC4X3_IfcArbitraryProfileDefWithVoids_type = 0;
+entity* IFC4X3_IfcAsset_type = 0;
+entity* IFC4X3_IfcAsymmetricIShapeProfileDef_type = 0;
+entity* IFC4X3_IfcAudioVisualAppliance_type = 0;
+entity* IFC4X3_IfcAudioVisualApplianceType_type = 0;
+entity* IFC4X3_IfcAxis1Placement_type = 0;
+entity* IFC4X3_IfcAxis2Placement2D_type = 0;
+entity* IFC4X3_IfcAxis2Placement3D_type = 0;
+entity* IFC4X3_IfcAxis2PlacementLinear_type = 0;
+entity* IFC4X3_IfcBSplineCurve_type = 0;
+entity* IFC4X3_IfcBSplineCurveWithKnots_type = 0;
+entity* IFC4X3_IfcBSplineSurface_type = 0;
+entity* IFC4X3_IfcBSplineSurfaceWithKnots_type = 0;
+entity* IFC4X3_IfcBeam_type = 0;
+entity* IFC4X3_IfcBeamType_type = 0;
+entity* IFC4X3_IfcBearing_type = 0;
+entity* IFC4X3_IfcBearingType_type = 0;
+entity* IFC4X3_IfcBlobTexture_type = 0;
+entity* IFC4X3_IfcBlock_type = 0;
+entity* IFC4X3_IfcBoiler_type = 0;
+entity* IFC4X3_IfcBoilerType_type = 0;
+entity* IFC4X3_IfcBooleanClippingResult_type = 0;
+entity* IFC4X3_IfcBooleanResult_type = 0;
+entity* IFC4X3_IfcBorehole_type = 0;
+entity* IFC4X3_IfcBoundaryCondition_type = 0;
+entity* IFC4X3_IfcBoundaryCurve_type = 0;
+entity* IFC4X3_IfcBoundaryEdgeCondition_type = 0;
+entity* IFC4X3_IfcBoundaryFaceCondition_type = 0;
+entity* IFC4X3_IfcBoundaryNodeCondition_type = 0;
+entity* IFC4X3_IfcBoundaryNodeConditionWarping_type = 0;
+entity* IFC4X3_IfcBoundedCurve_type = 0;
+entity* IFC4X3_IfcBoundedSurface_type = 0;
+entity* IFC4X3_IfcBoundingBox_type = 0;
+entity* IFC4X3_IfcBoxedHalfSpace_type = 0;
+entity* IFC4X3_IfcBridge_type = 0;
+entity* IFC4X3_IfcBridgePart_type = 0;
+entity* IFC4X3_IfcBuilding_type = 0;
+entity* IFC4X3_IfcBuildingElementPart_type = 0;
+entity* IFC4X3_IfcBuildingElementPartType_type = 0;
+entity* IFC4X3_IfcBuildingElementProxy_type = 0;
+entity* IFC4X3_IfcBuildingElementProxyType_type = 0;
+entity* IFC4X3_IfcBuildingStorey_type = 0;
+entity* IFC4X3_IfcBuildingSystem_type = 0;
+entity* IFC4X3_IfcBuiltElement_type = 0;
+entity* IFC4X3_IfcBuiltElementType_type = 0;
+entity* IFC4X3_IfcBuiltSystem_type = 0;
+entity* IFC4X3_IfcBurner_type = 0;
+entity* IFC4X3_IfcBurnerType_type = 0;
+entity* IFC4X3_IfcCShapeProfileDef_type = 0;
+entity* IFC4X3_IfcCableCarrierFitting_type = 0;
+entity* IFC4X3_IfcCableCarrierFittingType_type = 0;
+entity* IFC4X3_IfcCableCarrierSegment_type = 0;
+entity* IFC4X3_IfcCableCarrierSegmentType_type = 0;
+entity* IFC4X3_IfcCableFitting_type = 0;
+entity* IFC4X3_IfcCableFittingType_type = 0;
+entity* IFC4X3_IfcCableSegment_type = 0;
+entity* IFC4X3_IfcCableSegmentType_type = 0;
+entity* IFC4X3_IfcCaissonFoundation_type = 0;
+entity* IFC4X3_IfcCaissonFoundationType_type = 0;
+entity* IFC4X3_IfcCartesianPoint_type = 0;
+entity* IFC4X3_IfcCartesianPointList_type = 0;
+entity* IFC4X3_IfcCartesianPointList2D_type = 0;
+entity* IFC4X3_IfcCartesianPointList3D_type = 0;
+entity* IFC4X3_IfcCartesianTransformationOperator_type = 0;
+entity* IFC4X3_IfcCartesianTransformationOperator2D_type = 0;
+entity* IFC4X3_IfcCartesianTransformationOperator2DnonUniform_type = 0;
+entity* IFC4X3_IfcCartesianTransformationOperator3D_type = 0;
+entity* IFC4X3_IfcCartesianTransformationOperator3DnonUniform_type = 0;
+entity* IFC4X3_IfcCenterLineProfileDef_type = 0;
+entity* IFC4X3_IfcChiller_type = 0;
+entity* IFC4X3_IfcChillerType_type = 0;
+entity* IFC4X3_IfcChimney_type = 0;
+entity* IFC4X3_IfcChimneyType_type = 0;
+entity* IFC4X3_IfcCircle_type = 0;
+entity* IFC4X3_IfcCircleHollowProfileDef_type = 0;
+entity* IFC4X3_IfcCircleProfileDef_type = 0;
+entity* IFC4X3_IfcCivilElement_type = 0;
+entity* IFC4X3_IfcCivilElementType_type = 0;
+entity* IFC4X3_IfcClassification_type = 0;
+entity* IFC4X3_IfcClassificationReference_type = 0;
+entity* IFC4X3_IfcClosedShell_type = 0;
+entity* IFC4X3_IfcClothoid_type = 0;
+entity* IFC4X3_IfcCoil_type = 0;
+entity* IFC4X3_IfcCoilType_type = 0;
+entity* IFC4X3_IfcColourRgb_type = 0;
+entity* IFC4X3_IfcColourRgbList_type = 0;
+entity* IFC4X3_IfcColourSpecification_type = 0;
+entity* IFC4X3_IfcColumn_type = 0;
+entity* IFC4X3_IfcColumnType_type = 0;
+entity* IFC4X3_IfcCommunicationsAppliance_type = 0;
+entity* IFC4X3_IfcCommunicationsApplianceType_type = 0;
+entity* IFC4X3_IfcComplexProperty_type = 0;
+entity* IFC4X3_IfcComplexPropertyTemplate_type = 0;
+entity* IFC4X3_IfcCompositeCurve_type = 0;
+entity* IFC4X3_IfcCompositeCurveOnSurface_type = 0;
+entity* IFC4X3_IfcCompositeCurveSegment_type = 0;
+entity* IFC4X3_IfcCompositeProfileDef_type = 0;
+entity* IFC4X3_IfcCompressor_type = 0;
+entity* IFC4X3_IfcCompressorType_type = 0;
+entity* IFC4X3_IfcCondenser_type = 0;
+entity* IFC4X3_IfcCondenserType_type = 0;
+entity* IFC4X3_IfcConic_type = 0;
+entity* IFC4X3_IfcConnectedFaceSet_type = 0;
+entity* IFC4X3_IfcConnectionCurveGeometry_type = 0;
+entity* IFC4X3_IfcConnectionGeometry_type = 0;
+entity* IFC4X3_IfcConnectionPointEccentricity_type = 0;
+entity* IFC4X3_IfcConnectionPointGeometry_type = 0;
+entity* IFC4X3_IfcConnectionSurfaceGeometry_type = 0;
+entity* IFC4X3_IfcConnectionVolumeGeometry_type = 0;
+entity* IFC4X3_IfcConstraint_type = 0;
+entity* IFC4X3_IfcConstructionEquipmentResource_type = 0;
+entity* IFC4X3_IfcConstructionEquipmentResourceType_type = 0;
+entity* IFC4X3_IfcConstructionMaterialResource_type = 0;
+entity* IFC4X3_IfcConstructionMaterialResourceType_type = 0;
+entity* IFC4X3_IfcConstructionProductResource_type = 0;
+entity* IFC4X3_IfcConstructionProductResourceType_type = 0;
+entity* IFC4X3_IfcConstructionResource_type = 0;
+entity* IFC4X3_IfcConstructionResourceType_type = 0;
+entity* IFC4X3_IfcContext_type = 0;
+entity* IFC4X3_IfcContextDependentUnit_type = 0;
+entity* IFC4X3_IfcControl_type = 0;
+entity* IFC4X3_IfcController_type = 0;
+entity* IFC4X3_IfcControllerType_type = 0;
+entity* IFC4X3_IfcConversionBasedUnit_type = 0;
+entity* IFC4X3_IfcConversionBasedUnitWithOffset_type = 0;
+entity* IFC4X3_IfcConveyorSegment_type = 0;
+entity* IFC4X3_IfcConveyorSegmentType_type = 0;
+entity* IFC4X3_IfcCooledBeam_type = 0;
+entity* IFC4X3_IfcCooledBeamType_type = 0;
+entity* IFC4X3_IfcCoolingTower_type = 0;
+entity* IFC4X3_IfcCoolingTowerType_type = 0;
+entity* IFC4X3_IfcCoordinateOperation_type = 0;
+entity* IFC4X3_IfcCoordinateReferenceSystem_type = 0;
+entity* IFC4X3_IfcCosineSpiral_type = 0;
+entity* IFC4X3_IfcCostItem_type = 0;
+entity* IFC4X3_IfcCostSchedule_type = 0;
+entity* IFC4X3_IfcCostValue_type = 0;
+entity* IFC4X3_IfcCourse_type = 0;
+entity* IFC4X3_IfcCourseType_type = 0;
+entity* IFC4X3_IfcCovering_type = 0;
+entity* IFC4X3_IfcCoveringType_type = 0;
+entity* IFC4X3_IfcCrewResource_type = 0;
+entity* IFC4X3_IfcCrewResourceType_type = 0;
+entity* IFC4X3_IfcCsgPrimitive3D_type = 0;
+entity* IFC4X3_IfcCsgSolid_type = 0;
+entity* IFC4X3_IfcCurrencyRelationship_type = 0;
+entity* IFC4X3_IfcCurtainWall_type = 0;
+entity* IFC4X3_IfcCurtainWallType_type = 0;
+entity* IFC4X3_IfcCurve_type = 0;
+entity* IFC4X3_IfcCurveBoundedPlane_type = 0;
+entity* IFC4X3_IfcCurveBoundedSurface_type = 0;
+entity* IFC4X3_IfcCurveSegment_type = 0;
+entity* IFC4X3_IfcCurveStyle_type = 0;
+entity* IFC4X3_IfcCurveStyleFont_type = 0;
+entity* IFC4X3_IfcCurveStyleFontAndScaling_type = 0;
+entity* IFC4X3_IfcCurveStyleFontPattern_type = 0;
+entity* IFC4X3_IfcCylindricalSurface_type = 0;
+entity* IFC4X3_IfcDamper_type = 0;
+entity* IFC4X3_IfcDamperType_type = 0;
+entity* IFC4X3_IfcDeepFoundation_type = 0;
+entity* IFC4X3_IfcDeepFoundationType_type = 0;
+entity* IFC4X3_IfcDerivedProfileDef_type = 0;
+entity* IFC4X3_IfcDerivedUnit_type = 0;
+entity* IFC4X3_IfcDerivedUnitElement_type = 0;
+entity* IFC4X3_IfcDimensionalExponents_type = 0;
+entity* IFC4X3_IfcDirection_type = 0;
+entity* IFC4X3_IfcDirectrixCurveSweptAreaSolid_type = 0;
+entity* IFC4X3_IfcDirectrixDerivedReferenceSweptAreaSolid_type = 0;
+entity* IFC4X3_IfcDiscreteAccessory_type = 0;
+entity* IFC4X3_IfcDiscreteAccessoryType_type = 0;
+entity* IFC4X3_IfcDistributionBoard_type = 0;
+entity* IFC4X3_IfcDistributionBoardType_type = 0;
+entity* IFC4X3_IfcDistributionChamberElement_type = 0;
+entity* IFC4X3_IfcDistributionChamberElementType_type = 0;
+entity* IFC4X3_IfcDistributionCircuit_type = 0;
+entity* IFC4X3_IfcDistributionControlElement_type = 0;
+entity* IFC4X3_IfcDistributionControlElementType_type = 0;
+entity* IFC4X3_IfcDistributionElement_type = 0;
+entity* IFC4X3_IfcDistributionElementType_type = 0;
+entity* IFC4X3_IfcDistributionFlowElement_type = 0;
+entity* IFC4X3_IfcDistributionFlowElementType_type = 0;
+entity* IFC4X3_IfcDistributionPort_type = 0;
+entity* IFC4X3_IfcDistributionSystem_type = 0;
+entity* IFC4X3_IfcDocumentInformation_type = 0;
+entity* IFC4X3_IfcDocumentInformationRelationship_type = 0;
+entity* IFC4X3_IfcDocumentReference_type = 0;
+entity* IFC4X3_IfcDoor_type = 0;
+entity* IFC4X3_IfcDoorLiningProperties_type = 0;
+entity* IFC4X3_IfcDoorPanelProperties_type = 0;
+entity* IFC4X3_IfcDoorType_type = 0;
+entity* IFC4X3_IfcDraughtingPreDefinedColour_type = 0;
+entity* IFC4X3_IfcDraughtingPreDefinedCurveFont_type = 0;
+entity* IFC4X3_IfcDuctFitting_type = 0;
+entity* IFC4X3_IfcDuctFittingType_type = 0;
+entity* IFC4X3_IfcDuctSegment_type = 0;
+entity* IFC4X3_IfcDuctSegmentType_type = 0;
+entity* IFC4X3_IfcDuctSilencer_type = 0;
+entity* IFC4X3_IfcDuctSilencerType_type = 0;
+entity* IFC4X3_IfcEarthworksCut_type = 0;
+entity* IFC4X3_IfcEarthworksElement_type = 0;
+entity* IFC4X3_IfcEarthworksFill_type = 0;
+entity* IFC4X3_IfcEdge_type = 0;
+entity* IFC4X3_IfcEdgeCurve_type = 0;
+entity* IFC4X3_IfcEdgeLoop_type = 0;
+entity* IFC4X3_IfcElectricAppliance_type = 0;
+entity* IFC4X3_IfcElectricApplianceType_type = 0;
+entity* IFC4X3_IfcElectricDistributionBoard_type = 0;
+entity* IFC4X3_IfcElectricDistributionBoardType_type = 0;
+entity* IFC4X3_IfcElectricFlowStorageDevice_type = 0;
+entity* IFC4X3_IfcElectricFlowStorageDeviceType_type = 0;
+entity* IFC4X3_IfcElectricFlowTreatmentDevice_type = 0;
+entity* IFC4X3_IfcElectricFlowTreatmentDeviceType_type = 0;
+entity* IFC4X3_IfcElectricGenerator_type = 0;
+entity* IFC4X3_IfcElectricGeneratorType_type = 0;
+entity* IFC4X3_IfcElectricMotor_type = 0;
+entity* IFC4X3_IfcElectricMotorType_type = 0;
+entity* IFC4X3_IfcElectricTimeControl_type = 0;
+entity* IFC4X3_IfcElectricTimeControlType_type = 0;
+entity* IFC4X3_IfcElement_type = 0;
+entity* IFC4X3_IfcElementAssembly_type = 0;
+entity* IFC4X3_IfcElementAssemblyType_type = 0;
+entity* IFC4X3_IfcElementComponent_type = 0;
+entity* IFC4X3_IfcElementComponentType_type = 0;
+entity* IFC4X3_IfcElementQuantity_type = 0;
+entity* IFC4X3_IfcElementType_type = 0;
+entity* IFC4X3_IfcElementarySurface_type = 0;
+entity* IFC4X3_IfcEllipse_type = 0;
+entity* IFC4X3_IfcEllipseProfileDef_type = 0;
+entity* IFC4X3_IfcEnergyConversionDevice_type = 0;
+entity* IFC4X3_IfcEnergyConversionDeviceType_type = 0;
+entity* IFC4X3_IfcEngine_type = 0;
+entity* IFC4X3_IfcEngineType_type = 0;
+entity* IFC4X3_IfcEvaporativeCooler_type = 0;
+entity* IFC4X3_IfcEvaporativeCoolerType_type = 0;
+entity* IFC4X3_IfcEvaporator_type = 0;
+entity* IFC4X3_IfcEvaporatorType_type = 0;
+entity* IFC4X3_IfcEvent_type = 0;
+entity* IFC4X3_IfcEventTime_type = 0;
+entity* IFC4X3_IfcEventType_type = 0;
+entity* IFC4X3_IfcExtendedProperties_type = 0;
+entity* IFC4X3_IfcExternalInformation_type = 0;
+entity* IFC4X3_IfcExternalReference_type = 0;
+entity* IFC4X3_IfcExternalReferenceRelationship_type = 0;
+entity* IFC4X3_IfcExternalSpatialElement_type = 0;
+entity* IFC4X3_IfcExternalSpatialStructureElement_type = 0;
+entity* IFC4X3_IfcExternallyDefinedHatchStyle_type = 0;
+entity* IFC4X3_IfcExternallyDefinedSurfaceStyle_type = 0;
+entity* IFC4X3_IfcExternallyDefinedTextFont_type = 0;
+entity* IFC4X3_IfcExtrudedAreaSolid_type = 0;
+entity* IFC4X3_IfcExtrudedAreaSolidTapered_type = 0;
+entity* IFC4X3_IfcFace_type = 0;
+entity* IFC4X3_IfcFaceBasedSurfaceModel_type = 0;
+entity* IFC4X3_IfcFaceBound_type = 0;
+entity* IFC4X3_IfcFaceOuterBound_type = 0;
+entity* IFC4X3_IfcFaceSurface_type = 0;
+entity* IFC4X3_IfcFacetedBrep_type = 0;
+entity* IFC4X3_IfcFacetedBrepWithVoids_type = 0;
+entity* IFC4X3_IfcFacility_type = 0;
+entity* IFC4X3_IfcFacilityPart_type = 0;
+entity* IFC4X3_IfcFacilityPartCommon_type = 0;
+entity* IFC4X3_IfcFailureConnectionCondition_type = 0;
+entity* IFC4X3_IfcFan_type = 0;
+entity* IFC4X3_IfcFanType_type = 0;
+entity* IFC4X3_IfcFastener_type = 0;
+entity* IFC4X3_IfcFastenerType_type = 0;
+entity* IFC4X3_IfcFeatureElement_type = 0;
+entity* IFC4X3_IfcFeatureElementAddition_type = 0;
+entity* IFC4X3_IfcFeatureElementSubtraction_type = 0;
+entity* IFC4X3_IfcFillAreaStyle_type = 0;
+entity* IFC4X3_IfcFillAreaStyleHatching_type = 0;
+entity* IFC4X3_IfcFillAreaStyleTiles_type = 0;
+entity* IFC4X3_IfcFilter_type = 0;
+entity* IFC4X3_IfcFilterType_type = 0;
+entity* IFC4X3_IfcFireSuppressionTerminal_type = 0;
+entity* IFC4X3_IfcFireSuppressionTerminalType_type = 0;
+entity* IFC4X3_IfcFixedReferenceSweptAreaSolid_type = 0;
+entity* IFC4X3_IfcFlowController_type = 0;
+entity* IFC4X3_IfcFlowControllerType_type = 0;
+entity* IFC4X3_IfcFlowFitting_type = 0;
+entity* IFC4X3_IfcFlowFittingType_type = 0;
+entity* IFC4X3_IfcFlowInstrument_type = 0;
+entity* IFC4X3_IfcFlowInstrumentType_type = 0;
+entity* IFC4X3_IfcFlowMeter_type = 0;
+entity* IFC4X3_IfcFlowMeterType_type = 0;
+entity* IFC4X3_IfcFlowMovingDevice_type = 0;
+entity* IFC4X3_IfcFlowMovingDeviceType_type = 0;
+entity* IFC4X3_IfcFlowSegment_type = 0;
+entity* IFC4X3_IfcFlowSegmentType_type = 0;
+entity* IFC4X3_IfcFlowStorageDevice_type = 0;
+entity* IFC4X3_IfcFlowStorageDeviceType_type = 0;
+entity* IFC4X3_IfcFlowTerminal_type = 0;
+entity* IFC4X3_IfcFlowTerminalType_type = 0;
+entity* IFC4X3_IfcFlowTreatmentDevice_type = 0;
+entity* IFC4X3_IfcFlowTreatmentDeviceType_type = 0;
+entity* IFC4X3_IfcFooting_type = 0;
+entity* IFC4X3_IfcFootingType_type = 0;
+entity* IFC4X3_IfcFurnishingElement_type = 0;
+entity* IFC4X3_IfcFurnishingElementType_type = 0;
+entity* IFC4X3_IfcFurniture_type = 0;
+entity* IFC4X3_IfcFurnitureType_type = 0;
+entity* IFC4X3_IfcGeographicElement_type = 0;
+entity* IFC4X3_IfcGeographicElementType_type = 0;
+entity* IFC4X3_IfcGeometricCurveSet_type = 0;
+entity* IFC4X3_IfcGeometricRepresentationContext_type = 0;
+entity* IFC4X3_IfcGeometricRepresentationItem_type = 0;
+entity* IFC4X3_IfcGeometricRepresentationSubContext_type = 0;
+entity* IFC4X3_IfcGeometricSet_type = 0;
+entity* IFC4X3_IfcGeomodel_type = 0;
+entity* IFC4X3_IfcGeoslice_type = 0;
+entity* IFC4X3_IfcGeotechnicalAssembly_type = 0;
+entity* IFC4X3_IfcGeotechnicalElement_type = 0;
+entity* IFC4X3_IfcGeotechnicalStratum_type = 0;
+entity* IFC4X3_IfcGradientCurve_type = 0;
+entity* IFC4X3_IfcGrid_type = 0;
+entity* IFC4X3_IfcGridAxis_type = 0;
+entity* IFC4X3_IfcGridPlacement_type = 0;
+entity* IFC4X3_IfcGroup_type = 0;
+entity* IFC4X3_IfcHalfSpaceSolid_type = 0;
+entity* IFC4X3_IfcHeatExchanger_type = 0;
+entity* IFC4X3_IfcHeatExchangerType_type = 0;
+entity* IFC4X3_IfcHumidifier_type = 0;
+entity* IFC4X3_IfcHumidifierType_type = 0;
+entity* IFC4X3_IfcIShapeProfileDef_type = 0;
+entity* IFC4X3_IfcImageTexture_type = 0;
+entity* IFC4X3_IfcImpactProtectionDevice_type = 0;
+entity* IFC4X3_IfcImpactProtectionDeviceType_type = 0;
+entity* IFC4X3_IfcIndexedColourMap_type = 0;
+entity* IFC4X3_IfcIndexedPolyCurve_type = 0;
+entity* IFC4X3_IfcIndexedPolygonalFace_type = 0;
+entity* IFC4X3_IfcIndexedPolygonalFaceWithVoids_type = 0;
+entity* IFC4X3_IfcIndexedPolygonalTextureMap_type = 0;
+entity* IFC4X3_IfcIndexedTextureMap_type = 0;
+entity* IFC4X3_IfcIndexedTriangleTextureMap_type = 0;
+entity* IFC4X3_IfcInterceptor_type = 0;
+entity* IFC4X3_IfcInterceptorType_type = 0;
+entity* IFC4X3_IfcIntersectionCurve_type = 0;
+entity* IFC4X3_IfcInventory_type = 0;
+entity* IFC4X3_IfcIrregularTimeSeries_type = 0;
+entity* IFC4X3_IfcIrregularTimeSeriesValue_type = 0;
+entity* IFC4X3_IfcJunctionBox_type = 0;
+entity* IFC4X3_IfcJunctionBoxType_type = 0;
+entity* IFC4X3_IfcKerb_type = 0;
+entity* IFC4X3_IfcKerbType_type = 0;
+entity* IFC4X3_IfcLShapeProfileDef_type = 0;
+entity* IFC4X3_IfcLaborResource_type = 0;
+entity* IFC4X3_IfcLaborResourceType_type = 0;
+entity* IFC4X3_IfcLagTime_type = 0;
+entity* IFC4X3_IfcLamp_type = 0;
+entity* IFC4X3_IfcLampType_type = 0;
+entity* IFC4X3_IfcLibraryInformation_type = 0;
+entity* IFC4X3_IfcLibraryReference_type = 0;
+entity* IFC4X3_IfcLightDistributionData_type = 0;
+entity* IFC4X3_IfcLightFixture_type = 0;
+entity* IFC4X3_IfcLightFixtureType_type = 0;
+entity* IFC4X3_IfcLightIntensityDistribution_type = 0;
+entity* IFC4X3_IfcLightSource_type = 0;
+entity* IFC4X3_IfcLightSourceAmbient_type = 0;
+entity* IFC4X3_IfcLightSourceDirectional_type = 0;
+entity* IFC4X3_IfcLightSourceGoniometric_type = 0;
+entity* IFC4X3_IfcLightSourcePositional_type = 0;
+entity* IFC4X3_IfcLightSourceSpot_type = 0;
+entity* IFC4X3_IfcLine_type = 0;
+entity* IFC4X3_IfcLinearElement_type = 0;
+entity* IFC4X3_IfcLinearPlacement_type = 0;
+entity* IFC4X3_IfcLinearPositioningElement_type = 0;
+entity* IFC4X3_IfcLiquidTerminal_type = 0;
+entity* IFC4X3_IfcLiquidTerminalType_type = 0;
+entity* IFC4X3_IfcLocalPlacement_type = 0;
+entity* IFC4X3_IfcLoop_type = 0;
+entity* IFC4X3_IfcManifoldSolidBrep_type = 0;
+entity* IFC4X3_IfcMapConversion_type = 0;
+entity* IFC4X3_IfcMappedItem_type = 0;
+entity* IFC4X3_IfcMarineFacility_type = 0;
+entity* IFC4X3_IfcMarinePart_type = 0;
+entity* IFC4X3_IfcMaterial_type = 0;
+entity* IFC4X3_IfcMaterialClassificationRelationship_type = 0;
+entity* IFC4X3_IfcMaterialConstituent_type = 0;
+entity* IFC4X3_IfcMaterialConstituentSet_type = 0;
+entity* IFC4X3_IfcMaterialDefinition_type = 0;
+entity* IFC4X3_IfcMaterialDefinitionRepresentation_type = 0;
+entity* IFC4X3_IfcMaterialLayer_type = 0;
+entity* IFC4X3_IfcMaterialLayerSet_type = 0;
+entity* IFC4X3_IfcMaterialLayerSetUsage_type = 0;
+entity* IFC4X3_IfcMaterialLayerWithOffsets_type = 0;
+entity* IFC4X3_IfcMaterialList_type = 0;
+entity* IFC4X3_IfcMaterialProfile_type = 0;
+entity* IFC4X3_IfcMaterialProfileSet_type = 0;
+entity* IFC4X3_IfcMaterialProfileSetUsage_type = 0;
+entity* IFC4X3_IfcMaterialProfileSetUsageTapering_type = 0;
+entity* IFC4X3_IfcMaterialProfileWithOffsets_type = 0;
+entity* IFC4X3_IfcMaterialProperties_type = 0;
+entity* IFC4X3_IfcMaterialRelationship_type = 0;
+entity* IFC4X3_IfcMaterialUsageDefinition_type = 0;
+entity* IFC4X3_IfcMeasureWithUnit_type = 0;
+entity* IFC4X3_IfcMechanicalFastener_type = 0;
+entity* IFC4X3_IfcMechanicalFastenerType_type = 0;
+entity* IFC4X3_IfcMedicalDevice_type = 0;
+entity* IFC4X3_IfcMedicalDeviceType_type = 0;
+entity* IFC4X3_IfcMember_type = 0;
+entity* IFC4X3_IfcMemberType_type = 0;
+entity* IFC4X3_IfcMetric_type = 0;
+entity* IFC4X3_IfcMirroredProfileDef_type = 0;
+entity* IFC4X3_IfcMobileTelecommunicationsAppliance_type = 0;
+entity* IFC4X3_IfcMobileTelecommunicationsApplianceType_type = 0;
+entity* IFC4X3_IfcMonetaryUnit_type = 0;
+entity* IFC4X3_IfcMooringDevice_type = 0;
+entity* IFC4X3_IfcMooringDeviceType_type = 0;
+entity* IFC4X3_IfcMotorConnection_type = 0;
+entity* IFC4X3_IfcMotorConnectionType_type = 0;
+entity* IFC4X3_IfcNamedUnit_type = 0;
+entity* IFC4X3_IfcNavigationElement_type = 0;
+entity* IFC4X3_IfcNavigationElementType_type = 0;
+entity* IFC4X3_IfcObject_type = 0;
+entity* IFC4X3_IfcObjectDefinition_type = 0;
+entity* IFC4X3_IfcObjectPlacement_type = 0;
+entity* IFC4X3_IfcObjective_type = 0;
+entity* IFC4X3_IfcOccupant_type = 0;
+entity* IFC4X3_IfcOffsetCurve_type = 0;
+entity* IFC4X3_IfcOffsetCurve2D_type = 0;
+entity* IFC4X3_IfcOffsetCurve3D_type = 0;
+entity* IFC4X3_IfcOffsetCurveByDistances_type = 0;
+entity* IFC4X3_IfcOpenCrossProfileDef_type = 0;
+entity* IFC4X3_IfcOpenShell_type = 0;
+entity* IFC4X3_IfcOpeningElement_type = 0;
+entity* IFC4X3_IfcOrganization_type = 0;
+entity* IFC4X3_IfcOrganizationRelationship_type = 0;
+entity* IFC4X3_IfcOrientedEdge_type = 0;
+entity* IFC4X3_IfcOuterBoundaryCurve_type = 0;
+entity* IFC4X3_IfcOutlet_type = 0;
+entity* IFC4X3_IfcOutletType_type = 0;
+entity* IFC4X3_IfcOwnerHistory_type = 0;
+entity* IFC4X3_IfcParameterizedProfileDef_type = 0;
+entity* IFC4X3_IfcPath_type = 0;
+entity* IFC4X3_IfcPavement_type = 0;
+entity* IFC4X3_IfcPavementType_type = 0;
+entity* IFC4X3_IfcPcurve_type = 0;
+entity* IFC4X3_IfcPerformanceHistory_type = 0;
+entity* IFC4X3_IfcPermeableCoveringProperties_type = 0;
+entity* IFC4X3_IfcPermit_type = 0;
+entity* IFC4X3_IfcPerson_type = 0;
+entity* IFC4X3_IfcPersonAndOrganization_type = 0;
+entity* IFC4X3_IfcPhysicalComplexQuantity_type = 0;
+entity* IFC4X3_IfcPhysicalQuantity_type = 0;
+entity* IFC4X3_IfcPhysicalSimpleQuantity_type = 0;
+entity* IFC4X3_IfcPile_type = 0;
+entity* IFC4X3_IfcPileType_type = 0;
+entity* IFC4X3_IfcPipeFitting_type = 0;
+entity* IFC4X3_IfcPipeFittingType_type = 0;
+entity* IFC4X3_IfcPipeSegment_type = 0;
+entity* IFC4X3_IfcPipeSegmentType_type = 0;
+entity* IFC4X3_IfcPixelTexture_type = 0;
+entity* IFC4X3_IfcPlacement_type = 0;
+entity* IFC4X3_IfcPlanarBox_type = 0;
+entity* IFC4X3_IfcPlanarExtent_type = 0;
+entity* IFC4X3_IfcPlane_type = 0;
+entity* IFC4X3_IfcPlate_type = 0;
+entity* IFC4X3_IfcPlateType_type = 0;
+entity* IFC4X3_IfcPoint_type = 0;
+entity* IFC4X3_IfcPointByDistanceExpression_type = 0;
+entity* IFC4X3_IfcPointOnCurve_type = 0;
+entity* IFC4X3_IfcPointOnSurface_type = 0;
+entity* IFC4X3_IfcPolyLoop_type = 0;
+entity* IFC4X3_IfcPolygonalBoundedHalfSpace_type = 0;
+entity* IFC4X3_IfcPolygonalFaceSet_type = 0;
+entity* IFC4X3_IfcPolyline_type = 0;
+entity* IFC4X3_IfcPolynomialCurve_type = 0;
+entity* IFC4X3_IfcPort_type = 0;
+entity* IFC4X3_IfcPositioningElement_type = 0;
+entity* IFC4X3_IfcPostalAddress_type = 0;
+entity* IFC4X3_IfcPreDefinedColour_type = 0;
+entity* IFC4X3_IfcPreDefinedCurveFont_type = 0;
+entity* IFC4X3_IfcPreDefinedItem_type = 0;
+entity* IFC4X3_IfcPreDefinedProperties_type = 0;
+entity* IFC4X3_IfcPreDefinedPropertySet_type = 0;
+entity* IFC4X3_IfcPreDefinedTextFont_type = 0;
+entity* IFC4X3_IfcPresentationItem_type = 0;
+entity* IFC4X3_IfcPresentationLayerAssignment_type = 0;
+entity* IFC4X3_IfcPresentationLayerWithStyle_type = 0;
+entity* IFC4X3_IfcPresentationStyle_type = 0;
+entity* IFC4X3_IfcProcedure_type = 0;
+entity* IFC4X3_IfcProcedureType_type = 0;
+entity* IFC4X3_IfcProcess_type = 0;
+entity* IFC4X3_IfcProduct_type = 0;
+entity* IFC4X3_IfcProductDefinitionShape_type = 0;
+entity* IFC4X3_IfcProductRepresentation_type = 0;
+entity* IFC4X3_IfcProfileDef_type = 0;
+entity* IFC4X3_IfcProfileProperties_type = 0;
+entity* IFC4X3_IfcProject_type = 0;
+entity* IFC4X3_IfcProjectLibrary_type = 0;
+entity* IFC4X3_IfcProjectOrder_type = 0;
+entity* IFC4X3_IfcProjectedCRS_type = 0;
+entity* IFC4X3_IfcProjectionElement_type = 0;
+entity* IFC4X3_IfcProperty_type = 0;
+entity* IFC4X3_IfcPropertyAbstraction_type = 0;
+entity* IFC4X3_IfcPropertyBoundedValue_type = 0;
+entity* IFC4X3_IfcPropertyDefinition_type = 0;
+entity* IFC4X3_IfcPropertyDependencyRelationship_type = 0;
+entity* IFC4X3_IfcPropertyEnumeratedValue_type = 0;
+entity* IFC4X3_IfcPropertyEnumeration_type = 0;
+entity* IFC4X3_IfcPropertyListValue_type = 0;
+entity* IFC4X3_IfcPropertyReferenceValue_type = 0;
+entity* IFC4X3_IfcPropertySet_type = 0;
+entity* IFC4X3_IfcPropertySetDefinition_type = 0;
+entity* IFC4X3_IfcPropertySetTemplate_type = 0;
+entity* IFC4X3_IfcPropertySingleValue_type = 0;
+entity* IFC4X3_IfcPropertyTableValue_type = 0;
+entity* IFC4X3_IfcPropertyTemplate_type = 0;
+entity* IFC4X3_IfcPropertyTemplateDefinition_type = 0;
+entity* IFC4X3_IfcProtectiveDevice_type = 0;
+entity* IFC4X3_IfcProtectiveDeviceTrippingUnit_type = 0;
+entity* IFC4X3_IfcProtectiveDeviceTrippingUnitType_type = 0;
+entity* IFC4X3_IfcProtectiveDeviceType_type = 0;
+entity* IFC4X3_IfcPump_type = 0;
+entity* IFC4X3_IfcPumpType_type = 0;
+entity* IFC4X3_IfcQuantityArea_type = 0;
+entity* IFC4X3_IfcQuantityCount_type = 0;
+entity* IFC4X3_IfcQuantityLength_type = 0;
+entity* IFC4X3_IfcQuantityNumber_type = 0;
+entity* IFC4X3_IfcQuantitySet_type = 0;
+entity* IFC4X3_IfcQuantityTime_type = 0;
+entity* IFC4X3_IfcQuantityVolume_type = 0;
+entity* IFC4X3_IfcQuantityWeight_type = 0;
+entity* IFC4X3_IfcRail_type = 0;
+entity* IFC4X3_IfcRailType_type = 0;
+entity* IFC4X3_IfcRailing_type = 0;
+entity* IFC4X3_IfcRailingType_type = 0;
+entity* IFC4X3_IfcRailway_type = 0;
+entity* IFC4X3_IfcRailwayPart_type = 0;
+entity* IFC4X3_IfcRamp_type = 0;
+entity* IFC4X3_IfcRampFlight_type = 0;
+entity* IFC4X3_IfcRampFlightType_type = 0;
+entity* IFC4X3_IfcRampType_type = 0;
+entity* IFC4X3_IfcRationalBSplineCurveWithKnots_type = 0;
+entity* IFC4X3_IfcRationalBSplineSurfaceWithKnots_type = 0;
+entity* IFC4X3_IfcRectangleHollowProfileDef_type = 0;
+entity* IFC4X3_IfcRectangleProfileDef_type = 0;
+entity* IFC4X3_IfcRectangularPyramid_type = 0;
+entity* IFC4X3_IfcRectangularTrimmedSurface_type = 0;
+entity* IFC4X3_IfcRecurrencePattern_type = 0;
+entity* IFC4X3_IfcReference_type = 0;
+entity* IFC4X3_IfcReferent_type = 0;
+entity* IFC4X3_IfcRegularTimeSeries_type = 0;
+entity* IFC4X3_IfcReinforcedSoil_type = 0;
+entity* IFC4X3_IfcReinforcementBarProperties_type = 0;
+entity* IFC4X3_IfcReinforcementDefinitionProperties_type = 0;
+entity* IFC4X3_IfcReinforcingBar_type = 0;
+entity* IFC4X3_IfcReinforcingBarType_type = 0;
+entity* IFC4X3_IfcReinforcingElement_type = 0;
+entity* IFC4X3_IfcReinforcingElementType_type = 0;
+entity* IFC4X3_IfcReinforcingMesh_type = 0;
+entity* IFC4X3_IfcReinforcingMeshType_type = 0;
+entity* IFC4X3_IfcRelAdheresToElement_type = 0;
+entity* IFC4X3_IfcRelAggregates_type = 0;
+entity* IFC4X3_IfcRelAssigns_type = 0;
+entity* IFC4X3_IfcRelAssignsToActor_type = 0;
+entity* IFC4X3_IfcRelAssignsToControl_type = 0;
+entity* IFC4X3_IfcRelAssignsToGroup_type = 0;
+entity* IFC4X3_IfcRelAssignsToGroupByFactor_type = 0;
+entity* IFC4X3_IfcRelAssignsToProcess_type = 0;
+entity* IFC4X3_IfcRelAssignsToProduct_type = 0;
+entity* IFC4X3_IfcRelAssignsToResource_type = 0;
+entity* IFC4X3_IfcRelAssociates_type = 0;
+entity* IFC4X3_IfcRelAssociatesApproval_type = 0;
+entity* IFC4X3_IfcRelAssociatesClassification_type = 0;
+entity* IFC4X3_IfcRelAssociatesConstraint_type = 0;
+entity* IFC4X3_IfcRelAssociatesDocument_type = 0;
+entity* IFC4X3_IfcRelAssociatesLibrary_type = 0;
+entity* IFC4X3_IfcRelAssociatesMaterial_type = 0;
+entity* IFC4X3_IfcRelAssociatesProfileDef_type = 0;
+entity* IFC4X3_IfcRelConnects_type = 0;
+entity* IFC4X3_IfcRelConnectsElements_type = 0;
+entity* IFC4X3_IfcRelConnectsPathElements_type = 0;
+entity* IFC4X3_IfcRelConnectsPortToElement_type = 0;
+entity* IFC4X3_IfcRelConnectsPorts_type = 0;
+entity* IFC4X3_IfcRelConnectsStructuralActivity_type = 0;
+entity* IFC4X3_IfcRelConnectsStructuralMember_type = 0;
+entity* IFC4X3_IfcRelConnectsWithEccentricity_type = 0;
+entity* IFC4X3_IfcRelConnectsWithRealizingElements_type = 0;
+entity* IFC4X3_IfcRelContainedInSpatialStructure_type = 0;
+entity* IFC4X3_IfcRelCoversBldgElements_type = 0;
+entity* IFC4X3_IfcRelCoversSpaces_type = 0;
+entity* IFC4X3_IfcRelDeclares_type = 0;
+entity* IFC4X3_IfcRelDecomposes_type = 0;
+entity* IFC4X3_IfcRelDefines_type = 0;
+entity* IFC4X3_IfcRelDefinesByObject_type = 0;
+entity* IFC4X3_IfcRelDefinesByProperties_type = 0;
+entity* IFC4X3_IfcRelDefinesByTemplate_type = 0;
+entity* IFC4X3_IfcRelDefinesByType_type = 0;
+entity* IFC4X3_IfcRelFillsElement_type = 0;
+entity* IFC4X3_IfcRelFlowControlElements_type = 0;
+entity* IFC4X3_IfcRelInterferesElements_type = 0;
+entity* IFC4X3_IfcRelNests_type = 0;
+entity* IFC4X3_IfcRelPositions_type = 0;
+entity* IFC4X3_IfcRelProjectsElement_type = 0;
+entity* IFC4X3_IfcRelReferencedInSpatialStructure_type = 0;
+entity* IFC4X3_IfcRelSequence_type = 0;
+entity* IFC4X3_IfcRelServicesBuildings_type = 0;
+entity* IFC4X3_IfcRelSpaceBoundary_type = 0;
+entity* IFC4X3_IfcRelSpaceBoundary1stLevel_type = 0;
+entity* IFC4X3_IfcRelSpaceBoundary2ndLevel_type = 0;
+entity* IFC4X3_IfcRelVoidsElement_type = 0;
+entity* IFC4X3_IfcRelationship_type = 0;
+entity* IFC4X3_IfcReparametrisedCompositeCurveSegment_type = 0;
+entity* IFC4X3_IfcRepresentation_type = 0;
+entity* IFC4X3_IfcRepresentationContext_type = 0;
+entity* IFC4X3_IfcRepresentationItem_type = 0;
+entity* IFC4X3_IfcRepresentationMap_type = 0;
+entity* IFC4X3_IfcResource_type = 0;
+entity* IFC4X3_IfcResourceApprovalRelationship_type = 0;
+entity* IFC4X3_IfcResourceConstraintRelationship_type = 0;
+entity* IFC4X3_IfcResourceLevelRelationship_type = 0;
+entity* IFC4X3_IfcResourceTime_type = 0;
+entity* IFC4X3_IfcRevolvedAreaSolid_type = 0;
+entity* IFC4X3_IfcRevolvedAreaSolidTapered_type = 0;
+entity* IFC4X3_IfcRightCircularCone_type = 0;
+entity* IFC4X3_IfcRightCircularCylinder_type = 0;
+entity* IFC4X3_IfcRoad_type = 0;
+entity* IFC4X3_IfcRoadPart_type = 0;
+entity* IFC4X3_IfcRoof_type = 0;
+entity* IFC4X3_IfcRoofType_type = 0;
+entity* IFC4X3_IfcRoot_type = 0;
+entity* IFC4X3_IfcRoundedRectangleProfileDef_type = 0;
+entity* IFC4X3_IfcSIUnit_type = 0;
+entity* IFC4X3_IfcSanitaryTerminal_type = 0;
+entity* IFC4X3_IfcSanitaryTerminalType_type = 0;
+entity* IFC4X3_IfcSchedulingTime_type = 0;
+entity* IFC4X3_IfcSeamCurve_type = 0;
+entity* IFC4X3_IfcSecondOrderPolynomialSpiral_type = 0;
+entity* IFC4X3_IfcSectionProperties_type = 0;
+entity* IFC4X3_IfcSectionReinforcementProperties_type = 0;
+entity* IFC4X3_IfcSectionedSolid_type = 0;
+entity* IFC4X3_IfcSectionedSolidHorizontal_type = 0;
+entity* IFC4X3_IfcSectionedSpine_type = 0;
+entity* IFC4X3_IfcSectionedSurface_type = 0;
+entity* IFC4X3_IfcSegment_type = 0;
+entity* IFC4X3_IfcSegmentedReferenceCurve_type = 0;
+entity* IFC4X3_IfcSensor_type = 0;
+entity* IFC4X3_IfcSensorType_type = 0;
+entity* IFC4X3_IfcSeventhOrderPolynomialSpiral_type = 0;
+entity* IFC4X3_IfcShadingDevice_type = 0;
+entity* IFC4X3_IfcShadingDeviceType_type = 0;
+entity* IFC4X3_IfcShapeAspect_type = 0;
+entity* IFC4X3_IfcShapeModel_type = 0;
+entity* IFC4X3_IfcShapeRepresentation_type = 0;
+entity* IFC4X3_IfcShellBasedSurfaceModel_type = 0;
+entity* IFC4X3_IfcSign_type = 0;
+entity* IFC4X3_IfcSignType_type = 0;
+entity* IFC4X3_IfcSignal_type = 0;
+entity* IFC4X3_IfcSignalType_type = 0;
+entity* IFC4X3_IfcSimpleProperty_type = 0;
+entity* IFC4X3_IfcSimplePropertyTemplate_type = 0;
+entity* IFC4X3_IfcSineSpiral_type = 0;
+entity* IFC4X3_IfcSite_type = 0;
+entity* IFC4X3_IfcSlab_type = 0;
+entity* IFC4X3_IfcSlabType_type = 0;
+entity* IFC4X3_IfcSlippageConnectionCondition_type = 0;
+entity* IFC4X3_IfcSolarDevice_type = 0;
+entity* IFC4X3_IfcSolarDeviceType_type = 0;
+entity* IFC4X3_IfcSolidModel_type = 0;
+entity* IFC4X3_IfcSpace_type = 0;
+entity* IFC4X3_IfcSpaceHeater_type = 0;
+entity* IFC4X3_IfcSpaceHeaterType_type = 0;
+entity* IFC4X3_IfcSpaceType_type = 0;
+entity* IFC4X3_IfcSpatialElement_type = 0;
+entity* IFC4X3_IfcSpatialElementType_type = 0;
+entity* IFC4X3_IfcSpatialStructureElement_type = 0;
+entity* IFC4X3_IfcSpatialStructureElementType_type = 0;
+entity* IFC4X3_IfcSpatialZone_type = 0;
+entity* IFC4X3_IfcSpatialZoneType_type = 0;
+entity* IFC4X3_IfcSphere_type = 0;
+entity* IFC4X3_IfcSphericalSurface_type = 0;
+entity* IFC4X3_IfcSpiral_type = 0;
+entity* IFC4X3_IfcStackTerminal_type = 0;
+entity* IFC4X3_IfcStackTerminalType_type = 0;
+entity* IFC4X3_IfcStair_type = 0;
+entity* IFC4X3_IfcStairFlight_type = 0;
+entity* IFC4X3_IfcStairFlightType_type = 0;
+entity* IFC4X3_IfcStairType_type = 0;
+entity* IFC4X3_IfcStructuralAction_type = 0;
+entity* IFC4X3_IfcStructuralActivity_type = 0;
+entity* IFC4X3_IfcStructuralAnalysisModel_type = 0;
+entity* IFC4X3_IfcStructuralConnection_type = 0;
+entity* IFC4X3_IfcStructuralConnectionCondition_type = 0;
+entity* IFC4X3_IfcStructuralCurveAction_type = 0;
+entity* IFC4X3_IfcStructuralCurveConnection_type = 0;
+entity* IFC4X3_IfcStructuralCurveMember_type = 0;
+entity* IFC4X3_IfcStructuralCurveMemberVarying_type = 0;
+entity* IFC4X3_IfcStructuralCurveReaction_type = 0;
+entity* IFC4X3_IfcStructuralItem_type = 0;
+entity* IFC4X3_IfcStructuralLinearAction_type = 0;
+entity* IFC4X3_IfcStructuralLoad_type = 0;
+entity* IFC4X3_IfcStructuralLoadCase_type = 0;
+entity* IFC4X3_IfcStructuralLoadConfiguration_type = 0;
+entity* IFC4X3_IfcStructuralLoadGroup_type = 0;
+entity* IFC4X3_IfcStructuralLoadLinearForce_type = 0;
+entity* IFC4X3_IfcStructuralLoadOrResult_type = 0;
+entity* IFC4X3_IfcStructuralLoadPlanarForce_type = 0;
+entity* IFC4X3_IfcStructuralLoadSingleDisplacement_type = 0;
+entity* IFC4X3_IfcStructuralLoadSingleDisplacementDistortion_type = 0;
+entity* IFC4X3_IfcStructuralLoadSingleForce_type = 0;
+entity* IFC4X3_IfcStructuralLoadSingleForceWarping_type = 0;
+entity* IFC4X3_IfcStructuralLoadStatic_type = 0;
+entity* IFC4X3_IfcStructuralLoadTemperature_type = 0;
+entity* IFC4X3_IfcStructuralMember_type = 0;
+entity* IFC4X3_IfcStructuralPlanarAction_type = 0;
+entity* IFC4X3_IfcStructuralPointAction_type = 0;
+entity* IFC4X3_IfcStructuralPointConnection_type = 0;
+entity* IFC4X3_IfcStructuralPointReaction_type = 0;
+entity* IFC4X3_IfcStructuralReaction_type = 0;
+entity* IFC4X3_IfcStructuralResultGroup_type = 0;
+entity* IFC4X3_IfcStructuralSurfaceAction_type = 0;
+entity* IFC4X3_IfcStructuralSurfaceConnection_type = 0;
+entity* IFC4X3_IfcStructuralSurfaceMember_type = 0;
+entity* IFC4X3_IfcStructuralSurfaceMemberVarying_type = 0;
+entity* IFC4X3_IfcStructuralSurfaceReaction_type = 0;
+entity* IFC4X3_IfcStyleModel_type = 0;
+entity* IFC4X3_IfcStyledItem_type = 0;
+entity* IFC4X3_IfcStyledRepresentation_type = 0;
+entity* IFC4X3_IfcSubContractResource_type = 0;
+entity* IFC4X3_IfcSubContractResourceType_type = 0;
+entity* IFC4X3_IfcSubedge_type = 0;
+entity* IFC4X3_IfcSurface_type = 0;
+entity* IFC4X3_IfcSurfaceCurve_type = 0;
+entity* IFC4X3_IfcSurfaceCurveSweptAreaSolid_type = 0;
+entity* IFC4X3_IfcSurfaceFeature_type = 0;
+entity* IFC4X3_IfcSurfaceOfLinearExtrusion_type = 0;
+entity* IFC4X3_IfcSurfaceOfRevolution_type = 0;
+entity* IFC4X3_IfcSurfaceReinforcementArea_type = 0;
+entity* IFC4X3_IfcSurfaceStyle_type = 0;
+entity* IFC4X3_IfcSurfaceStyleLighting_type = 0;
+entity* IFC4X3_IfcSurfaceStyleRefraction_type = 0;
+entity* IFC4X3_IfcSurfaceStyleRendering_type = 0;
+entity* IFC4X3_IfcSurfaceStyleShading_type = 0;
+entity* IFC4X3_IfcSurfaceStyleWithTextures_type = 0;
+entity* IFC4X3_IfcSurfaceTexture_type = 0;
+entity* IFC4X3_IfcSweptAreaSolid_type = 0;
+entity* IFC4X3_IfcSweptDiskSolid_type = 0;
+entity* IFC4X3_IfcSweptDiskSolidPolygonal_type = 0;
+entity* IFC4X3_IfcSweptSurface_type = 0;
+entity* IFC4X3_IfcSwitchingDevice_type = 0;
+entity* IFC4X3_IfcSwitchingDeviceType_type = 0;
+entity* IFC4X3_IfcSystem_type = 0;
+entity* IFC4X3_IfcSystemFurnitureElement_type = 0;
+entity* IFC4X3_IfcSystemFurnitureElementType_type = 0;
+entity* IFC4X3_IfcTShapeProfileDef_type = 0;
+entity* IFC4X3_IfcTable_type = 0;
+entity* IFC4X3_IfcTableColumn_type = 0;
+entity* IFC4X3_IfcTableRow_type = 0;
+entity* IFC4X3_IfcTank_type = 0;
+entity* IFC4X3_IfcTankType_type = 0;
+entity* IFC4X3_IfcTask_type = 0;
+entity* IFC4X3_IfcTaskTime_type = 0;
+entity* IFC4X3_IfcTaskTimeRecurring_type = 0;
+entity* IFC4X3_IfcTaskType_type = 0;
+entity* IFC4X3_IfcTelecomAddress_type = 0;
+entity* IFC4X3_IfcTendon_type = 0;
+entity* IFC4X3_IfcTendonAnchor_type = 0;
+entity* IFC4X3_IfcTendonAnchorType_type = 0;
+entity* IFC4X3_IfcTendonConduit_type = 0;
+entity* IFC4X3_IfcTendonConduitType_type = 0;
+entity* IFC4X3_IfcTendonType_type = 0;
+entity* IFC4X3_IfcTessellatedFaceSet_type = 0;
+entity* IFC4X3_IfcTessellatedItem_type = 0;
+entity* IFC4X3_IfcTextLiteral_type = 0;
+entity* IFC4X3_IfcTextLiteralWithExtent_type = 0;
+entity* IFC4X3_IfcTextStyle_type = 0;
+entity* IFC4X3_IfcTextStyleFontModel_type = 0;
+entity* IFC4X3_IfcTextStyleForDefinedFont_type = 0;
+entity* IFC4X3_IfcTextStyleTextModel_type = 0;
+entity* IFC4X3_IfcTextureCoordinate_type = 0;
+entity* IFC4X3_IfcTextureCoordinateGenerator_type = 0;
+entity* IFC4X3_IfcTextureCoordinateIndices_type = 0;
+entity* IFC4X3_IfcTextureCoordinateIndicesWithVoids_type = 0;
+entity* IFC4X3_IfcTextureMap_type = 0;
+entity* IFC4X3_IfcTextureVertex_type = 0;
+entity* IFC4X3_IfcTextureVertexList_type = 0;
+entity* IFC4X3_IfcThirdOrderPolynomialSpiral_type = 0;
+entity* IFC4X3_IfcTimePeriod_type = 0;
+entity* IFC4X3_IfcTimeSeries_type = 0;
+entity* IFC4X3_IfcTimeSeriesValue_type = 0;
+entity* IFC4X3_IfcTopologicalRepresentationItem_type = 0;
+entity* IFC4X3_IfcTopologyRepresentation_type = 0;
+entity* IFC4X3_IfcToroidalSurface_type = 0;
+entity* IFC4X3_IfcTrackElement_type = 0;
+entity* IFC4X3_IfcTrackElementType_type = 0;
+entity* IFC4X3_IfcTransformer_type = 0;
+entity* IFC4X3_IfcTransformerType_type = 0;
+entity* IFC4X3_IfcTransportElement_type = 0;
+entity* IFC4X3_IfcTransportElementType_type = 0;
+entity* IFC4X3_IfcTransportationDevice_type = 0;
+entity* IFC4X3_IfcTransportationDeviceType_type = 0;
+entity* IFC4X3_IfcTrapeziumProfileDef_type = 0;
+entity* IFC4X3_IfcTriangulatedFaceSet_type = 0;
+entity* IFC4X3_IfcTriangulatedIrregularNetwork_type = 0;
+entity* IFC4X3_IfcTrimmedCurve_type = 0;
+entity* IFC4X3_IfcTubeBundle_type = 0;
+entity* IFC4X3_IfcTubeBundleType_type = 0;
+entity* IFC4X3_IfcTypeObject_type = 0;
+entity* IFC4X3_IfcTypeProcess_type = 0;
+entity* IFC4X3_IfcTypeProduct_type = 0;
+entity* IFC4X3_IfcTypeResource_type = 0;
+entity* IFC4X3_IfcUShapeProfileDef_type = 0;
+entity* IFC4X3_IfcUnitAssignment_type = 0;
+entity* IFC4X3_IfcUnitaryControlElement_type = 0;
+entity* IFC4X3_IfcUnitaryControlElementType_type = 0;
+entity* IFC4X3_IfcUnitaryEquipment_type = 0;
+entity* IFC4X3_IfcUnitaryEquipmentType_type = 0;
+entity* IFC4X3_IfcValve_type = 0;
+entity* IFC4X3_IfcValveType_type = 0;
+entity* IFC4X3_IfcVector_type = 0;
+entity* IFC4X3_IfcVehicle_type = 0;
+entity* IFC4X3_IfcVehicleType_type = 0;
+entity* IFC4X3_IfcVertex_type = 0;
+entity* IFC4X3_IfcVertexLoop_type = 0;
+entity* IFC4X3_IfcVertexPoint_type = 0;
+entity* IFC4X3_IfcVibrationDamper_type = 0;
+entity* IFC4X3_IfcVibrationDamperType_type = 0;
+entity* IFC4X3_IfcVibrationIsolator_type = 0;
+entity* IFC4X3_IfcVibrationIsolatorType_type = 0;
+entity* IFC4X3_IfcVirtualElement_type = 0;
+entity* IFC4X3_IfcVirtualGridIntersection_type = 0;
+entity* IFC4X3_IfcVoidingFeature_type = 0;
+entity* IFC4X3_IfcWall_type = 0;
+entity* IFC4X3_IfcWallStandardCase_type = 0;
+entity* IFC4X3_IfcWallType_type = 0;
+entity* IFC4X3_IfcWasteTerminal_type = 0;
+entity* IFC4X3_IfcWasteTerminalType_type = 0;
+entity* IFC4X3_IfcWindow_type = 0;
+entity* IFC4X3_IfcWindowLiningProperties_type = 0;
+entity* IFC4X3_IfcWindowPanelProperties_type = 0;
+entity* IFC4X3_IfcWindowType_type = 0;
+entity* IFC4X3_IfcWorkCalendar_type = 0;
+entity* IFC4X3_IfcWorkControl_type = 0;
+entity* IFC4X3_IfcWorkPlan_type = 0;
+entity* IFC4X3_IfcWorkSchedule_type = 0;
+entity* IFC4X3_IfcWorkTime_type = 0;
+entity* IFC4X3_IfcZShapeProfileDef_type = 0;
+entity* IFC4X3_IfcZone_type = 0;
+type_declaration* IFC4X3_IfcAbsorbedDoseMeasure_type = 0;
+type_declaration* IFC4X3_IfcAccelerationMeasure_type = 0;
+type_declaration* IFC4X3_IfcAmountOfSubstanceMeasure_type = 0;
+type_declaration* IFC4X3_IfcAngularVelocityMeasure_type = 0;
+type_declaration* IFC4X3_IfcArcIndex_type = 0;
+type_declaration* IFC4X3_IfcAreaDensityMeasure_type = 0;
+type_declaration* IFC4X3_IfcAreaMeasure_type = 0;
+type_declaration* IFC4X3_IfcBinary_type = 0;
+type_declaration* IFC4X3_IfcBoolean_type = 0;
+type_declaration* IFC4X3_IfcBoxAlignment_type = 0;
+type_declaration* IFC4X3_IfcCardinalPointReference_type = 0;
+type_declaration* IFC4X3_IfcComplexNumber_type = 0;
+type_declaration* IFC4X3_IfcCompoundPlaneAngleMeasure_type = 0;
+type_declaration* IFC4X3_IfcContextDependentMeasure_type = 0;
+type_declaration* IFC4X3_IfcCountMeasure_type = 0;
+type_declaration* IFC4X3_IfcCurvatureMeasure_type = 0;
+type_declaration* IFC4X3_IfcDate_type = 0;
+type_declaration* IFC4X3_IfcDateTime_type = 0;
+type_declaration* IFC4X3_IfcDayInMonthNumber_type = 0;
+type_declaration* IFC4X3_IfcDayInWeekNumber_type = 0;
+type_declaration* IFC4X3_IfcDescriptiveMeasure_type = 0;
+type_declaration* IFC4X3_IfcDimensionCount_type = 0;
+type_declaration* IFC4X3_IfcDoseEquivalentMeasure_type = 0;
+type_declaration* IFC4X3_IfcDuration_type = 0;
+type_declaration* IFC4X3_IfcDynamicViscosityMeasure_type = 0;
+type_declaration* IFC4X3_IfcElectricCapacitanceMeasure_type = 0;
+type_declaration* IFC4X3_IfcElectricChargeMeasure_type = 0;
+type_declaration* IFC4X3_IfcElectricConductanceMeasure_type = 0;
+type_declaration* IFC4X3_IfcElectricCurrentMeasure_type = 0;
+type_declaration* IFC4X3_IfcElectricResistanceMeasure_type = 0;
+type_declaration* IFC4X3_IfcElectricVoltageMeasure_type = 0;
+type_declaration* IFC4X3_IfcEnergyMeasure_type = 0;
+type_declaration* IFC4X3_IfcFontStyle_type = 0;
+type_declaration* IFC4X3_IfcFontVariant_type = 0;
+type_declaration* IFC4X3_IfcFontWeight_type = 0;
+type_declaration* IFC4X3_IfcForceMeasure_type = 0;
+type_declaration* IFC4X3_IfcFrequencyMeasure_type = 0;
+type_declaration* IFC4X3_IfcGloballyUniqueId_type = 0;
+type_declaration* IFC4X3_IfcHeatFluxDensityMeasure_type = 0;
+type_declaration* IFC4X3_IfcHeatingValueMeasure_type = 0;
+type_declaration* IFC4X3_IfcIdentifier_type = 0;
+type_declaration* IFC4X3_IfcIlluminanceMeasure_type = 0;
+type_declaration* IFC4X3_IfcInductanceMeasure_type = 0;
+type_declaration* IFC4X3_IfcInteger_type = 0;
+type_declaration* IFC4X3_IfcIntegerCountRateMeasure_type = 0;
+type_declaration* IFC4X3_IfcIonConcentrationMeasure_type = 0;
+type_declaration* IFC4X3_IfcIsothermalMoistureCapacityMeasure_type = 0;
+type_declaration* IFC4X3_IfcKinematicViscosityMeasure_type = 0;
+type_declaration* IFC4X3_IfcLabel_type = 0;
+type_declaration* IFC4X3_IfcLanguageId_type = 0;
+type_declaration* IFC4X3_IfcLengthMeasure_type = 0;
+type_declaration* IFC4X3_IfcLineIndex_type = 0;
+type_declaration* IFC4X3_IfcLinearForceMeasure_type = 0;
+type_declaration* IFC4X3_IfcLinearMomentMeasure_type = 0;
+type_declaration* IFC4X3_IfcLinearStiffnessMeasure_type = 0;
+type_declaration* IFC4X3_IfcLinearVelocityMeasure_type = 0;
+type_declaration* IFC4X3_IfcLogical_type = 0;
+type_declaration* IFC4X3_IfcLuminousFluxMeasure_type = 0;
+type_declaration* IFC4X3_IfcLuminousIntensityDistributionMeasure_type = 0;
+type_declaration* IFC4X3_IfcLuminousIntensityMeasure_type = 0;
+type_declaration* IFC4X3_IfcMagneticFluxDensityMeasure_type = 0;
+type_declaration* IFC4X3_IfcMagneticFluxMeasure_type = 0;
+type_declaration* IFC4X3_IfcMassDensityMeasure_type = 0;
+type_declaration* IFC4X3_IfcMassFlowRateMeasure_type = 0;
+type_declaration* IFC4X3_IfcMassMeasure_type = 0;
+type_declaration* IFC4X3_IfcMassPerLengthMeasure_type = 0;
+type_declaration* IFC4X3_IfcModulusOfElasticityMeasure_type = 0;
+type_declaration* IFC4X3_IfcModulusOfLinearSubgradeReactionMeasure_type = 0;
+type_declaration* IFC4X3_IfcModulusOfRotationalSubgradeReactionMeasure_type = 0;
+type_declaration* IFC4X3_IfcModulusOfSubgradeReactionMeasure_type = 0;
+type_declaration* IFC4X3_IfcMoistureDiffusivityMeasure_type = 0;
+type_declaration* IFC4X3_IfcMolecularWeightMeasure_type = 0;
+type_declaration* IFC4X3_IfcMomentOfInertiaMeasure_type = 0;
+type_declaration* IFC4X3_IfcMonetaryMeasure_type = 0;
+type_declaration* IFC4X3_IfcMonthInYearNumber_type = 0;
+type_declaration* IFC4X3_IfcNonNegativeLengthMeasure_type = 0;
+type_declaration* IFC4X3_IfcNormalisedRatioMeasure_type = 0;
+type_declaration* IFC4X3_IfcNumericMeasure_type = 0;
+type_declaration* IFC4X3_IfcPHMeasure_type = 0;
+type_declaration* IFC4X3_IfcParameterValue_type = 0;
+type_declaration* IFC4X3_IfcPlanarForceMeasure_type = 0;
+type_declaration* IFC4X3_IfcPlaneAngleMeasure_type = 0;
+type_declaration* IFC4X3_IfcPositiveInteger_type = 0;
+type_declaration* IFC4X3_IfcPositiveLengthMeasure_type = 0;
+type_declaration* IFC4X3_IfcPositivePlaneAngleMeasure_type = 0;
+type_declaration* IFC4X3_IfcPositiveRatioMeasure_type = 0;
+type_declaration* IFC4X3_IfcPowerMeasure_type = 0;
+type_declaration* IFC4X3_IfcPresentableText_type = 0;
+type_declaration* IFC4X3_IfcPressureMeasure_type = 0;
+type_declaration* IFC4X3_IfcPropertySetDefinitionSet_type = 0;
+type_declaration* IFC4X3_IfcRadioActivityMeasure_type = 0;
+type_declaration* IFC4X3_IfcRatioMeasure_type = 0;
+type_declaration* IFC4X3_IfcReal_type = 0;
+type_declaration* IFC4X3_IfcRotationalFrequencyMeasure_type = 0;
+type_declaration* IFC4X3_IfcRotationalMassMeasure_type = 0;
+type_declaration* IFC4X3_IfcRotationalStiffnessMeasure_type = 0;
+type_declaration* IFC4X3_IfcSectionModulusMeasure_type = 0;
+type_declaration* IFC4X3_IfcSectionalAreaIntegralMeasure_type = 0;
+type_declaration* IFC4X3_IfcShearModulusMeasure_type = 0;
+type_declaration* IFC4X3_IfcSolidAngleMeasure_type = 0;
+type_declaration* IFC4X3_IfcSoundPowerLevelMeasure_type = 0;
+type_declaration* IFC4X3_IfcSoundPowerMeasure_type = 0;
+type_declaration* IFC4X3_IfcSoundPressureLevelMeasure_type = 0;
+type_declaration* IFC4X3_IfcSoundPressureMeasure_type = 0;
+type_declaration* IFC4X3_IfcSpecificHeatCapacityMeasure_type = 0;
+type_declaration* IFC4X3_IfcSpecularExponent_type = 0;
+type_declaration* IFC4X3_IfcSpecularRoughness_type = 0;
+type_declaration* IFC4X3_IfcTemperatureGradientMeasure_type = 0;
+type_declaration* IFC4X3_IfcTemperatureRateOfChangeMeasure_type = 0;
+type_declaration* IFC4X3_IfcText_type = 0;
+type_declaration* IFC4X3_IfcTextAlignment_type = 0;
+type_declaration* IFC4X3_IfcTextDecoration_type = 0;
+type_declaration* IFC4X3_IfcTextFontName_type = 0;
+type_declaration* IFC4X3_IfcTextTransformation_type = 0;
+type_declaration* IFC4X3_IfcThermalAdmittanceMeasure_type = 0;
+type_declaration* IFC4X3_IfcThermalConductivityMeasure_type = 0;
+type_declaration* IFC4X3_IfcThermalExpansionCoefficientMeasure_type = 0;
+type_declaration* IFC4X3_IfcThermalResistanceMeasure_type = 0;
+type_declaration* IFC4X3_IfcThermalTransmittanceMeasure_type = 0;
+type_declaration* IFC4X3_IfcThermodynamicTemperatureMeasure_type = 0;
+type_declaration* IFC4X3_IfcTime_type = 0;
+type_declaration* IFC4X3_IfcTimeMeasure_type = 0;
+type_declaration* IFC4X3_IfcTimeStamp_type = 0;
+type_declaration* IFC4X3_IfcTorqueMeasure_type = 0;
+type_declaration* IFC4X3_IfcURIReference_type = 0;
+type_declaration* IFC4X3_IfcVaporPermeabilityMeasure_type = 0;
+type_declaration* IFC4X3_IfcVolumeMeasure_type = 0;
+type_declaration* IFC4X3_IfcVolumetricFlowRateMeasure_type = 0;
+type_declaration* IFC4X3_IfcWarpingConstantMeasure_type = 0;
+type_declaration* IFC4X3_IfcWarpingMomentMeasure_type = 0;
+select_type* IFC4X3_IfcActorSelect_type = 0;
+select_type* IFC4X3_IfcAppliedValueSelect_type = 0;
+select_type* IFC4X3_IfcAxis2Placement_type = 0;
+select_type* IFC4X3_IfcBendingParameterSelect_type = 0;
+select_type* IFC4X3_IfcBooleanOperand_type = 0;
+select_type* IFC4X3_IfcClassificationReferenceSelect_type = 0;
+select_type* IFC4X3_IfcClassificationSelect_type = 0;
+select_type* IFC4X3_IfcColour_type = 0;
+select_type* IFC4X3_IfcColourOrFactor_type = 0;
+select_type* IFC4X3_IfcCoordinateReferenceSystemSelect_type = 0;
+select_type* IFC4X3_IfcCsgSelect_type = 0;
+select_type* IFC4X3_IfcCurveFontOrScaledCurveFontSelect_type = 0;
+select_type* IFC4X3_IfcCurveMeasureSelect_type = 0;
+select_type* IFC4X3_IfcCurveOnSurface_type = 0;
+select_type* IFC4X3_IfcCurveOrEdgeCurve_type = 0;
+select_type* IFC4X3_IfcCurveStyleFontSelect_type = 0;
+select_type* IFC4X3_IfcDefinitionSelect_type = 0;
+select_type* IFC4X3_IfcDerivedMeasureValue_type = 0;
+select_type* IFC4X3_IfcDocumentSelect_type = 0;
+select_type* IFC4X3_IfcFillStyleSelect_type = 0;
+select_type* IFC4X3_IfcGeometricSetSelect_type = 0;
+select_type* IFC4X3_IfcGridPlacementDirectionSelect_type = 0;
+select_type* IFC4X3_IfcHatchLineDistanceSelect_type = 0;
+select_type* IFC4X3_IfcInterferenceSelect_type = 0;
+select_type* IFC4X3_IfcLayeredItem_type = 0;
+select_type* IFC4X3_IfcLibrarySelect_type = 0;
+select_type* IFC4X3_IfcLightDistributionDataSourceSelect_type = 0;
+select_type* IFC4X3_IfcMaterialSelect_type = 0;
+select_type* IFC4X3_IfcMeasureValue_type = 0;
+select_type* IFC4X3_IfcMetricValueSelect_type = 0;
+select_type* IFC4X3_IfcModulusOfRotationalSubgradeReactionSelect_type = 0;
+select_type* IFC4X3_IfcModulusOfSubgradeReactionSelect_type = 0;
+select_type* IFC4X3_IfcModulusOfTranslationalSubgradeReactionSelect_type = 0;
+select_type* IFC4X3_IfcObjectReferenceSelect_type = 0;
+select_type* IFC4X3_IfcPointOrVertexPoint_type = 0;
+select_type* IFC4X3_IfcProcessSelect_type = 0;
+select_type* IFC4X3_IfcProductRepresentationSelect_type = 0;
+select_type* IFC4X3_IfcProductSelect_type = 0;
+select_type* IFC4X3_IfcPropertySetDefinitionSelect_type = 0;
+select_type* IFC4X3_IfcResourceObjectSelect_type = 0;
+select_type* IFC4X3_IfcResourceSelect_type = 0;
+select_type* IFC4X3_IfcRotationalStiffnessSelect_type = 0;
+select_type* IFC4X3_IfcSegmentIndexSelect_type = 0;
+select_type* IFC4X3_IfcShell_type = 0;
+select_type* IFC4X3_IfcSimpleValue_type = 0;
+select_type* IFC4X3_IfcSizeSelect_type = 0;
+select_type* IFC4X3_IfcSolidOrShell_type = 0;
+select_type* IFC4X3_IfcSpaceBoundarySelect_type = 0;
+select_type* IFC4X3_IfcSpatialReferenceSelect_type = 0;
+select_type* IFC4X3_IfcSpecularHighlightSelect_type = 0;
+select_type* IFC4X3_IfcStructuralActivityAssignmentSelect_type = 0;
+select_type* IFC4X3_IfcSurfaceOrFaceSurface_type = 0;
+select_type* IFC4X3_IfcSurfaceStyleElementSelect_type = 0;
+select_type* IFC4X3_IfcTextFontSelect_type = 0;
+select_type* IFC4X3_IfcTimeOrRatioSelect_type = 0;
+select_type* IFC4X3_IfcTranslationalStiffnessSelect_type = 0;
+select_type* IFC4X3_IfcTrimmingSelect_type = 0;
+select_type* IFC4X3_IfcUnit_type = 0;
+select_type* IFC4X3_IfcValue_type = 0;
+select_type* IFC4X3_IfcVectorOrDirection_type = 0;
+select_type* IFC4X3_IfcWarpingStiffnessSelect_type = 0;
+enumeration_type* IFC4X3_IfcActionRequestTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcActionSourceTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcActionTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcActuatorTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcAddressTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcAirTerminalBoxTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcAirTerminalTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcAirToAirHeatRecoveryTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcAlarmTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcAlignmentCantSegmentTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcAlignmentHorizontalSegmentTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcAlignmentTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcAlignmentVerticalSegmentTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcAnalysisModelTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcAnalysisTheoryTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcAnnotationTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcArithmeticOperatorEnum_type = 0;
+enumeration_type* IFC4X3_IfcAssemblyPlaceEnum_type = 0;
+enumeration_type* IFC4X3_IfcAudioVisualApplianceTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcBSplineCurveForm_type = 0;
+enumeration_type* IFC4X3_IfcBSplineSurfaceForm_type = 0;
+enumeration_type* IFC4X3_IfcBeamTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcBearingTypeDisplacementEnum_type = 0;
+enumeration_type* IFC4X3_IfcBearingTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcBenchmarkEnum_type = 0;
+enumeration_type* IFC4X3_IfcBoilerTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcBooleanOperator_type = 0;
+enumeration_type* IFC4X3_IfcBridgePartTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcBridgeTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcBuildingElementPartTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcBuildingElementProxyTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcBuildingSystemTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcBuiltSystemTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcBurnerTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcCableCarrierFittingTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcCableCarrierSegmentTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcCableFittingTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcCableSegmentTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcCaissonFoundationTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcChangeActionEnum_type = 0;
+enumeration_type* IFC4X3_IfcChillerTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcChimneyTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcCoilTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcColumnTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcCommunicationsApplianceTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcComplexPropertyTemplateTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcCompressorTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcCondenserTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcConnectionTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcConstraintEnum_type = 0;
+enumeration_type* IFC4X3_IfcConstructionEquipmentResourceTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcConstructionMaterialResourceTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcConstructionProductResourceTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcControllerTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcConveyorSegmentTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcCooledBeamTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcCoolingTowerTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcCostItemTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcCostScheduleTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcCourseTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcCoveringTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcCrewResourceTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcCurtainWallTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcCurveInterpolationEnum_type = 0;
+enumeration_type* IFC4X3_IfcDamperTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcDataOriginEnum_type = 0;
+enumeration_type* IFC4X3_IfcDerivedUnitEnum_type = 0;
+enumeration_type* IFC4X3_IfcDirectionSenseEnum_type = 0;
+enumeration_type* IFC4X3_IfcDiscreteAccessoryTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcDistributionBoardTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcDistributionChamberElementTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcDistributionPortTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcDistributionSystemEnum_type = 0;
+enumeration_type* IFC4X3_IfcDocumentConfidentialityEnum_type = 0;
+enumeration_type* IFC4X3_IfcDocumentStatusEnum_type = 0;
+enumeration_type* IFC4X3_IfcDoorPanelOperationEnum_type = 0;
+enumeration_type* IFC4X3_IfcDoorPanelPositionEnum_type = 0;
+enumeration_type* IFC4X3_IfcDoorStyleConstructionEnum_type = 0;
+enumeration_type* IFC4X3_IfcDoorStyleOperationEnum_type = 0;
+enumeration_type* IFC4X3_IfcDoorTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcDoorTypeOperationEnum_type = 0;
+enumeration_type* IFC4X3_IfcDuctFittingTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcDuctSegmentTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcDuctSilencerTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcEarthworksCutTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcEarthworksFillTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcElectricApplianceTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcElectricDistributionBoardTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcElectricFlowStorageDeviceTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcElectricFlowTreatmentDeviceTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcElectricGeneratorTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcElectricMotorTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcElectricTimeControlTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcElementAssemblyTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcElementCompositionEnum_type = 0;
+enumeration_type* IFC4X3_IfcEngineTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcEvaporativeCoolerTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcEvaporatorTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcEventTriggerTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcEventTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcExternalSpatialElementTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcFacilityPartCommonTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcFacilityUsageEnum_type = 0;
+enumeration_type* IFC4X3_IfcFanTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcFastenerTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcFilterTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcFireSuppressionTerminalTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcFlowDirectionEnum_type = 0;
+enumeration_type* IFC4X3_IfcFlowInstrumentTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcFlowMeterTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcFootingTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcFurnitureTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcGeographicElementTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcGeometricProjectionEnum_type = 0;
+enumeration_type* IFC4X3_IfcGeotechnicalStratumTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcGlobalOrLocalEnum_type = 0;
+enumeration_type* IFC4X3_IfcGridTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcHeatExchangerTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcHumidifierTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcImpactProtectionDeviceTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcInterceptorTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcInternalOrExternalEnum_type = 0;
+enumeration_type* IFC4X3_IfcInventoryTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcJunctionBoxTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcKnotType_type = 0;
+enumeration_type* IFC4X3_IfcLaborResourceTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcLampTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcLayerSetDirectionEnum_type = 0;
+enumeration_type* IFC4X3_IfcLightDistributionCurveEnum_type = 0;
+enumeration_type* IFC4X3_IfcLightEmissionSourceEnum_type = 0;
+enumeration_type* IFC4X3_IfcLightFixtureTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcLiquidTerminalTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcLoadGroupTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcLogicalOperatorEnum_type = 0;
+enumeration_type* IFC4X3_IfcMarineFacilityTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcMarinePartTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcMechanicalFastenerTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcMedicalDeviceTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcMemberTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcMobileTelecommunicationsApplianceTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcMooringDeviceTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcMotorConnectionTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcNavigationElementTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcObjectTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcObjectiveEnum_type = 0;
+enumeration_type* IFC4X3_IfcOccupantTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcOpeningElementTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcOutletTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcPavementTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcPerformanceHistoryTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcPermeableCoveringOperationEnum_type = 0;
+enumeration_type* IFC4X3_IfcPermitTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcPhysicalOrVirtualEnum_type = 0;
+enumeration_type* IFC4X3_IfcPileConstructionEnum_type = 0;
+enumeration_type* IFC4X3_IfcPileTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcPipeFittingTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcPipeSegmentTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcPlateTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcPreferredSurfaceCurveRepresentation_type = 0;
+enumeration_type* IFC4X3_IfcProcedureTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcProfileTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcProjectOrderTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcProjectedOrTrueLengthEnum_type = 0;
+enumeration_type* IFC4X3_IfcProjectionElementTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcPropertySetTemplateTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcProtectiveDeviceTrippingUnitTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcProtectiveDeviceTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcPumpTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcRailTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcRailingTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcRailwayPartTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcRailwayTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcRampFlightTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcRampTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcRecurrenceTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcReferentTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcReflectanceMethodEnum_type = 0;
+enumeration_type* IFC4X3_IfcReinforcedSoilTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcReinforcingBarRoleEnum_type = 0;
+enumeration_type* IFC4X3_IfcReinforcingBarSurfaceEnum_type = 0;
+enumeration_type* IFC4X3_IfcReinforcingBarTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcReinforcingMeshTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcRoadPartTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcRoadTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcRoleEnum_type = 0;
+enumeration_type* IFC4X3_IfcRoofTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcSIPrefix_type = 0;
+enumeration_type* IFC4X3_IfcSIUnitName_type = 0;
+enumeration_type* IFC4X3_IfcSanitaryTerminalTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcSectionTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcSensorTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcSequenceEnum_type = 0;
+enumeration_type* IFC4X3_IfcShadingDeviceTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcSignTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcSignalTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcSimplePropertyTemplateTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcSlabTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcSolarDeviceTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcSpaceHeaterTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcSpaceTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcSpatialZoneTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcStackTerminalTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcStairFlightTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcStairTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcStateEnum_type = 0;
+enumeration_type* IFC4X3_IfcStructuralCurveActivityTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcStructuralCurveMemberTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcStructuralSurfaceActivityTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcStructuralSurfaceMemberTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcSubContractResourceTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcSurfaceFeatureTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcSurfaceSide_type = 0;
+enumeration_type* IFC4X3_IfcSwitchingDeviceTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcSystemFurnitureElementTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcTankTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcTaskDurationEnum_type = 0;
+enumeration_type* IFC4X3_IfcTaskTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcTendonAnchorTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcTendonConduitTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcTendonTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcTextPath_type = 0;
+enumeration_type* IFC4X3_IfcTimeSeriesDataTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcTrackElementTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcTransformerTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcTransitionCode_type = 0;
+enumeration_type* IFC4X3_IfcTransportElementTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcTrimmingPreference_type = 0;
+enumeration_type* IFC4X3_IfcTubeBundleTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcUnitEnum_type = 0;
+enumeration_type* IFC4X3_IfcUnitaryControlElementTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcUnitaryEquipmentTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcValveTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcVehicleTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcVibrationDamperTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcVibrationIsolatorTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcVirtualElementTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcVoidingFeatureTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcWallTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcWasteTerminalTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcWindowPanelOperationEnum_type = 0;
+enumeration_type* IFC4X3_IfcWindowPanelPositionEnum_type = 0;
+enumeration_type* IFC4X3_IfcWindowStyleConstructionEnum_type = 0;
+enumeration_type* IFC4X3_IfcWindowStyleOperationEnum_type = 0;
+enumeration_type* IFC4X3_IfcWindowTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcWindowTypePartitioningEnum_type = 0;
+enumeration_type* IFC4X3_IfcWorkCalendarTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcWorkPlanTypeEnum_type = 0;
+enumeration_type* IFC4X3_IfcWorkScheduleTypeEnum_type = 0;
+
+class IFC4X3_instance_factory : public IfcParse::instance_factory {
+ virtual IfcUtil::IfcBaseClass* operator()(IfcEntityInstanceData* data) const {
+ switch(data->type()->index_in_schema()) {
+ case 0: return new ::Ifc4x3::IfcAbsorbedDoseMeasure(data);
+ case 1: return new ::Ifc4x3::IfcAccelerationMeasure(data);
+ case 2: return new ::Ifc4x3::IfcActionRequest(data);
+ case 3: return new ::Ifc4x3::IfcActionRequestTypeEnum(data);
+ case 4: return new ::Ifc4x3::IfcActionSourceTypeEnum(data);
+ case 5: return new ::Ifc4x3::IfcActionTypeEnum(data);
+ case 6: return new ::Ifc4x3::IfcActor(data);
+ case 7: return new ::Ifc4x3::IfcActorRole(data);
+ case 9: return new ::Ifc4x3::IfcActuator(data);
+ case 10: return new ::Ifc4x3::IfcActuatorType(data);
+ case 11: return new ::Ifc4x3::IfcActuatorTypeEnum(data);
+ case 12: return new ::Ifc4x3::IfcAddress(data);
+ case 13: return new ::Ifc4x3::IfcAddressTypeEnum(data);
+ case 14: return new ::Ifc4x3::IfcAdvancedBrep(data);
+ case 15: return new ::Ifc4x3::IfcAdvancedBrepWithVoids(data);
+ case 16: return new ::Ifc4x3::IfcAdvancedFace(data);
+ case 17: return new ::Ifc4x3::IfcAirTerminal(data);
+ case 18: return new ::Ifc4x3::IfcAirTerminalBox(data);
+ case 19: return new ::Ifc4x3::IfcAirTerminalBoxType(data);
+ case 20: return new ::Ifc4x3::IfcAirTerminalBoxTypeEnum(data);
+ case 21: return new ::Ifc4x3::IfcAirTerminalType(data);
+ case 22: return new ::Ifc4x3::IfcAirTerminalTypeEnum(data);
+ case 23: return new ::Ifc4x3::IfcAirToAirHeatRecovery(data);
+ case 24: return new ::Ifc4x3::IfcAirToAirHeatRecoveryType(data);
+ case 25: return new ::Ifc4x3::IfcAirToAirHeatRecoveryTypeEnum(data);
+ case 26: return new ::Ifc4x3::IfcAlarm(data);
+ case 27: return new ::Ifc4x3::IfcAlarmType(data);
+ case 28: return new ::Ifc4x3::IfcAlarmTypeEnum(data);
+ case 29: return new ::Ifc4x3::IfcAlignment(data);
+ case 30: return new ::Ifc4x3::IfcAlignmentCant(data);
+ case 31: return new ::Ifc4x3::IfcAlignmentCantSegment(data);
+ case 32: return new ::Ifc4x3::IfcAlignmentCantSegmentTypeEnum(data);
+ case 33: return new ::Ifc4x3::IfcAlignmentHorizontal(data);
+ case 34: return new ::Ifc4x3::IfcAlignmentHorizontalSegment(data);
+ case 35: return new ::Ifc4x3::IfcAlignmentHorizontalSegmentTypeEnum(data);
+ case 36: return new ::Ifc4x3::IfcAlignmentParameterSegment(data);
+ case 37: return new ::Ifc4x3::IfcAlignmentSegment(data);
+ case 38: return new ::Ifc4x3::IfcAlignmentTypeEnum(data);
+ case 39: return new ::Ifc4x3::IfcAlignmentVertical(data);
+ case 40: return new ::Ifc4x3::IfcAlignmentVerticalSegment(data);
+ case 41: return new ::Ifc4x3::IfcAlignmentVerticalSegmentTypeEnum(data);
+ case 42: return new ::Ifc4x3::IfcAmountOfSubstanceMeasure(data);
+ case 43: return new ::Ifc4x3::IfcAnalysisModelTypeEnum(data);
+ case 44: return new ::Ifc4x3::IfcAnalysisTheoryTypeEnum(data);
+ case 45: return new ::Ifc4x3::IfcAngularVelocityMeasure(data);
+ case 46: return new ::Ifc4x3::IfcAnnotation(data);
+ case 47: return new ::Ifc4x3::IfcAnnotationFillArea(data);
+ case 48: return new ::Ifc4x3::IfcAnnotationTypeEnum(data);
+ case 49: return new ::Ifc4x3::IfcApplication(data);
+ case 50: return new ::Ifc4x3::IfcAppliedValue(data);
+ case 52: return new ::Ifc4x3::IfcApproval(data);
+ case 53: return new ::Ifc4x3::IfcApprovalRelationship(data);
+ case 54: return new ::Ifc4x3::IfcArbitraryClosedProfileDef(data);
+ case 55: return new ::Ifc4x3::IfcArbitraryOpenProfileDef(data);
+ case 56: return new ::Ifc4x3::IfcArbitraryProfileDefWithVoids(data);
+ case 57: return new ::Ifc4x3::IfcArcIndex(data);
+ case 58: return new ::Ifc4x3::IfcAreaDensityMeasure(data);
+ case 59: return new ::Ifc4x3::IfcAreaMeasure(data);
+ case 60: return new ::Ifc4x3::IfcArithmeticOperatorEnum(data);
+ case 61: return new ::Ifc4x3::IfcAssemblyPlaceEnum(data);
+ case 62: return new ::Ifc4x3::IfcAsset(data);
+ case 63: return new ::Ifc4x3::IfcAsymmetricIShapeProfileDef(data);
+ case 64: return new ::Ifc4x3::IfcAudioVisualAppliance(data);
+ case 65: return new ::Ifc4x3::IfcAudioVisualApplianceType(data);
+ case 66: return new ::Ifc4x3::IfcAudioVisualApplianceTypeEnum(data);
+ case 67: return new ::Ifc4x3::IfcAxis1Placement(data);
+ case 69: return new ::Ifc4x3::IfcAxis2Placement2D(data);
+ case 70: return new ::Ifc4x3::IfcAxis2Placement3D(data);
+ case 71: return new ::Ifc4x3::IfcAxis2PlacementLinear(data);
+ case 72: return new ::Ifc4x3::IfcBeam(data);
+ case 73: return new ::Ifc4x3::IfcBeamType(data);
+ case 74: return new ::Ifc4x3::IfcBeamTypeEnum(data);
+ case 75: return new ::Ifc4x3::IfcBearing(data);
+ case 76: return new ::Ifc4x3::IfcBearingType(data);
+ case 77: return new ::Ifc4x3::IfcBearingTypeDisplacementEnum(data);
+ case 78: return new ::Ifc4x3::IfcBearingTypeEnum(data);
+ case 79: return new ::Ifc4x3::IfcBenchmarkEnum(data);
+ case 81: return new ::Ifc4x3::IfcBinary(data);
+ case 82: return new ::Ifc4x3::IfcBlobTexture(data);
+ case 83: return new ::Ifc4x3::IfcBlock(data);
+ case 84: return new ::Ifc4x3::IfcBoiler(data);
+ case 85: return new ::Ifc4x3::IfcBoilerType(data);
+ case 86: return new ::Ifc4x3::IfcBoilerTypeEnum(data);
+ case 87: return new ::Ifc4x3::IfcBoolean(data);
+ case 88: return new ::Ifc4x3::IfcBooleanClippingResult(data);
+ case 90: return new ::Ifc4x3::IfcBooleanOperator(data);
+ case 91: return new ::Ifc4x3::IfcBooleanResult(data);
+ case 92: return new ::Ifc4x3::IfcBorehole(data);
+ case 93: return new ::Ifc4x3::IfcBoundaryCondition(data);
+ case 94: return new ::Ifc4x3::IfcBoundaryCurve(data);
+ case 95: return new ::Ifc4x3::IfcBoundaryEdgeCondition(data);
+ case 96: return new ::Ifc4x3::IfcBoundaryFaceCondition(data);
+ case 97: return new ::Ifc4x3::IfcBoundaryNodeCondition(data);
+ case 98: return new ::Ifc4x3::IfcBoundaryNodeConditionWarping(data);
+ case 99: return new ::Ifc4x3::IfcBoundedCurve(data);
+ case 100: return new ::Ifc4x3::IfcBoundedSurface(data);
+ case 101: return new ::Ifc4x3::IfcBoundingBox(data);
+ case 102: return new ::Ifc4x3::IfcBoxAlignment(data);
+ case 103: return new ::Ifc4x3::IfcBoxedHalfSpace(data);
+ case 104: return new ::Ifc4x3::IfcBridge(data);
+ case 105: return new ::Ifc4x3::IfcBridgePart(data);
+ case 106: return new ::Ifc4x3::IfcBridgePartTypeEnum(data);
+ case 107: return new ::Ifc4x3::IfcBridgeTypeEnum(data);
+ case 108: return new ::Ifc4x3::IfcBSplineCurve(data);
+ case 109: return new ::Ifc4x3::IfcBSplineCurveForm(data);
+ case 110: return new ::Ifc4x3::IfcBSplineCurveWithKnots(data);
+ case 111: return new ::Ifc4x3::IfcBSplineSurface(data);
+ case 112: return new ::Ifc4x3::IfcBSplineSurfaceForm(data);
+ case 113: return new ::Ifc4x3::IfcBSplineSurfaceWithKnots(data);
+ case 114: return new ::Ifc4x3::IfcBuilding(data);
+ case 115: return new ::Ifc4x3::IfcBuildingElementPart(data);
+ case 116: return new ::Ifc4x3::IfcBuildingElementPartType(data);
+ case 117: return new ::Ifc4x3::IfcBuildingElementPartTypeEnum(data);
+ case 118: return new ::Ifc4x3::IfcBuildingElementProxy(data);
+ case 119: return new ::Ifc4x3::IfcBuildingElementProxyType(data);
+ case 120: return new ::Ifc4x3::IfcBuildingElementProxyTypeEnum(data);
+ case 121: return new ::Ifc4x3::IfcBuildingStorey(data);
+ case 122: return new ::Ifc4x3::IfcBuildingSystem(data);
+ case 123: return new ::Ifc4x3::IfcBuildingSystemTypeEnum(data);
+ case 124: return new ::Ifc4x3::IfcBuiltElement(data);
+ case 125: return new ::Ifc4x3::IfcBuiltElementType(data);
+ case 126: return new ::Ifc4x3::IfcBuiltSystem(data);
+ case 127: return new ::Ifc4x3::IfcBuiltSystemTypeEnum(data);
+ case 128: return new ::Ifc4x3::IfcBurner(data);
+ case 129: return new ::Ifc4x3::IfcBurnerType(data);
+ case 130: return new ::Ifc4x3::IfcBurnerTypeEnum(data);
+ case 131: return new ::Ifc4x3::IfcCableCarrierFitting(data);
+ case 132: return new ::Ifc4x3::IfcCableCarrierFittingType(data);
+ case 133: return new ::Ifc4x3::IfcCableCarrierFittingTypeEnum(data);
+ case 134: return new ::Ifc4x3::IfcCableCarrierSegment(data);
+ case 135: return new ::Ifc4x3::IfcCableCarrierSegmentType(data);
+ case 136: return new ::Ifc4x3::IfcCableCarrierSegmentTypeEnum(data);
+ case 137: return new ::Ifc4x3::IfcCableFitting(data);
+ case 138: return new ::Ifc4x3::IfcCableFittingType(data);
+ case 139: return new ::Ifc4x3::IfcCableFittingTypeEnum(data);
+ case 140: return new ::Ifc4x3::IfcCableSegment(data);
+ case 141: return new ::Ifc4x3::IfcCableSegmentType(data);
+ case 142: return new ::Ifc4x3::IfcCableSegmentTypeEnum(data);
+ case 143: return new ::Ifc4x3::IfcCaissonFoundation(data);
+ case 144: return new ::Ifc4x3::IfcCaissonFoundationType(data);
+ case 145: return new ::Ifc4x3::IfcCaissonFoundationTypeEnum(data);
+ case 146: return new ::Ifc4x3::IfcCardinalPointReference(data);
+ case 147: return new ::Ifc4x3::IfcCartesianPoint(data);
+ case 148: return new ::Ifc4x3::IfcCartesianPointList(data);
+ case 149: return new ::Ifc4x3::IfcCartesianPointList2D(data);
+ case 150: return new ::Ifc4x3::IfcCartesianPointList3D(data);
+ case 151: return new ::Ifc4x3::IfcCartesianTransformationOperator(data);
+ case 152: return new ::Ifc4x3::IfcCartesianTransformationOperator2D(data);
+ case 153: return new ::Ifc4x3::IfcCartesianTransformationOperator2DnonUniform(data);
+ case 154: return new ::Ifc4x3::IfcCartesianTransformationOperator3D(data);
+ case 155: return new ::Ifc4x3::IfcCartesianTransformationOperator3DnonUniform(data);
+ case 156: return new ::Ifc4x3::IfcCenterLineProfileDef(data);
+ case 157: return new ::Ifc4x3::IfcChangeActionEnum(data);
+ case 158: return new ::Ifc4x3::IfcChiller(data);
+ case 159: return new ::Ifc4x3::IfcChillerType(data);
+ case 160: return new ::Ifc4x3::IfcChillerTypeEnum(data);
+ case 161: return new ::Ifc4x3::IfcChimney(data);
+ case 162: return new ::Ifc4x3::IfcChimneyType(data);
+ case 163: return new ::Ifc4x3::IfcChimneyTypeEnum(data);
+ case 164: return new ::Ifc4x3::IfcCircle(data);
+ case 165: return new ::Ifc4x3::IfcCircleHollowProfileDef(data);
+ case 166: return new ::Ifc4x3::IfcCircleProfileDef(data);
+ case 167: return new ::Ifc4x3::IfcCivilElement(data);
+ case 168: return new ::Ifc4x3::IfcCivilElementType(data);
+ case 169: return new ::Ifc4x3::IfcClassification(data);
+ case 170: return new ::Ifc4x3::IfcClassificationReference(data);
+ case 173: return new ::Ifc4x3::IfcClosedShell(data);
+ case 174: return new ::Ifc4x3::IfcClothoid(data);
+ case 175: return new ::Ifc4x3::IfcCoil(data);
+ case 176: return new ::Ifc4x3::IfcCoilType(data);
+ case 177: return new ::Ifc4x3::IfcCoilTypeEnum(data);
+ case 180: return new ::Ifc4x3::IfcColourRgb(data);
+ case 181: return new ::Ifc4x3::IfcColourRgbList(data);
+ case 182: return new ::Ifc4x3::IfcColourSpecification(data);
+ case 183: return new ::Ifc4x3::IfcColumn(data);
+ case 184: return new ::Ifc4x3::IfcColumnType(data);
+ case 185: return new ::Ifc4x3::IfcColumnTypeEnum(data);
+ case 186: return new ::Ifc4x3::IfcCommunicationsAppliance(data);
+ case 187: return new ::Ifc4x3::IfcCommunicationsApplianceType(data);
+ case 188: return new ::Ifc4x3::IfcCommunicationsApplianceTypeEnum(data);
+ case 189: return new ::Ifc4x3::IfcComplexNumber(data);
+ case 190: return new ::Ifc4x3::IfcComplexProperty(data);
+ case 191: return new ::Ifc4x3::IfcComplexPropertyTemplate(data);
+ case 192: return new ::Ifc4x3::IfcComplexPropertyTemplateTypeEnum(data);
+ case 193: return new ::Ifc4x3::IfcCompositeCurve(data);
+ case 194: return new ::Ifc4x3::IfcCompositeCurveOnSurface(data);
+ case 195: return new ::Ifc4x3::IfcCompositeCurveSegment(data);
+ case 196: return new ::Ifc4x3::IfcCompositeProfileDef(data);
+ case 197: return new ::Ifc4x3::IfcCompoundPlaneAngleMeasure(data);
+ case 198: return new ::Ifc4x3::IfcCompressor(data);
+ case 199: return new ::Ifc4x3::IfcCompressorType(data);
+ case 200: return new ::Ifc4x3::IfcCompressorTypeEnum(data);
+ case 201: return new ::Ifc4x3::IfcCondenser(data);
+ case 202: return new ::Ifc4x3::IfcCondenserType(data);
+ case 203: return new ::Ifc4x3::IfcCondenserTypeEnum(data);
+ case 204: return new ::Ifc4x3::IfcConic(data);
+ case 205: return new ::Ifc4x3::IfcConnectedFaceSet(data);
+ case 206: return new ::Ifc4x3::IfcConnectionCurveGeometry(data);
+ case 207: return new ::Ifc4x3::IfcConnectionGeometry(data);
+ case 208: return new ::Ifc4x3::IfcConnectionPointEccentricity(data);
+ case 209: return new ::Ifc4x3::IfcConnectionPointGeometry(data);
+ case 210: return new ::Ifc4x3::IfcConnectionSurfaceGeometry(data);
+ case 211: return new ::Ifc4x3::IfcConnectionTypeEnum(data);
+ case 212: return new ::Ifc4x3::IfcConnectionVolumeGeometry(data);
+ case 213: return new ::Ifc4x3::IfcConstraint(data);
+ case 214: return new ::Ifc4x3::IfcConstraintEnum(data);
+ case 215: return new ::Ifc4x3::IfcConstructionEquipmentResource(data);
+ case 216: return new ::Ifc4x3::IfcConstructionEquipmentResourceType(data);
+ case 217: return new ::Ifc4x3::IfcConstructionEquipmentResourceTypeEnum(data);
+ case 218: return new ::Ifc4x3::IfcConstructionMaterialResource(data);
+ case 219: return new ::Ifc4x3::IfcConstructionMaterialResourceType(data);
+ case 220: return new ::Ifc4x3::IfcConstructionMaterialResourceTypeEnum(data);
+ case 221: return new ::Ifc4x3::IfcConstructionProductResource(data);
+ case 222: return new ::Ifc4x3::IfcConstructionProductResourceType(data);
+ case 223: return new ::Ifc4x3::IfcConstructionProductResourceTypeEnum(data);
+ case 224: return new ::Ifc4x3::IfcConstructionResource(data);
+ case 225: return new ::Ifc4x3::IfcConstructionResourceType(data);
+ case 226: return new ::Ifc4x3::IfcContext(data);
+ case 227: return new ::Ifc4x3::IfcContextDependentMeasure(data);
+ case 228: return new ::Ifc4x3::IfcContextDependentUnit(data);
+ case 229: return new ::Ifc4x3::IfcControl(data);
+ case 230: return new ::Ifc4x3::IfcController(data);
+ case 231: return new ::Ifc4x3::IfcControllerType(data);
+ case 232: return new ::Ifc4x3::IfcControllerTypeEnum(data);
+ case 233: return new ::Ifc4x3::IfcConversionBasedUnit(data);
+ case 234: return new ::Ifc4x3::IfcConversionBasedUnitWithOffset(data);
+ case 235: return new ::Ifc4x3::IfcConveyorSegment(data);
+ case 236: return new ::Ifc4x3::IfcConveyorSegmentType(data);
+ case 237: return new ::Ifc4x3::IfcConveyorSegmentTypeEnum(data);
+ case 238: return new ::Ifc4x3::IfcCooledBeam(data);
+ case 239: return new ::Ifc4x3::IfcCooledBeamType(data);
+ case 240: return new ::Ifc4x3::IfcCooledBeamTypeEnum(data);
+ case 241: return new ::Ifc4x3::IfcCoolingTower(data);
+ case 242: return new ::Ifc4x3::IfcCoolingTowerType(data);
+ case 243: return new ::Ifc4x3::IfcCoolingTowerTypeEnum(data);
+ case 244: return new ::Ifc4x3::IfcCoordinateOperation(data);
+ case 245: return new ::Ifc4x3::IfcCoordinateReferenceSystem(data);
+ case 247: return new ::Ifc4x3::IfcCosineSpiral(data);
+ case 248: return new ::Ifc4x3::IfcCostItem(data);
+ case 249: return new ::Ifc4x3::IfcCostItemTypeEnum(data);
+ case 250: return new ::Ifc4x3::IfcCostSchedule(data);
+ case 251: return new ::Ifc4x3::IfcCostScheduleTypeEnum(data);
+ case 252: return new ::Ifc4x3::IfcCostValue(data);
+ case 253: return new ::Ifc4x3::IfcCountMeasure(data);
+ case 254: return new ::Ifc4x3::IfcCourse(data);
+ case 255: return new ::Ifc4x3::IfcCourseType(data);
+ case 256: return new ::Ifc4x3::IfcCourseTypeEnum(data);
+ case 257: return new ::Ifc4x3::IfcCovering(data);
+ case 258: return new ::Ifc4x3::IfcCoveringType(data);
+ case 259: return new ::Ifc4x3::IfcCoveringTypeEnum(data);
+ case 260: return new ::Ifc4x3::IfcCrewResource(data);
+ case 261: return new ::Ifc4x3::IfcCrewResourceType(data);
+ case 262: return new ::Ifc4x3::IfcCrewResourceTypeEnum(data);
+ case 263: return new ::Ifc4x3::IfcCsgPrimitive3D(data);
+ case 265: return new ::Ifc4x3::IfcCsgSolid(data);
+ case 266: return new ::Ifc4x3::IfcCShapeProfileDef(data);
+ case 267: return new ::Ifc4x3::IfcCurrencyRelationship(data);
+ case 268: return new ::Ifc4x3::IfcCurtainWall(data);
+ case 269: return new ::Ifc4x3::IfcCurtainWallType(data);
+ case 270: return new ::Ifc4x3::IfcCurtainWallTypeEnum(data);
+ case 271: return new ::Ifc4x3::IfcCurvatureMeasure(data);
+ case 272: return new ::Ifc4x3::IfcCurve(data);
+ case 273: return new ::Ifc4x3::IfcCurveBoundedPlane(data);
+ case 274: return new ::Ifc4x3::IfcCurveBoundedSurface(data);
+ case 276: return new ::Ifc4x3::IfcCurveInterpolationEnum(data);
+ case 280: return new ::Ifc4x3::IfcCurveSegment(data);
+ case 281: return new ::Ifc4x3::IfcCurveStyle(data);
+ case 282: return new ::Ifc4x3::IfcCurveStyleFont(data);
+ case 283: return new ::Ifc4x3::IfcCurveStyleFontAndScaling(data);
+ case 284: return new ::Ifc4x3::IfcCurveStyleFontPattern(data);
+ case 286: return new ::Ifc4x3::IfcCylindricalSurface(data);
+ case 287: return new ::Ifc4x3::IfcDamper(data);
+ case 288: return new ::Ifc4x3::IfcDamperType(data);
+ case 289: return new ::Ifc4x3::IfcDamperTypeEnum(data);
+ case 290: return new ::Ifc4x3::IfcDataOriginEnum(data);
+ case 291: return new ::Ifc4x3::IfcDate(data);
+ case 292: return new ::Ifc4x3::IfcDateTime(data);
+ case 293: return new ::Ifc4x3::IfcDayInMonthNumber(data);
+ case 294: return new ::Ifc4x3::IfcDayInWeekNumber(data);
+ case 295: return new ::Ifc4x3::IfcDeepFoundation(data);
+ case 296: return new ::Ifc4x3::IfcDeepFoundationType(data);
+ case 299: return new ::Ifc4x3::IfcDerivedProfileDef(data);
+ case 300: return new ::Ifc4x3::IfcDerivedUnit(data);
+ case 301: return new ::Ifc4x3::IfcDerivedUnitElement(data);
+ case 302: return new ::Ifc4x3::IfcDerivedUnitEnum(data);
+ case 303: return new ::Ifc4x3::IfcDescriptiveMeasure(data);
+ case 304: return new ::Ifc4x3::IfcDimensionalExponents(data);
+ case 305: return new ::Ifc4x3::IfcDimensionCount(data);
+ case 306: return new ::Ifc4x3::IfcDirection(data);
+ case 307: return new ::Ifc4x3::IfcDirectionSenseEnum(data);
+ case 308: return new ::Ifc4x3::IfcDirectrixCurveSweptAreaSolid(data);
+ case 309: return new ::Ifc4x3::IfcDirectrixDerivedReferenceSweptAreaSolid(data);
+ case 310: return new ::Ifc4x3::IfcDiscreteAccessory(data);
+ case 311: return new ::Ifc4x3::IfcDiscreteAccessoryType(data);
+ case 312: return new ::Ifc4x3::IfcDiscreteAccessoryTypeEnum(data);
+ case 313: return new ::Ifc4x3::IfcDistributionBoard(data);
+ case 314: return new ::Ifc4x3::IfcDistributionBoardType(data);
+ case 315: return new ::Ifc4x3::IfcDistributionBoardTypeEnum(data);
+ case 316: return new ::Ifc4x3::IfcDistributionChamberElement(data);
+ case 317: return new ::Ifc4x3::IfcDistributionChamberElementType(data);
+ case 318: return new ::Ifc4x3::IfcDistributionChamberElementTypeEnum(data);
+ case 319: return new ::Ifc4x3::IfcDistributionCircuit(data);
+ case 320: return new ::Ifc4x3::IfcDistributionControlElement(data);
+ case 321: return new ::Ifc4x3::IfcDistributionControlElementType(data);
+ case 322: return new ::Ifc4x3::IfcDistributionElement(data);
+ case 323: return new ::Ifc4x3::IfcDistributionElementType(data);
+ case 324: return new ::Ifc4x3::IfcDistributionFlowElement(data);
+ case 325: return new ::Ifc4x3::IfcDistributionFlowElementType(data);
+ case 326: return new ::Ifc4x3::IfcDistributionPort(data);
+ case 327: return new ::Ifc4x3::IfcDistributionPortTypeEnum(data);
+ case 328: return new ::Ifc4x3::IfcDistributionSystem(data);
+ case 329: return new ::Ifc4x3::IfcDistributionSystemEnum(data);
+ case 330: return new ::Ifc4x3::IfcDocumentConfidentialityEnum(data);
+ case 331: return new ::Ifc4x3::IfcDocumentInformation(data);
+ case 332: return new ::Ifc4x3::IfcDocumentInformationRelationship(data);
+ case 333: return new ::Ifc4x3::IfcDocumentReference(data);
+ case 335: return new ::Ifc4x3::IfcDocumentStatusEnum(data);
+ case 336: return new ::Ifc4x3::IfcDoor(data);
+ case 337: return new ::Ifc4x3::IfcDoorLiningProperties(data);
+ case 338: return new ::Ifc4x3::IfcDoorPanelOperationEnum(data);
+ case 339: return new ::Ifc4x3::IfcDoorPanelPositionEnum(data);
+ case 340: return new ::Ifc4x3::IfcDoorPanelProperties(data);
+ case 341: return new ::Ifc4x3::IfcDoorStyleConstructionEnum(data);
+ case 342: return new ::Ifc4x3::IfcDoorStyleOperationEnum(data);
+ case 343: return new ::Ifc4x3::IfcDoorType(data);
+ case 344: return new ::Ifc4x3::IfcDoorTypeEnum(data);
+ case 345: return new ::Ifc4x3::IfcDoorTypeOperationEnum(data);
+ case 346: return new ::Ifc4x3::IfcDoseEquivalentMeasure(data);
+ case 347: return new ::Ifc4x3::IfcDraughtingPreDefinedColour(data);
+ case 348: return new ::Ifc4x3::IfcDraughtingPreDefinedCurveFont(data);
+ case 349: return new ::Ifc4x3::IfcDuctFitting(data);
+ case 350: return new ::Ifc4x3::IfcDuctFittingType(data);
+ case 351: return new ::Ifc4x3::IfcDuctFittingTypeEnum(data);
+ case 352: return new ::Ifc4x3::IfcDuctSegment(data);
+ case 353: return new ::Ifc4x3::IfcDuctSegmentType(data);
+ case 354: return new ::Ifc4x3::IfcDuctSegmentTypeEnum(data);
+ case 355: return new ::Ifc4x3::IfcDuctSilencer(data);
+ case 356: return new ::Ifc4x3::IfcDuctSilencerType(data);
+ case 357: return new ::Ifc4x3::IfcDuctSilencerTypeEnum(data);
+ case 358: return new ::Ifc4x3::IfcDuration(data);
+ case 359: return new ::Ifc4x3::IfcDynamicViscosityMeasure(data);
+ case 360: return new ::Ifc4x3::IfcEarthworksCut(data);
+ case 361: return new ::Ifc4x3::IfcEarthworksCutTypeEnum(data);
+ case 362: return new ::Ifc4x3::IfcEarthworksElement(data);
+ case 363: return new ::Ifc4x3::IfcEarthworksFill(data);
+ case 364: return new ::Ifc4x3::IfcEarthworksFillTypeEnum(data);
+ case 365: return new ::Ifc4x3::IfcEdge(data);
+ case 366: return new ::Ifc4x3::IfcEdgeCurve(data);
+ case 367: return new ::Ifc4x3::IfcEdgeLoop(data);
+ case 368: return new ::Ifc4x3::IfcElectricAppliance(data);
+ case 369: return new ::Ifc4x3::IfcElectricApplianceType(data);
+ case 370: return new ::Ifc4x3::IfcElectricApplianceTypeEnum(data);
+ case 371: return new ::Ifc4x3::IfcElectricCapacitanceMeasure(data);
+ case 372: return new ::Ifc4x3::IfcElectricChargeMeasure(data);
+ case 373: return new ::Ifc4x3::IfcElectricConductanceMeasure(data);
+ case 374: return new ::Ifc4x3::IfcElectricCurrentMeasure(data);
+ case 375: return new ::Ifc4x3::IfcElectricDistributionBoard(data);
+ case 376: return new ::Ifc4x3::IfcElectricDistributionBoardType(data);
+ case 377: return new ::Ifc4x3::IfcElectricDistributionBoardTypeEnum(data);
+ case 378: return new ::Ifc4x3::IfcElectricFlowStorageDevice(data);
+ case 379: return new ::Ifc4x3::IfcElectricFlowStorageDeviceType(data);
+ case 380: return new ::Ifc4x3::IfcElectricFlowStorageDeviceTypeEnum(data);
+ case 381: return new ::Ifc4x3::IfcElectricFlowTreatmentDevice(data);
+ case 382: return new ::Ifc4x3::IfcElectricFlowTreatmentDeviceType(data);
+ case 383: return new ::Ifc4x3::IfcElectricFlowTreatmentDeviceTypeEnum(data);
+ case 384: return new ::Ifc4x3::IfcElectricGenerator(data);
+ case 385: return new ::Ifc4x3::IfcElectricGeneratorType(data);
+ case 386: return new ::Ifc4x3::IfcElectricGeneratorTypeEnum(data);
+ case 387: return new ::Ifc4x3::IfcElectricMotor(data);
+ case 388: return new ::Ifc4x3::IfcElectricMotorType(data);
+ case 389: return new ::Ifc4x3::IfcElectricMotorTypeEnum(data);
+ case 390: return new ::Ifc4x3::IfcElectricResistanceMeasure(data);
+ case 391: return new ::Ifc4x3::IfcElectricTimeControl(data);
+ case 392: return new ::Ifc4x3::IfcElectricTimeControlType(data);
+ case 393: return new ::Ifc4x3::IfcElectricTimeControlTypeEnum(data);
+ case 394: return new ::Ifc4x3::IfcElectricVoltageMeasure(data);
+ case 395: return new ::Ifc4x3::IfcElement(data);
+ case 396: return new ::Ifc4x3::IfcElementarySurface(data);
+ case 397: return new ::Ifc4x3::IfcElementAssembly(data);
+ case 398: return new ::Ifc4x3::IfcElementAssemblyType(data);
+ case 399: return new ::Ifc4x3::IfcElementAssemblyTypeEnum(data);
+ case 400: return new ::Ifc4x3::IfcElementComponent(data);
+ case 401: return new ::Ifc4x3::IfcElementComponentType(data);
+ case 402: return new ::Ifc4x3::IfcElementCompositionEnum(data);
+ case 403: return new ::Ifc4x3::IfcElementQuantity(data);
+ case 404: return new ::Ifc4x3::IfcElementType(data);
+ case 405: return new ::Ifc4x3::IfcEllipse(data);
+ case 406: return new ::Ifc4x3::IfcEllipseProfileDef(data);
+ case 407: return new ::Ifc4x3::IfcEnergyConversionDevice(data);
+ case 408: return new ::Ifc4x3::IfcEnergyConversionDeviceType(data);
+ case 409: return new ::Ifc4x3::IfcEnergyMeasure(data);
+ case 410: return new ::Ifc4x3::IfcEngine(data);
+ case 411: return new ::Ifc4x3::IfcEngineType(data);
+ case 412: return new ::Ifc4x3::IfcEngineTypeEnum(data);
+ case 413: return new ::Ifc4x3::IfcEvaporativeCooler(data);
+ case 414: return new ::Ifc4x3::IfcEvaporativeCoolerType(data);
+ case 415: return new ::Ifc4x3::IfcEvaporativeCoolerTypeEnum(data);
+ case 416: return new ::Ifc4x3::IfcEvaporator(data);
+ case 417: return new ::Ifc4x3::IfcEvaporatorType(data);
+ case 418: return new ::Ifc4x3::IfcEvaporatorTypeEnum(data);
+ case 419: return new ::Ifc4x3::IfcEvent(data);
+ case 420: return new ::Ifc4x3::IfcEventTime(data);
+ case 421: return new ::Ifc4x3::IfcEventTriggerTypeEnum(data);
+ case 422: return new ::Ifc4x3::IfcEventType(data);
+ case 423: return new ::Ifc4x3::IfcEventTypeEnum(data);
+ case 424: return new ::Ifc4x3::IfcExtendedProperties(data);
+ case 425: return new ::Ifc4x3::IfcExternalInformation(data);
+ case 426: return new ::Ifc4x3::IfcExternallyDefinedHatchStyle(data);
+ case 427: return new ::Ifc4x3::IfcExternallyDefinedSurfaceStyle(data);
+ case 428: return new ::Ifc4x3::IfcExternallyDefinedTextFont(data);
+ case 429: return new ::Ifc4x3::IfcExternalReference(data);
+ case 430: return new ::Ifc4x3::IfcExternalReferenceRelationship(data);
+ case 431: return new ::Ifc4x3::IfcExternalSpatialElement(data);
+ case 432: return new ::Ifc4x3::IfcExternalSpatialElementTypeEnum(data);
+ case 433: return new ::Ifc4x3::IfcExternalSpatialStructureElement(data);
+ case 434: return new ::Ifc4x3::IfcExtrudedAreaSolid(data);
+ case 435: return new ::Ifc4x3::IfcExtrudedAreaSolidTapered(data);
+ case 436: return new ::Ifc4x3::IfcFace(data);
+ case 437: return new ::Ifc4x3::IfcFaceBasedSurfaceModel(data);
+ case 438: return new ::Ifc4x3::IfcFaceBound(data);
+ case 439: return new ::Ifc4x3::IfcFaceOuterBound(data);
+ case 440: return new ::Ifc4x3::IfcFaceSurface(data);
+ case 441: return new ::Ifc4x3::IfcFacetedBrep(data);
+ case 442: return new ::Ifc4x3::IfcFacetedBrepWithVoids(data);
+ case 443: return new ::Ifc4x3::IfcFacility(data);
+ case 444: return new ::Ifc4x3::IfcFacilityPart(data);
+ case 445: return new ::Ifc4x3::IfcFacilityPartCommon(data);
+ case 446: return new ::Ifc4x3::IfcFacilityPartCommonTypeEnum(data);
+ case 447: return new ::Ifc4x3::IfcFacilityUsageEnum(data);
+ case 448: return new ::Ifc4x3::IfcFailureConnectionCondition(data);
+ case 449: return new ::Ifc4x3::IfcFan(data);
+ case 450: return new ::Ifc4x3::IfcFanType(data);
+ case 451: return new ::Ifc4x3::IfcFanTypeEnum(data);
+ case 452: return new ::Ifc4x3::IfcFastener(data);
+ case 453: return new ::Ifc4x3::IfcFastenerType(data);
+ case 454: return new ::Ifc4x3::IfcFastenerTypeEnum(data);
+ case 455: return new ::Ifc4x3::IfcFeatureElement(data);
+ case 456: return new ::Ifc4x3::IfcFeatureElementAddition(data);
+ case 457: return new ::Ifc4x3::IfcFeatureElementSubtraction(data);
+ case 458: return new ::Ifc4x3::IfcFillAreaStyle(data);
+ case 459: return new ::Ifc4x3::IfcFillAreaStyleHatching(data);
+ case 460: return new ::Ifc4x3::IfcFillAreaStyleTiles(data);
+ case 462: return new ::Ifc4x3::IfcFilter(data);
+ case 463: return new ::Ifc4x3::IfcFilterType(data);
+ case 464: return new ::Ifc4x3::IfcFilterTypeEnum(data);
+ case 465: return new ::Ifc4x3::IfcFireSuppressionTerminal(data);
+ case 466: return new ::Ifc4x3::IfcFireSuppressionTerminalType(data);
+ case 467: return new ::Ifc4x3::IfcFireSuppressionTerminalTypeEnum(data);
+ case 468: return new ::Ifc4x3::IfcFixedReferenceSweptAreaSolid(data);
+ case 469: return new ::Ifc4x3::IfcFlowController(data);
+ case 470: return new ::Ifc4x3::IfcFlowControllerType(data);
+ case 471: return new ::Ifc4x3::IfcFlowDirectionEnum(data);
+ case 472: return new ::Ifc4x3::IfcFlowFitting(data);
+ case 473: return new ::Ifc4x3::IfcFlowFittingType(data);
+ case 474: return new ::Ifc4x3::IfcFlowInstrument(data);
+ case 475: return new ::Ifc4x3::IfcFlowInstrumentType(data);
+ case 476: return new ::Ifc4x3::IfcFlowInstrumentTypeEnum(data);
+ case 477: return new ::Ifc4x3::IfcFlowMeter(data);
+ case 478: return new ::Ifc4x3::IfcFlowMeterType(data);
+ case 479: return new ::Ifc4x3::IfcFlowMeterTypeEnum(data);
+ case 480: return new ::Ifc4x3::IfcFlowMovingDevice(data);
+ case 481: return new ::Ifc4x3::IfcFlowMovingDeviceType(data);
+ case 482: return new ::Ifc4x3::IfcFlowSegment(data);
+ case 483: return new ::Ifc4x3::IfcFlowSegmentType(data);
+ case 484: return new ::Ifc4x3::IfcFlowStorageDevice(data);
+ case 485: return new ::Ifc4x3::IfcFlowStorageDeviceType(data);
+ case 486: return new ::Ifc4x3::IfcFlowTerminal(data);
+ case 487: return new ::Ifc4x3::IfcFlowTerminalType(data);
+ case 488: return new ::Ifc4x3::IfcFlowTreatmentDevice(data);
+ case 489: return new ::Ifc4x3::IfcFlowTreatmentDeviceType(data);
+ case 490: return new ::Ifc4x3::IfcFontStyle(data);
+ case 491: return new ::Ifc4x3::IfcFontVariant(data);
+ case 492: return new ::Ifc4x3::IfcFontWeight(data);
+ case 493: return new ::Ifc4x3::IfcFooting(data);
+ case 494: return new ::Ifc4x3::IfcFootingType(data);
+ case 495: return new ::Ifc4x3::IfcFootingTypeEnum(data);
+ case 496: return new ::Ifc4x3::IfcForceMeasure(data);
+ case 497: return new ::Ifc4x3::IfcFrequencyMeasure(data);
+ case 498: return new ::Ifc4x3::IfcFurnishingElement(data);
+ case 499: return new ::Ifc4x3::IfcFurnishingElementType(data);
+ case 500: return new ::Ifc4x3::IfcFurniture(data);
+ case 501: return new ::Ifc4x3::IfcFurnitureType(data);
+ case 502: return new ::Ifc4x3::IfcFurnitureTypeEnum(data);
+ case 503: return new ::Ifc4x3::IfcGeographicElement(data);
+ case 504: return new ::Ifc4x3::IfcGeographicElementType(data);
+ case 505: return new ::Ifc4x3::IfcGeographicElementTypeEnum(data);
+ case 506: return new ::Ifc4x3::IfcGeometricCurveSet(data);
+ case 507: return new ::Ifc4x3::IfcGeometricProjectionEnum(data);
+ case 508: return new ::Ifc4x3::IfcGeometricRepresentationContext(data);
+ case 509: return new ::Ifc4x3::IfcGeometricRepresentationItem(data);
+ case 510: return new ::Ifc4x3::IfcGeometricRepresentationSubContext(data);
+ case 511: return new ::Ifc4x3::IfcGeometricSet(data);
+ case 513: return new ::Ifc4x3::IfcGeomodel(data);
+ case 514: return new ::Ifc4x3::IfcGeoslice(data);
+ case 515: return new ::Ifc4x3::IfcGeotechnicalAssembly(data);
+ case 516: return new ::Ifc4x3::IfcGeotechnicalElement(data);
+ case 517: return new ::Ifc4x3::IfcGeotechnicalStratum(data);
+ case 518: return new ::Ifc4x3::IfcGeotechnicalStratumTypeEnum(data);
+ case 519: return new ::Ifc4x3::IfcGloballyUniqueId(data);
+ case 520: return new ::Ifc4x3::IfcGlobalOrLocalEnum(data);
+ case 521: return new ::Ifc4x3::IfcGradientCurve(data);
+ case 522: return new ::Ifc4x3::IfcGrid(data);
+ case 523: return new ::Ifc4x3::IfcGridAxis(data);
+ case 524: return new ::Ifc4x3::IfcGridPlacement(data);
+ case 526: return new ::Ifc4x3::IfcGridTypeEnum(data);
+ case 527: return new ::Ifc4x3::IfcGroup(data);
+ case 528: return new ::Ifc4x3::IfcHalfSpaceSolid(data);
+ case 530: return new ::Ifc4x3::IfcHeatExchanger(data);
+ case 531: return new ::Ifc4x3::IfcHeatExchangerType(data);
+ case 532: return new ::Ifc4x3::IfcHeatExchangerTypeEnum(data);
+ case 533: return new ::Ifc4x3::IfcHeatFluxDensityMeasure(data);
+ case 534: return new ::Ifc4x3::IfcHeatingValueMeasure(data);
+ case 535: return new ::Ifc4x3::IfcHumidifier(data);
+ case 536: return new ::Ifc4x3::IfcHumidifierType(data);
+ case 537: return new ::Ifc4x3::IfcHumidifierTypeEnum(data);
+ case 538: return new ::Ifc4x3::IfcIdentifier(data);
+ case 539: return new ::Ifc4x3::IfcIlluminanceMeasure(data);
+ case 540: return new ::Ifc4x3::IfcImageTexture(data);
+ case 541: return new ::Ifc4x3::IfcImpactProtectionDevice(data);
+ case 542: return new ::Ifc4x3::IfcImpactProtectionDeviceType(data);
+ case 543: return new ::Ifc4x3::IfcImpactProtectionDeviceTypeEnum(data);
+ case 544: return new ::Ifc4x3::IfcIndexedColourMap(data);
+ case 545: return new ::Ifc4x3::IfcIndexedPolyCurve(data);
+ case 546: return new ::Ifc4x3::IfcIndexedPolygonalFace(data);
+ case 547: return new ::Ifc4x3::IfcIndexedPolygonalFaceWithVoids(data);
+ case 548: return new ::Ifc4x3::IfcIndexedPolygonalTextureMap(data);
+ case 549: return new ::Ifc4x3::IfcIndexedTextureMap(data);
+ case 550: return new ::Ifc4x3::IfcIndexedTriangleTextureMap(data);
+ case 551: return new ::Ifc4x3::IfcInductanceMeasure(data);
+ case 552: return new ::Ifc4x3::IfcInteger(data);
+ case 553: return new ::Ifc4x3::IfcIntegerCountRateMeasure(data);
+ case 554: return new ::Ifc4x3::IfcInterceptor(data);
+ case 555: return new ::Ifc4x3::IfcInterceptorType(data);
+ case 556: return new ::Ifc4x3::IfcInterceptorTypeEnum(data);
+ case 558: return new ::Ifc4x3::IfcInternalOrExternalEnum(data);
+ case 559: return new ::Ifc4x3::IfcIntersectionCurve(data);
+ case 560: return new ::Ifc4x3::IfcInventory(data);
+ case 561: return new ::Ifc4x3::IfcInventoryTypeEnum(data);
+ case 562: return new ::Ifc4x3::IfcIonConcentrationMeasure(data);
+ case 563: return new ::Ifc4x3::IfcIrregularTimeSeries(data);
+ case 564: return new ::Ifc4x3::IfcIrregularTimeSeriesValue(data);
+ case 565: return new ::Ifc4x3::IfcIShapeProfileDef(data);
+ case 566: return new ::Ifc4x3::IfcIsothermalMoistureCapacityMeasure(data);
+ case 567: return new ::Ifc4x3::IfcJunctionBox(data);
+ case 568: return new ::Ifc4x3::IfcJunctionBoxType(data);
+ case 569: return new ::Ifc4x3::IfcJunctionBoxTypeEnum(data);
+ case 570: return new ::Ifc4x3::IfcKerb(data);
+ case 571: return new ::Ifc4x3::IfcKerbType(data);
+ case 572: return new ::Ifc4x3::IfcKinematicViscosityMeasure(data);
+ case 573: return new ::Ifc4x3::IfcKnotType(data);
+ case 574: return new ::Ifc4x3::IfcLabel(data);
+ case 575: return new ::Ifc4x3::IfcLaborResource(data);
+ case 576: return new ::Ifc4x3::IfcLaborResourceType(data);
+ case 577: return new ::Ifc4x3::IfcLaborResourceTypeEnum(data);
+ case 578: return new ::Ifc4x3::IfcLagTime(data);
+ case 579: return new ::Ifc4x3::IfcLamp(data);
+ case 580: return new ::Ifc4x3::IfcLampType(data);
+ case 581: return new ::Ifc4x3::IfcLampTypeEnum(data);
+ case 582: return new ::Ifc4x3::IfcLanguageId(data);
+ case 584: return new ::Ifc4x3::IfcLayerSetDirectionEnum(data);
+ case 585: return new ::Ifc4x3::IfcLengthMeasure(data);
+ case 586: return new ::Ifc4x3::IfcLibraryInformation(data);
+ case 587: return new ::Ifc4x3::IfcLibraryReference(data);
+ case 589: return new ::Ifc4x3::IfcLightDistributionCurveEnum(data);
+ case 590: return new ::Ifc4x3::IfcLightDistributionData(data);
+ case 592: return new ::Ifc4x3::IfcLightEmissionSourceEnum(data);
+ case 593: return new ::Ifc4x3::IfcLightFixture(data);
+ case 594: return new ::Ifc4x3::IfcLightFixtureType(data);
+ case 595: return new ::Ifc4x3::IfcLightFixtureTypeEnum(data);
+ case 596: return new ::Ifc4x3::IfcLightIntensityDistribution(data);
+ case 597: return new ::Ifc4x3::IfcLightSource(data);
+ case 598: return new ::Ifc4x3::IfcLightSourceAmbient(data);
+ case 599: return new ::Ifc4x3::IfcLightSourceDirectional(data);
+ case 600: return new ::Ifc4x3::IfcLightSourceGoniometric(data);
+ case 601: return new ::Ifc4x3::IfcLightSourcePositional(data);
+ case 602: return new ::Ifc4x3::IfcLightSourceSpot(data);
+ case 603: return new ::Ifc4x3::IfcLine(data);
+ case 604: return new ::Ifc4x3::IfcLinearElement(data);
+ case 605: return new ::Ifc4x3::IfcLinearForceMeasure(data);
+ case 606: return new ::Ifc4x3::IfcLinearMomentMeasure(data);
+ case 607: return new ::Ifc4x3::IfcLinearPlacement(data);
+ case 608: return new ::Ifc4x3::IfcLinearPositioningElement(data);
+ case 609: return new ::Ifc4x3::IfcLinearStiffnessMeasure(data);
+ case 610: return new ::Ifc4x3::IfcLinearVelocityMeasure(data);
+ case 611: return new ::Ifc4x3::IfcLineIndex(data);
+ case 612: return new ::Ifc4x3::IfcLiquidTerminal(data);
+ case 613: return new ::Ifc4x3::IfcLiquidTerminalType(data);
+ case 614: return new ::Ifc4x3::IfcLiquidTerminalTypeEnum(data);
+ case 615: return new ::Ifc4x3::IfcLoadGroupTypeEnum(data);
+ case 616: return new ::Ifc4x3::IfcLocalPlacement(data);
+ case 617: return new ::Ifc4x3::IfcLogical(data);
+ case 618: return new ::Ifc4x3::IfcLogicalOperatorEnum(data);
+ case 619: return new ::Ifc4x3::IfcLoop(data);
+ case 620: return new ::Ifc4x3::IfcLShapeProfileDef(data);
+ case 621: return new ::Ifc4x3::IfcLuminousFluxMeasure(data);
+ case 622: return new ::Ifc4x3::IfcLuminousIntensityDistributionMeasure(data);
+ case 623: return new ::Ifc4x3::IfcLuminousIntensityMeasure(data);
+ case 624: return new ::Ifc4x3::IfcMagneticFluxDensityMeasure(data);
+ case 625: return new ::Ifc4x3::IfcMagneticFluxMeasure(data);
+ case 626: return new ::Ifc4x3::IfcManifoldSolidBrep(data);
+ case 627: return new ::Ifc4x3::IfcMapConversion(data);
+ case 628: return new ::Ifc4x3::IfcMappedItem(data);
+ case 629: return new ::Ifc4x3::IfcMarineFacility(data);
+ case 630: return new ::Ifc4x3::IfcMarineFacilityTypeEnum(data);
+ case 631: return new ::Ifc4x3::IfcMarinePart(data);
+ case 632: return new ::Ifc4x3::IfcMarinePartTypeEnum(data);
+ case 633: return new ::Ifc4x3::IfcMassDensityMeasure(data);
+ case 634: return new ::Ifc4x3::IfcMassFlowRateMeasure(data);
+ case 635: return new ::Ifc4x3::IfcMassMeasure(data);
+ case 636: return new ::Ifc4x3::IfcMassPerLengthMeasure(data);
+ case 637: return new ::Ifc4x3::IfcMaterial(data);
+ case 638: return new ::Ifc4x3::IfcMaterialClassificationRelationship(data);
+ case 639: return new ::Ifc4x3::IfcMaterialConstituent(data);
+ case 640: return new ::Ifc4x3::IfcMaterialConstituentSet(data);
+ case 641: return new ::Ifc4x3::IfcMaterialDefinition(data);
+ case 642: return new ::Ifc4x3::IfcMaterialDefinitionRepresentation(data);
+ case 643: return new ::Ifc4x3::IfcMaterialLayer(data);
+ case 644: return new ::Ifc4x3::IfcMaterialLayerSet(data);
+ case 645: return new ::Ifc4x3::IfcMaterialLayerSetUsage(data);
+ case 646: return new ::Ifc4x3::IfcMaterialLayerWithOffsets(data);
+ case 647: return new ::Ifc4x3::IfcMaterialList(data);
+ case 648: return new ::Ifc4x3::IfcMaterialProfile(data);
+ case 649: return new ::Ifc4x3::IfcMaterialProfileSet(data);
+ case 650: return new ::Ifc4x3::IfcMaterialProfileSetUsage(data);
+ case 651: return new ::Ifc4x3::IfcMaterialProfileSetUsageTapering(data);
+ case 652: return new ::Ifc4x3::IfcMaterialProfileWithOffsets(data);
+ case 653: return new ::Ifc4x3::IfcMaterialProperties(data);
+ case 654: return new ::Ifc4x3::IfcMaterialRelationship(data);
+ case 656: return new ::Ifc4x3::IfcMaterialUsageDefinition(data);
+ case 658: return new ::Ifc4x3::IfcMeasureWithUnit(data);
+ case 659: return new ::Ifc4x3::IfcMechanicalFastener(data);
+ case 660: return new ::Ifc4x3::IfcMechanicalFastenerType(data);
+ case 661: return new ::Ifc4x3::IfcMechanicalFastenerTypeEnum(data);
+ case 662: return new ::Ifc4x3::IfcMedicalDevice(data);
+ case 663: return new ::Ifc4x3::IfcMedicalDeviceType(data);
+ case 664: return new ::Ifc4x3::IfcMedicalDeviceTypeEnum(data);
+ case 665: return new ::Ifc4x3::IfcMember(data);
+ case 666: return new ::Ifc4x3::IfcMemberType(data);
+ case 667: return new ::Ifc4x3::IfcMemberTypeEnum(data);
+ case 668: return new ::Ifc4x3::IfcMetric(data);
+ case 670: return new ::Ifc4x3::IfcMirroredProfileDef(data);
+ case 671: return new ::Ifc4x3::IfcMobileTelecommunicationsAppliance(data);
+ case 672: return new ::Ifc4x3::IfcMobileTelecommunicationsApplianceType(data);
+ case 673: return new ::Ifc4x3::IfcMobileTelecommunicationsApplianceTypeEnum(data);
+ case 674: return new ::Ifc4x3::IfcModulusOfElasticityMeasure(data);
+ case 675: return new ::Ifc4x3::IfcModulusOfLinearSubgradeReactionMeasure(data);
+ case 676: return new ::Ifc4x3::IfcModulusOfRotationalSubgradeReactionMeasure(data);
+ case 678: return new ::Ifc4x3::IfcModulusOfSubgradeReactionMeasure(data);
+ case 681: return new ::Ifc4x3::IfcMoistureDiffusivityMeasure(data);
+ case 682: return new ::Ifc4x3::IfcMolecularWeightMeasure(data);
+ case 683: return new ::Ifc4x3::IfcMomentOfInertiaMeasure(data);
+ case 684: return new ::Ifc4x3::IfcMonetaryMeasure(data);
+ case 685: return new ::Ifc4x3::IfcMonetaryUnit(data);
+ case 686: return new ::Ifc4x3::IfcMonthInYearNumber(data);
+ case 687: return new ::Ifc4x3::IfcMooringDevice(data);
+ case 688: return new ::Ifc4x3::IfcMooringDeviceType(data);
+ case 689: return new ::Ifc4x3::IfcMooringDeviceTypeEnum(data);
+ case 690: return new ::Ifc4x3::IfcMotorConnection(data);
+ case 691: return new ::Ifc4x3::IfcMotorConnectionType(data);
+ case 692: return new ::Ifc4x3::IfcMotorConnectionTypeEnum(data);
+ case 693: return new ::Ifc4x3::IfcNamedUnit(data);
+ case 694: return new ::Ifc4x3::IfcNavigationElement(data);
+ case 695: return new ::Ifc4x3::IfcNavigationElementType(data);
+ case 696: return new ::Ifc4x3::IfcNavigationElementTypeEnum(data);
+ case 697: return new ::Ifc4x3::IfcNonNegativeLengthMeasure(data);
+ case 698: return new ::Ifc4x3::IfcNormalisedRatioMeasure(data);
+ case 699: return new ::Ifc4x3::IfcNumericMeasure(data);
+ case 700: return new ::Ifc4x3::IfcObject(data);
+ case 701: return new ::Ifc4x3::IfcObjectDefinition(data);
+ case 702: return new ::Ifc4x3::IfcObjective(data);
+ case 703: return new ::Ifc4x3::IfcObjectiveEnum(data);
+ case 704: return new ::Ifc4x3::IfcObjectPlacement(data);
+ case 706: return new ::Ifc4x3::IfcObjectTypeEnum(data);
+ case 707: return new ::Ifc4x3::IfcOccupant(data);
+ case 708: return new ::Ifc4x3::IfcOccupantTypeEnum(data);
+ case 709: return new ::Ifc4x3::IfcOffsetCurve(data);
+ case 710: return new ::Ifc4x3::IfcOffsetCurve2D(data);
+ case 711: return new ::Ifc4x3::IfcOffsetCurve3D(data);
+ case 712: return new ::Ifc4x3::IfcOffsetCurveByDistances(data);
+ case 713: return new ::Ifc4x3::IfcOpenCrossProfileDef(data);
+ case 714: return new ::Ifc4x3::IfcOpeningElement(data);
+ case 715: return new ::Ifc4x3::IfcOpeningElementTypeEnum(data);
+ case 716: return new ::Ifc4x3::IfcOpenShell(data);
+ case 717: return new ::Ifc4x3::IfcOrganization(data);
+ case 718: return new ::Ifc4x3::IfcOrganizationRelationship(data);
+ case 719: return new ::Ifc4x3::IfcOrientedEdge(data);
+ case 720: return new ::Ifc4x3::IfcOuterBoundaryCurve(data);
+ case 721: return new ::Ifc4x3::IfcOutlet(data);
+ case 722: return new ::Ifc4x3::IfcOutletType(data);
+ case 723: return new ::Ifc4x3::IfcOutletTypeEnum(data);
+ case 724: return new ::Ifc4x3::IfcOwnerHistory(data);
+ case 725: return new ::Ifc4x3::IfcParameterizedProfileDef(data);
+ case 726: return new ::Ifc4x3::IfcParameterValue(data);
+ case 727: return new ::Ifc4x3::IfcPath(data);
+ case 728: return new ::Ifc4x3::IfcPavement(data);
+ case 729: return new ::Ifc4x3::IfcPavementType(data);
+ case 730: return new ::Ifc4x3::IfcPavementTypeEnum(data);
+ case 731: return new ::Ifc4x3::IfcPcurve(data);
+ case 732: return new ::Ifc4x3::IfcPerformanceHistory(data);
+ case 733: return new ::Ifc4x3::IfcPerformanceHistoryTypeEnum(data);
+ case 734: return new ::Ifc4x3::IfcPermeableCoveringOperationEnum(data);
+ case 735: return new ::Ifc4x3::IfcPermeableCoveringProperties(data);
+ case 736: return new ::Ifc4x3::IfcPermit(data);
+ case 737: return new ::Ifc4x3::IfcPermitTypeEnum(data);
+ case 738: return new ::Ifc4x3::IfcPerson(data);
+ case 739: return new ::Ifc4x3::IfcPersonAndOrganization(data);
+ case 740: return new ::Ifc4x3::IfcPHMeasure(data);
+ case 741: return new ::Ifc4x3::IfcPhysicalComplexQuantity(data);
+ case 742: return new ::Ifc4x3::IfcPhysicalOrVirtualEnum(data);
+ case 743: return new ::Ifc4x3::IfcPhysicalQuantity(data);
+ case 744: return new ::Ifc4x3::IfcPhysicalSimpleQuantity(data);
+ case 745: return new ::Ifc4x3::IfcPile(data);
+ case 746: return new ::Ifc4x3::IfcPileConstructionEnum(data);
+ case 747: return new ::Ifc4x3::IfcPileType(data);
+ case 748: return new ::Ifc4x3::IfcPileTypeEnum(data);
+ case 749: return new ::Ifc4x3::IfcPipeFitting(data);
+ case 750: return new ::Ifc4x3::IfcPipeFittingType(data);
+ case 751: return new ::Ifc4x3::IfcPipeFittingTypeEnum(data);
+ case 752: return new ::Ifc4x3::IfcPipeSegment(data);
+ case 753: return new ::Ifc4x3::IfcPipeSegmentType(data);
+ case 754: return new ::Ifc4x3::IfcPipeSegmentTypeEnum(data);
+ case 755: return new ::Ifc4x3::IfcPixelTexture(data);
+ case 756: return new ::Ifc4x3::IfcPlacement(data);
+ case 757: return new ::Ifc4x3::IfcPlanarBox(data);
+ case 758: return new ::Ifc4x3::IfcPlanarExtent(data);
+ case 759: return new ::Ifc4x3::IfcPlanarForceMeasure(data);
+ case 760: return new ::Ifc4x3::IfcPlane(data);
+ case 761: return new ::Ifc4x3::IfcPlaneAngleMeasure(data);
+ case 762: return new ::Ifc4x3::IfcPlate(data);
+ case 763: return new ::Ifc4x3::IfcPlateType(data);
+ case 764: return new ::Ifc4x3::IfcPlateTypeEnum(data);
+ case 765: return new ::Ifc4x3::IfcPoint(data);
+ case 766: return new ::Ifc4x3::IfcPointByDistanceExpression(data);
+ case 767: return new ::Ifc4x3::IfcPointOnCurve(data);
+ case 768: return new ::Ifc4x3::IfcPointOnSurface(data);
+ case 770: return new ::Ifc4x3::IfcPolygonalBoundedHalfSpace(data);
+ case 771: return new ::Ifc4x3::IfcPolygonalFaceSet(data);
+ case 772: return new ::Ifc4x3::IfcPolyline(data);
+ case 773: return new ::Ifc4x3::IfcPolyLoop(data);
+ case 774: return new ::Ifc4x3::IfcPolynomialCurve(data);
+ case 775: return new ::Ifc4x3::IfcPort(data);
+ case 776: return new ::Ifc4x3::IfcPositioningElement(data);
+ case 777: return new ::Ifc4x3::IfcPositiveInteger(data);
+ case 778: return new ::Ifc4x3::IfcPositiveLengthMeasure(data);
+ case 779: return new ::Ifc4x3::IfcPositivePlaneAngleMeasure(data);
+ case 780: return new ::Ifc4x3::IfcPositiveRatioMeasure(data);
+ case 781: return new ::Ifc4x3::IfcPostalAddress(data);
+ case 782: return new ::Ifc4x3::IfcPowerMeasure(data);
+ case 783: return new ::Ifc4x3::IfcPreDefinedColour(data);
+ case 784: return new ::Ifc4x3::IfcPreDefinedCurveFont(data);
+ case 785: return new ::Ifc4x3::IfcPreDefinedItem(data);
+ case 786: return new ::Ifc4x3::IfcPreDefinedProperties(data);
+ case 787: return new ::Ifc4x3::IfcPreDefinedPropertySet(data);
+ case 788: return new ::Ifc4x3::IfcPreDefinedTextFont(data);
+ case 789: return new ::Ifc4x3::IfcPreferredSurfaceCurveRepresentation(data);
+ case 790: return new ::Ifc4x3::IfcPresentableText(data);
+ case 791: return new ::Ifc4x3::IfcPresentationItem(data);
+ case 792: return new ::Ifc4x3::IfcPresentationLayerAssignment(data);
+ case 793: return new ::Ifc4x3::IfcPresentationLayerWithStyle(data);
+ case 794: return new ::Ifc4x3::IfcPresentationStyle(data);
+ case 795: return new ::Ifc4x3::IfcPressureMeasure(data);
+ case 796: return new ::Ifc4x3::IfcProcedure(data);
+ case 797: return new ::Ifc4x3::IfcProcedureType(data);
+ case 798: return new ::Ifc4x3::IfcProcedureTypeEnum(data);
+ case 799: return new ::Ifc4x3::IfcProcess(data);
+ case 801: return new ::Ifc4x3::IfcProduct(data);
+ case 802: return new ::Ifc4x3::IfcProductDefinitionShape(data);
+ case 803: return new ::Ifc4x3::IfcProductRepresentation(data);
+ case 806: return new ::Ifc4x3::IfcProfileDef(data);
+ case 807: return new ::Ifc4x3::IfcProfileProperties(data);
+ case 808: return new ::Ifc4x3::IfcProfileTypeEnum(data);
+ case 809: return new ::Ifc4x3::IfcProject(data);
+ case 810: return new ::Ifc4x3::IfcProjectedCRS(data);
+ case 811: return new ::Ifc4x3::IfcProjectedOrTrueLengthEnum(data);
+ case 812: return new ::Ifc4x3::IfcProjectionElement(data);
+ case 813: return new ::Ifc4x3::IfcProjectionElementTypeEnum(data);
+ case 814: return new ::Ifc4x3::IfcProjectLibrary(data);
+ case 815: return new ::Ifc4x3::IfcProjectOrder(data);
+ case 816: return new ::Ifc4x3::IfcProjectOrderTypeEnum(data);
+ case 817: return new ::Ifc4x3::IfcProperty(data);
+ case 818: return new ::Ifc4x3::IfcPropertyAbstraction(data);
+ case 819: return new ::Ifc4x3::IfcPropertyBoundedValue(data);
+ case 820: return new ::Ifc4x3::IfcPropertyDefinition(data);
+ case 821: return new ::Ifc4x3::IfcPropertyDependencyRelationship(data);
+ case 822: return new ::Ifc4x3::IfcPropertyEnumeratedValue(data);
+ case 823: return new ::Ifc4x3::IfcPropertyEnumeration(data);
+ case 824: return new ::Ifc4x3::IfcPropertyListValue(data);
+ case 825: return new ::Ifc4x3::IfcPropertyReferenceValue(data);
+ case 826: return new ::Ifc4x3::IfcPropertySet(data);
+ case 827: return new ::Ifc4x3::IfcPropertySetDefinition(data);
+ case 829: return new ::Ifc4x3::IfcPropertySetDefinitionSet(data);
+ case 830: return new ::Ifc4x3::IfcPropertySetTemplate(data);
+ case 831: return new ::Ifc4x3::IfcPropertySetTemplateTypeEnum(data);
+ case 832: return new ::Ifc4x3::IfcPropertySingleValue(data);
+ case 833: return new ::Ifc4x3::IfcPropertyTableValue(data);
+ case 834: return new ::Ifc4x3::IfcPropertyTemplate(data);
+ case 835: return new ::Ifc4x3::IfcPropertyTemplateDefinition(data);
+ case 836: return new ::Ifc4x3::IfcProtectiveDevice(data);
+ case 837: return new ::Ifc4x3::IfcProtectiveDeviceTrippingUnit(data);
+ case 838: return new ::Ifc4x3::IfcProtectiveDeviceTrippingUnitType(data);
+ case 839: return new ::Ifc4x3::IfcProtectiveDeviceTrippingUnitTypeEnum(data);
+ case 840: return new ::Ifc4x3::IfcProtectiveDeviceType(data);
+ case 841: return new ::Ifc4x3::IfcProtectiveDeviceTypeEnum(data);
+ case 842: return new ::Ifc4x3::IfcPump(data);
+ case 843: return new ::Ifc4x3::IfcPumpType(data);
+ case 844: return new ::Ifc4x3::IfcPumpTypeEnum(data);
+ case 845: return new ::Ifc4x3::IfcQuantityArea(data);
+ case 846: return new ::Ifc4x3::IfcQuantityCount(data);
+ case 847: return new ::Ifc4x3::IfcQuantityLength(data);
+ case 848: return new ::Ifc4x3::IfcQuantityNumber(data);
+ case 849: return new ::Ifc4x3::IfcQuantitySet(data);
+ case 850: return new ::Ifc4x3::IfcQuantityTime(data);
+ case 851: return new ::Ifc4x3::IfcQuantityVolume(data);
+ case 852: return new ::Ifc4x3::IfcQuantityWeight(data);
+ case 853: return new ::Ifc4x3::IfcRadioActivityMeasure(data);
+ case 854: return new ::Ifc4x3::IfcRail(data);
+ case 855: return new ::Ifc4x3::IfcRailing(data);
+ case 856: return new ::Ifc4x3::IfcRailingType(data);
+ case 857: return new ::Ifc4x3::IfcRailingTypeEnum(data);
+ case 858: return new ::Ifc4x3::IfcRailType(data);
+ case 859: return new ::Ifc4x3::IfcRailTypeEnum(data);
+ case 860: return new ::Ifc4x3::IfcRailway(data);
+ case 861: return new ::Ifc4x3::IfcRailwayPart(data);
+ case 862: return new ::Ifc4x3::IfcRailwayPartTypeEnum(data);
+ case 863: return new ::Ifc4x3::IfcRailwayTypeEnum(data);
+ case 864: return new ::Ifc4x3::IfcRamp(data);
+ case 865: return new ::Ifc4x3::IfcRampFlight(data);
+ case 866: return new ::Ifc4x3::IfcRampFlightType(data);
+ case 867: return new ::Ifc4x3::IfcRampFlightTypeEnum(data);
+ case 868: return new ::Ifc4x3::IfcRampType(data);
+ case 869: return new ::Ifc4x3::IfcRampTypeEnum(data);
+ case 870: return new ::Ifc4x3::IfcRatioMeasure(data);
+ case 871: return new ::Ifc4x3::IfcRationalBSplineCurveWithKnots(data);
+ case 872: return new ::Ifc4x3::IfcRationalBSplineSurfaceWithKnots(data);
+ case 873: return new ::Ifc4x3::IfcReal(data);
+ case 874: return new ::Ifc4x3::IfcRectangleHollowProfileDef(data);
+ case 875: return new ::Ifc4x3::IfcRectangleProfileDef(data);
+ case 876: return new ::Ifc4x3::IfcRectangularPyramid(data);
+ case 877: return new ::Ifc4x3::IfcRectangularTrimmedSurface(data);
+ case 878: return new ::Ifc4x3::IfcRecurrencePattern(data);
+ case 879: return new ::Ifc4x3::IfcRecurrenceTypeEnum(data);
+ case 880: return new ::Ifc4x3::IfcReference(data);
+ case 881: return new ::Ifc4x3::IfcReferent(data);
+ case 882: return new ::Ifc4x3::IfcReferentTypeEnum(data);
+ case 883: return new ::Ifc4x3::IfcReflectanceMethodEnum(data);
+ case 884: return new ::Ifc4x3::IfcRegularTimeSeries(data);
+ case 885: return new ::Ifc4x3::IfcReinforcedSoil(data);
+ case 886: return new ::Ifc4x3::IfcReinforcedSoilTypeEnum(data);
+ case 887: return new ::Ifc4x3::IfcReinforcementBarProperties(data);
+ case 888: return new ::Ifc4x3::IfcReinforcementDefinitionProperties(data);
+ case 889: return new ::Ifc4x3::IfcReinforcingBar(data);
+ case 890: return new ::Ifc4x3::IfcReinforcingBarRoleEnum(data);
+ case 891: return new ::Ifc4x3::IfcReinforcingBarSurfaceEnum(data);
+ case 892: return new ::Ifc4x3::IfcReinforcingBarType(data);
+ case 893: return new ::Ifc4x3::IfcReinforcingBarTypeEnum(data);
+ case 894: return new ::Ifc4x3::IfcReinforcingElement(data);
+ case 895: return new ::Ifc4x3::IfcReinforcingElementType(data);
+ case 896: return new ::Ifc4x3::IfcReinforcingMesh(data);
+ case 897: return new ::Ifc4x3::IfcReinforcingMeshType(data);
+ case 898: return new ::Ifc4x3::IfcReinforcingMeshTypeEnum(data);
+ case 899: return new ::Ifc4x3::IfcRelAdheresToElement(data);
+ case 900: return new ::Ifc4x3::IfcRelAggregates(data);
+ case 901: return new ::Ifc4x3::IfcRelAssigns(data);
+ case 902: return new ::Ifc4x3::IfcRelAssignsToActor(data);
+ case 903: return new ::Ifc4x3::IfcRelAssignsToControl(data);
+ case 904: return new ::Ifc4x3::IfcRelAssignsToGroup(data);
+ case 905: return new ::Ifc4x3::IfcRelAssignsToGroupByFactor(data);
+ case 906: return new ::Ifc4x3::IfcRelAssignsToProcess(data);
+ case 907: return new ::Ifc4x3::IfcRelAssignsToProduct(data);
+ case 908: return new ::Ifc4x3::IfcRelAssignsToResource(data);
+ case 909: return new ::Ifc4x3::IfcRelAssociates(data);
+ case 910: return new ::Ifc4x3::IfcRelAssociatesApproval(data);
+ case 911: return new ::Ifc4x3::IfcRelAssociatesClassification(data);
+ case 912: return new ::Ifc4x3::IfcRelAssociatesConstraint(data);
+ case 913: return new ::Ifc4x3::IfcRelAssociatesDocument(data);
+ case 914: return new ::Ifc4x3::IfcRelAssociatesLibrary(data);
+ case 915: return new ::Ifc4x3::IfcRelAssociatesMaterial(data);
+ case 916: return new ::Ifc4x3::IfcRelAssociatesProfileDef(data);
+ case 917: return new ::Ifc4x3::IfcRelationship(data);
+ case 918: return new ::Ifc4x3::IfcRelConnects(data);
+ case 919: return new ::Ifc4x3::IfcRelConnectsElements(data);
+ case 920: return new ::Ifc4x3::IfcRelConnectsPathElements(data);
+ case 921: return new ::Ifc4x3::IfcRelConnectsPorts(data);
+ case 922: return new ::Ifc4x3::IfcRelConnectsPortToElement(data);
+ case 923: return new ::Ifc4x3::IfcRelConnectsStructuralActivity(data);
+ case 924: return new ::Ifc4x3::IfcRelConnectsStructuralMember(data);
+ case 925: return new ::Ifc4x3::IfcRelConnectsWithEccentricity(data);
+ case 926: return new ::Ifc4x3::IfcRelConnectsWithRealizingElements(data);
+ case 927: return new ::Ifc4x3::IfcRelContainedInSpatialStructure(data);
+ case 928: return new ::Ifc4x3::IfcRelCoversBldgElements(data);
+ case 929: return new ::Ifc4x3::IfcRelCoversSpaces(data);
+ case 930: return new ::Ifc4x3::IfcRelDeclares(data);
+ case 931: return new ::Ifc4x3::IfcRelDecomposes(data);
+ case 932: return new ::Ifc4x3::IfcRelDefines(data);
+ case 933: return new ::Ifc4x3::IfcRelDefinesByObject(data);
+ case 934: return new ::Ifc4x3::IfcRelDefinesByProperties(data);
+ case 935: return new ::Ifc4x3::IfcRelDefinesByTemplate(data);
+ case 936: return new ::Ifc4x3::IfcRelDefinesByType(data);
+ case 937: return new ::Ifc4x3::IfcRelFillsElement(data);
+ case 938: return new ::Ifc4x3::IfcRelFlowControlElements(data);
+ case 939: return new ::Ifc4x3::IfcRelInterferesElements(data);
+ case 940: return new ::Ifc4x3::IfcRelNests(data);
+ case 941: return new ::Ifc4x3::IfcRelPositions(data);
+ case 942: return new ::Ifc4x3::IfcRelProjectsElement(data);
+ case 943: return new ::Ifc4x3::IfcRelReferencedInSpatialStructure(data);
+ case 944: return new ::Ifc4x3::IfcRelSequence(data);
+ case 945: return new ::Ifc4x3::IfcRelServicesBuildings(data);
+ case 946: return new ::Ifc4x3::IfcRelSpaceBoundary(data);
+ case 947: return new ::Ifc4x3::IfcRelSpaceBoundary1stLevel(data);
+ case 948: return new ::Ifc4x3::IfcRelSpaceBoundary2ndLevel(data);
+ case 949: return new ::Ifc4x3::IfcRelVoidsElement(data);
+ case 950: return new ::Ifc4x3::IfcReparametrisedCompositeCurveSegment(data);
+ case 951: return new ::Ifc4x3::IfcRepresentation(data);
+ case 952: return new ::Ifc4x3::IfcRepresentationContext(data);
+ case 953: return new ::Ifc4x3::IfcRepresentationItem(data);
+ case 954: return new ::Ifc4x3::IfcRepresentationMap(data);
+ case 955: return new ::Ifc4x3::IfcResource(data);
+ case 956: return new ::Ifc4x3::IfcResourceApprovalRelationship(data);
+ case 957: return new ::Ifc4x3::IfcResourceConstraintRelationship(data);
+ case 958: return new ::Ifc4x3::IfcResourceLevelRelationship(data);
+ case 961: return new ::Ifc4x3::IfcResourceTime(data);
+ case 962: return new ::Ifc4x3::IfcRevolvedAreaSolid(data);
+ case 963: return new ::Ifc4x3::IfcRevolvedAreaSolidTapered(data);
+ case 964: return new ::Ifc4x3::IfcRightCircularCone(data);
+ case 965: return new ::Ifc4x3::IfcRightCircularCylinder(data);
+ case 966: return new ::Ifc4x3::IfcRoad(data);
+ case 967: return new ::Ifc4x3::IfcRoadPart(data);
+ case 968: return new ::Ifc4x3::IfcRoadPartTypeEnum(data);
+ case 969: return new ::Ifc4x3::IfcRoadTypeEnum(data);
+ case 970: return new ::Ifc4x3::IfcRoleEnum(data);
+ case 971: return new ::Ifc4x3::IfcRoof(data);
+ case 972: return new ::Ifc4x3::IfcRoofType(data);
+ case 973: return new ::Ifc4x3::IfcRoofTypeEnum(data);
+ case 974: return new ::Ifc4x3::IfcRoot(data);
+ case 975: return new ::Ifc4x3::IfcRotationalFrequencyMeasure(data);
+ case 976: return new ::Ifc4x3::IfcRotationalMassMeasure(data);
+ case 977: return new ::Ifc4x3::IfcRotationalStiffnessMeasure(data);
+ case 979: return new ::Ifc4x3::IfcRoundedRectangleProfileDef(data);
+ case 980: return new ::Ifc4x3::IfcSanitaryTerminal(data);
+ case 981: return new ::Ifc4x3::IfcSanitaryTerminalType(data);
+ case 982: return new ::Ifc4x3::IfcSanitaryTerminalTypeEnum(data);
+ case 983: return new ::Ifc4x3::IfcSchedulingTime(data);
+ case 984: return new ::Ifc4x3::IfcSeamCurve(data);
+ case 985: return new ::Ifc4x3::IfcSecondOrderPolynomialSpiral(data);
+ case 986: return new ::Ifc4x3::IfcSectionalAreaIntegralMeasure(data);
+ case 987: return new ::Ifc4x3::IfcSectionedSolid(data);
+ case 988: return new ::Ifc4x3::IfcSectionedSolidHorizontal(data);
+ case 989: return new ::Ifc4x3::IfcSectionedSpine(data);
+ case 990: return new ::Ifc4x3::IfcSectionedSurface(data);
+ case 991: return new ::Ifc4x3::IfcSectionModulusMeasure(data);
+ case 992: return new ::Ifc4x3::IfcSectionProperties(data);
+ case 993: return new ::Ifc4x3::IfcSectionReinforcementProperties(data);
+ case 994: return new ::Ifc4x3::IfcSectionTypeEnum(data);
+ case 995: return new ::Ifc4x3::IfcSegment(data);
+ case 996: return new ::Ifc4x3::IfcSegmentedReferenceCurve(data);
+ case 998: return new ::Ifc4x3::IfcSensor(data);
+ case 999: return new ::Ifc4x3::IfcSensorType(data);
+ case 1000: return new ::Ifc4x3::IfcSensorTypeEnum(data);
+ case 1001: return new ::Ifc4x3::IfcSequenceEnum(data);
+ case 1002: return new ::Ifc4x3::IfcSeventhOrderPolynomialSpiral(data);
+ case 1003: return new ::Ifc4x3::IfcShadingDevice(data);
+ case 1004: return new ::Ifc4x3::IfcShadingDeviceType(data);
+ case 1005: return new ::Ifc4x3::IfcShadingDeviceTypeEnum(data);
+ case 1006: return new ::Ifc4x3::IfcShapeAspect(data);
+ case 1007: return new ::Ifc4x3::IfcShapeModel(data);
+ case 1008: return new ::Ifc4x3::IfcShapeRepresentation(data);
+ case 1009: return new ::Ifc4x3::IfcShearModulusMeasure(data);
+ case 1011: return new ::Ifc4x3::IfcShellBasedSurfaceModel(data);
+ case 1012: return new ::Ifc4x3::IfcSign(data);
+ case 1013: return new ::Ifc4x3::IfcSignal(data);
+ case 1014: return new ::Ifc4x3::IfcSignalType(data);
+ case 1015: return new ::Ifc4x3::IfcSignalTypeEnum(data);
+ case 1016: return new ::Ifc4x3::IfcSignType(data);
+ case 1017: return new ::Ifc4x3::IfcSignTypeEnum(data);
+ case 1018: return new ::Ifc4x3::IfcSimpleProperty(data);
+ case 1019: return new ::Ifc4x3::IfcSimplePropertyTemplate(data);
+ case 1020: return new ::Ifc4x3::IfcSimplePropertyTemplateTypeEnum(data);
+ case 1022: return new ::Ifc4x3::IfcSineSpiral(data);
+ case 1023: return new ::Ifc4x3::IfcSIPrefix(data);
+ case 1024: return new ::Ifc4x3::IfcSite(data);
+ case 1025: return new ::Ifc4x3::IfcSIUnit(data);
+ case 1026: return new ::Ifc4x3::IfcSIUnitName(data);
+ case 1028: return new ::Ifc4x3::IfcSlab(data);
+ case 1029: return new ::Ifc4x3::IfcSlabType(data);
+ case 1030: return new ::Ifc4x3::IfcSlabTypeEnum(data);
+ case 1031: return new ::Ifc4x3::IfcSlippageConnectionCondition(data);
+ case 1032: return new ::Ifc4x3::IfcSolarDevice(data);
+ case 1033: return new ::Ifc4x3::IfcSolarDeviceType(data);
+ case 1034: return new ::Ifc4x3::IfcSolarDeviceTypeEnum(data);
+ case 1035: return new ::Ifc4x3::IfcSolidAngleMeasure(data);
+ case 1036: return new ::Ifc4x3::IfcSolidModel(data);
+ case 1038: return new ::Ifc4x3::IfcSoundPowerLevelMeasure(data);
+ case 1039: return new ::Ifc4x3::IfcSoundPowerMeasure(data);
+ case 1040: return new ::Ifc4x3::IfcSoundPressureLevelMeasure(data);
+ case 1041: return new ::Ifc4x3::IfcSoundPressureMeasure(data);
+ case 1042: return new ::Ifc4x3::IfcSpace(data);
+ case 1044: return new ::Ifc4x3::IfcSpaceHeater(data);
+ case 1045: return new ::Ifc4x3::IfcSpaceHeaterType(data);
+ case 1046: return new ::Ifc4x3::IfcSpaceHeaterTypeEnum(data);
+ case 1047: return new ::Ifc4x3::IfcSpaceType(data);
+ case 1048: return new ::Ifc4x3::IfcSpaceTypeEnum(data);
+ case 1049: return new ::Ifc4x3::IfcSpatialElement(data);
+ case 1050: return new ::Ifc4x3::IfcSpatialElementType(data);
+ case 1052: return new ::Ifc4x3::IfcSpatialStructureElement(data);
+ case 1053: return new ::Ifc4x3::IfcSpatialStructureElementType(data);
+ case 1054: return new ::Ifc4x3::IfcSpatialZone(data);
+ case 1055: return new ::Ifc4x3::IfcSpatialZoneType(data);
+ case 1056: return new ::Ifc4x3::IfcSpatialZoneTypeEnum(data);
+ case 1057: return new ::Ifc4x3::IfcSpecificHeatCapacityMeasure(data);
+ case 1058: return new ::Ifc4x3::IfcSpecularExponent(data);
+ case 1060: return new ::Ifc4x3::IfcSpecularRoughness(data);
+ case 1061: return new ::Ifc4x3::IfcSphere(data);
+ case 1062: return new ::Ifc4x3::IfcSphericalSurface(data);
+ case 1063: return new ::Ifc4x3::IfcSpiral(data);
+ case 1064: return new ::Ifc4x3::IfcStackTerminal(data);
+ case 1065: return new ::Ifc4x3::IfcStackTerminalType(data);
+ case 1066: return new ::Ifc4x3::IfcStackTerminalTypeEnum(data);
+ case 1067: return new ::Ifc4x3::IfcStair(data);
+ case 1068: return new ::Ifc4x3::IfcStairFlight(data);
+ case 1069: return new ::Ifc4x3::IfcStairFlightType(data);
+ case 1070: return new ::Ifc4x3::IfcStairFlightTypeEnum(data);
+ case 1071: return new ::Ifc4x3::IfcStairType(data);
+ case 1072: return new ::Ifc4x3::IfcStairTypeEnum(data);
+ case 1073: return new ::Ifc4x3::IfcStateEnum(data);
+ case 1074: return new ::Ifc4x3::IfcStructuralAction(data);
+ case 1075: return new ::Ifc4x3::IfcStructuralActivity(data);
+ case 1077: return new ::Ifc4x3::IfcStructuralAnalysisModel(data);
+ case 1078: return new ::Ifc4x3::IfcStructuralConnection(data);
+ case 1079: return new ::Ifc4x3::IfcStructuralConnectionCondition(data);
+ case 1080: return new ::Ifc4x3::IfcStructuralCurveAction(data);
+ case 1081: return new ::Ifc4x3::IfcStructuralCurveActivityTypeEnum(data);
+ case 1082: return new ::Ifc4x3::IfcStructuralCurveConnection(data);
+ case 1083: return new ::Ifc4x3::IfcStructuralCurveMember(data);
+ case 1084: return new ::Ifc4x3::IfcStructuralCurveMemberTypeEnum(data);
+ case 1085: return new ::Ifc4x3::IfcStructuralCurveMemberVarying(data);
+ case 1086: return new ::Ifc4x3::IfcStructuralCurveReaction(data);
+ case 1087: return new ::Ifc4x3::IfcStructuralItem(data);
+ case 1088: return new ::Ifc4x3::IfcStructuralLinearAction(data);
+ case 1089: return new ::Ifc4x3::IfcStructuralLoad(data);
+ case 1090: return new ::Ifc4x3::IfcStructuralLoadCase(data);
+ case 1091: return new ::Ifc4x3::IfcStructuralLoadConfiguration(data);
+ case 1092: return new ::Ifc4x3::IfcStructuralLoadGroup(data);
+ case 1093: return new ::Ifc4x3::IfcStructuralLoadLinearForce(data);
+ case 1094: return new ::Ifc4x3::IfcStructuralLoadOrResult(data);
+ case 1095: return new ::Ifc4x3::IfcStructuralLoadPlanarForce(data);
+ case 1096: return new ::Ifc4x3::IfcStructuralLoadSingleDisplacement(data);
+ case 1097: return new ::Ifc4x3::IfcStructuralLoadSingleDisplacementDistortion(data);
+ case 1098: return new ::Ifc4x3::IfcStructuralLoadSingleForce(data);
+ case 1099: return new ::Ifc4x3::IfcStructuralLoadSingleForceWarping(data);
+ case 1100: return new ::Ifc4x3::IfcStructuralLoadStatic(data);
+ case 1101: return new ::Ifc4x3::IfcStructuralLoadTemperature(data);
+ case 1102: return new ::Ifc4x3::IfcStructuralMember(data);
+ case 1103: return new ::Ifc4x3::IfcStructuralPlanarAction(data);
+ case 1104: return new ::Ifc4x3::IfcStructuralPointAction(data);
+ case 1105: return new ::Ifc4x3::IfcStructuralPointConnection(data);
+ case 1106: return new ::Ifc4x3::IfcStructuralPointReaction(data);
+ case 1107: return new ::Ifc4x3::IfcStructuralReaction(data);
+ case 1108: return new ::Ifc4x3::IfcStructuralResultGroup(data);
+ case 1109: return new ::Ifc4x3::IfcStructuralSurfaceAction(data);
+ case 1110: return new ::Ifc4x3::IfcStructuralSurfaceActivityTypeEnum(data);
+ case 1111: return new ::Ifc4x3::IfcStructuralSurfaceConnection(data);
+ case 1112: return new ::Ifc4x3::IfcStructuralSurfaceMember(data);
+ case 1113: return new ::Ifc4x3::IfcStructuralSurfaceMemberTypeEnum(data);
+ case 1114: return new ::Ifc4x3::IfcStructuralSurfaceMemberVarying(data);
+ case 1115: return new ::Ifc4x3::IfcStructuralSurfaceReaction(data);
+ case 1116: return new ::Ifc4x3::IfcStyledItem(data);
+ case 1117: return new ::Ifc4x3::IfcStyledRepresentation(data);
+ case 1118: return new ::Ifc4x3::IfcStyleModel(data);
+ case 1119: return new ::Ifc4x3::IfcSubContractResource(data);
+ case 1120: return new ::Ifc4x3::IfcSubContractResourceType(data);
+ case 1121: return new ::Ifc4x3::IfcSubContractResourceTypeEnum(data);
+ case 1122: return new ::Ifc4x3::IfcSubedge(data);
+ case 1123: return new ::Ifc4x3::IfcSurface(data);
+ case 1124: return new ::Ifc4x3::IfcSurfaceCurve(data);
+ case 1125: return new ::Ifc4x3::IfcSurfaceCurveSweptAreaSolid(data);
+ case 1126: return new ::Ifc4x3::IfcSurfaceFeature(data);
+ case 1127: return new ::Ifc4x3::IfcSurfaceFeatureTypeEnum(data);
+ case 1128: return new ::Ifc4x3::IfcSurfaceOfLinearExtrusion(data);
+ case 1129: return new ::Ifc4x3::IfcSurfaceOfRevolution(data);
+ case 1131: return new ::Ifc4x3::IfcSurfaceReinforcementArea(data);
+ case 1132: return new ::Ifc4x3::IfcSurfaceSide(data);
+ case 1133: return new ::Ifc4x3::IfcSurfaceStyle(data);
+ case 1135: return new ::Ifc4x3::IfcSurfaceStyleLighting(data);
+ case 1136: return new ::Ifc4x3::IfcSurfaceStyleRefraction(data);
+ case 1137: return new ::Ifc4x3::IfcSurfaceStyleRendering(data);
+ case 1138: return new ::Ifc4x3::IfcSurfaceStyleShading(data);
+ case 1139: return new ::Ifc4x3::IfcSurfaceStyleWithTextures(data);
+ case 1140: return new ::Ifc4x3::IfcSurfaceTexture(data);
+ case 1141: return new ::Ifc4x3::IfcSweptAreaSolid(data);
+ case 1142: return new ::Ifc4x3::IfcSweptDiskSolid(data);
+ case 1143: return new ::Ifc4x3::IfcSweptDiskSolidPolygonal(data);
+ case 1144: return new ::Ifc4x3::IfcSweptSurface(data);
+ case 1145: return new ::Ifc4x3::IfcSwitchingDevice(data);
+ case 1146: return new ::Ifc4x3::IfcSwitchingDeviceType(data);
+ case 1147: return new ::Ifc4x3::IfcSwitchingDeviceTypeEnum(data);
+ case 1148: return new ::Ifc4x3::IfcSystem(data);
+ case 1149: return new ::Ifc4x3::IfcSystemFurnitureElement(data);
+ case 1150: return new ::Ifc4x3::IfcSystemFurnitureElementType(data);
+ case 1151: return new ::Ifc4x3::IfcSystemFurnitureElementTypeEnum(data);
+ case 1152: return new ::Ifc4x3::IfcTable(data);
+ case 1153: return new ::Ifc4x3::IfcTableColumn(data);
+ case 1154: return new ::Ifc4x3::IfcTableRow(data);
+ case 1155: return new ::Ifc4x3::IfcTank(data);
+ case 1156: return new ::Ifc4x3::IfcTankType(data);
+ case 1157: return new ::Ifc4x3::IfcTankTypeEnum(data);
+ case 1158: return new ::Ifc4x3::IfcTask(data);
+ case 1159: return new ::Ifc4x3::IfcTaskDurationEnum(data);
+ case 1160: return new ::Ifc4x3::IfcTaskTime(data);
+ case 1161: return new ::Ifc4x3::IfcTaskTimeRecurring(data);
+ case 1162: return new ::Ifc4x3::IfcTaskType(data);
+ case 1163: return new ::Ifc4x3::IfcTaskTypeEnum(data);
+ case 1164: return new ::Ifc4x3::IfcTelecomAddress(data);
+ case 1165: return new ::Ifc4x3::IfcTemperatureGradientMeasure(data);
+ case 1166: return new ::Ifc4x3::IfcTemperatureRateOfChangeMeasure(data);
+ case 1167: return new ::Ifc4x3::IfcTendon(data);
+ case 1168: return new ::Ifc4x3::IfcTendonAnchor(data);
+ case 1169: return new ::Ifc4x3::IfcTendonAnchorType(data);
+ case 1170: return new ::Ifc4x3::IfcTendonAnchorTypeEnum(data);
+ case 1171: return new ::Ifc4x3::IfcTendonConduit(data);
+ case 1172: return new ::Ifc4x3::IfcTendonConduitType(data);
+ case 1173: return new ::Ifc4x3::IfcTendonConduitTypeEnum(data);
+ case 1174: return new ::Ifc4x3::IfcTendonType(data);
+ case 1175: return new ::Ifc4x3::IfcTendonTypeEnum(data);
+ case 1176: return new ::Ifc4x3::IfcTessellatedFaceSet(data);
+ case 1177: return new ::Ifc4x3::IfcTessellatedItem(data);
+ case 1178: return new ::Ifc4x3::IfcText(data);
+ case 1179: return new ::Ifc4x3::IfcTextAlignment(data);
+ case 1180: return new ::Ifc4x3::IfcTextDecoration(data);
+ case 1181: return new ::Ifc4x3::IfcTextFontName(data);
+ case 1183: return new ::Ifc4x3::IfcTextLiteral(data);
+ case 1184: return new ::Ifc4x3::IfcTextLiteralWithExtent(data);
+ case 1185: return new ::Ifc4x3::IfcTextPath(data);
+ case 1186: return new ::Ifc4x3::IfcTextStyle(data);
+ case 1187: return new ::Ifc4x3::IfcTextStyleFontModel(data);
+ case 1188: return new ::Ifc4x3::IfcTextStyleForDefinedFont(data);
+ case 1189: return new ::Ifc4x3::IfcTextStyleTextModel(data);
+ case 1190: return new ::Ifc4x3::IfcTextTransformation(data);
+ case 1191: return new ::Ifc4x3::IfcTextureCoordinate(data);
+ case 1192: return new ::Ifc4x3::IfcTextureCoordinateGenerator(data);
+ case 1193: return new ::Ifc4x3::IfcTextureCoordinateIndices(data);
+ case 1194: return new ::Ifc4x3::IfcTextureCoordinateIndicesWithVoids(data);
+ case 1195: return new ::Ifc4x3::IfcTextureMap(data);
+ case 1196: return new ::Ifc4x3::IfcTextureVertex(data);
+ case 1197: return new ::Ifc4x3::IfcTextureVertexList(data);
+ case 1198: return new ::Ifc4x3::IfcThermalAdmittanceMeasure(data);
+ case 1199: return new ::Ifc4x3::IfcThermalConductivityMeasure(data);
+ case 1200: return new ::Ifc4x3::IfcThermalExpansionCoefficientMeasure(data);
+ case 1201: return new ::Ifc4x3::IfcThermalResistanceMeasure(data);
+ case 1202: return new ::Ifc4x3::IfcThermalTransmittanceMeasure(data);
+ case 1203: return new ::Ifc4x3::IfcThermodynamicTemperatureMeasure(data);
+ case 1204: return new ::Ifc4x3::IfcThirdOrderPolynomialSpiral(data);
+ case 1205: return new ::Ifc4x3::IfcTime(data);
+ case 1206: return new ::Ifc4x3::IfcTimeMeasure(data);
+ case 1208: return new ::Ifc4x3::IfcTimePeriod(data);
+ case 1209: return new ::Ifc4x3::IfcTimeSeries(data);
+ case 1210: return new ::Ifc4x3::IfcTimeSeriesDataTypeEnum(data);
+ case 1211: return new ::Ifc4x3::IfcTimeSeriesValue(data);
+ case 1212: return new ::Ifc4x3::IfcTimeStamp(data);
+ case 1213: return new ::Ifc4x3::IfcTopologicalRepresentationItem(data);
+ case 1214: return new ::Ifc4x3::IfcTopologyRepresentation(data);
+ case 1215: return new ::Ifc4x3::IfcToroidalSurface(data);
+ case 1216: return new ::Ifc4x3::IfcTorqueMeasure(data);
+ case 1217: return new ::Ifc4x3::IfcTrackElement(data);
+ case 1218: return new ::Ifc4x3::IfcTrackElementType(data);
+ case 1219: return new ::Ifc4x3::IfcTrackElementTypeEnum(data);
+ case 1220: return new ::Ifc4x3::IfcTransformer(data);
+ case 1221: return new ::Ifc4x3::IfcTransformerType(data);
+ case 1222: return new ::Ifc4x3::IfcTransformerTypeEnum(data);
+ case 1223: return new ::Ifc4x3::IfcTransitionCode(data);
+ case 1225: return new ::Ifc4x3::IfcTransportationDevice(data);
+ case 1226: return new ::Ifc4x3::IfcTransportationDeviceType(data);
+ case 1227: return new ::Ifc4x3::IfcTransportElement(data);
+ case 1228: return new ::Ifc4x3::IfcTransportElementType(data);
+ case 1229: return new ::Ifc4x3::IfcTransportElementTypeEnum(data);
+ case 1230: return new ::Ifc4x3::IfcTrapeziumProfileDef(data);
+ case 1231: return new ::Ifc4x3::IfcTriangulatedFaceSet(data);
+ case 1232: return new ::Ifc4x3::IfcTriangulatedIrregularNetwork(data);
+ case 1233: return new ::Ifc4x3::IfcTrimmedCurve(data);
+ case 1234: return new ::Ifc4x3::IfcTrimmingPreference(data);
+ case 1236: return new ::Ifc4x3::IfcTShapeProfileDef(data);
+ case 1237: return new ::Ifc4x3::IfcTubeBundle(data);
+ case 1238: return new ::Ifc4x3::IfcTubeBundleType(data);
+ case 1239: return new ::Ifc4x3::IfcTubeBundleTypeEnum(data);
+ case 1240: return new ::Ifc4x3::IfcTypeObject(data);
+ case 1241: return new ::Ifc4x3::IfcTypeProcess(data);
+ case 1242: return new ::Ifc4x3::IfcTypeProduct(data);
+ case 1243: return new ::Ifc4x3::IfcTypeResource(data);
+ case 1245: return new ::Ifc4x3::IfcUnitaryControlElement(data);
+ case 1246: return new ::Ifc4x3::IfcUnitaryControlElementType(data);
+ case 1247: return new ::Ifc4x3::IfcUnitaryControlElementTypeEnum(data);
+ case 1248: return new ::Ifc4x3::IfcUnitaryEquipment(data);
+ case 1249: return new ::Ifc4x3::IfcUnitaryEquipmentType(data);
+ case 1250: return new ::Ifc4x3::IfcUnitaryEquipmentTypeEnum(data);
+ case 1251: return new ::Ifc4x3::IfcUnitAssignment(data);
+ case 1252: return new ::Ifc4x3::IfcUnitEnum(data);
+ case 1253: return new ::Ifc4x3::IfcURIReference(data);
+ case 1254: return new ::Ifc4x3::IfcUShapeProfileDef(data);
+ case 1256: return new ::Ifc4x3::IfcValve(data);
+ case 1257: return new ::Ifc4x3::IfcValveType(data);
+ case 1258: return new ::Ifc4x3::IfcValveTypeEnum(data);
+ case 1259: return new ::Ifc4x3::IfcVaporPermeabilityMeasure(data);
+ case 1260: return new ::Ifc4x3::IfcVector(data);
+ case 1262: return new ::Ifc4x3::IfcVehicle(data);
+ case 1263: return new ::Ifc4x3::IfcVehicleType(data);
+ case 1264: return new ::Ifc4x3::IfcVehicleTypeEnum(data);
+ case 1265: return new ::Ifc4x3::IfcVertex(data);
+ case 1266: return new ::Ifc4x3::IfcVertexLoop(data);
+ case 1267: return new ::Ifc4x3::IfcVertexPoint(data);
+ case 1268: return new ::Ifc4x3::IfcVibrationDamper(data);
+ case 1269: return new ::Ifc4x3::IfcVibrationDamperType(data);
+ case 1270: return new ::Ifc4x3::IfcVibrationDamperTypeEnum(data);
+ case 1271: return new ::Ifc4x3::IfcVibrationIsolator(data);
+ case 1272: return new ::Ifc4x3::IfcVibrationIsolatorType(data);
+ case 1273: return new ::Ifc4x3::IfcVibrationIsolatorTypeEnum(data);
+ case 1274: return new ::Ifc4x3::IfcVirtualElement(data);
+ case 1275: return new ::Ifc4x3::IfcVirtualElementTypeEnum(data);
+ case 1276: return new ::Ifc4x3::IfcVirtualGridIntersection(data);
+ case 1277: return new ::Ifc4x3::IfcVoidingFeature(data);
+ case 1278: return new ::Ifc4x3::IfcVoidingFeatureTypeEnum(data);
+ case 1279: return new ::Ifc4x3::IfcVolumeMeasure(data);
+ case 1280: return new ::Ifc4x3::IfcVolumetricFlowRateMeasure(data);
+ case 1281: return new ::Ifc4x3::IfcWall(data);
+ case 1282: return new ::Ifc4x3::IfcWallStandardCase(data);
+ case 1283: return new ::Ifc4x3::IfcWallType(data);
+ case 1284: return new ::Ifc4x3::IfcWallTypeEnum(data);
+ case 1285: return new ::Ifc4x3::IfcWarpingConstantMeasure(data);
+ case 1286: return new ::Ifc4x3::IfcWarpingMomentMeasure(data);
+ case 1288: return new ::Ifc4x3::IfcWasteTerminal(data);
+ case 1289: return new ::Ifc4x3::IfcWasteTerminalType(data);
+ case 1290: return new ::Ifc4x3::IfcWasteTerminalTypeEnum(data);
+ case 1291: return new ::Ifc4x3::IfcWindow(data);
+ case 1292: return new ::Ifc4x3::IfcWindowLiningProperties(data);
+ case 1293: return new ::Ifc4x3::IfcWindowPanelOperationEnum(data);
+ case 1294: return new ::Ifc4x3::IfcWindowPanelPositionEnum(data);
+ case 1295: return new ::Ifc4x3::IfcWindowPanelProperties(data);
+ case 1296: return new ::Ifc4x3::IfcWindowStyleConstructionEnum(data);
+ case 1297: return new ::Ifc4x3::IfcWindowStyleOperationEnum(data);
+ case 1298: return new ::Ifc4x3::IfcWindowType(data);
+ case 1299: return new ::Ifc4x3::IfcWindowTypeEnum(data);
+ case 1300: return new ::Ifc4x3::IfcWindowTypePartitioningEnum(data);
+ case 1301: return new ::Ifc4x3::IfcWorkCalendar(data);
+ case 1302: return new ::Ifc4x3::IfcWorkCalendarTypeEnum(data);
+ case 1303: return new ::Ifc4x3::IfcWorkControl(data);
+ case 1304: return new ::Ifc4x3::IfcWorkPlan(data);
+ case 1305: return new ::Ifc4x3::IfcWorkPlanTypeEnum(data);
+ case 1306: return new ::Ifc4x3::IfcWorkSchedule(data);
+ case 1307: return new ::Ifc4x3::IfcWorkScheduleTypeEnum(data);
+ case 1308: return new ::Ifc4x3::IfcWorkTime(data);
+ case 1309: return new ::Ifc4x3::IfcZone(data);
+ case 1310: return new ::Ifc4x3::IfcZShapeProfileDef(data);
+ default: throw IfcParse::IfcException(data->type()->name() + " cannot be instantiated");
+ }
+
+ }
+};
+
+
+#if defined(__clang__)
+__attribute__((optnone))
+#elif defined(__GNUC__) || defined(__GNUG__)
+#pragma GCC push_options
+#pragma GCC optimize ("O0")
+#elif defined(_MSC_VER)
+#pragma optimize("", off)
+#endif
+
+IfcParse::schema_definition* IFC4X3_populate_schema() {
+ IFC4X3_IfcAbsorbedDoseMeasure_type = new type_declaration("IfcAbsorbedDoseMeasure", 0, new simple_type(simple_type::real_type));
+ IFC4X3_IfcAccelerationMeasure_type = new type_declaration("IfcAccelerationMeasure", 1, new simple_type(simple_type::real_type));
+ {
+ std::vector items; items.reserve(7);
+ items.push_back("EMAIL");
+ items.push_back("FAX");
+ items.push_back("NOTDEFINED");
+ items.push_back("PHONE");
+ items.push_back("POST");
+ items.push_back("USERDEFINED");
+ items.push_back("VERBAL");
+ IFC4X3_IfcActionRequestTypeEnum_type = new enumeration_type("IfcActionRequestTypeEnum", 3, items);
+ }
+ {
+ std::vector items; items.reserve(27);
+ items.push_back("BRAKES");
+ items.push_back("BUOYANCY");
+ items.push_back("COMPLETION_G1");
+ items.push_back("CREEP");
+ items.push_back("CURRENT");
+ items.push_back("DEAD_LOAD_G");
+ items.push_back("EARTHQUAKE_E");
+ items.push_back("ERECTION");
+ items.push_back("FIRE");
+ items.push_back("ICE");
+ items.push_back("IMPACT");
+ items.push_back("IMPULSE");
+ items.push_back("LACK_OF_FIT");
+ items.push_back("LIVE_LOAD_Q");
+ items.push_back("NOTDEFINED");
+ items.push_back("PRESTRESSING_P");
+ items.push_back("PROPPING");
+ items.push_back("RAIN");
+ items.push_back("SETTLEMENT_U");
+ items.push_back("SHRINKAGE");
+ items.push_back("SNOW_S");
+ items.push_back("SYSTEM_IMPERFECTION");
+ items.push_back("TEMPERATURE_T");
+ items.push_back("TRANSPORT");
+ items.push_back("USERDEFINED");
+ items.push_back("WAVE");
+ items.push_back("WIND_W");
+ IFC4X3_IfcActionSourceTypeEnum_type = new enumeration_type("IfcActionSourceTypeEnum", 4, items);
+ }
+ {
+ std::vector items; items.reserve(5);
+ items.push_back("EXTRAORDINARY_A");
+ items.push_back("NOTDEFINED");
+ items.push_back("PERMANENT_G");
+ items.push_back("USERDEFINED");
+ items.push_back("VARIABLE_Q");
+ IFC4X3_IfcActionTypeEnum_type = new enumeration_type("IfcActionTypeEnum", 5, items);
+ }
+ {
+ std::vector items; items.reserve(7);
+ items.push_back("ELECTRICACTUATOR");
+ items.push_back("HANDOPERATEDACTUATOR");
+ items.push_back("HYDRAULICACTUATOR");
+ items.push_back("NOTDEFINED");
+ items.push_back("PNEUMATICACTUATOR");
+ items.push_back("THERMOSTATICACTUATOR");
+ items.push_back("USERDEFINED");
+ IFC4X3_IfcActuatorTypeEnum_type = new enumeration_type("IfcActuatorTypeEnum", 11, items);
+ }
+ {
+ std::vector items; items.reserve(5);
+ items.push_back("DISTRIBUTIONPOINT");
+ items.push_back("HOME");
+ items.push_back("OFFICE");
+ items.push_back("SITE");
+ items.push_back("USERDEFINED");
+ IFC4X3_IfcAddressTypeEnum_type = new enumeration_type("IfcAddressTypeEnum", 13, items);
+ }
+ {
+ std::vector items; items.reserve(5);
+ items.push_back("CONSTANTFLOW");
+ items.push_back("NOTDEFINED");
+ items.push_back("USERDEFINED");
+ items.push_back("VARIABLEFLOWPRESSUREDEPENDANT");
+ items.push_back("VARIABLEFLOWPRESSUREINDEPENDANT");
+ IFC4X3_IfcAirTerminalBoxTypeEnum_type = new enumeration_type("IfcAirTerminalBoxTypeEnum", 20, items);
+ }
+ {
+ std::vector items; items.reserve(6);
+ items.push_back("DIFFUSER");
+ items.push_back("GRILLE");
+ items.push_back("LOUVRE");
+ items.push_back("NOTDEFINED");
+ items.push_back("REGISTER");
+ items.push_back("USERDEFINED");
+ IFC4X3_IfcAirTerminalTypeEnum_type = new enumeration_type("IfcAirTerminalTypeEnum", 22, items);
+ }
+ {
+ std::vector items; items.reserve(11);
+ items.push_back("FIXEDPLATECOUNTERFLOWEXCHANGER");
+ items.push_back("FIXEDPLATECROSSFLOWEXCHANGER");
+ items.push_back("FIXEDPLATEPARALLELFLOWEXCHANGER");
+ items.push_back("HEATPIPE");
+ items.push_back("NOTDEFINED");
+ items.push_back("ROTARYWHEEL");
+ items.push_back("RUNAROUNDCOILLOOP");
+ items.push_back("THERMOSIPHONCOILTYPEHEATEXCHANGERS");
+ items.push_back("THERMOSIPHONSEALEDTUBEHEATEXCHANGERS");
+ items.push_back("TWINTOWERENTHALPYRECOVERYLOOPS");
+ items.push_back("USERDEFINED");
+ IFC4X3_IfcAirToAirHeatRecoveryTypeEnum_type = new enumeration_type("IfcAirToAirHeatRecoveryTypeEnum", 25, items);
+ }
+ {
+ std::vector items; items.reserve(10);
+ items.push_back("BELL");
+ items.push_back("BREAKGLASSBUTTON");
+ items.push_back("LIGHT");
+ items.push_back("MANUALPULLBOX");
+ items.push_back("NOTDEFINED");
+ items.push_back("RAILWAYCROCODILE");
+ items.push_back("RAILWAYDETONATOR");
+ items.push_back("SIREN");
+ items.push_back("USERDEFINED");
+ items.push_back("WHISTLE");
+ IFC4X3_IfcAlarmTypeEnum_type = new enumeration_type("IfcAlarmTypeEnum", 28, items);
+ }
+ {
+ std::vector items; items.reserve(7);
+ items.push_back("BLOSSCURVE");
+ items.push_back("CONSTANTCANT");
+ items.push_back("COSINECURVE");
+ items.push_back("HELMERTCURVE");
+ items.push_back("LINEARTRANSITION");
+ items.push_back("SINECURVE");
+ items.push_back("VIENNESEBEND");
+ IFC4X3_IfcAlignmentCantSegmentTypeEnum_type = new enumeration_type("IfcAlignmentCantSegmentTypeEnum", 32, items);
+ }
+ {
+ std::vector items; items.reserve(9);
+ items.push_back("BLOSSCURVE");
+ items.push_back("CIRCULARARC");
+ items.push_back("CLOTHOID");
+ items.push_back("COSINECURVE");
+ items.push_back("CUBIC");
+ items.push_back("HELMERTCURVE");
+ items.push_back("LINE");
+ items.push_back("SINECURVE");
+ items.push_back("VIENNESEBEND");
+ IFC4X3_IfcAlignmentHorizontalSegmentTypeEnum_type = new enumeration_type("IfcAlignmentHorizontalSegmentTypeEnum", 35, items);
+ }
+ {
+ std::vector items; items.reserve(2);
+ items.push_back("NOTDEFINED");
+ items.push_back("USERDEFINED");
+ IFC4X3_IfcAlignmentTypeEnum_type = new enumeration_type("IfcAlignmentTypeEnum", 38, items);
+ }
+ {
+ std::vector items; items.reserve(4);
+ items.push_back("CIRCULARARC");
+ items.push_back("CLOTHOID");
+ items.push_back("CONSTANTGRADIENT");
+ items.push_back("PARABOLICARC");
+ IFC4X3_IfcAlignmentVerticalSegmentTypeEnum_type = new enumeration_type("IfcAlignmentVerticalSegmentTypeEnum", 41, items);
+ }
+ IFC4X3_IfcAmountOfSubstanceMeasure_type = new type_declaration("IfcAmountOfSubstanceMeasure", 42, new simple_type(simple_type::real_type));
+ {
+ std::vector items; items.reserve(5);
+ items.push_back("IN_PLANE_LOADING_2D");
+ items.push_back("LOADING_3D");
+ items.push_back("NOTDEFINED");
+ items.push_back("OUT_PLANE_LOADING_2D");
+ items.push_back("USERDEFINED");
+ IFC4X3_IfcAnalysisModelTypeEnum_type = new enumeration_type("IfcAnalysisModelTypeEnum", 43, items);
+ }
+ {
+ std::vector items; items.reserve(6);
+ items.push_back("FIRST_ORDER_THEORY");
+ items.push_back("FULL_NONLINEAR_THEORY");
+ items.push_back("NOTDEFINED");
+ items.push_back("SECOND_ORDER_THEORY");
+ items.push_back("THIRD_ORDER_THEORY");
+ items.push_back("USERDEFINED");
+ IFC4X3_IfcAnalysisTheoryTypeEnum_type = new enumeration_type("IfcAnalysisTheoryTypeEnum", 44, items);
+ }
+ IFC4X3_IfcAngularVelocityMeasure_type = new type_declaration("IfcAngularVelocityMeasure", 45, new simple_type(simple_type::real_type));
+ {
+ std::vector items; items.reserve(11);
+ items.push_back("ASBUILTAREA");
+ items.push_back("ASBUILTLINE");
+ items.push_back("ASBUILTPOINT");
+ items.push_back("ASSUMEDAREA");
+ items.push_back("ASSUMEDLINE");
+ items.push_back("ASSUMEDPOINT");
+ items.push_back("NON_PHYSICAL_SIGNAL");
+ items.push_back("NOTDEFINED");
+ items.push_back("SUPERELEVATIONEVENT");
+ items.push_back("USERDEFINED");
+ items.push_back("WIDTHEVENT");
+ IFC4X3_IfcAnnotationTypeEnum_type = new enumeration_type("IfcAnnotationTypeEnum", 48, items);
+ }
+ IFC4X3_IfcAreaDensityMeasure_type = new type_declaration("IfcAreaDensityMeasure", 58, new simple_type(simple_type::real_type));
+ IFC4X3_IfcAreaMeasure_type = new type_declaration("IfcAreaMeasure", 59, new simple_type(simple_type::real_type));
+ {
+ std::vector items; items.reserve(4);
+ items.push_back("ADD");
+ items.push_back("DIVIDE");
+ items.push_back("MULTIPLY");
+ items.push_back("SUBTRACT");
+ IFC4X3_IfcArithmeticOperatorEnum_type = new enumeration_type("IfcArithmeticOperatorEnum", 60, items);
+ }
+ {
+ std::vector items; items.reserve(3);
+ items.push_back("FACTORY");
+ items.push_back("NOTDEFINED");
+ items.push_back("SITE");
+ IFC4X3_IfcAssemblyPlaceEnum_type = new enumeration_type("IfcAssemblyPlaceEnum", 61, items);
+ }
+ {
+ std::vector items; items.reserve(15);
+ items.push_back("AMPLIFIER");
+ items.push_back("CAMERA");
+ items.push_back("COMMUNICATIONTERMINAL");
+ items.push_back("DISPLAY");
+ items.push_back("MICROPHONE");
+ items.push_back("NOTDEFINED");
+ items.push_back("PLAYER");
+ items.push_back("PROJECTOR");
+ items.push_back("RECEIVER");
+ items.push_back("RECORDINGEQUIPMENT");
+ items.push_back("SPEAKER");
+ items.push_back("SWITCHER");
+ items.push_back("TELEPHONE");
+ items.push_back("TUNER");
+ items.push_back("USERDEFINED");
+ IFC4X3_IfcAudioVisualApplianceTypeEnum_type = new enumeration_type("IfcAudioVisualApplianceTypeEnum", 66, items);
+ }
+ {
+ std::vector items; items.reserve(6);
+ items.push_back("CIRCULAR_ARC");
+ items.push_back("ELLIPTIC_ARC");
+ items.push_back("HYPERBOLIC_ARC");
+ items.push_back("PARABOLIC_ARC");
+ items.push_back("POLYLINE_FORM");
+ items.push_back("UNSPECIFIED");
+ IFC4X3_IfcBSplineCurveForm_type = new enumeration_type("IfcBSplineCurveForm", 109, items);
+ }
+ {
+ std::vector items; items.reserve(11);
+ items.push_back("CONICAL_SURF");
+ items.push_back("CYLINDRICAL_SURF");
+ items.push_back("GENERALISED_CONE");
+ items.push_back("PLANE_SURF");
+ items.push_back("QUADRIC_SURF");
+ items.push_back("RULED_SURF");
+ items.push_back("SPHERICAL_SURF");
+ items.push_back("SURF_OF_LINEAR_EXTRUSION");
+ items.push_back("SURF_OF_REVOLUTION");
+ items.push_back("TOROIDAL_SURF");
+ items.push_back("UNSPECIFIED");
+ IFC4X3_IfcBSplineSurfaceForm_type = new enumeration_type("IfcBSplineSurfaceForm", 112, items);
+ }
+ {
+ std::vector items; items.reserve(14);
+ items.push_back("BEAM");
+ items.push_back("CORNICE");
+ items.push_back("DIAPHRAGM");
+ items.push_back("EDGEBEAM");
+ items.push_back("GIRDER_SEGMENT");
+ items.push_back("HATSTONE");
+ items.push_back("HOLLOWCORE");
+ items.push_back("JOIST");
+ items.push_back("LINTEL");
+ items.push_back("NOTDEFINED");
+ items.push_back("PIERCAP");
+ items.push_back("SPANDREL");
+ items.push_back("T_BEAM");
+ items.push_back("USERDEFINED");
+ IFC4X3_IfcBeamTypeEnum_type = new enumeration_type("IfcBeamTypeEnum", 74, items);
+ }
+ {
+ std::vector items; items.reserve(5);
+ items.push_back("FIXED_MOVEMENT");
+ items.push_back("FREE_MOVEMENT");
+ items.push_back("GUIDED_LONGITUDINAL");
+ items.push_back("GUIDED_TRANSVERSAL");
+ items.push_back("NOTDEFINED");
+ IFC4X3_IfcBearingTypeDisplacementEnum_type = new enumeration_type("IfcBearingTypeDisplacementEnum", 77, items);
+ }
+ {
+ std::vector items; items.reserve(10);
+ items.push_back("CYLINDRICAL");
+ items.push_back("DISK");
+ items.push_back("ELASTOMERIC");
+ items.push_back("GUIDE");
+ items.push_back("NOTDEFINED");
+ items.push_back("POT");
+ items.push_back("ROCKER");
+ items.push_back("ROLLER");
+ items.push_back("SPHERICAL");
+ items.push_back("USERDEFINED");
+ IFC4X3_IfcBearingTypeEnum_type = new enumeration_type("IfcBearingTypeEnum", 78, items);
+ }
+ {
+ std::vector items; items.reserve(10);
+ items.push_back("EQUALTO");
+ items.push_back("GREATERTHAN");
+ items.push_back("GREATERTHANOREQUALTO");
+ items.push_back("INCLUDEDIN");
+ items.push_back("INCLUDES");
+ items.push_back("LESSTHAN");
+ items.push_back("LESSTHANOREQUALTO");
+ items.push_back("NOTEQUALTO");
+ items.push_back("NOTINCLUDEDIN");
+ items.push_back("NOTINCLUDES");
+ IFC4X3_IfcBenchmarkEnum_type = new enumeration_type("IfcBenchmarkEnum", 79, items);
+ }
+ IFC4X3_IfcBinary_type = new type_declaration("IfcBinary", 81, new simple_type(simple_type::binary_type));
+ {
+ std::vector items; items.reserve(4);
+ items.push_back("NOTDEFINED");
+ items.push_back("STEAM");
+ items.push_back("USERDEFINED");
+ items.push_back("WATER");
+ IFC4X3_IfcBoilerTypeEnum_type = new enumeration_type("IfcBoilerTypeEnum", 86, items);
+ }
+ IFC4X3_IfcBoolean_type = new type_declaration("IfcBoolean", 87, new simple_type(simple_type::boolean_type));
+ {
+ std::vector items; items.reserve(3);
+ items.push_back("DIFFERENCE");
+ items.push_back("INTERSECTION");
+ items.push_back("UNION");
+ IFC4X3_IfcBooleanOperator_type = new enumeration_type("IfcBooleanOperator", 90, items);
+ }
+ {
+ std::vector items; items.reserve(12);
+ items.push_back("ABUTMENT");
+ items.push_back("DECK");
+ items.push_back("DECK_SEGMENT");
+ items.push_back("FOUNDATION");
+ items.push_back("NOTDEFINED");
+ items.push_back("PIER");
+ items.push_back("PIER_SEGMENT");
+ items.push_back("PYLON");
+ items.push_back("SUBSTRUCTURE");
+ items.push_back("SUPERSTRUCTURE");
+ items.push_back("SURFACESTRUCTURE");
+ items.push_back("USERDEFINED");
+ IFC4X3_IfcBridgePartTypeEnum_type = new enumeration_type("IfcBridgePartTypeEnum", 106, items);
+ }
+ {
+ std::vector items; items.reserve(10);
+ items.push_back("ARCHED");
+ items.push_back("CABLE_STAYED");
+ items.push_back("CANTILEVER");
+ items.push_back("CULVERT");
+ items.push_back("FRAMEWORK");
+ items.push_back("GIRDER");
+ items.push_back("NOTDEFINED");
+ items.push_back("SUSPENSION");
+ items.push_back("TRUSS");
+ items.push_back("USERDEFINED");
+ IFC4X3_IfcBridgeTypeEnum_type = new enumeration_type("IfcBridgeTypeEnum", 107, items);
+ }
+ {
+ std::vector items; items.reserve(7);
+ items.push_back("APRON");
+ items.push_back("ARMOURUNIT");
+ items.push_back("INSULATION");
+ items.push_back("NOTDEFINED");
+ items.push_back("PRECASTPANEL");
+ items.push_back("SAFETYCAGE");
+ items.push_back("USERDEFINED");
+ IFC4X3_IfcBuildingElementPartTypeEnum_type = new enumeration_type("IfcBuildingElementPartTypeEnum", 117, items);
+ }
+ {
+ std::vector items; items.reserve(5);
+ items.push_back("COMPLEX");
+ items.push_back("ELEMENT");
+ items.push_back("NOTDEFINED");
+ items.push_back("PARTIAL");
+ items.push_back("USERDEFINED");
+ IFC4X3_IfcBuildingElementProxyTypeEnum_type = new enumeration_type("IfcBuildingElementProxyTypeEnum", 120, items);
+ }
+ {
+ std::vector items; items.reserve(11);
+ items.push_back("EROSIONPREVENTION");
+ items.push_back("FENESTRATION");
+ items.push_back("FOUNDATION");
+ items.push_back("LOADBEARING");
+ items.push_back("NOTDEFINED");
+ items.push_back("OUTERSHELL");
+ items.push_back("PRESTRESSING");
+ items.push_back("REINFORCING");
+ items.push_back("SHADING");
+ items.push_back("TRANSPORT");
+ items.push_back("USERDEFINED");
+ IFC4X3_IfcBuildingSystemTypeEnum_type = new enumeration_type("IfcBuildingSystemTypeEnum", 123, items);
+ }
+ {
+ std::vector items; items.reserve(15);
+ items.push_back("EROSIONPREVENTION");
+ items.push_back("FENESTRATION");
+ items.push_back("FOUNDATION");
+ items.push_back("LOADBEARING");
+ items.push_back("MOORING");
+ items.push_back("NOTDEFINED");
+ items.push_back("OUTERSHELL");
+ items.push_back("PRESTRESSING");
+ items.push_back("RAILWAYLINE");
+ items.push_back("RAILWAYTRACK");
+ items.push_back("REINFORCING");
+ items.push_back("SHADING");
+ items.push_back("TRACKCIRCUIT");
+ items.push_back("TRANSPORT");
+ items.push_back("USERDEFINED");
+ IFC4X3_IfcBuiltSystemTypeEnum_type = new enumeration_type("IfcBuiltSystemTypeEnum", 127, items);
+ }
+ {
+ std::vector items; items.reserve(2);
+ items.push_back("NOTDEFINED");
+ items.push_back("USERDEFINED");
+ IFC4X3_IfcBurnerTypeEnum_type = new enumeration_type("IfcBurnerTypeEnum", 130, items);
+ }
+ {
+ std::vector items; items.reserve(8);
+ items.push_back("BEND");
+ items.push_back("CONNECTOR");
+ items.push_back("CROSS");
+ items.push_back("JUNCTION");
+ items.push_back("NOTDEFINED");
+ items.push_back("TEE");
+ items.push_back("TRANSITION");
+ items.push_back("USERDEFINED");
+ IFC4X3_IfcCableCarrierFittingTypeEnum_type = new enumeration_type("IfcCableCarrierFittingTypeEnum", 133, items);
+ }
+ {
+ std::vector items; items.reserve(9);
+ items.push_back("CABLEBRACKET");
+ items.push_back("CABLELADDERSEGMENT");
+ items.push_back("CABLETRAYSEGMENT");
+ items.push_back("CABLETRUNKINGSEGMENT");
+ items.push_back("CATENARYWIRE");
+ items.push_back("CONDUITSEGMENT");
+ items.push_back("DROPPER");
+ items.push_back("NOTDEFINED");
+ items.push_back("USERDEFINED");
+ IFC4X3_IfcCableCarrierSegmentTypeEnum_type = new enumeration_type("IfcCableCarrierSegmentTypeEnum", 136, items);
+ }
+ {
+ std::vector items; items.reserve(8);
+ items.push_back("CONNECTOR");
+ items.push_back("ENTRY");
+ items.push_back("EXIT");
+ items.push_back("FANOUT");
+ items.push_back("JUNCTION");
+ items.push_back("NOTDEFINED");
+ items.push_back("TRANSITION");
+ items.push_back("USERDEFINED");
+ IFC4X3_IfcCableFittingTypeEnum_type = new enumeration_type("IfcCableFittingTypeEnum", 139, items);
+ }
+ {
+ std::vector items; items.reserve(12);
+ items.push_back("BUSBARSEGMENT");
+ items.push_back("CABLESEGMENT");
+ items.push_back("CONDUCTORSEGMENT");
+ items.push_back("CONTACTWIRESEGMENT");
+ items.push_back("CORESEGMENT");
+ items.push_back("FIBERSEGMENT");
+ items.push_back("FIBERTUBE");
+ items.push_back("NOTDEFINED");
+ items.push_back("OPTICALCABLESEGMENT");
+ items.push_back("STITCHWIRE");
+ items.push_back("USERDEFINED");
+ items.push_back("WIREPAIRSEGMENT");
+ IFC4X3_IfcCableSegmentTypeEnum_type = new enumeration_type("IfcCableSegmentTypeEnum", 142, items);
+ }
+ {
+ std::vector items; items.reserve(4);
+ items.push_back("CAISSON");
+ items.push_back("NOTDEFINED");
+ items.push_back("USERDEFINED");
+ items.push_back("WELL");
+ IFC4X3_IfcCaissonFoundationTypeEnum_type = new enumeration_type("IfcCaissonFoundationTypeEnum", 145, items);
+ }
+ IFC4X3_IfcCardinalPointReference_type = new type_declaration("IfcCardinalPointReference", 146, new simple_type(simple_type::integer_type));
+ {
+ std::vector items; items.reserve(5);
+ items.push_back("ADDED");
+ items.push_back("DELETED");
+ items.push_back("MODIFIED");
+ items.push_back("NOCHANGE");
+ items.push_back("NOTDEFINED");
+ IFC4X3_IfcChangeActionEnum_type = new enumeration_type("IfcChangeActionEnum", 157, items);
+ }
+ {
+ std::vector items; items.reserve(5);
+ items.push_back("AIRCOOLED");
+ items.push_back("HEATRECOVERY");
+ items.push_back("NOTDEFINED");
+ items.push_back("USERDEFINED");
+ items.push_back("WATERCOOLED");
+ IFC4X3_IfcChillerTypeEnum_type = new enumeration_type("IfcChillerTypeEnum", 160, items);
+ }
+ {
+ std::vector items; items.reserve(2);
+ items.push_back("NOTDEFINED");
+ items.push_back("USERDEFINED");
+ IFC4X3_IfcChimneyTypeEnum_type = new enumeration_type("IfcChimneyTypeEnum", 163, items);
+ }
+ {
+ std::vector items; items.reserve(9);
+ items.push_back("DXCOOLINGCOIL");
+ items.push_back("ELECTRICHEATINGCOIL");
+ items.push_back("GASHEATINGCOIL");
+ items.push_back("HYDRONICCOIL");
+ items.push_back("NOTDEFINED");
+ items.push_back("STEAMHEATINGCOIL");
+ items.push_back("USERDEFINED");
+ items.push_back("WATERCOOLINGCOIL");
+ items.push_back("WATERHEATINGCOIL");
+ IFC4X3_IfcCoilTypeEnum_type = new enumeration_type("IfcCoilTypeEnum", 177, items);
+ }
+ {
+ std::vector items; items.reserve(7);
+ items.push_back("COLUMN");
+ items.push_back("NOTDEFINED");
+ items.push_back("PIERSTEM");
+ items.push_back("PIERSTEM_SEGMENT");
+ items.push_back("PILASTER");
+ items.push_back("STANDCOLUMN");
+ items.push_back("USERDEFINED");
+ IFC4X3_IfcColumnTypeEnum_type = new enumeration_type("IfcColumnTypeEnum", 185, items);
+ }
+ {
+ std::vector items; items.reserve(26);
+ items.push_back("ANTENNA");
+ items.push_back("AUTOMATON");
+ items.push_back("COMPUTER");
+ items.push_back("FAX");
+ items.push_back("GATEWAY");
+ items.push_back("INTELLIGENTPERIPHERAL");
+ items.push_back("IPNETWORKEQUIPMENT");
+ items.push_back("LINESIDEELECTRONICUNIT");
+ items.push_back("MODEM");
+ items.push_back("NETWORKAPPLIANCE");
+ items.push_back("NETWORKBRIDGE");
+ items.push_back("NETWORKHUB");
+ items.push_back("NOTDEFINED");
+ items.push_back("OPTICALLINETERMINAL");
+ items.push_back("OPTICALNETWORKUNIT");
+ items.push_back("PRINTER");
+ items.push_back("RADIOBLOCKCENTER");
+ items.push_back("REPEATER");
+ items.push_back("ROUTER");
+ items.push_back("SCANNER");
+ items.push_back("TELECOMMAND");
+ items.push_back("TELEPHONYEXCHANGE");
+ items.push_back("TRANSITIONCOMPONENT");
+ items.push_back("TRANSPONDER");
+ items.push_back("TRANSPORTEQUIPMENT");
+ items.push_back("USERDEFINED");
+ IFC4X3_IfcCommunicationsApplianceTypeEnum_type = new enumeration_type("IfcCommunicationsApplianceTypeEnum", 188, items);
+ }
+ IFC4X3_IfcComplexNumber_type = new type_declaration("IfcComplexNumber", 189, new aggregation_type(aggregation_type::array_type, 1, 2, new simple_type(simple_type::real_type)));
+ {
+ std::vector items; items.reserve(2);
+ items.push_back("P_COMPLEX");
+ items.push_back("Q_COMPLEX");
+ IFC4X3_IfcComplexPropertyTemplateTypeEnum_type = new enumeration_type("IfcComplexPropertyTemplateTypeEnum", 192, items);
+ }
+ IFC4X3_IfcCompoundPlaneAngleMeasure_type = new type_declaration("IfcCompoundPlaneAngleMeasure", 197, new aggregation_type(aggregation_type::list_type, 3, 4, new simple_type(simple_type::integer_type)));
+ {
+ std::vector items; items.reserve(17);
+ items.push_back("BOOSTER");
+ items.push_back("DYNAMIC");
+ items.push_back("HERMETIC");
+ items.push_back("NOTDEFINED");
+ items.push_back("OPENTYPE");
+ items.push_back("RECIPROCATING");
+ items.push_back("ROLLINGPISTON");
+ items.push_back("ROTARY");
+ items.push_back("ROTARYVANE");
+ items.push_back("SCROLL");
+ items.push_back("SEMIHERMETIC");
+ items.push_back("SINGLESCREW");
+ items.push_back("SINGLESTAGE");
+ items.push_back("TROCHOIDAL");
+ items.push_back("TWINSCREW");
+ items.push_back("USERDEFINED");
+ items.push_back("WELDEDSHELLHERMETIC");
+ IFC4X3_IfcCompressorTypeEnum_type = new enumeration_type("IfcCompressorTypeEnum", 200, items);
+ }
+ {
+ std::vector items; items.reserve(9);
+ items.push_back("AIRCOOLED");
+ items.push_back("EVAPORATIVECOOLED");
+ items.push_back("NOTDEFINED");
+ items.push_back("USERDEFINED");
+ items.push_back("WATERCOOLED");
+ items.push_back("WATERCOOLEDBRAZEDPLATE");
+ items.push_back("WATERCOOLEDSHELLCOIL");
+ items.push_back("WATERCOOLEDSHELLTUBE");
+ items.push_back("WATERCOOLEDTUBEINTUBE");
+ IFC4X3_IfcCondenserTypeEnum_type = new enumeration_type("IfcCondenserTypeEnum", 203, items);
+ }
+ {
+ std::vector items; items.reserve(4);
+ items.push_back("ATEND");
+ items.push_back("ATPATH");
+ items.push_back("ATSTART");
+ items.push_back("NOTDEFINED");
+ IFC4X3_IfcConnectionTypeEnum_type = new enumeration_type("IfcConnectionTypeEnum", 211, items);
+ }
+ {
+ std::vector items; items.reserve(5);
+ items.push_back("ADVISORY");
+ items.push_back("HARD");
+ items.push_back("NOTDEFINED");
+ items.push_back("SOFT");
+ items.push_back("USERDEFINED");
+ IFC4X3_IfcConstraintEnum_type = new enumeration_type("IfcConstraintEnum", 214, items);
+ }
+ {
+ std::vector items; items.reserve(10);
+ items.push_back("DEMOLISHING");
+ items.push_back("EARTHMOVING");
+ items.push_back("ERECTING");
+ items.push_back("HEATING");
+ items.push_back("LIGHTING");
+ items.push_back("NOTDEFINED");
+ items.push_back("PAVING");
+ items.push_back("PUMPING");
+ items.push_back("TRANSPORTING");
+ items.push_back("USERDEFINED");
+ IFC4X3_IfcConstructionEquipmentResourceTypeEnum_type = new enumeration_type("IfcConstructionEquipmentResourceTypeEnum", 217, items);
+ }
+ {
+ std::vector items; items.reserve(11);
+ items.push_back("AGGREGATES");
+ items.push_back("CONCRETE");
+ items.push_back("DRYWALL");
+ items.push_back("FUEL");
+ items.push_back("GYPSUM");
+ items.push_back("MASONRY");
+ items.push_back("METAL");
+ items.push_back("NOTDEFINED");
+ items.push_back("PLASTIC");
+ items.push_back("USERDEFINED");
+ items.push_back("WOOD");
+ IFC4X3_IfcConstructionMaterialResourceTypeEnum_type = new enumeration_type("IfcConstructionMaterialResourceTypeEnum", 220, items);
+ }
+ {
+ std::vector items; items.reserve(4);
+ items.push_back("ASSEMBLY");
+ items.push_back("FORMWORK");
+ items.push_back("NOTDEFINED");
+ items.push_back("USERDEFINED");
+ IFC4X3_IfcConstructionProductResourceTypeEnum_type = new enumeration_type("IfcConstructionProductResourceTypeEnum", 223, items);
+ }
+ IFC4X3_IfcContextDependentMeasure_type = new type_declaration("IfcContextDependentMeasure", 227, new simple_type(simple_type::real_type));
+ {
+ std::vector items; items.reserve(7);
+ items.push_back("FLOATING");
+ items.push_back("MULTIPOSITION");
+ items.push_back("NOTDEFINED");
+ items.push_back("PROGRAMMABLE");
+ items.push_back("PROPORTIONAL");
+ items.push_back("TWOPOSITION");
+ items.push_back("USERDEFINED");
+ IFC4X3_IfcControllerTypeEnum_type = new enumeration_type("IfcControllerTypeEnum", 232, items);
+ }
+ {
+ std::vector items; items.reserve(6);
+ items.push_back("BELTCONVEYOR");
+ items.push_back("BUCKETCONVEYOR");
+ items.push_back("CHUTECONVEYOR");
+ items.push_back("NOTDEFINED");
+ items.push_back("SCREWCONVEYOR");
+ items.push_back("USERDEFINED");
+ IFC4X3_IfcConveyorSegmentTypeEnum_type = new enumeration_type("IfcConveyorSegmentTypeEnum", 237, items);
+ }
+ {
+ std::vector items; items.reserve(4);
+ items.push_back("ACTIVE");
+ items.push_back("NOTDEFINED");
+ items.push_back("PASSIVE");
+ items.push_back("USERDEFINED");
+ IFC4X3_IfcCooledBeamTypeEnum_type = new enumeration_type("IfcCooledBeamTypeEnum", 240, items);
+ }
+ {
+ std::vector items; items.reserve(5);
+ items.push_back("MECHANICALFORCEDDRAFT");
+ items.push_back("MECHANICALINDUCEDDRAFT");
+ items.push_back("NATURALDRAFT");
+ items.push_back("NOTDEFINED");
+ items.push_back("USERDEFINED");
+ IFC4X3_IfcCoolingTowerTypeEnum_type = new enumeration_type("IfcCoolingTowerTypeEnum", 243, items);
+ }
+ {
+ std::vector items; items.reserve(2);
+ items.push_back("NOTDEFINED");
+ items.push_back("USERDEFINED");
+ IFC4X3_IfcCostItemTypeEnum_type = new enumeration_type("IfcCostItemTypeEnum", 249, items);
+ }
+ {
+ std::vector items; items.reserve(9);
+ items.push_back("BUDGET");
+ items.push_back("COSTPLAN");
+ items.push_back("ESTIMATE");
+ items.push_back("NOTDEFINED");
+ items.push_back("PRICEDBILLOFQUANTITIES");
+ items.push_back("SCHEDULEOFRATES");
+ items.push_back("TENDER");
+ items.push_back("UNPRICEDBILLOFQUANTITIES");
+ items.push_back("USERDEFINED");
+ IFC4X3_IfcCostScheduleTypeEnum_type = new enumeration_type("IfcCostScheduleTypeEnum", 251, items);
+ }
+ IFC4X3_IfcCountMeasure_type = new type_declaration("IfcCountMeasure", 253, new simple_type(simple_type::integer_type));
+ {
+ std::vector items; items.reserve(8);
+ items.push_back("ARMOUR");
+ items.push_back("BALLASTBED");
+ items.push_back("CORE");
+ items.push_back("FILTER");
+ items.push_back("NOTDEFINED");
+ items.push_back("PAVEMENT");
+ items.push_back("PROTECTION");
+ items.push_back("USERDEFINED");
+ IFC4X3_IfcCourseTypeEnum_type = new enumeration_type("IfcCourseTypeEnum", 256, items);
+ }
+ {
+ std::vector items; items.reserve(14);
+ items.push_back("CEILING");
+ items.push_back("CLADDING");
+ items.push_back("COPING");
+ items.push_back("FLOORING");
+ items.push_back("INSULATION");
+ items.push_back("MEMBRANE");
+ items.push_back("MOLDING");
+ items.push_back("NOTDEFINED");
+ items.push_back("ROOFING");
+ items.push_back("SKIRTINGBOARD");
+ items.push_back("SLEEVING");
+ items.push_back("TOPPING");
+ items.push_back("USERDEFINED");
+ items.push_back("WRAPPING");
+ IFC4X3_IfcCoveringTypeEnum_type = new enumeration_type("IfcCoveringTypeEnum", 259, items);
+ }
+ {
+ std::vector items; items.reserve(4);
+ items.push_back("NOTDEFINED");
+ items.push_back("OFFICE");
+ items.push_back("SITE");
+ items.push_back("USERDEFINED");
+ IFC4X3_IfcCrewResourceTypeEnum_type = new enumeration_type("IfcCrewResourceTypeEnum", 262, items);
+ }
+ {
+ std::vector items; items.reserve(2);
+ items.push_back("NOTDEFINED");
+ items.push_back("USERDEFINED");
+ IFC4X3_IfcCurtainWallTypeEnum_type = new enumeration_type("IfcCurtainWallTypeEnum", 270, items);
+ }
+ IFC4X3_IfcCurvatureMeasure_type = new type_declaration("IfcCurvatureMeasure", 271, new simple_type(simple_type::real_type));
+ {
+ std::vector items; items.reserve(4);
+ items.push_back("LINEAR");
+ items.push_back("LOG_LINEAR");
+ items.push_back("LOG_LOG");
+ items.push_back("NOTDEFINED");
+ IFC4X3_IfcCurveInterpolationEnum_type = new enumeration_type("IfcCurveInterpolationEnum", 276, items);
+ }
+ {
+ std::vector items; items.reserve(13);
+ items.push_back("BACKDRAFTDAMPER");
+ items.push_back("BALANCINGDAMPER");
+ items.push_back("BLASTDAMPER");
+ items.push_back("CONTROLDAMPER");
+ items.push_back("FIREDAMPER");
+ items.push_back("FIRESMOKEDAMPER");
+ items.push_back("FUMEHOODEXHAUST");
+ items.push_back("GRAVITYDAMPER");
+ items.push_back("GRAVITYRELIEFDAMPER");
+ items.push_back("NOTDEFINED");
+ items.push_back("RELIEFDAMPER");
+ items.push_back("SMOKEDAMPER");
+ items.push_back("USERDEFINED");
+ IFC4X3_IfcDamperTypeEnum_type = new enumeration_type("IfcDamperTypeEnum", 289, items);
+ }
+ {
+ std::vector items; items.reserve(5);
+ items.push_back("MEASURED");
+ items.push_back("NOTDEFINED");
+ items.push_back("PREDICTED");
+ items.push_back("SIMULATED");
+ items.push_back("USERDEFINED");
+ IFC4X3_IfcDataOriginEnum_type = new enumeration_type("IfcDataOriginEnum", 290, items);
+ }
+ IFC4X3_IfcDate_type = new type_declaration("IfcDate", 291, new simple_type(simple_type::string_type));
+ IFC4X3_IfcDateTime_type = new type_declaration("IfcDateTime", 292, new simple_type(simple_type::string_type));
+ IFC4X3_IfcDayInMonthNumber_type = new type_declaration("IfcDayInMonthNumber", 293, new simple_type(simple_type::integer_type));
+ IFC4X3_IfcDayInWeekNumber_type = new type_declaration("IfcDayInWeekNumber", 294, new simple_type(simple_type::integer_type));
+ {
+ std::vector items; items.reserve(53);
+ items.push_back("ACCELERATIONUNIT");
+ items.push_back("ANGULARVELOCITYUNIT");
+ items.push_back("AREADENSITYUNIT");
+ items.push_back("COMPOUNDPLANEANGLEUNIT");
+ items.push_back("CURVATUREUNIT");
+ items.push_back("DYNAMICVISCOSITYUNIT");
+ items.push_back("HEATFLUXDENSITYUNIT");
+ items.push_back("HEATINGVALUEUNIT");
+ items.push_back("INTEGERCOUNTRATEUNIT");
+ items.push_back("IONCONCENTRATIONUNIT");
+ items.push_back("ISOTHERMALMOISTURECAPACITYUNIT");
+ items.push_back("KINEMATICVISCOSITYUNIT");
+ items.push_back("LINEARFORCEUNIT");
+ items.push_back("LINEARMOMENTUNIT");
+ items.push_back("LINEARSTIFFNESSUNIT");
+ items.push_back("LINEARVELOCITYUNIT");
+ items.push_back("LUMINOUSINTENSITYDISTRIBUTIONUNIT");
+ items.push_back("MASSDENSITYUNIT");
+ items.push_back("MASSFLOWRATEUNIT");
+ items.push_back("MASSPERLENGTHUNIT");
+ items.push_back("MODULUSOFELASTICITYUNIT");
+ items.push_back("MODULUSOFLINEARSUBGRADEREACTIONUNIT");
+ items.push_back("MODULUSOFROTATIONALSUBGRADEREACTIONUNIT");
+ items.push_back("MODULUSOFSUBGRADEREACTIONUNIT");
+ items.push_back("MOISTUREDIFFUSIVITYUNIT");
+ items.push_back("MOLECULARWEIGHTUNIT");
+ items.push_back("MOMENTOFINERTIAUNIT");
+ items.push_back("PHUNIT");
+ items.push_back("PLANARFORCEUNIT");
+ items.push_back("ROTATIONALFREQUENCYUNIT");
+ items.push_back("ROTATIONALMASSUNIT");
+ items.push_back("ROTATIONALSTIFFNESSUNIT");
+ items.push_back("SECTIONAREAINTEGRALUNIT");
+ items.push_back("SECTIONMODULUSUNIT");
+ items.push_back("SHEARMODULUSUNIT");
+ items.push_back("SOUNDPOWERLEVELUNIT");
+ items.push_back("SOUNDPOWERUNIT");
+ items.push_back("SOUNDPRESSURELEVELUNIT");
+ items.push_back("SOUNDPRESSUREUNIT");
+ items.push_back("SPECIFICHEATCAPACITYUNIT");
+ items.push_back("TEMPERATUREGRADIENTUNIT");
+ items.push_back("TEMPERATURERATEOFCHANGEUNIT");
+ items.push_back("THERMALADMITTANCEUNIT");
+ items.push_back("THERMALCONDUCTANCEUNIT");
+ items.push_back("THERMALEXPANSIONCOEFFICIENTUNIT");
+ items.push_back("THERMALRESISTANCEUNIT");
+ items.push_back("THERMALTRANSMITTANCEUNIT");
+ items.push_back("TORQUEUNIT");
+ items.push_back("USERDEFINED");
+ items.push_back("VAPORPERMEABILITYUNIT");
+ items.push_back("VOLUMETRICFLOWRATEUNIT");
+ items.push_back("WARPINGCONSTANTUNIT");
+ items.push_back("WARPINGMOMENTUNIT");
+ IFC4X3_IfcDerivedUnitEnum_type = new enumeration_type("IfcDerivedUnitEnum", 302, items);
+ }
+ IFC4X3_IfcDescriptiveMeasure_type = new type_declaration("IfcDescriptiveMeasure", 303, new simple_type(simple_type::string_type));
+ IFC4X3_IfcDimensionCount_type = new type_declaration("IfcDimensionCount", 305, new simple_type(simple_type::integer_type));
+ {
+ std::vector items; items.reserve(2);
+ items.push_back("NEGATIVE");
+ items.push_back("POSITIVE");
+ IFC4X3_IfcDirectionSenseEnum_type = new enumeration_type("IfcDirectionSenseEnum", 307, items);
+ }
+ {
+ std::vector items; items.reserve(23);
+ items.push_back("ANCHORPLATE");
+ items.push_back("BIRDPROTECTION");
+ items.push_back("BRACKET");
+ items.push_back("CABLEARRANGER");
+ items.push_back("ELASTIC_CUSHION");
+ items.push_back("EXPANSION_JOINT_DEVICE");
+ items.push_back("FILLER");
+ items.push_back("FLASHING");
+ items.push_back("INSULATOR");
+ items.push_back("LOCK");
+ items.push_back("NOTDEFINED");
+ items.push_back("PANEL_STRENGTHENING");
+ items.push_back("POINTMACHINEMOUNTINGDEVICE");
+ items.push_back("POINT_MACHINE_LOCKING_DEVICE");
+ items.push_back("RAILBRACE");
+ items.push_back("RAILPAD");
+ items.push_back("RAIL_LUBRICATION");
+ items.push_back("RAIL_MECHANICAL_EQUIPMENT");
+ items.push_back("SHOE");
+ items.push_back("SLIDINGCHAIR");
+ items.push_back("SOUNDABSORPTION");
+ items.push_back("TENSIONINGEQUIPMENT");
+ items.push_back("USERDEFINED");
+ IFC4X3_IfcDiscreteAccessoryTypeEnum_type = new enumeration_type("IfcDiscreteAccessoryTypeEnum", 312, items);
+ }
+ {
+ std::vector items; items.reserve(8);
+ items.push_back("CONSUMERUNIT");
+ items.push_back("DISPATCHINGBOARD");
+ items.push_back("DISTRIBUTIONBOARD");
+ items.push_back("DISTRIBUTIONFRAME");
+ items.push_back("MOTORCONTROLCENTRE");
+ items.push_back("NOTDEFINED");
+ items.push_back("SWITCHBOARD");
+ items.push_back("USERDEFINED");
+ IFC4X3_IfcDistributionBoardTypeEnum_type = new enumeration_type("IfcDistributionBoardTypeEnum", 315, items);
+ }
+ {
+ std::vector items; items.reserve(10);
+ items.push_back("FORMEDDUCT");
+ items.push_back("INSPECTIONCHAMBER");
+ items.push_back("INSPECTIONPIT");
+ items.push_back("MANHOLE");
+ items.push_back("METERCHAMBER");
+ items.push_back("NOTDEFINED");
+ items.push_back("SUMP");
+ items.push_back("TRENCH");
+ items.push_back("USERDEFINED");
+ items.push_back("VALVECHAMBER");
+ IFC4X3_IfcDistributionChamberElementTypeEnum_type = new enumeration_type("IfcDistributionChamberElementTypeEnum", 318, items);
+ }
+ {
+ std::vector items; items.reserve(7);
+ items.push_back("CABLE");
+ items.push_back("CABLECARRIER");
+ items.push_back("DUCT");
+ items.push_back("NOTDEFINED");
+ items.push_back("PIPE");
+ items.push_back("USERDEFINED");
+ items.push_back("WIRELESS");
+ IFC4X3_IfcDistributionPortTypeEnum_type = new enumeration_type("IfcDistributionPortTypeEnum", 327, items);
+ }
+ {
+ std::vector items; items.reserve(51);
+ items.push_back("AIRCONDITIONING");
+ items.push_back("AUDIOVISUAL");
+ items.push_back("CATENARY_SYSTEM");
+ items.push_back("CHEMICAL");
+ items.push_back("CHILLEDWATER");
+ items.push_back("COMMUNICATION");
+ items.push_back("COMPRESSEDAIR");
+ items.push_back("CONDENSERWATER");
+ items.push_back("CONTROL");
+ items.push_back("CONVEYING");
+ items.push_back("DATA");
+ items.push_back("DISPOSAL");
+ items.push_back("DOMESTICCOLDWATER");
+ items.push_back("DOMESTICHOTWATER");
+ items.push_back("DRAINAGE");
+ items.push_back("EARTHING");
+ items.push_back("ELECTRICAL");
+ items.push_back("ELECTROACOUSTIC");
+ items.push_back("EXHAUST");
+ items.push_back("FIREPROTECTION");
+ items.push_back("FIXEDTRANSMISSIONNETWORK");
+ items.push_back("FUEL");
+ items.push_back("GAS");
+ items.push_back("HAZARDOUS");
+ items.push_back("HEATING");
+ items.push_back("LIGHTING");
+ items.push_back("LIGHTNINGPROTECTION");
+ items.push_back("MOBILENETWORK");
+ items.push_back("MONITORINGSYSTEM");
+ items.push_back("MUNICIPALSOLIDWASTE");
+ items.push_back("NOTDEFINED");
+ items.push_back("OIL");
+ items.push_back("OPERATIONAL");
+ items.push_back("OPERATIONALTELEPHONYSYSTEM");
+ items.push_back("OVERHEAD_CONTACTLINE_SYSTEM");
+ items.push_back("POWERGENERATION");
+ items.push_back("RAINWATER");
+ items.push_back("REFRIGERATION");
+ items.push_back("RETURN_CIRCUIT");
+ items.push_back("SECURITY");
+ items.push_back("SEWAGE");
+ items.push_back("SIGNAL");
+ items.push_back("STORMWATER");
+ items.push_back("TELEPHONE");
+ items.push_back("TV");
+ items.push_back("USERDEFINED");
+ items.push_back("VACUUM");
+ items.push_back("VENT");
+ items.push_back("VENTILATION");
+ items.push_back("WASTEWATER");
+ items.push_back("WATERSUPPLY");
+ IFC4X3_IfcDistributionSystemEnum_type = new enumeration_type("IfcDistributionSystemEnum", 329, items);
+ }
+ {
+ std::vector items; items.reserve(6);
+ items.push_back("CONFIDENTIAL");
+ items.push_back("NOTDEFINED");
+ items.push_back("PERSONAL");
+ items.push_back("PUBLIC");
+ items.push_back("RESTRICTED");
+ items.push_back("USERDEFINED");
+ IFC4X3_IfcDocumentConfidentialityEnum_type = new enumeration_type("IfcDocumentConfidentialityEnum", 330, items);
+ }
+ {
+ std::vector items; items.reserve(5);
+ items.push_back("DRAFT");
+ items.push_back("FINAL");
+ items.push_back("FINALDRAFT");
+ items.push_back("NOTDEFINED");
+ items.push_back("REVISION");
+ IFC4X3_IfcDocumentStatusEnum_type = new enumeration_type("IfcDocumentStatusEnum", 335, items);
+ }
+ {
+ std::vector items; items.reserve(9);
+ items.push_back("DOUBLE_ACTING");
+ items.push_back("FIXEDPANEL");
+ items.push_back("FOLDING");
+ items.push_back("NOTDEFINED");
+ items.push_back("REVOLVING");
+ items.push_back("ROLLINGUP");
+ items.push_back("SLIDING");
+ items.push_back("SWINGING");
+ items.push_back("USERDEFINED");
+ IFC4X3_IfcDoorPanelOperationEnum_type = new enumeration_type("IfcDoorPanelOperationEnum", 338, items);
+ }
+ {
+ std::vector items; items.reserve(4);
+ items.push_back("LEFT");
+ items.push_back("MIDDLE");
+ items.push_back("NOTDEFINED");
+ items.push_back("RIGHT");
+ IFC4X3_IfcDoorPanelPositionEnum_type = new enumeration_type("IfcDoorPanelPositionEnum", 339, items);
+ }
+ {
+ std::vector items; items.reserve(9);
+ items.push_back("ALUMINIUM");
+ items.push_back("ALUMINIUM_PLASTIC");
+ items.push_back("ALUMINIUM_WOOD");
+ items.push_back("HIGH_GRADE_STEEL");
+ items.push_back("NOTDEFINED");
+ items.push_back("PLASTIC");
+ items.push_back("STEEL");
+ items.push_back("USERDEFINED");
+ items.push_back("WOOD");
+ IFC4X3_IfcDoorStyleConstructionEnum_type = new enumeration_type("IfcDoorStyleConstructionEnum", 341, items);
+ }
+ {
+ std::vector items; items.reserve(18);
+ items.push_back("DOUBLE_DOOR_DOUBLE_SWING");
+ items.push_back("DOUBLE_DOOR_FOLDING");
+ items.push_back("DOUBLE_DOOR_SINGLE_SWING");
+ items.push_back("DOUBLE_DOOR_SINGLE_SWING_OPPOSITE_LEFT");
+ items.push_back("DOUBLE_DOOR_SINGLE_SWING_OPPOSITE_RIGHT");
+ items.push_back("DOUBLE_DOOR_SLIDING");
+ items.push_back("DOUBLE_SWING_LEFT");
+ items.push_back("DOUBLE_SWING_RIGHT");
+ items.push_back("FOLDING_TO_LEFT");
+ items.push_back("FOLDING_TO_RIGHT");
+ items.push_back("NOTDEFINED");
+ items.push_back("REVOLVING");
+ items.push_back("ROLLINGUP");
+ items.push_back("SINGLE_SWING_LEFT");
+ items.push_back("SINGLE_SWING_RIGHT");
+ items.push_back("SLIDING_TO_LEFT");
+ items.push_back("SLIDING_TO_RIGHT");
+ items.push_back("USERDEFINED");
+ IFC4X3_IfcDoorStyleOperationEnum_type = new enumeration_type("IfcDoorStyleOperationEnum", 342, items);
+ }
+ {
+ std::vector items; items.reserve(7);
+ items.push_back("BOOM_BARRIER");
+ items.push_back("DOOR");
+ items.push_back("GATE");
+ items.push_back("NOTDEFINED");
+ items.push_back("TRAPDOOR");
+ items.push_back("TURNSTILE");
+ items.push_back("USERDEFINED");
+ IFC4X3_IfcDoorTypeEnum_type = new enumeration_type("IfcDoorTypeEnum", 344, items);
+ }
+ {
+ std::vector items; items.reserve(25);
+ items.push_back("DOUBLE_PANEL_DOUBLE_SWING");
+ items.push_back("DOUBLE_PANEL_FOLDING");
+ items.push_back("DOUBLE_PANEL_LIFTING_VERTICAL");
+ items.push_back("DOUBLE_PANEL_SINGLE_SWING");
+ items.push_back("DOUBLE_PANEL_SINGLE_SWING_OPPOSITE_LEFT");
+ items.push_back("DOUBLE_PANEL_SINGLE_SWING_OPPOSITE_RIGHT");
+ items.push_back("DOUBLE_PANEL_SLIDING");
+ items.push_back("DOUBLE_SWING_LEFT");
+ items.push_back("DOUBLE_SWING_RIGHT");
+ items.push_back("FOLDING_TO_LEFT");
+ items.push_back("FOLDING_TO_RIGHT");
+ items.push_back("LIFTING_HORIZONTAL");
+ items.push_back("LIFTING_VERTICAL_LEFT");
+ items.push_back("LIFTING_VERTICAL_RIGHT");
+ items.push_back("NOTDEFINED");
+ items.push_back("REVOLVING_HORIZONTAL");
+ items.push_back("REVOLVING_VERTICAL");
+ items.push_back("ROLLINGUP");
+ items.push_back("SINGLE_SWING_LEFT");
+ items.push_back("SINGLE_SWING_RIGHT");
+ items.push_back("SLIDING_TO_LEFT");
+ items.push_back("SLIDING_TO_RIGHT");
+ items.push_back("SWING_FIXED_LEFT");
+ items.push_back("SWING_FIXED_RIGHT");
+ items.push_back("USERDEFINED");
+ IFC4X3_IfcDoorTypeOperationEnum_type = new enumeration_type("IfcDoorTypeOperationEnum", 345, items);
+ }
+ IFC4X3_IfcDoseEquivalentMeasure_type = new type_declaration("IfcDoseEquivalentMeasure", 346, new simple_type(simple_type::real_type));
+ {
+ std::vector items; items.reserve(9);
+ items.push_back("BEND");
+ items.push_back("CONNECTOR");
+ items.push_back("ENTRY");
+ items.push_back("EXIT");
+ items.push_back("JUNCTION");
+ items.push_back("NOTDEFINED");
+ items.push_back("OBSTRUCTION");
+ items.push_back("TRANSITION");
+ items.push_back("USERDEFINED");
+ IFC4X3_IfcDuctFittingTypeEnum_type = new enumeration_type("IfcDuctFittingTypeEnum", 351, items);
+ }
+ {
+ std::vector items; items.reserve(4);
+ items.push_back("FLEXIBLESEGMENT");
+ items.push_back("NOTDEFINED");
+ items.push_back("RIGIDSEGMENT");
+ items.push_back("USERDEFINED");
+ IFC4X3_IfcDuctSegmentTypeEnum_type = new enumeration_type("IfcDuctSegmentTypeEnum", 354, items);
+ }
+ {
+ std::vector items; items.reserve(5);
+ items.push_back("FLATOVAL");
+ items.push_back("NOTDEFINED");
+ items.push_back("RECTANGULAR");
+ items.push_back("ROUND");
+ items.push_back("USERDEFINED");
+ IFC4X3_IfcDuctSilencerTypeEnum_type = new enumeration_type("IfcDuctSilencerTypeEnum", 357, items);
+ }
+ IFC4X3_IfcDuration_type = new type_declaration("IfcDuration", 358, new simple_type(simple_type::string_type));
+ IFC4X3_IfcDynamicViscosityMeasure_type = new type_declaration("IfcDynamicViscosityMeasure", 359, new simple_type(simple_type::real_type));
+ {
+ std::vector items; items.reserve(11);
+ items.push_back("BASE_EXCAVATION");
+ items.push_back("CUT");
+ items.push_back("DREDGING");
+ items.push_back("EXCAVATION");
+ items.push_back("NOTDEFINED");
+ items.push_back("OVEREXCAVATION");
+ items.push_back("PAVEMENTMILLING");
+ items.push_back("STEPEXCAVATION");
+ items.push_back("TOPSOILREMOVAL");
+ items.push_back("TRENCH");
+ items.push_back("USERDEFINED");
+ IFC4X3_IfcEarthworksCutTypeEnum_type = new enumeration_type("IfcEarthworksCutTypeEnum", 361, items);
+ }
+ {
+ std::vector items; items.reserve(9);
+ items.push_back("BACKFILL");
+ items.push_back("COUNTERWEIGHT");
+ items.push_back("EMBANKMENT");
+ items.push_back("NOTDEFINED");
+ items.push_back("SLOPEFILL");
+ items.push_back("SUBGRADE");
+ items.push_back("SUBGRADEBED");
+ items.push_back("TRANSITIONSECTION");
+ items.push_back("USERDEFINED");
+ IFC4X3_IfcEarthworksFillTypeEnum_type = new enumeration_type("IfcEarthworksFillTypeEnum", 364, items);
+ }
+ {
+ std::vector items; items.reserve(18);
+ items.push_back("DISHWASHER");
+ items.push_back("ELECTRICCOOKER");
+ items.push_back("FREESTANDINGELECTRICHEATER");
+ items.push_back("FREESTANDINGFAN");
+ items.push_back("FREESTANDINGWATERCOOLER");
+ items.push_back("FREESTANDINGWATERHEATER");
+ items.push_back("FREEZER");
+ items.push_back("FRIDGE_FREEZER");
+ items.push_back("HANDDRYER");
+ items.push_back("KITCHENMACHINE");
+ items.push_back("MICROWAVE");
+ items.push_back("NOTDEFINED");
+ items.push_back("PHOTOCOPIER");
+ items.push_back("REFRIGERATOR");
+ items.push_back("TUMBLEDRYER");
+ items.push_back("USERDEFINED");
+ items.push_back("VENDINGMACHINE");
+ items.push_back("WASHINGMACHINE");
+ IFC4X3_IfcElectricApplianceTypeEnum_type = new enumeration_type("IfcElectricApplianceTypeEnum", 370, items);
+ }
+ IFC4X3_IfcElectricCapacitanceMeasure_type = new type_declaration("IfcElectricCapacitanceMeasure", 371, new simple_type(simple_type::real_type));
+ IFC4X3_IfcElectricChargeMeasure_type = new type_declaration("IfcElectricChargeMeasure", 372, new simple_type(simple_type::real_type));
+ IFC4X3_IfcElectricConductanceMeasure_type = new type_declaration("IfcElectricConductanceMeasure", 373, new simple_type(simple_type::real_type));
+ IFC4X3_IfcElectricCurrentMeasure_type = new type_declaration("IfcElectricCurrentMeasure", 374, new simple_type(simple_type::real_type));
+ {
+ std::vector items; items.reserve(6);
+ items.push_back("CONSUMERUNIT");
+ items.push_back("DISTRIBUTIONBOARD");
+ items.push_back("MOTORCONTROLCENTRE");
+ items.push_back("NOTDEFINED");
+ items.push_back("SWITCHBOARD");
+ items.push_back("USERDEFINED");
+ IFC4X3_IfcElectricDistributionBoardTypeEnum_type = new enumeration_type("IfcElectricDistributionBoardTypeEnum", 377, items);
+ }
+ {
+ std::vector items; items.reserve(11);
+ items.push_back("BATTERY");
+ items.push_back("CAPACITOR");
+ items.push_back("CAPACITORBANK");
+ items.push_back("COMPENSATOR");
+ items.push_back("HARMONICFILTER");
+ items.push_back("INDUCTOR");
+ items.push_back("INDUCTORBANK");
+ items.push_back("NOTDEFINED");
+ items.push_back("RECHARGER");
+ items.push_back("UPS");
+ items.push_back("USERDEFINED");
+ IFC4X3_IfcElectricFlowStorageDeviceTypeEnum_type = new enumeration_type("IfcElectricFlowStorageDeviceTypeEnum", 380, items);
+ }
+ {
+ std::vector items; items.reserve(3);
+ items.push_back("ELECTRONICFILTER");
+ items.push_back("NOTDEFINED");
+ items.push_back("USERDEFINED");
+ IFC4X3_IfcElectricFlowTreatmentDeviceTypeEnum_type = new enumeration_type("IfcElectricFlowTreatmentDeviceTypeEnum", 383, items);
+ }
+ {
+ std::vector items; items.reserve(5);
+ items.push_back("CHP");
+ items.push_back("ENGINEGENERATOR");
+ items.push_back("NOTDEFINED");
+ items.push_back("STANDALONE");
+ items.push_back("USERDEFINED");
+ IFC4X3_IfcElectricGeneratorTypeEnum_type = new enumeration_type("IfcElectricGeneratorTypeEnum", 386, items);
+ }
+ {
+ std::vector items; items.reserve(7);
+ items.push_back("DC");
+ items.push_back("INDUCTION");
+ items.push_back("NOTDEFINED");
+ items.push_back("POLYPHASE");
+ items.push_back("RELUCTANCESYNCHRONOUS");
+ items.push_back("SYNCHRONOUS");
+ items.push_back("USERDEFINED");
+ IFC4X3_IfcElectricMotorTypeEnum_type = new enumeration_type("IfcElectricMotorTypeEnum", 389, items);
+ }
+ IFC4X3_IfcElectricResistanceMeasure_type = new type_declaration("IfcElectricResistanceMeasure", 390, new simple_type(simple_type::real_type));
+ {
+ std::vector items; items.reserve(5);
+ items.push_back("NOTDEFINED");
+ items.push_back("RELAY");
+ items.push_back("TIMECLOCK");
+ items.push_back("TIMEDELAY");
+ items.push_back("USERDEFINED");
+ IFC4X3_IfcElectricTimeControlTypeEnum_type = new enumeration_type("IfcElectricTimeControlTypeEnum", 393, items);
+ }
+ IFC4X3_IfcElectricVoltageMeasure_type = new type_declaration("IfcElectricVoltageMeasure", 394, new simple_type(simple_type::real_type));
+ {
+ std::vector items; items.reserve(30);
+ items.push_back("ABUTMENT");
+ items.push_back("ACCESSORY_ASSEMBLY");
+ items.push_back("ARCH");
+ items.push_back("BEAM_GRID");
+ items.push_back("BRACED_FRAME");
+ items.push_back("CROSS_BRACING");
+ items.push_back("DECK");
+ items.push_back("DILATATIONPANEL");
+ items.push_back("ENTRANCEWORKS");
+ items.push_back("GIRDER");
+ items.push_back("GRID");
+ items.push_back("MAST");
+ items.push_back("NOTDEFINED");
+ items.push_back("PIER");
+ items.push_back("PYLON");
+ items.push_back("RAIL_MECHANICAL_EQUIPMENT_ASSEMBLY");
+ items.push_back("REINFORCEMENT_UNIT");
+ items.push_back("RIGID_FRAME");
+ items.push_back("SHELTER");
+ items.push_back("SIGNALASSEMBLY");
+ items.push_back("SLAB_FIELD");
+ items.push_back("SUMPBUSTER");
+ items.push_back("SUPPORTINGASSEMBLY");
+ items.push_back("SUSPENSIONASSEMBLY");
+ items.push_back("TRACKPANEL");
+ items.push_back("TRACTION_SWITCHING_ASSEMBLY");
+ items.push_back("TRAFFIC_CALMING_DEVICE");
+ items.push_back("TRUSS");
+ items.push_back("TURNOUTPANEL");
+ items.push_back("USERDEFINED");
+ IFC4X3_IfcElementAssemblyTypeEnum_type = new enumeration_type("IfcElementAssemblyTypeEnum", 399, items);
+ }
+ {
+ std::vector items; items.reserve(3);
+ items.push_back("COMPLEX");
+ items.push_back("ELEMENT");
+ items.push_back("PARTIAL");
+ IFC4X3_IfcElementCompositionEnum_type = new enumeration_type("IfcElementCompositionEnum", 402, items);
+ }
+ IFC4X3_IfcEnergyMeasure_type = new type_declaration("IfcEnergyMeasure", 409, new simple_type(simple_type::real_type));
+ {
+ std::vector items; items.reserve(4);
+ items.push_back("EXTERNALCOMBUSTION");
+ items.push_back("INTERNALCOMBUSTION");
+ items.push_back("NOTDEFINED");
+ items.push_back("USERDEFINED");
+ IFC4X3_IfcEngineTypeEnum_type = new enumeration_type("IfcEngineTypeEnum", 412, items);
+ }
+ {
+ std::vector items; items.reserve(11);
+ items.push_back("DIRECTEVAPORATIVEAIRWASHER");
+ items.push_back("DIRECTEVAPORATIVEPACKAGEDROTARYAIRCOOLER");
+ items.push_back("DIRECTEVAPORATIVERANDOMMEDIAAIRCOOLER");
+ items.push_back("DIRECTEVAPORATIVERIGIDMEDIAAIRCOOLER");
+ items.push_back("DIRECTEVAPORATIVESLINGERSPACKAGEDAIRCOOLER");
+ items.push_back("INDIRECTDIRECTCOMBINATION");
+ items.push_back("INDIRECTEVAPORATIVECOOLINGTOWERORCOILCOOLER");
+ items.push_back("INDIRECTEVAPORATIVEPACKAGEAIRCOOLER");
+ items.push_back("INDIRECTEVAPORATIVEWETCOIL");
+ items.push_back("NOTDEFINED");
+ items.push_back("USERDEFINED");
+ IFC4X3_IfcEvaporativeCoolerTypeEnum_type = new enumeration_type("IfcEvaporativeCoolerTypeEnum", 415, items);
+ }
+ {
+ std::vector items; items.reserve(8);
+ items.push_back("DIRECTEXPANSION");
+ items.push_back("DIRECTEXPANSIONBRAZEDPLATE");
+ items.push_back("DIRECTEXPANSIONSHELLANDTUBE");
+ items.push_back("DIRECTEXPANSIONTUBEINTUBE");
+ items.push_back("FLOODEDSHELLANDTUBE");
+ items.push_back("NOTDEFINED");
+ items.push_back("SHELLANDCOIL");
+ items.push_back("USERDEFINED");
+ IFC4X3_IfcEvaporatorTypeEnum_type = new enumeration_type("IfcEvaporatorTypeEnum", 418, items);
+ }
+ {
+ std::vector items; items.reserve(6);
+ items.push_back("EVENTCOMPLEX");
+ items.push_back("EVENTMESSAGE");
+ items.push_back("EVENTRULE");
+ items.push_back("EVENTTIME");
+ items.push_back("NOTDEFINED");
+ items.push_back("USERDEFINED");
+ IFC4X3_IfcEventTriggerTypeEnum_type = new enumeration_type("IfcEventTriggerTypeEnum", 421, items);
+ }
+ {
+ std::vector items; items.reserve(5);
+ items.push_back("ENDEVENT");
+ items.push_back("INTERMEDIATEEVENT");
+ items.push_back("NOTDEFINED");
+ items.push_back("STARTEVENT");
+ items.push_back("USERDEFINED");
+ IFC4X3_IfcEventTypeEnum_type = new enumeration_type("IfcEventTypeEnum", 423, items);
+ }
+ {
+ std::vector items; items.reserve(6);
+ items.push_back("EXTERNAL");
+ items.push_back("EXTERNAL_EARTH");
+ items.push_back("EXTERNAL_FIRE");
+ items.push_back("EXTERNAL_WATER");
+ items.push_back("NOTDEFINED");
+ items.push_back("USERDEFINED");
+ IFC4X3_IfcExternalSpatialElementTypeEnum_type = new enumeration_type("IfcExternalSpatialElementTypeEnum", 432, items);
+ }
+ {
+ std::vector items; items.reserve(10);
+ items.push_back("ABOVEGROUND");
+ items.push_back("BELOWGROUND");
+ items.push_back("JUNCTION");
+ items.push_back("LEVELCROSSING");
+ items.push_back("NOTDEFINED");
+ items.push_back("SEGMENT");
+ items.push_back("SUBSTRUCTURE");
+ items.push_back("SUPERSTRUCTURE");
+ items.push_back("TERMINAL");
+ items.push_back("USERDEFINED");
+ IFC4X3_IfcFacilityPartCommonTypeEnum_type = new enumeration_type("IfcFacilityPartCommonTypeEnum", 446, items);
+ }
+ {
+ std::vector items; items.reserve(6);
+ items.push_back("LATERAL");
+ items.push_back("LONGITUDINAL");
+ items.push_back("NOTDEFINED");
+ items.push_back("REGION");
+ items.push_back("USERDEFINED");
+ items.push_back("VERTICAL");
+ IFC4X3_IfcFacilityUsageEnum_type = new enumeration_type("IfcFacilityUsageEnum", 447, items);
+ }
+ {
+ std::vector items; items.reserve(9);
+ items.push_back("CENTRIFUGALAIRFOIL");
+ items.push_back("CENTRIFUGALBACKWARDINCLINEDCURVED");
+ items.push_back("CENTRIFUGALFORWARDCURVED");
+ items.push_back("CENTRIFUGALRADIAL");
+ items.push_back("NOTDEFINED");
+ items.push_back("PROPELLORAXIAL");
+ items.push_back("TUBEAXIAL");
+ items.push_back("USERDEFINED");
+ items.push_back("VANEAXIAL");
+ IFC4X3_IfcFanTypeEnum_type = new enumeration_type("IfcFanTypeEnum", 451, items);
+ }
+ {
+ std::vector items; items.reserve(5);
+ items.push_back("GLUE");
+ items.push_back("MORTAR");
+ items.push_back("NOTDEFINED");
+ items.push_back("USERDEFINED");
+ items.push_back("WELD");
+ IFC4X3_IfcFastenerTypeEnum_type = new enumeration_type("IfcFastenerTypeEnum", 454, items);
+ }
+ {
+ std::vector items; items.reserve(8);
+ items.push_back("AIRPARTICLEFILTER");
+ items.push_back("COMPRESSEDAIRFILTER");
+ items.push_back("NOTDEFINED");
+ items.push_back("ODORFILTER");
+ items.push_back("OILFILTER");
+ items.push_back("STRAINER");
+ items.push_back("USERDEFINED");
+ items.push_back("WATERFILTER");
+ IFC4X3_IfcFilterTypeEnum_type = new enumeration_type("IfcFilterTypeEnum", 464, items);
+ }
+ {
+ std::vector items; items.reserve(8);
+ items.push_back("BREECHINGINLET");
+ items.push_back("FIREHYDRANT");
+ items.push_back("FIREMONITOR");
+ items.push_back("HOSEREEL");
+ items.push_back("NOTDEFINED");
+ items.push_back("SPRINKLER");
+ items.push_back("SPRINKLERDEFLECTOR");
+ items.push_back("USERDEFINED");
+ IFC4X3_IfcFireSuppressionTerminalTypeEnum_type = new enumeration_type("IfcFireSuppressionTerminalTypeEnum", 467, items);
+ }
+ {
+ std::vector items; items.reserve(4);
+ items.push_back("NOTDEFINED");
+ items.push_back("SINK");
+ items.push_back("SOURCE");
+ items.push_back("SOURCEANDSINK");
+ IFC4X3_IfcFlowDirectionEnum_type = new enumeration_type("IfcFlowDirectionEnum", 471, items);
+ }
+ {
+ std::vector items; items.reserve(12);
+ items.push_back("AMMETER");
+ items.push_back("COMBINED");
+ items.push_back("FREQUENCYMETER");
+ items.push_back("NOTDEFINED");
+ items.push_back("PHASEANGLEMETER");
+ items.push_back("POWERFACTORMETER");
+ items.push_back("PRESSUREGAUGE");
+ items.push_back("THERMOMETER");
+ items.push_back("USERDEFINED");
+ items.push_back("VOLTMETER");
+ items.push_back("VOLTMETER_PEAK");
+ items.push_back("VOLTMETER_RMS");
+ IFC4X3_IfcFlowInstrumentTypeEnum_type = new enumeration_type("IfcFlowInstrumentTypeEnum", 476, items);
+ }
+ {
+ std::vector items; items.reserve(6);
+ items.push_back("ENERGYMETER");
+ items.push_back("GASMETER");
+ items.push_back("NOTDEFINED");
+ items.push_back("OILMETER");
+ items.push_back("USERDEFINED");
+ items.push_back("WATERMETER");
+ IFC4X3_IfcFlowMeterTypeEnum_type = new enumeration_type("IfcFlowMeterTypeEnum", 479, items);
+ }
+ IFC4X3_IfcFontStyle_type = new type_declaration("IfcFontStyle", 490, new simple_type(simple_type::string_type));
+ IFC4X3_IfcFontVariant_type = new type_declaration("IfcFontVariant", 491, new simple_type(simple_type::string_type));
+ IFC4X3_IfcFontWeight_type = new type_declaration("IfcFontWeight", 492, new simple_type(simple_type::string_type));
+ {
+ std::vector items; items.reserve(7);
+ items.push_back("CAISSON_FOUNDATION");
+ items.push_back("FOOTING_BEAM");
+ items.push_back("NOTDEFINED");
+ items.push_back("PAD_FOOTING");
+ items.push_back("PILE_CAP");
+ items.push_back("STRIP_FOOTING");
+ items.push_back("USERDEFINED");
+ IFC4X3_IfcFootingTypeEnum_type = new enumeration_type("IfcFootingTypeEnum", 495, items);
+ }
+ IFC4X3_IfcForceMeasure_type = new type_declaration("IfcForceMeasure", 496, new simple_type(simple_type::real_type));
+ IFC4X3_IfcFrequencyMeasure_type = new type_declaration("IfcFrequencyMeasure", 497, new simple_type(simple_type::real_type));
+ {
+ std::vector items; items.reserve(10);
+ items.push_back("BED");
+ items.push_back("CHAIR");
+ items.push_back("DESK");
+ items.push_back("FILECABINET");
+ items.push_back("NOTDEFINED");
+ items.push_back("SHELF");
+ items.push_back("SOFA");
+ items.push_back("TABLE");
+ items.push_back("TECHNICALCABINET");
+ items.push_back("USERDEFINED");
+ IFC4X3_IfcFurnitureTypeEnum_type = new enumeration_type("IfcFurnitureTypeEnum", 502, items);
+ }
+ {
+ std::vector items; items.reserve(5);
+ items.push_back("NOTDEFINED");
+ items.push_back("SOIL_BORING_POINT");
+ items.push_back("TERRAIN");
+ items.push_back("USERDEFINED");
+ items.push_back("VEGETATION");
+ IFC4X3_IfcGeographicElementTypeEnum_type = new enumeration_type("IfcGeographicElementTypeEnum", 505, items);
+ }
+ {
+ std::vector items; items.reserve(9);
+ items.push_back("ELEVATION_VIEW");
+ items.push_back("GRAPH_VIEW");
+ items.push_back("MODEL_VIEW");
+ items.push_back("NOTDEFINED");
+ items.push_back("PLAN_VIEW");
+ items.push_back("REFLECTED_PLAN_VIEW");
+ items.push_back("SECTION_VIEW");
+ items.push_back("SKETCH_VIEW");
+ items.push_back("USERDEFINED");
+ IFC4X3_IfcGeometricProjectionEnum_type = new enumeration_type("IfcGeometricProjectionEnum", 507, items);
+ }
+ {
+ std::vector items; items.reserve(5);
+ items.push_back("NOTDEFINED");
+ items.push_back("SOLID");
+ items.push_back("USERDEFINED");
+ items.push_back("VOID");
+ items.push_back("WATER");
+ IFC4X3_IfcGeotechnicalStratumTypeEnum_type = new enumeration_type("IfcGeotechnicalStratumTypeEnum", 518, items);
+ }
+ {
+ std::vector items; items.reserve(2);
+ items.push_back("GLOBAL_COORDS");
+ items.push_back("LOCAL_COORDS");
+ IFC4X3_IfcGlobalOrLocalEnum_type = new enumeration_type("IfcGlobalOrLocalEnum", 520, items);
+ }
+ IFC4X3_IfcGloballyUniqueId_type = new type_declaration("IfcGloballyUniqueId", 519, new simple_type(simple_type::string_type));
+ {
+ std::vector items; items.reserve(6);
+ items.push_back("IRREGULAR");
+ items.push_back("NOTDEFINED");
+ items.push_back("RADIAL");
+ items.push_back("RECTANGULAR");
+ items.push_back("TRIANGULAR");
+ items.push_back("USERDEFINED");
+ IFC4X3_IfcGridTypeEnum_type = new enumeration_type("IfcGridTypeEnum", 526, items);
+ }
+ {
+ std::vector items; items.reserve(5);
+ items.push_back("NOTDEFINED");
+ items.push_back("PLATE");
+ items.push_back("SHELLANDTUBE");
+ items.push_back("TURNOUTHEATING");
+ items.push_back("USERDEFINED");
+ IFC4X3_IfcHeatExchangerTypeEnum_type = new enumeration_type("IfcHeatExchangerTypeEnum", 532, items);
+ }
+ IFC4X3_IfcHeatFluxDensityMeasure_type = new type_declaration("IfcHeatFluxDensityMeasure", 533, new simple_type(simple_type::real_type));
+ IFC4X3_IfcHeatingValueMeasure_type = new type_declaration("IfcHeatingValueMeasure", 534, new simple_type(simple_type::real_type));
+ {
+ std::vector items; items.reserve(15);
+ items.push_back("ADIABATICAIRWASHER");
+ items.push_back("ADIABATICATOMIZING");
+ items.push_back("ADIABATICCOMPRESSEDAIRNOZZLE");
+ items.push_back("ADIABATICPAN");
+ items.push_back("ADIABATICRIGIDMEDIA");
+ items.push_back("ADIABATICULTRASONIC");
+ items.push_back("ADIABATICWETTEDELEMENT");
+ items.push_back("ASSISTEDBUTANE");
+ items.push_back("ASSISTEDELECTRIC");
+ items.push_back("ASSISTEDNATURALGAS");
+ items.push_back("ASSISTEDPROPANE");
+ items.push_back("ASSISTEDSTEAM");
+ items.push_back("NOTDEFINED");
+ items.push_back("STEAMINJECTION");
+ items.push_back("USERDEFINED");
+ IFC4X3_IfcHumidifierTypeEnum_type = new enumeration_type("IfcHumidifierTypeEnum", 537, items);
+ }
+ IFC4X3_IfcIdentifier_type = new type_declaration("IfcIdentifier", 538, new simple_type(simple_type::string_type));
+ IFC4X3_IfcIlluminanceMeasure_type = new type_declaration("IfcIlluminanceMeasure", 539, new simple_type(simple_type::real_type));
+ {
+ std::vector items; items.reserve(6);
+ items.push_back("BUMPER");
+ items.push_back("CRASHCUSHION");
+ items.push_back("DAMPINGSYSTEM");
+ items.push_back("FENDER");
+ items.push_back("NOTDEFINED");
+ items.push_back("USERDEFINED");
+ IFC4X3_IfcImpactProtectionDeviceTypeEnum_type = new enumeration_type("IfcImpactProtectionDeviceTypeEnum", 543, items);
+ }
+ IFC4X3_IfcInductanceMeasure_type = new type_declaration("IfcInductanceMeasure", 551, new simple_type(simple_type::real_type));
+ IFC4X3_IfcInteger_type = new type_declaration("IfcInteger", 552, new simple_type(simple_type::integer_type));
+ IFC4X3_IfcIntegerCountRateMeasure_type = new type_declaration("IfcIntegerCountRateMeasure", 553, new simple_type(simple_type::integer_type));
+ {
+ std::vector items; items.reserve(6);
+ items.push_back("CYCLONIC");
+ items.push_back("GREASE");
+ items.push_back("NOTDEFINED");
+ items.push_back("OIL");
+ items.push_back("PETROL");
+ items.push_back("USERDEFINED");
+ IFC4X3_IfcInterceptorTypeEnum_type = new enumeration_type("IfcInterceptorTypeEnum", 556, items);
+ }
+ {
+ std::vector items; items.reserve(6);
+ items.push_back("EXTERNAL");
+ items.push_back("EXTERNAL_EARTH");
+ items.push_back("EXTERNAL_FIRE");
+ items.push_back("EXTERNAL_WATER");
+ items.push_back("INTERNAL");
+ items.push_back("NOTDEFINED");
+ IFC4X3_IfcInternalOrExternalEnum_type = new enumeration_type("IfcInternalOrExternalEnum", 558, items);
+ }
+ {
+ std::vector items; items.reserve(5);
+ items.push_back("ASSETINVENTORY");
+ items.push_back("FURNITUREINVENTORY");
+ items.push_back("NOTDEFINED");
+ items.push_back("SPACEINVENTORY");
+ items.push_back("USERDEFINED");
+ IFC4X3_IfcInventoryTypeEnum_type = new enumeration_type("IfcInventoryTypeEnum", 561, items);
+ }
+ IFC4X3_IfcIonConcentrationMeasure_type = new type_declaration("IfcIonConcentrationMeasure", 562, new simple_type(simple_type::real_type));
+ IFC4X3_IfcIsothermalMoistureCapacityMeasure_type = new type_declaration("IfcIsothermalMoistureCapacityMeasure", 566, new simple_type(simple_type::real_type));
+ {
+ std::vector items; items.reserve(4);
+ items.push_back("DATA");
+ items.push_back("NOTDEFINED");
+ items.push_back("POWER");
+ items.push_back("USERDEFINED");
+ IFC4X3_IfcJunctionBoxTypeEnum_type = new enumeration_type("IfcJunctionBoxTypeEnum", 569, items);
+ }
+ IFC4X3_IfcKinematicViscosityMeasure_type = new type_declaration("IfcKinematicViscosityMeasure", 572, new simple_type(simple_type::real_type));
+ {
+ std::vector items; items.reserve(4);
+ items.push_back("PIECEWISE_BEZIER_KNOTS");
+ items.push_back("QUASI_UNIFORM_KNOTS");
+ items.push_back("UNIFORM_KNOTS");
+ items.push_back("UNSPECIFIED");
+ IFC4X3_IfcKnotType_type = new enumeration_type("IfcKnotType", 573, items);
+ }
+ IFC4X3_IfcLabel_type = new type_declaration("IfcLabel", 574, new simple_type(simple_type::string_type));
+ {
+ std::vector items; items.reserve(21);
+ items.push_back("ADMINISTRATION");
+ items.push_back("CARPENTRY");
+ items.push_back("CLEANING");
+ items.push_back("CONCRETE");
+ items.push_back("DRYWALL");
+ items.push_back("ELECTRIC");
+ items.push_back("FINISHING");
+ items.push_back("FLOORING");
+ items.push_back("GENERAL");
+ items.push_back("HVAC");
+ items.push_back("LANDSCAPING");
+ items.push_back("MASONRY");
+ items.push_back("NOTDEFINED");
+ items.push_back("PAINTING");
+ items.push_back("PAVING");
+ items.push_back("PLUMBING");
+ items.push_back("ROOFING");
+ items.push_back("SITEGRADING");
+ items.push_back("STEELWORK");
+ items.push_back("SURVEYING");
+ items.push_back("USERDEFINED");
+ IFC4X3_IfcLaborResourceTypeEnum_type = new enumeration_type("IfcLaborResourceTypeEnum", 577, items);
+ }
+ {
+ std::vector items; items.reserve(11);
+ items.push_back("COMPACTFLUORESCENT");
+ items.push_back("FLUORESCENT");
+ items.push_back("HALOGEN");
+ items.push_back("HIGHPRESSUREMERCURY");
+ items.push_back("HIGHPRESSURESODIUM");
+ items.push_back("LED");
+ items.push_back("METALHALIDE");
+ items.push_back("NOTDEFINED");
+ items.push_back("OLED");
+ items.push_back("TUNGSTENFILAMENT");
+ items.push_back("USERDEFINED");
+ IFC4X3_IfcLampTypeEnum_type = new enumeration_type("IfcLampTypeEnum", 581, items);
+ }
+ IFC4X3_IfcLanguageId_type = new type_declaration("IfcLanguageId", 582, new named_type(IFC4X3_IfcIdentifier_type));
+ {
+ std::vector items; items.reserve(3);
+ items.push_back("AXIS1");
+ items.push_back("AXIS2");
+ items.push_back("AXIS3");
+ IFC4X3_IfcLayerSetDirectionEnum_type = new enumeration_type("IfcLayerSetDirectionEnum", 584, items);
+ }
+ IFC4X3_IfcLengthMeasure_type = new type_declaration("IfcLengthMeasure", 585, new simple_type(simple_type::real_type));
+ {
+ std::vector items; items.reserve(4);
+ items.push_back("NOTDEFINED");
+ items.push_back("TYPE_A");
+ items.push_back("TYPE_B");
+ items.push_back("TYPE_C");
+ IFC4X3_IfcLightDistributionCurveEnum_type = new enumeration_type("IfcLightDistributionCurveEnum", 589, items);
+ }
+ {
+ std::vector items; items.reserve(11);
+ items.push_back("COMPACTFLUORESCENT");
+ items.push_back("FLUORESCENT");
+ items.push_back("HIGHPRESSUREMERCURY");
+ items.push_back("HIGHPRESSURESODIUM");
+ items.push_back("LIGHTEMITTINGDIODE");
+ items.push_back("LOWPRESSURESODIUM");
+ items.push_back("LOWVOLTAGEHALOGEN");
+ items.push_back("MAINVOLTAGEHALOGEN");
+ items.push_back("METALHALIDE");
+ items.push_back("NOTDEFINED");
+ items.push_back("TUNGSTENFILAMENT");
+ IFC4X3_IfcLightEmissionSourceEnum_type = new enumeration_type("IfcLightEmissionSourceEnum", 592, items);
+ }
+ {
+ std::vector items; items.reserve(5);
+ items.push_back("DIRECTIONSOURCE");
+ items.push_back("NOTDEFINED");
+ items.push_back("POINTSOURCE");
+ items.push_back("SECURITYLIGHTING");
+ items.push_back("USERDEFINED");
+ IFC4X3_IfcLightFixtureTypeEnum_type = new enumeration_type("IfcLightFixtureTypeEnum", 595, items);
+ }
+ IFC4X3_IfcLinearForceMeasure_type = new type_declaration("IfcLinearForceMeasure", 605, new simple_type(simple_type::real_type));
+ IFC4X3_IfcLinearMomentMeasure_type = new type_declaration("IfcLinearMomentMeasure", 606, new simple_type(simple_type::real_type));
+ IFC4X3_IfcLinearStiffnessMeasure_type = new type_declaration("IfcLinearStiffnessMeasure", 609, new simple_type(simple_type::real_type));
+ IFC4X3_IfcLinearVelocityMeasure_type = new type_declaration("IfcLinearVelocityMeasure", 610, new simple_type(simple_type::real_type));
+ {
+ std::vector items; items.reserve(4);
+ items.push_back("HOSEREEL");
+ items.push_back("LOADINGARM");
+ items.push_back("NOTDEFINED");
+ items.push_back("USERDEFINED");
+ IFC4X3_IfcLiquidTerminalTypeEnum_type = new enumeration_type("IfcLiquidTerminalTypeEnum", 614, items);
+ }
+ {
+ std::vector items; items.reserve(5);
+ items.push_back("LOAD_CASE");
+ items.push_back("LOAD_COMBINATION");
+ items.push_back("LOAD_GROUP");
+ items.push_back("NOTDEFINED");
+ items.push_back("USERDEFINED");
+ IFC4X3_IfcLoadGroupTypeEnum_type = new enumeration_type("IfcLoadGroupTypeEnum", 615, items);
+ }
+ IFC4X3_IfcLogical_type = new type_declaration("IfcLogical", 617, new simple_type(simple_type::logical_type));
+ {
+ std::vector items; items.reserve(5);
+ items.push_back("LOGICALAND");
+ items.push_back("LOGICALNOTAND");
+ items.push_back("LOGICALNOTOR");
+ items.push_back("LOGICALOR");
+ items.push_back("LOGICALXOR");
+ IFC4X3_IfcLogicalOperatorEnum_type = new enumeration_type("IfcLogicalOperatorEnum", 618, items);
+ }
+ IFC4X3_IfcLuminousFluxMeasure_type = new type_declaration("IfcLuminousFluxMeasure", 621, new simple_type(simple_type::real_type));
+ IFC4X3_IfcLuminousIntensityDistributionMeasure_type = new type_declaration("IfcLuminousIntensityDistributionMeasure", 622, new simple_type(simple_type::real_type));
+ IFC4X3_IfcLuminousIntensityMeasure_type = new type_declaration("IfcLuminousIntensityMeasure", 623, new simple_type(simple_type::real_type));
+ IFC4X3_IfcMagneticFluxDensityMeasure_type = new type_declaration("IfcMagneticFluxDensityMeasure", 624, new simple_type(simple_type::real_type));
+ IFC4X3_IfcMagneticFluxMeasure_type = new type_declaration("IfcMagneticFluxMeasure", 625, new simple_type(simple_type::real_type));
+ {
+ std::vector items; items.reserve(21);
+ items.push_back("BARRIERBEACH");
+ items.push_back("BREAKWATER");
+ items.push_back("CANAL");
+ items.push_back("DRYDOCK");
+ items.push_back("FLOATINGDOCK");
+ items.push_back("HYDROLIFT");
+ items.push_back("JETTY");
+ items.push_back("LAUNCHRECOVERY");
+ items.push_back("MARINEDEFENCE");
+ items.push_back("NAVIGATIONALCHANNEL");
+ items.push_back("NOTDEFINED");
+ items.push_back("PORT");
+ items.push_back("QUAY");
+ items.push_back("REVETMENT");
+ items.push_back("SHIPLIFT");
+ items.push_back("SHIPLOCK");
+ items.push_back("SHIPYARD");
+ items.push_back("SLIPWAY");
+ items.push_back("USERDEFINED");
+ items.push_back("WATERWAY");
+ items.push_back("WATERWAYSHIPLIFT");
+ IFC4X3_IfcMarineFacilityTypeEnum_type = new enumeration_type("IfcMarineFacilityTypeEnum", 630, items);
+ }
+ {
+ std::vector items; items.reserve(26);
+ items.push_back("ABOVEWATERLINE");
+ items.push_back("ANCHORAGE");
+ items.push_back("APPROACHCHANNEL");
+ items.push_back("BELOWWATERLINE");
+ items.push_back("BERTHINGSTRUCTURE");
+ items.push_back("CHAMBER");
+ items.push_back("CILL_LEVEL");
+ items.push_back("COPELEVEL");
+ items.push_back("CORE");
+ items.push_back("CREST");
+ items.push_back("GATEHEAD");
+ items.push_back("GUDINGSTRUCTURE");
+ items.push_back("HIGHWATERLINE");
+ items.push_back("LANDFIELD");
+ items.push_back("LEEWARDSIDE");
+ items.push_back("LOWWATERLINE");
+ items.push_back("MANUFACTURING");
+ items.push_back("NAVIGATIONALAREA");
+ items.push_back("NOTDEFINED");
+ items.push_back("PROTECTION");
+ items.push_back("SHIPTRANSFER");
+ items.push_back("STORAGEAREA");
+ items.push_back("USERDEFINED");
+ items.push_back("VEHICLESERVICING");
+ items.push_back("WATERFIELD");
+ items.push_back("WEATHERSIDE");
+ IFC4X3_IfcMarinePartTypeEnum_type = new enumeration_type("IfcMarinePartTypeEnum", 632, items);
+ }
+ IFC4X3_IfcMassDensityMeasure_type = new type_declaration("IfcMassDensityMeasure", 633, new simple_type(simple_type::real_type));
+ IFC4X3_IfcMassFlowRateMeasure_type = new type_declaration("IfcMassFlowRateMeasure", 634, new simple_type(simple_type::real_type));
+ IFC4X3_IfcMassMeasure_type = new type_declaration("IfcMassMeasure", 635, new simple_type(simple_type::real_type));
+ IFC4X3_IfcMassPerLengthMeasure_type = new type_declaration("IfcMassPerLengthMeasure", 636, new simple_type(simple_type::real_type));
+ {
+ std::vector items; items.reserve(17);
+ items.push_back("ANCHORBOLT");
+ items.push_back("BOLT");
+ items.push_back("CHAIN");
+ items.push_back("COUPLER");
+ items.push_back("DOWEL");
+ items.push_back("NAIL");
+ items.push_back("NAILPLATE");
+ items.push_back("NOTDEFINED");
+ items.push_back("RAILFASTENING");
+ items.push_back("RAILJOINT");
+ items.push_back("RIVET");
+ items.push_back("ROPE");
+ items.push_back("SCREW");
+ items.push_back("SHEARCONNECTOR");
+ items.push_back("STAPLE");
+ items.push_back("STUDSHEARCONNECTOR");
+ items.push_back("USERDEFINED");
+ IFC4X3_IfcMechanicalFastenerTypeEnum_type = new enumeration_type("IfcMechanicalFastenerTypeEnum", 661, items);
+ }
+ {
+ std::vector items; items.reserve(7);
+ items.push_back("AIRSTATION");
+ items.push_back("FEEDAIRUNIT");
+ items.push_back("NOTDEFINED");
+ items.push_back("OXYGENGENERATOR");
+ items.push_back("OXYGENPLANT");
+ items.push_back("USERDEFINED");
+ items.push_back("VACUUMSTATION");
+ IFC4X3_IfcMedicalDeviceTypeEnum_type = new enumeration_type("IfcMedicalDeviceTypeEnum", 664, items);
+ }
+ {
+ std::vector items; items.reserve(21);
+ items.push_back("ARCH_SEGMENT");
+ items.push_back("BRACE");
+ items.push_back("CHORD");
+ items.push_back("COLLAR");
+ items.push_back("MEMBER");
+ items.push_back("MULLION");
+ items.push_back("NOTDEFINED");
+ items.push_back("PLATE");
+ items.push_back("POST");
+ items.push_back("PURLIN");
+ items.push_back("RAFTER");
+ items.push_back("STAY_CABLE");
+ items.push_back("STIFFENING_RIB");
+ items.push_back("STRINGER");
+ items.push_back("STRUCTURALCABLE");
+ items.push_back("STRUT");
+ items.push_back("STUD");
+ items.push_back("SUSPENDER");
+ items.push_back("SUSPENSION_CABLE");
+ items.push_back("TIEBAR");
+ items.push_back("USERDEFINED");
+ IFC4X3_IfcMemberTypeEnum_type = new enumeration_type("IfcMemberTypeEnum", 667, items);
+ }
+ {
+ std::vector items; items.reserve(15);
+ items.push_back("ACCESSPOINT");
+ items.push_back("BASEBANDUNIT");
+ items.push_back("BASETRANSCEIVERSTATION");
+ items.push_back("E_UTRAN_NODE_B");
+ items.push_back("GATEWAY_GPRS_SUPPORT_NODE");
+ items.push_back("MASTERUNIT");
+ items.push_back("MOBILESWITCHINGCENTER");
+ items.push_back("MSCSERVER");
+ items.push_back("NOTDEFINED");
+ items.push_back("PACKETCONTROLUNIT");
+ items.push_back("REMOTERADIOUNIT");
+ items.push_back("REMOTEUNIT");
+ items.push_back("SERVICE_GPRS_SUPPORT_NODE");
+ items.push_back("SUBSCRIBERSERVER");
+ items.push_back("USERDEFINED");
+ IFC4X3_IfcMobileTelecommunicationsApplianceTypeEnum_type = new enumeration_type("IfcMobileTelecommunicationsApplianceTypeEnum", 673, items);
+ }
+ IFC4X3_IfcModulusOfElasticityMeasure_type = new type_declaration("IfcModulusOfElasticityMeasure", 674, new simple_type(simple_type::real_type));
+ IFC4X3_IfcModulusOfLinearSubgradeReactionMeasure_type = new type_declaration("IfcModulusOfLinearSubgradeReactionMeasure", 675, new simple_type(simple_type::real_type));
+ IFC4X3_IfcModulusOfRotationalSubgradeReactionMeasure_type = new type_declaration("IfcModulusOfRotationalSubgradeReactionMeasure", 676, new simple_type(simple_type::real_type));
+ {
+ std::vector items; items.reserve(2);
+ items.push_back(IFC4X3_IfcBoolean_type);
+ items.push_back(IFC4X3_IfcModulusOfRotationalSubgradeReactionMeasure_type);
+ IFC4X3_IfcModulusOfRotationalSubgradeReactionSelect_type = new select_type("IfcModulusOfRotationalSubgradeReactionSelect", 677, items);
+ }
+ IFC4X3_IfcModulusOfSubgradeReactionMeasure_type = new type_declaration("IfcModulusOfSubgradeReactionMeasure", 678, new simple_type(simple_type::real_type));
+ {
+ std::vector items; items.reserve(2);
+ items.push_back(IFC4X3_IfcBoolean_type);
+ items.push_back(IFC4X3_IfcModulusOfSubgradeReactionMeasure_type);
+ IFC4X3_IfcModulusOfSubgradeReactionSelect_type = new select_type("IfcModulusOfSubgradeReactionSelect", 679, items);
+ }
+ {
+ std::vector items; items.reserve(2);
+ items.push_back(IFC4X3_IfcBoolean_type);
+ items.push_back(IFC4X3_IfcModulusOfLinearSubgradeReactionMeasure_type);
+ IFC4X3_IfcModulusOfTranslationalSubgradeReactionSelect_type = new select_type("IfcModulusOfTranslationalSubgradeReactionSelect", 680, items);
+ }
+ IFC4X3_IfcMoistureDiffusivityMeasure_type = new type_declaration("IfcMoistureDiffusivityMeasure", 681, new simple_type(simple_type::real_type));
+ IFC4X3_IfcMolecularWeightMeasure_type = new type_declaration("IfcMolecularWeightMeasure", 682, new simple_type(simple_type::real_type));
+ IFC4X3_IfcMomentOfInertiaMeasure_type = new type_declaration("IfcMomentOfInertiaMeasure", 683, new simple_type(simple_type::real_type));
+ IFC4X3_IfcMonetaryMeasure_type = new type_declaration("IfcMonetaryMeasure", 684, new simple_type(simple_type::real_type));
+ IFC4X3_IfcMonthInYearNumber_type = new type_declaration("IfcMonthInYearNumber", 686, new simple_type(simple_type::integer_type));
+ {
+ std::vector items; items.reserve(7);
+ items.push_back("BOLLARD");
+ items.push_back("LINETENSIONER");
+ items.push_back("MAGNETICDEVICE");
+ items.push_back("MOORINGHOOKS");
+ items.push_back("NOTDEFINED");
+ items.push_back("USERDEFINED");
+ items.push_back("VACUUMDEVICE");
+ IFC4X3_IfcMooringDeviceTypeEnum_type = new enumeration_type("IfcMooringDeviceTypeEnum", 689, items);
+ }
+ {
+ std::vector items; items.reserve(5);
+ items.push_back("BELTDRIVE");
+ items.push_back("COUPLING");
+ items.push_back("DIRECTDRIVE");
+ items.push_back("NOTDEFINED");
+ items.push_back("USERDEFINED");
+ IFC4X3_IfcMotorConnectionTypeEnum_type = new enumeration_type("IfcMotorConnectionTypeEnum", 692, items);
+ }
+ {
+ std::vector items; items.reserve(4);
+ items.push_back("BEACON");
+ items.push_back("BUOY");
+ items.push_back("NOTDEFINED");
+ items.push_back("USERDEFINED");
+ IFC4X3_IfcNavigationElementTypeEnum_type = new enumeration_type("IfcNavigationElementTypeEnum", 696, items);
+ }
+ IFC4X3_IfcNonNegativeLengthMeasure_type = new type_declaration("IfcNonNegativeLengthMeasure", 697, new named_type(IFC4X3_IfcLengthMeasure_type));
+ IFC4X3_IfcNumericMeasure_type = new type_declaration("IfcNumericMeasure", 699, new simple_type(simple_type::number_type));
+ {
+ std::vector items; items.reserve(8);
+ items.push_back("ACTOR");
+ items.push_back("CONTROL");
+ items.push_back("GROUP");
+ items.push_back("NOTDEFINED");
+ items.push_back("PROCESS");
+ items.push_back("PRODUCT");
+ items.push_back("PROJECT");
+ items.push_back("RESOURCE");
+ IFC4X3_IfcObjectTypeEnum_type = new enumeration_type("IfcObjectTypeEnum", 706, items);
+ }
+ {
+ std::vector items; items.reserve(13);
+ items.push_back("CODECOMPLIANCE");
+ items.push_back("CODEWAIVER");
+ items.push_back("DESIGNINTENT");
+ items.push_back("EXTERNAL");
+ items.push_back("HEALTHANDSAFETY");
+ items.push_back("MERGECONFLICT");
+ items.push_back("MODELVIEW");
+ items.push_back("NOTDEFINED");
+ items.push_back("PARAMETER");
+ items.push_back("REQUIREMENT");
+ items.push_back("SPECIFICATION");
+ items.push_back("TRIGGERCONDITION");
+ items.push_back("USERDEFINED");
+ IFC4X3_IfcObjectiveEnum_type = new enumeration_type("IfcObjectiveEnum", 703, items);
+ }
+ {
+ std::vector items; items.reserve(9);
+ items.push_back("ASSIGNEE");
+ items.push_back("ASSIGNOR");
+ items.push_back("LESSEE");
+ items.push_back("LESSOR");
+ items.push_back("LETTINGAGENT");
+ items.push_back("NOTDEFINED");
+ items.push_back("OWNER");
+ items.push_back("TENANT");
+ items.push_back("USERDEFINED");
+ IFC4X3_IfcOccupantTypeEnum_type = new enumeration_type("IfcOccupantTypeEnum", 708, items);
+ }
+ {
+ std::vector items; items.reserve(4);
+ items.push_back("NOTDEFINED");
+ items.push_back("OPENING");
+ items.push_back("RECESS");
+ items.push_back("USERDEFINED");
+ IFC4X3_IfcOpeningElementTypeEnum_type = new enumeration_type("IfcOpeningElementTypeEnum", 715, items);
+ }
+ {
+ std::vector items; items.reserve(7);
+ items.push_back("AUDIOVISUALOUTLET");
+ items.push_back("COMMUNICATIONSOUTLET");
+ items.push_back("DATAOUTLET");
+ items.push_back("NOTDEFINED");
+ items.push_back("POWEROUTLET");
+ items.push_back("TELEPHONEOUTLET");
+ items.push_back("USERDEFINED");
+ IFC4X3_IfcOutletTypeEnum_type = new enumeration_type("IfcOutletTypeEnum", 723, items);
+ }
+ IFC4X3_IfcPHMeasure_type = new type_declaration("IfcPHMeasure", 740, new simple_type(simple_type::real_type));
+ IFC4X3_IfcParameterValue_type = new type_declaration("IfcParameterValue", 726, new simple_type(simple_type::real_type));
+ {
+ std::vector items; items.reserve(4);
+ items.push_back("FLEXIBLE");
+ items.push_back("NOTDEFINED");
+ items.push_back("RIGID");
+ items.push_back("USERDEFINED");
+ IFC4X3_IfcPavementTypeEnum_type = new enumeration_type("IfcPavementTypeEnum", 730, items);
+ }
+ {
+ std::vector items; items.reserve(2);
+ items.push_back("NOTDEFINED");
+ items.push_back("USERDEFINED");
+ IFC4X3_IfcPerformanceHistoryTypeEnum_type = new enumeration_type("IfcPerformanceHistoryTypeEnum", 733, items);
+ }
+ {
+ std::vector items; items.reserve(5);
+ items.push_back("GRILL");
+ items.push_back("LOUVER");
+ items.push_back("NOTDEFINED");
+ items.push_back("SCREEN");
+ items.push_back("USERDEFINED");
+ IFC4X3_IfcPermeableCoveringOperationEnum_type = new enumeration_type("IfcPermeableCoveringOperationEnum", 734, items);
+ }
+ {
+ std::vector items; items.reserve(5);
+ items.push_back("ACCESS");
+ items.push_back("BUILDING");
+ items.push_back("NOTDEFINED");
+ items.push_back("USERDEFINED");
+ items.push_back("WORK");
+ IFC4X3_IfcPermitTypeEnum_type = new enumeration_type("IfcPermitTypeEnum", 737, items);
+ }
+ {
+ std::vector items; items.reserve(3);
+ items.push_back("NOTDEFINED");
+ items.push_back("PHYSICAL");
+ items.push_back("VIRTUAL");
+ IFC4X3_IfcPhysicalOrVirtualEnum_type = new enumeration_type("IfcPhysicalOrVirtualEnum", 742, items);
+ }
+ {
+ std::vector items; items.reserve(6);
+ items.push_back("CAST_IN_PLACE");
+ items.push_back("COMPOSITE");
+ items.push_back("NOTDEFINED");
+ items.push_back("PRECAST_CONCRETE");
+ items.push_back("PREFAB_STEEL");
+ items.push_back("USERDEFINED");
+ IFC4X3_IfcPileConstructionEnum_type = new enumeration_type("IfcPileConstructionEnum", 746, items);
+ }
+ {
+ std::vector items; items.reserve(8);
+ items.push_back("BORED");
+ items.push_back("COHESION");
+ items.push_back("DRIVEN");
+ items.push_back("FRICTION");
+ items.push_back("JETGROUTING");
+ items.push_back("NOTDEFINED");
+ items.push_back("SUPPORT");
+ items.push_back("USERDEFINED");
+ IFC4X3_IfcPileTypeEnum_type = new enumeration_type("IfcPileTypeEnum", 748, items);
+ }
+ {
+ std::vector items; items.reserve(9);
+ items.push_back("BEND");
+ items.push_back("CONNECTOR");
+ items.push_back("ENTRY");
+ items.push_back("EXIT");
+ items.push_back("JUNCTION");
+ items.push_back("NOTDEFINED");
+ items.push_back("OBSTRUCTION");
+ items.push_back("TRANSITION");
+ items.push_back("USERDEFINED");
+ IFC4X3_IfcPipeFittingTypeEnum_type = new enumeration_type("IfcPipeFittingTypeEnum", 751, items);
+ }
+ {
+ std::vector items; items.reserve(7);
+ items.push_back("CULVERT");
+ items.push_back("FLEXIBLESEGMENT");
+ items.push_back("GUTTER");
+ items.push_back("NOTDEFINED");
+ items.push_back("RIGIDSEGMENT");
+ items.push_back("SPOOL");
+ items.push_back("USERDEFINED");
+ IFC4X3_IfcPipeSegmentTypeEnum_type = new enumeration_type("IfcPipeSegmentTypeEnum", 754, items);
+ }
+ IFC4X3_IfcPlanarForceMeasure_type = new type_declaration("IfcPlanarForceMeasure", 759, new simple_type(simple_type::real_type));
+ IFC4X3_IfcPlaneAngleMeasure_type = new type_declaration("IfcPlaneAngleMeasure", 761, new simple_type(simple_type::real_type));
+ {
+ std::vector items; items.reserve(11);
+ items.push_back("BASE_PLATE");
+ items.push_back("COVER_PLATE");
+ items.push_back("CURTAIN_PANEL");
+ items.push_back("FLANGE_PLATE");
+ items.push_back("GUSSET_PLATE");
+ items.push_back("NOTDEFINED");
+ items.push_back("SHEET");
+ items.push_back("SPLICE_PLATE");
+ items.push_back("STIFFENER_PLATE");
+ items.push_back("USERDEFINED");
+ items.push_back("WEB_PLATE");
+ IFC4X3_IfcPlateTypeEnum_type = new enumeration_type("IfcPlateTypeEnum", 764, items);
+ }
+ IFC4X3_IfcPositiveInteger_type = new type_declaration("IfcPositiveInteger", 777, new named_type(IFC4X3_IfcInteger_type));
+ IFC4X3_IfcPositiveLengthMeasure_type = new type_declaration("IfcPositiveLengthMeasure", 778, new named_type(IFC4X3_IfcLengthMeasure_type));
+ IFC4X3_IfcPositivePlaneAngleMeasure_type = new type_declaration("IfcPositivePlaneAngleMeasure", 779, new named_type(IFC4X3_IfcPlaneAngleMeasure_type));
+ IFC4X3_IfcPowerMeasure_type = new type_declaration("IfcPowerMeasure", 782, new simple_type(simple_type::real_type));
+ {
+ std::vector items; items.reserve(3);
+ items.push_back("CURVE3D");
+ items.push_back("PCURVE_S1");
+ items.push_back("PCURVE_S2");
+ IFC4X3_IfcPreferredSurfaceCurveRepresentation_type = new enumeration_type("IfcPreferredSurfaceCurveRepresentation", 789, items);
+ }
+ IFC4X3_IfcPresentableText_type = new type_declaration("IfcPresentableText", 790, new simple_type(simple_type::string_type));
+ IFC4X3_IfcPressureMeasure_type = new type_declaration("IfcPressureMeasure", 795, new simple_type(simple_type::real_type));
+ {
+ std::vector