diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000000..3b83ce65bc --- /dev/null +++ b/.gitignore @@ -0,0 +1,10 @@ +# Dependency and build folders created by the build scripts +/deps*/ +/build*/ +/install*/ +/win/BuildDepsCache*.txt +# IfcExpressParser residue +/src/ifcexpressparser/__pycache__ +/src/ifcexpressparser/express_parser.py +# Python test residue +/test/__pycache__ diff --git a/README.md b/README.md index b64227f291..059869ee62 100644 --- a/README.md +++ b/README.md @@ -1,52 +1,63 @@ IfcOpenShell ============ -open source (LGPL) software library for working with the IFC file format +IfcOpenShell is an open source ([LGPL]) software library for working with the Industry Foundation Classes ([IFC]) +file format. Currently supported IFC releases are [IFC2x3 TC1] and [IFC4]. -[http://ifcopenshell.org](http://ifcopenshell.org) -[http://academy.ifcopenshell.org](http://academy.ifcopenshell.org) +For more information, see +* [http://ifcopenshell.org](http://ifcopenshell.org) +* [http://academy.ifcopenshell.org](http://academy.ifcopenshell.org) +Prerequisites +------------- +* Git +* CMake (2.6 or newer) +* Windows: Visual Studio 2008 or newer with C++ toolset, MinGW not supported currently +* *nix: GCC 4.7 or newer, or Clang (any version should work, but not tested) Dependencies -============ +------------- * [Boost](http://www.boost.org/) -* Open Cascade *optional*, but required for building IfcGeom) - [Official](http://www.opencascade.org/getocc/download/loadocc/) or [community edition](https://github.com/tpaviot/oce) +* Open Cascade - *optional*, but required for building IfcGeom + ([official](http://www.opencascade.org/getocc/download/loadocc/) or [community edition](https://github.com/tpaviot/oce)) For converting IFC representation items into BRep solids and tesselated meshes -* [ICU](http://site.icu-project.org/) *optional* +* [ICU](http://site.icu-project.org/) - *optional* For handling code pages and Unicode in the parser -* [OpenCOLLADA](https://github.com/khronosGroup/OpenCOLLADA/) *optional* +* [OpenCOLLADA](https://github.com/khronosGroup/OpenCOLLADA/) - *optional* For IfcConvert to be able to write tessellated Collada (.dae) files -* [SWIG](http://www.swig.org/), [Python](https://www.python.org/) libraries *optional* +* [SWIG](http://www.swig.org/) and [Python](https://www.python.org/) - *optional* For building the IfcOpenShell Python interface and the Blender add-on -* 3ds max SDK *optional* - For building the 3ds max plug-in +* [3ds Max SDK](http://www.autodesk.com/products/3ds-max/free-trial) - *optional* + For building the 3ds Max plug-in. + All recent versions of 3ds Max (2014 and newer) are 64-bit only, so a 64-bit installation is assumed. +Building IfcOpenShell +--------------------- +### Compiling on Windows +The preferred way to fetch and build this project's dependencies is to use the build scripts +in win/ folder. **See [win/readme.md] for more information**. Instructions in a nutshell +(**assuming Visual Studio 2015 x64 environment variables set**): -Compiling on Windows -==================== -Users are advised to use the Visual Studio .sln file in the win/ folder. -For Windows users a prebuilt Open CASCADE version is available from the -http://opencascade.org website. Download and install this version and -provide the paths to the Open CASCADE header and library files to MS -Visual Studio C++. + > git clone https://github.com/IfcOpenShell/IfcOpenShell.git + > cd IfcOpenShell\win + > build-deps.cmd + > run-cmake.bat -For building the Autodesk 3ds Max plugin, the 3ds Max SDK needs to be -installed as well as 3ds Max itself. Please provide the include and -library paths to Visual Studio. +You can now open and build the solution file in Visual Studio: -For building the IfcPython wrapper, SWIG needs to be installed. Please -download the latest swigwin version from http://www.swig.org/download.html. -After extracting the .zip file, please add the extracted folder to the PATH -environment variable. Python needs to be installed, please provide the -include and library paths to Visual Studio. + > ..\build-vs2015-x64\IfcOpenShell.sln +As the scripts default to using the `RelWithDebInfo` configuration, and a freshly created solution by CMake defaults +to `Debug`, make sure to switch the used build configuration. Build the `INSTALL` project (right-click -> Project +Only) to deploy the headers and binaries into a single location if wanted/needed. -Compiling on *nix -================= -Users are advised to build IfcOpenShell using the cmake file provided in -the cmake/ folder. There might be an Open CASCADE package in your operating -system's software repository. If not, you will need to compile Open -CASCADE yourself. See http://opencascade.org. +Alternatively, one can use the utility batch files to build and install the project easily from the command-line: + + > build-ifcopenshell.cmd + > install-ifcopenshell.cmd + +### Compiling on *nix +There might be an Open CASCADE package in your operating system's software repository. If not, you will need to compile +Open CASCADE yourself. See http://opencascade.org. For building the IfcPython wrapper, SWIG and Python development are required. @@ -75,7 +86,10 @@ To build IfcOpenShell please take the following steps: $ cmake ../ $ make -If all worked out correctly you can now use IfcOpenShell. For example: +If all worked out correctly you can now use IfcOpenShell. See the examples below. + +Usage examples +-------------- **Invoking IfcConvert from the command line** @@ -84,8 +98,6 @@ If all worked out correctly you can now use IfcOpenShell. For example: $ ./IfcConvert Munkerud_hus6_BE.ifc $ less Munkerud_hus6_BE.obj -Or: - **Using the IfcOpenShell Python interface** $ wget -O duplex.zip http://projects.buildingsmartalliance.org/files/?artifact_id=4278 @@ -146,3 +158,9 @@ Or: >>> >>> # Writing IFC-SPF files to disk: >>> f.write("out.ifc") + +[LGPL]: https://github.com/IfcOpenShell/IfcOpenShell/tree/master/COPYING "LGPL" +[IFC]: http://www.buildingsmart-tech.org/specifications/ifc-overview "IFC" +[IFC2x3 TC1]: http://www.buildingsmart-tech.org/specifications/ifc-releases/ifc2x3-tc1-release "IFC2x3 TC1" +[IFC4]: http://www.buildingsmart-tech.org/specifications/ifc-releases/ifc4-release "IFC4" +[win/readme.md]: https://github.com/IfcOpenShell/IfcOpenShell/tree/master/win/readme.md "win/readme.md" \ No newline at end of file diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index 7431c8d566..6ddb3c1645 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -1,17 +1,91 @@ -cmake_minimum_required (VERSION 2.6) +################################################################################ +# # +# 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 . # +# # +################################################################################ + +cmake_minimum_required (VERSION 2.8.5) + project (IfcOpenShell) -FIND_PACKAGE(Boost REQUIRED COMPONENTS program_options) +OPTION(UNICODE_SUPPORT "Build IfcOpenShell with Unicode support (requires ICU)." ON) +OPTION(COLLADA_SUPPORT "Build IfcConvert with COLLADA support (requires OpenCOLLADA)." ON) +OPTION(ENABLE_BUILD_OPTIMIZATIONS "Enable certain compiler and linker optimizations on RelWithDebInfo and Release builds." OFF) +OPTION(IFCCONVERT_DOUBLE_PRECISION "IfcConvert: Use double precision floating-point numbers." ON) +OPTION(USE_IFC4 "Use IFC 4 instead of IFC 2x3 (full rebuild recommended when switching this)" OFF) +OPTION(BUILD_IFCPYTHON "Build IfcPython." ON) +OPTION(BUILD_EXAMPLES "Build example applications." ON) +OPTION(USE_VLD "Use Visual Leak Detector for debugging memory leaks, MSVC-only." OFF) +OPTION(BUILD_IFCMAX "Build IfcMax, a 3ds Max plug-in, Windows-only." OFF) +# TODO QtViewer is deprecated ATM as it uses the 0.4 API +# OPTION(BUILD_QTVIEWER "Build IfcOpenShell Qt GUI Viewer (requires Qt 4 framework)." OFF) + + +# Create cache entries if absent for environment variables +MACRO(UNIFY_ENVVARS_AND_CACHE VAR) + IF ((NOT DEFINED ${VAR}) AND (NOT "$ENV{${VAR}}" STREQUAL "")) + SET(${VAR} "$ENV{${VAR}}" CACHE STRING "${VAR}" FORCE) + ENDIF() +ENDMACRO() + +UNIFY_ENVVARS_AND_CACHE(OCC_INCLUDE_DIR) +UNIFY_ENVVARS_AND_CACHE(OCC_LIBRARY_DIR) +UNIFY_ENVVARS_AND_CACHE(ICU_INCLUDE_DIR) +UNIFY_ENVVARS_AND_CACHE(ICU_LIBRARY_DIR) +UNIFY_ENVVARS_AND_CACHE(OPENCOLLADA_INCLUDE_DIR) +UNIFY_ENVVARS_AND_CACHE(OPENCOLLADA_LIBRARY_DIR) +UNIFY_ENVVARS_AND_CACHE(PCRE_LIBRARY_DIR) +UNIFY_ENVVARS_AND_CACHE(PYTHON_EXECUTABLE) +IF(WIN32) + UNIFY_ENVVARS_AND_CACHE(THREEDS_MAX_SDK_HOME) +ENDIF() + +# Find Boost +IF(MSVC) + SET(Boost_USE_STATIC_LIBS ON) + SET(Boost_USE_STATIC_RUNTIME ON) + SET(Boost_USE_MULTITHREADED ON) +ENDIF() +FIND_PACKAGE(Boost REQUIRED COMPONENTS system program_options regex thread date_time) MESSAGE(STATUS "Boost include files found in ${Boost_INCLUDE_DIRS}") MESSAGE(STATUS "Boost libraries found in ${Boost_LIBRARY_DIRS}") -# Find Open CASCADE header files -IF("$ENV{OCC_INCLUDE_DIR}" STREQUAL "") - SET(OCC_INCLUDE_DIR "/usr/include/opencascade/" CACHE FILEPATH "Open CASCADE header files") +# Usage: +# SET(SOME_LIRARIES foo bar) +# ADD_DEBUG_VARIANTS(SOME_LIRARIES "${SOME_LIRARIES}" "d") +# "foo bar" -> "optimized foo debug food optimized bar debug bard" +FUNCTION(ADD_DEBUG_VARIANTS NAME LIBRARIES POSTFIX) + SET(LIBRARIES_STR "${LIBRARIES}") + SET(LIBRARIES "") + FOREACH(lib ${LIBRARIES_STR}) + SET(LIBRARIES "${LIBRARIES} optimized ${lib}") + SET(LIBRARIES "${LIBRARIES} debug ${lib}${POSTFIX}") + ENDFOREACH() + STRING(STRIP ${LIBRARIES} LIBRARIES) # leading and trailing whitespace cause confusion + SEPARATE_ARGUMENTS(LIBRARIES) # "optimized debug " needs to be a list instead of a string + SET(${NAME} ${LIBRARIES} PARENT_SCOPE) +ENDFUNCTION() + +# Find Open CASCADE +IF("${OCC_INCLUDE_DIR}" STREQUAL "") + SET(OCC_INCLUDE_DIR "/usr/include/oce/" CACHE FILEPATH "Open CASCADE header files") MESSAGE(STATUS "Looking for opencascade include files in: ${OCC_INCLUDE_DIR}") MESSAGE(STATUS "Use OCC_INCLUDE_DIR to specify another directory") ELSE() - SET(OCC_INCLUDE_DIR $ENV{OCC_INCLUDE_DIR} CACHE FILEPATH "Open CASCADE header files") + SET(OCC_INCLUDE_DIR ${OCC_INCLUDE_DIR} CACHE FILEPATH "Open CASCADE header files") MESSAGE(STATUS "Looking for opencascade include files in: ${OCC_INCLUDE_DIR}") ENDIF() @@ -22,220 +96,351 @@ ELSE() MESSAGE(FATAL_ERROR "Unable to find header files, aborting") ENDIF() -# Find Open CASCADE library files -IF("$ENV{OCC_LIBRARY_DIR}" STREQUAL "") +SET(OPENCASCADE_LIBRARIES + TKernel TKMath TKBRep TKGeomBase TKGeomAlgo TKG3d TKG2d TKShHealing TKTopAlgo TKMesh TKPrim TKBool TKBO + TKFillet TKSTEP TKSTEPBase TKSTEPAttr TKXSBase TKSTEP209 TKIGES TKOffset +) + +IF(MSVC) + ADD_DEBUG_VARIANTS(OPENCASCADE_LIBRARIES "${OPENCASCADE_LIBRARIES}" "d") +ENDIF() + +IF("${OCC_LIBRARY_DIR}" STREQUAL "") SET(OCC_LIBRARY_DIR "/usr/lib/" CACHE FILEPATH "Open CASCADE library files") MESSAGE(STATUS "Looking for opencascade library files in: ${OCC_LIBRARY_DIR}") MESSAGE(STATUS "Use OCC_LIBRARY_DIR to specify another directory") ELSE() - SET(OCC_LIBRARY_DIR $ENV{OCC_LIBRARY_DIR} CACHE FILEPATH "Open CASCADE library files") + SET(OCC_LIBRARY_DIR ${OCC_LIBRARY_DIR} CACHE FILEPATH "Open CASCADE library files") MESSAGE(STATUS "Looking for opencascade library files in: ${OCC_LIBRARY_DIR}") ENDIF() -FIND_LIBRARY(libTKernel "TKernel" ${OCC_LIBRARY_DIR} /usr/lib /usr/lib64 /usr/local/lib /usr/local/lib64) +FIND_LIBRARY(libTKernel NAMES TKernel TKerneld PATHS ${OCC_LIBRARY_DIR} /usr/lib /usr/lib64 /usr/local/lib /usr/local/lib64) IF(libTKernel) MESSAGE(STATUS "Library files found") ELSE() MESSAGE(FATAL_ERROR "Unable to find library files, aborting") ENDIF() -IF("$ENV{ICU_INCLUDE_DIR}" STREQUAL "") - MESSAGE(STATUS "No ICU include directory specified") -ElSE() - SET(ICU_INCLUDE_DIR CACHE FILEPATH "ICU header files") +IF(UNICODE_SUPPORT) + # Find ICU + IF("${ICU_INCLUDE_DIR}" STREQUAL "") + MESSAGE(STATUS "No ICU include directory specified") + ElSE() + SET(ICU_INCLUDE_DIR "${ICU_INCLUDE_DIR}" CACHE FILEPATH "ICU header files") + ENDIF() + + IF("${ICU_LIBRARY_DIR}" STREQUAL "") + MESSAGE(STATUS "No ICU library directory specified") + ElSE() + SET(ICU_LIBRARY_DIR "${ICU_LIBRARY_DIR}" CACHE FILEPATH "ICU library files") + ENDIF() + + FIND_LIBRARY(icu NAMES icuuc icuucd PATHS /usr/lib /usr/lib64 /usr/local/lib /usr/local/lib64 ${ICU_LIBRARY_DIR}) + + IF(icu) + ADD_DEFINITIONS(-DHAVE_ICU) + MESSAGE(STATUS "ICU libraries found") + # NOTE icudata appears to be icudt on Windows/MSVC and icudata on others + # dl is included to resolve dlopen and friends symbols + IF(MSVC) + SET(ICU_LIBRARIES icuuc icudt) + ADD_DEBUG_VARIANTS(ICU_LIBRARIES "${ICU_LIBRARIES}" "d") + ADD_DEFINITIONS(-DU_STATIC_IMPLEMENTATION) # required for static ICU + ELSE() + SET(ICU_LIBRARIES icuuc icudata dl) + ENDIF() + ELSE() + MESSAGE(FATAL_ERROR "UNICODE_SUPPORT enabled, but unable to find ICU. Disable UNICODE_SUPPORT or fix ICU paths to proceed.") + ENDIF() ENDIF() -IF("$ENV{ICU_LIBRARY_DIR}" STREQUAL "") - MESSAGE(STATUS "No ICU library directory specified") -ElSE() - SET(ICU_LIBRARY_DIR CACHE FILEPATH "ICU library files") +IF(COLLADA_SUPPORT) + # Find OpenCOLLADA + IF("${OPENCOLLADA_INCLUDE_DIR}" STREQUAL "") + MESSAGE(STATUS "No OpenCOLLADA include directory specified") + SET(OPENCOLLADA_INCLUDE_DIR "/usr/include/opencollada" CACHE FILEPATH "OpenCOLLADA header files") + ElSE() + SET(OPENCOLLADA_INCLUDE_DIR "${OPENCOLLADA_INCLUDE_DIR}" CACHE FILEPATH "OpenCOLLADA header files") + ENDIF() + + IF("${OPENCOLLADA_LIBRARY_DIR}" STREQUAL "") + MESSAGE(STATUS "No OpenCOLLADA library directory specified") + SET(OPENCOLLADA_LIBRARY_DIR "/usr/lib/opencollada" CACHE FILEPATH "OpenCOLLADA library files") + ElSE() + SET(OPENCOLLADA_LIBRARY_DIR "${OPENCOLLADA_LIBRARY_DIR}" CACHE FILEPATH "OpenCOLLADA library files") + ENDIF() + + SET(OPENCOLLADA_INCLUDE_DIRS "${OPENCOLLADA_INCLUDE_DIR}/COLLADABaseUtils" "${OPENCOLLADA_INCLUDE_DIR}/COLLADAStreamWriter") + + FIND_FILE(COLLADASWStreamWriter_h "COLLADASWStreamWriter.h" ${OPENCOLLADA_INCLUDE_DIRS}) + IF(COLLADASWStreamWriter_h) + MESSAGE(STATUS "OpenCOLLADA header files found") + ADD_DEFINITIONS(-DWITH_OPENCOLLADA) + SET(OPENCOLLADA_LIBRARIES + GeneratedSaxParser MathMLSolver OpenCOLLADABaseUtils OpenCOLLADAFramework OpenCOLLADASaxFrameworkLoader + OpenCOLLADAStreamWriter UTF buffer ftoa pcre + ) + IF(NOT "${PCRE_LIBRARY_DIR}" STREQUAL "") + SET(OPENCOLLADA_LIBRARY_DIR ${OPENCOLLADA_LIBRARY_DIR} ${PCRE_LIBRARY_DIR}) + ENDIF() + IF(MSVC) + ADD_DEBUG_VARIANTS(OPENCOLLADA_LIBRARIES "${OPENCOLLADA_LIBRARIES}" "d") + ENDIF() + ELSE() + MESSAGE(FATAL_ERROR "COLLADA_SUPPORT enabled, but unable to find OpenCOLLADA. Disable COLLADA_SUPPORT or fix OpenCOLLADA paths to proceed.") + ENDIF() ENDIF() -FIND_LIBRARY(icu "icuuc" /usr/lib /usr/lib64 /usr/local/lib /usr/local/lib64 ${ICU_LIBRARY_DIR}) + # TODO Are these needed on other platforms still or can these be removed for good? +IF (NOT WIN32) + INCLUDE(CheckIncludeFileCXX) -IF(icu) - MESSAGE(STATUS "ICU libraries found") - ADD_DEFINITIONS(-DHAVE_ICU) - SET(ICU_LIBRARIES icuuc icudata) -ELSE() - MESSAGE(STATUS "Unable to find ICU library files, continuing") + MACRO(CHECK_ADD_OCE_OCC_DEF INCLUDE) + STRING(REPLACE . _ STR ${INCLUDE}) + STRING(TOUPPER ${STR} STR) + CHECK_INCLUDE_FILE_CXX("${INCLUDE}" FOUND_${STR}) + IF(FOUND_${STR}) + ADD_DEFINITIONS(-DOCE_HAVE_${STR}) + ADD_DEFINITIONS(-DHAVE_${STR}) + ENDIF(FOUND_${STR}) + ENDMACRO() + + CHECK_ADD_OCE_OCC_DEF(limits) + CHECK_ADD_OCE_OCC_DEF(climits) + CHECK_ADD_OCE_OCC_DEF(limits.h) + CHECK_ADD_OCE_OCC_DEF(fstream) + CHECK_ADD_OCE_OCC_DEF(fstream.h) + CHECK_ADD_OCE_OCC_DEF(iomanip) + CHECK_ADD_OCE_OCC_DEF(iomanip.h) + CHECK_ADD_OCE_OCC_DEF(iostream) + CHECK_ADD_OCE_OCC_DEF(iostream.h) ENDIF() -IF("$ENV{OPENCOLLADA_INCLUDE_DIR}" STREQUAL "") - MESSAGE(STATUS "No OpenCOLLADA include directory specified") - SET(OPENCOLLADA_INCLUDE_DIR "/usr/local/include/opencollada" CACHE FILEPATH "OpenCOLLADA header files") -ElSE() - SET(OPENCOLLADA_INCLUDE_DIR "$ENV{OPENCOLLADA_INCLUDE_DIR}" CACHE FILEPATH "OpenCOLLADA header files") -ENDIF() - -IF("$ENV{OPENCOLLADA_LIBRARY_DIR}" STREQUAL "") - MESSAGE(STATUS "No OpenCOLLADA library directory specified") - SET(OPENCOLLADA_LIBRARY_DIR "/usr/local/lib/opencollada" CACHE FILEPATH "OpenCOLLADA library files") -ElSE() - SET(OPENCOLLADA_LIBRARY_DIR "$ENV{OPENCOLLADA_LIBRARY_DIR}" CACHE FILEPATH "OpenCOLLADA library files") -ENDIF() - -SET(OPENCOLLADA_INCLUDE_DIRS "${OPENCOLLADA_INCLUDE_DIR}/COLLADABaseUtils" "${OPENCOLLADA_INCLUDE_DIR}/COLLADAStreamWriter") - -FIND_FILE(COLLADASWStreamWriter_h "COLLADASWStreamWriter.h" ${OPENCOLLADA_INCLUDE_DIRS}) -IF(COLLADASWStreamWriter_h) - MESSAGE(STATUS "OpenCOLLADA header files found") - ADD_DEFINITIONS(-DWITH_OPENCOLLADA) - SET(OPENCOLLADA_LIBRARIES - GeneratedSaxParser MathMLSolver OpenCOLLADABaseUtils - OpenCOLLADAFramework OpenCOLLADASaxFrameworkLoader - OpenCOLLADAStreamWriter UTF buffer ftoa pcre - ) -ELSE() - MESSAGE(STATUS "OpenCOLLADA header files not found, continuing without COLLADA support") -ENDIF() - -INCLUDE(CheckIncludeFileCXX) - -MACRO(CHECK_ADD_OCE_OCC_DEF INCLUDE) - STRING(REPLACE . _ STR ${INCLUDE}) - STRING(TOUPPER ${STR} STR) - CHECK_INCLUDE_FILE_CXX("${INCLUDE}" FOUND_${STR}) - IF(FOUND_${STR}) - ADD_DEFINITIONS(-DOCE_HAVE_${STR}) - ADD_DEFINITIONS(-DHAVE_${STR}) - ENDIF(FOUND_${STR}) -ENDMACRO(CHECK_ADD_OCE_OCC_DEF) - -CHECK_ADD_OCE_OCC_DEF(limits) -CHECK_ADD_OCE_OCC_DEF(climits) -CHECK_ADD_OCE_OCC_DEF(limits.h) -CHECK_ADD_OCE_OCC_DEF(fstream) -CHECK_ADD_OCE_OCC_DEF(fstream.h) -CHECK_ADD_OCE_OCC_DEF(iomanip) -CHECK_ADD_OCE_OCC_DEF(iomanip.h) -CHECK_ADD_OCE_OCC_DEF(iostream) -CHECK_ADD_OCE_OCC_DEF(iostream.h) - IF(NOT CMAKE_BUILD_TYPE) - SET(CMAKE_BUILD_TYPE "Release") -ENDIF(NOT CMAKE_BUILD_TYPE) + SET(CMAKE_BUILD_TYPE "Release") +ENDIF() + +# NOTE: RelWithDebInfo and Release use O2 (= /Ox /Gl /Gy/ = Og /Oi /Ot /Oy /Ob2 /Gs /GF /Gy) by default, +# with the exception with RelWithDebInfo has /Ob1 instead. /Ob2 has been observed to improve the performance +# of IfcConvert significantly. +# TODO Setting of /GL and /LTCG don't seem to apply for static libraries (IfcGeom, IfcParse) +if(ENABLE_BUILD_OPTIMIZATIONS) + if(MSVC) + # C++ + set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /Ob2 /GL") + set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELEASE} /Zi") + # Linker + # /OPT:REF enables also /OPT:ICF and disables INCREMENTAL + set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} /LTCG /OPT:REF") + # /OPT:NOICF is recommended when /DEBUG is used (http://msdn.microsoft.com/en-us/library/xe4t6fc1.aspx) + set(CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} /DEBUG /OPT:NOICF") + set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /LTCG /OPT:REF") + set(CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /DEBUG /OPT:NOICF") + else() + #TODO GCC (& Clang?) optimizations + message(STATUS "ENABLE_BUILD_OPTIMIZATIONS not implemented for GCC/non-MSVC compilers.)") + endif() +endif() IF(MSVC) - ADD_DEFINITIONS(-D_UNICODE) -ElSE(MSVC) - ADD_DEFINITIONS(-fPIC -Wno-non-virtual-dtor) -ENDIF(MSVC) + # Enable solution folders (free VS versions prior to 2012 don't support solution folders) + if (MSVC_VERSION GREATER 1600) + set_property(GLOBAL PROPERTY USE_FOLDERS ON) + endif() -INCLUDE_DIRECTORIES(${INCLUDE_DIRECTORIES} ${OCC_INCLUDE_DIR} ${OPENCOLLADA_INCLUDE_DIRS} /usr/inc /usr/local/inc /usr/local/include/oce ${ICU_INCLUDE_DIR} ${Boost_INCLUDE_DIRS}) - -ADD_LIBRARY(IfcParse STATIC - ../src/ifcparse/Ifc2x3-latebound.cpp - ../src/ifcparse/Ifc2x3.cpp - ../src/ifcparse/Ifc4-latebound.cpp - ../src/ifcparse/Ifc4.cpp - ../src/ifcparse/IfcCharacterDecoder.cpp - ../src/ifcparse/IfcGlobalId.cpp - ../src/ifcparse/IfcHierarchyHelper.cpp - ../src/ifcparse/IfcLateBoundEntity.cpp - ../src/ifcparse/IfcParse.cpp - ../src/ifcparse/IfcSIPrefix.cpp - ../src/ifcparse/IfcSpfHeader.cpp - ../src/ifcparse/IfcUtil.cpp - ../src/ifcparse/IfcWrite.cpp -) - -ADD_LIBRARY(IfcGeom STATIC - ../src/ifcgeom/IfcGeomCurves.cpp - ../src/ifcgeom/IfcGeomFaces.cpp - ../src/ifcgeom/IfcGeomFunctions.cpp - ../src/ifcgeom/IfcGeomHelpers.cpp - ../src/ifcgeom/IfcGeomMaterial.cpp - ../src/ifcgeom/IfcGeomRenderStyles.cpp - ../src/ifcgeom/IfcGeomRepresentation.cpp - ../src/ifcgeom/IfcGeomShapes.cpp - ../src/ifcgeom/IfcGeomWires.cpp - ../src/ifcgeom/IfcRegister.cpp -) - -IF(icu) - TARGET_LINK_LIBRARIES(IfcParse icuuc) + IF(USE_VLD) + ADD_DEFINITIONS(-DUSE_VLD) + ENDIF() + # Enforce Unicode for CRT and Win32 API calls + ADD_DEFINITIONS(-D_UNICODE -DUNICODE) + # Disable warnings about unsafe C functions; we could use the safe C99 & C11 versions if we have no need for supporting old compilers. + ADD_DEFINITIONS(-D_SCL_SECURE_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS) + ADD_DEFINITIONS(-bigobj) # required for building the big ifcXXX.objs, https://msdn.microsoft.com/en-us/library/ms173499.aspx + # Bump up the warning level from the default 3 to 4. + ADD_DEFINITIONS(-W4) + IF(MSVC_VERSION GREATER 1800) # > 2013 + # Disable overeager and false positives causing C4458 ("declaration of 'indentifier' hides class member"), at least for now. + ADD_DEFINITIONS(-wd4458) + ENDIF() + # Link against the static VC runtime + FOREACH(flag CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE CMAKE_CXX_FLAGS_MINSIZEREL + CMAKE_CXX_FLAGS_RELWITHDEBINFO CMAKE_C_FLAGS CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_RELEASE + CMAKE_C_FLAGS_MINSIZEREL CMAKE_C_FLAGS_RELWITHDEBINFO) + IF(${flag} MATCHES "/MD") + STRING(REGEX REPLACE "/MD" "/MT" ${flag} "${${flag}}") + ENDIF() + IF(${flag} MATCHES "/MDd") + STRING(REGEX REPLACE "/MDd" "/MTd" ${flag} "${${flag}}") + ENDIF() + ENDFOREACH() +ElSE() + ADD_DEFINITIONS(-fPIC -Wno-non-virtual-dtor) ENDIF() +INCLUDE_DIRECTORIES(${INCLUDE_DIRECTORIES} ${OCC_INCLUDE_DIR} ${OPENCOLLADA_INCLUDE_DIRS} + ${ICU_INCLUDE_DIR} ${Boost_INCLUDE_DIRS} +) +if(NOT WIN32) + INCLUDE_DIRECTORIES(${INCLUDE_DIRECTORIES} /usr/inc /usr/local/inc /usr/local/include/oce) +endif() + +function(files_for_ifc_version IFC_VERSION RESULT_NAME) + set(IFC_PARSE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../src/ifcparse) + set(${RESULT_NAME} + ${IFC_PARSE_DIR}/Ifc${IFC_VERSION}.h + ${IFC_PARSE_DIR}/Ifc${IFC_VERSION}enum.h + ${IFC_PARSE_DIR}/Ifc${IFC_VERSION}-latebound.h + ${IFC_PARSE_DIR}/Ifc${IFC_VERSION}.cpp + ${IFC_PARSE_DIR}/Ifc${IFC_VERSION}-latebound.cpp + PARENT_SCOPE + ) +endfunction() + +if(COMPILE_SCHEMA) + find_package(PythonInterp) + + IF(NOT PYTHONINTERP_FOUND) + MESSAGE(FATAL_ERROR "A Python interpreter is necessary when COMPILE_SCHEMA is enabled. Disable COMPILE_SCHEMA or fix Python paths to proceed.") + ENDIF() + + set(IFC_RELEASE_NOT_USED "2x3" "4") + + # Install pyparsing if necessary + execute_process(COMMAND ${PYTHON_EXECUTABLE} -m pip freeze OUTPUT_VARIABLE PYTHON_PACKAGE_LIST) + if ("${PYTHON_PACKAGE_LIST}" STREQUAL "") + execute_process(COMMAND pip freeze OUTPUT_VARIABLE PYTHON_PACKAGE_LIST) + if ("${PYTHON_PACKAGE_LIST}" STREQUAL "") + message(WARNING "Failed to find pip. Pip is required to automatically install pyparsing") + endif() + endif() + string(FIND "${PYTHON_PACKAGE_LIST}" pyparsing PYPARSING_FOUND) + if ("${PYPARSING_FOUND}" STREQUAL "-1") + message(STATUS "Installing pyparsing") + execute_process(COMMAND ${PYTHON_EXECUTABLE} -m pip "install" --user pyparsing RESULT_VARIABLE SUCCESS) + if (NOT "${SUCCESS}" STREQUAL "0") + execute_process(COMMAND pip "install" --user pyparsing RESULT_VARIABLE SUCCESS) + if (NOT "${SUCCESS}" STREQUAL "0") + message(WARNING "Failed to automatically install pyparsing. Please install manually") + endif() + endif() + else() + message(STATUS "Python interpreter with pyparsing found") + endif() + + # Bootstrap the parser + message(STATUS "Compiling schema, this will take a while...") + execute_process(COMMAND ${PYTHON_EXECUTABLE} bootstrap.py express.bnf + WORKING_DIRECTORY ../src/ifcexpressparser + OUTPUT_FILE express_parser.py + RESULT_VARIABLE SUCCESS) + + if (NOT "${SUCCESS}" STREQUAL "0") + MESSAGE(FATAL_ERROR "Failed to bootstrap parser. Make sure pyparsing is installed") + endif() + + # Generate code + execute_process(COMMAND ${PYTHON_EXECUTABLE} ../ifcexpressparser/express_parser.py ../../${COMPILE_SCHEMA} + WORKING_DIRECTORY ../src/ifcparse + OUTPUT_VARIABLE COMPILED_SCHEMA_NAME) + + # Prevent the schema that had just been compiled from being excluded + if("${COMPILED_SCHEMA_NAME}" STREQUAL "IFC2X3") + list(REMOVE_ITEM IFC_RELEASE_NOT_USED "2x3") + add_definitions(-DUSE_IFC2x3) + elseif("${COMPILED_SCHEMA_NAME}" STREQUAL "IFC4") + list(REMOVE_ITEM IFC_RELEASE_NOT_USED "4") + add_definitions(-DUSE_IFC4) + endif() +else() + if(USE_IFC4) + add_definitions(-DUSE_IFC4) + set(IFC_RELEASE_NOT_USED "2x3") + else() + add_definitions(-DUSE_IFC2x3) # TODO Make all caps? i.e. USE_IFC2X3 + set(IFC_RELEASE_NOT_USED "4") + endif() +endif() + +# IfcParse +file(GLOB IFCPARSE_H_FILES ../src/ifcparse/*.h) +file(GLOB IFCPARSE_CPP_FILES ../src/ifcparse/*.cpp) + +foreach(IFC_RELEASE ${IFC_RELEASE_NOT_USED}) + files_for_ifc_version(${IFC_RELEASE} SOURCE_FILES_NOT_USED) + foreach(SOURCE_FILE ${SOURCE_FILES_NOT_USED}) + list(REMOVE_ITEM IFCPARSE_CPP_FILES ${SOURCE_FILE}) + list(REMOVE_ITEM IFCPARSE_H_FILES ${SOURCE_FILE}) + endforeach() +endforeach() + +set(IFCPARSE_FILES ${IFCPARSE_CPP_FILES} ${IFCPARSE_H_FILES}) + +ADD_LIBRARY(IfcParse STATIC ${IFCPARSE_FILES}) + +IF(UNICODE_SUPPORT) + TARGET_LINK_LIBRARIES(IfcParse ${ICU_LIBRARIES} ${Boost_LIBRARIES}) +ENDIF() + +# IfcGeom +file(GLOB IFCGEOM_H_FILES ../src/ifcgeom/*.h) +file(GLOB IFCGEOM_CPP_FILES ../src/ifcgeom/*.cpp) + +set(IFCGEOM_FILES ${IFCGEOM_CPP_FILES} ${IFCGEOM_H_FILES}) +ADD_LIBRARY(IfcGeom STATIC ${IFCGEOM_FILES}) + TARGET_LINK_LIBRARIES(IfcGeom IfcParse) -LINK_DIRECTORIES (${LINK_DIRECTORIES} ${IfcOpenShell_BINARY_DIR} ${OCC_LIBRARY_DIR} ${OPENCOLLADA_LIBRARY_DIR} /usr/lib /usr/lib64 /usr/local/lib /usr/local/lib64 ${ICU_LIBRARY_DIR} ${Boost_LIBRARY_DIRS}) - -ADD_EXECUTABLE(IfcConvert - ../src/ifcconvert/ColladaSerializer.cpp - ../src/ifcconvert/IfcConvert.cpp - ../src/ifcconvert/OpenCascadeBasedSerializer.cpp - ../src/ifcconvert/WavefrontObjSerializer.cpp - ../src/ifcconvert/XmlSerializer.cpp - ../src/ifcconvert/SvgSerializer.cpp - ../src/ifcconvert/util.cpp +LINK_DIRECTORIES(${LINK_DIRECTORIES} ${IfcOpenShell_BINARY_DIR} ${OCC_LIBRARY_DIR} ${OPENCOLLADA_LIBRARY_DIR} + ${ICU_LIBRARY_DIR} ${Boost_LIBRARY_DIRS} ) +if(NOT WIN32) + LINK_DIRECTORIES(${LINK_DIRECTORIES} /usr/lib /usr/lib64 /usr/local/lib /usr/local/lib64) +endif() -TARGET_LINK_LIBRARIES (IfcConvert IfcParse IfcGeom TKernel TKMath TKBRep TKGeomBase TKGeomAlgo TKG3d TKG2d TKShHealing TKTopAlgo TKMesh TKPrim TKBool TKBO TKFillet TKSTEP TKSTEPBase TKSTEPAttr TKXSBase TKSTEP209 TKIGES TKOffset ${Boost_LIBRARIES} ${OPENCOLLADA_LIBRARIES} ${ICU_LIBRARIES}) +# IfcConvert +if (IFCCONVERT_DOUBLE_PRECISION) + add_definitions(-DIFCCONVERT_DOUBLE_PRECISION) +endif() +file(GLOB IFCCONVERT_CPP_FILES ../src/ifcconvert/*.cpp) +file(GLOB IFCCONVERT_H_FILES ../src/ifcconvert/*.h) +set(IFCCONVERT_FILES ${IFCCONVERT_CPP_FILES} ${IFCCONVERT_H_FILES}) +ADD_EXECUTABLE(IfcConvert ${IFCCONVERT_FILES}) -ADD_EXECUTABLE(IfcGeomServer - ../src/ifcgeomserver/IfcGeomServer.cpp -) +# Make sure cross-referenced symbols between static OCC libraries get +# resolved. Also add thread and rt libraries. +get_filename_component(libTKernelExt ${libTKernel} EXT) +if("${libTKernelExt}" STREQUAL ".a") + find_package(Threads) + if (NOT APPLE) + set(LIB_RT "rt") + endif() + set(OPENCASCADE_LIBRARIES ${OPENCASCADE_LIBRARIES} ${OPENCASCADE_LIBRARIES} ${OPENCASCADE_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} ${LIB_RT} dl) +endif() -TARGET_LINK_LIBRARIES (IfcGeomServer IfcParse IfcGeom TKernel TKMath TKBRep TKGeomBase TKGeomAlgo TKG3d TKG2d TKShHealing TKTopAlgo TKMesh TKPrim TKBool TKBO TKFillet TKSTEP TKSTEPBase TKSTEPAttr TKXSBase TKSTEP209 TKIGES TKOffset ${ICU_LIBRARIES}) +TARGET_LINK_LIBRARIES(IfcConvert IfcParse IfcGeom ${OPENCASCADE_LIBRARIES} ${Boost_LIBRARIES} ${OPENCOLLADA_LIBRARIES} ${ICU_LIBRARIES}) -# Build python wrapper using separate CMakeLists.txt -ADD_SUBDIRECTORY(../src/ifcwrap ifcwrap) +# IfcGeomServer +file(GLOB CPP_FILES ../src/ifcgeomserver/*.cpp) +file(GLOB H_FILES ../src/ifcgeomserver/*.h) +set(SOURCE_FILES ${CPP_FILES} ${H_FILES}) +ADD_EXECUTABLE(IfcGeomServer ${SOURCE_FILES}) -# Build IfcParseExamples using separate CMakeLists.txt -ADD_SUBDIRECTORY(../src/examples examples) +TARGET_LINK_LIBRARIES(IfcGeomServer IfcParse IfcGeom ${OPENCASCADE_LIBRARIES} ${Boost_LIBRARIES} ${ICU_LIBRARIES}) -# ADD_SUBDIRECTORY(../src/qtviewer qtviewer) +IF(BUILD_IFCPYTHON) + ADD_SUBDIRECTORY(../src/ifcwrap ifcwrap) +ENDIF() + +IF(BUILD_EXAMPLES) + ADD_SUBDIRECTORY(../src/examples examples) +ENDIF() + +IF(BUILD_IFCMAX) + ADD_SUBDIRECTORY(../src/ifcmax ifcmax) +ENDIF() # CMake installation targets -SET(include_files_geom - ../src/ifcgeom/IfcGeom.h - ../src/ifcgeom/IfcGeomElement.h - ../src/ifcgeom/IfcGeomIterator.h - ../src/ifcgeom/IfcGeomIteratorSettings.h - ../src/ifcgeom/IfcGeomMaterial.h - ../src/ifcgeom/IfcGeomRenderStyles.h - ../src/ifcgeom/IfcGeomRepresentation.h - ../src/ifcgeom/IfcGeomShapeType.h - ../src/ifcgeom/IfcRegister.h - ../src/ifcgeom/IfcRegisterConvertCurve.h - ../src/ifcgeom/IfcRegisterConvertFace.h - ../src/ifcgeom/IfcRegisterConvertShape.h - ../src/ifcgeom/IfcRegisterConvertShapes.h - ../src/ifcgeom/IfcRegisterConvertWire.h - ../src/ifcgeom/IfcRegisterCreateCache.h - ../src/ifcgeom/IfcRegisterDef.h - ../src/ifcgeom/IfcRegisterGeomHeader.h - ../src/ifcgeom/IfcRegisterPurgeCache.h - ../src/ifcgeom/IfcRegisterShapeType.h - ../src/ifcgeom/IfcRegisterUndef.h - ../src/ifcgeom/IfcRepresentationShapeItem.h -) - -SET(include_files_parse - ../src/ifcparse/Ifc2x3-latebound.h - ../src/ifcparse/Ifc2x3.h - ../src/ifcparse/Ifc2x3enum.h - ../src/ifcparse/Ifc4-latebound.h - ../src/ifcparse/Ifc4.h - ../src/ifcparse/Ifc4enum.h - ../src/ifcparse/IfcCharacterDecoder.h - ../src/ifcparse/IfcEntityDescriptor.h - ../src/ifcparse/IfcException.h - ../src/ifcparse/IfcFile.h - ../src/ifcparse/IfcGlobalId.h - ../src/ifcparse/IfcHierarchyHelper.h - ../src/ifcparse/IfcLateBoundEntity.h - ../src/ifcparse/IfcParse.h - ../src/ifcparse/IfcSIPrefix.h - ../src/ifcparse/IfcSpfHeader.h - ../src/ifcparse/IfcSpfStream.h - ../src/ifcparse/IfcUtil.h - ../src/ifcparse/IfcWritableEntity.h - ../src/ifcparse/IfcWrite.h - ../src/ifcparse/SharedPointer.h -) -INSTALL(FILES ${include_files_geom} DESTINATION include/ifcgeom) -INSTALL(FILES ${include_files_parse} DESTINATION include/ifcparse) -INSTALL(TARGETS IfcConvert DESTINATION bin) +INSTALL(FILES ${IFCPARSE_H_FILES} DESTINATION include/ifcparse) +INSTALL(FILES ${IFCGEOM_H_FILES} DESTINATION include/ifcgeom) +INSTALL(TARGETS IfcConvert IfcGeomServer DESTINATION bin) INSTALL(TARGETS IfcParse IfcGeom DESTINATION lib) diff --git a/nix/build-all.sh b/nix/build-all.sh new file mode 100755 index 0000000000..f75be91f93 --- /dev/null +++ b/nix/build-all.sh @@ -0,0 +1,402 @@ +############################################################################### +# # +# 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 script builds IfcOpenShell and its dependencies # +# # +# Prerequisites for this script to function correctly: # +# * git * bzip2 * tar * c(++) compilers * yacc * autoconf # +# on debian 7.8 these can be obtained with: # +# $ apt-get install git gcc g++ autoconf bison bzip2 # +# on ubuntu 14.04: # +# $ apt-get install git gcc g++ autoconf bison make # +# on OS X El Capitan with homebrew: # +# $ brew install git bison autoconf automake # +# # +############################################################################### + +set -e + +PROJECT_NAME=IfcOpenShell +OCE_VERSION=0.16 +PYTHON_VERSIONS=(2.7.10 3.2.6 3.3.6 3.4.4 3.5.1) +BOOST_VERSION=1.59.0 +PCRE_VERSION=8.38 +LIBXML_VERSION=2.9.3 +CMAKE_VERSION=3.4.1 +ICU_VERSION=56.1 + +# Helper function for coloured printing + +BLACK_ON_WHITE="\033[0;30;107m" +RED="\033[31m" +GREEN="\033[32m" +YELLOW="\033[33m" +MAGENTA="\033[35m" +function cecho { + printf "$1$2\033[0m\n" +} + +function fullpath { + python -c "import os, sys; print os.path.realpath(os.path.dirname(sys.argv[1]))" "$1" +} + +# Set defaults for missing empty environment variables + +if [ -z "$IFCOS_NUM_BUILD_PROCS" ]; then +IFCOS_NUM_BUILD_PROCS=$(expr $(sysctl -n hw.ncpu 2> /dev/null || cat /proc/cpuinfo | grep processor | wc -l) + 1) +fi + +if [ -z "$TARGET_ARCH" ]; then +TARGET_ARCH="$(uname -m)" +fi + +SCRIPT_DIR=`fullpath "$0"` +CMAKE_DIR="$SCRIPT_DIR/../cmake/" + +if [ -z "$DEPS_DIR" ]; then +DEPS_DIR="$SCRIPT_DIR/../build/$(uname)/$TARGET_ARCH/" +[ -d $DEPS_DIR ] || mkdir -p $DEPS_DIR +DEPS_DIR=`fullpath $DEPS_DIR` +fi + +if [ -z "$BUILD_CFG" ]; then +BUILD_CFG="RelWithDebInfo" +fi + +if [ -z "$BUILD_TYPE" ]; then +BUILD_TYPE=Build +fi + +# Print build configuration information + +cecho $BLACK_ON_WHITE "This script fetches and builds $PROJECT_NAME and its dependencies" +echo "" +cecho $GREEN "Script configuration:" + +cecho $MAGENTA "* Target Architecture = $TARGET_ARCH" +echo " - Whether 32-bit (i686) or 64-bit (x86_64) will be built." +cecho $MAGENTA "* Dependency Directory = $DEPS_DIR" +echo " - The directory where $PROJECT_NAME dependencies are installed." +cecho $MAGENTA "* Build Config Type = $BUILD_CFG" +echo " - The used build configuration type for the dependencies." +echo " Defaults to RelWithDebInfo if not specified." + +if [ "$BUILD_CFG" = "MinSizeRel" ]; then +cecho $RED " WARNING: MinSizeRel build can suffer from a significant performance loss." +fi + +cecho $MAGENTA "* IFCOS_NUM_BUILD_PROCS = $IFCOS_NUM_BUILD_PROCS" +echo " - How many compiler processes may be run in parallel." + +echo "" + +# Check that required tools are in PATH + +for cmd in git bunzip2 tar cc c++ autoconf automake yacc make +do + which $cmd > /dev/null || { cecho $RED "Required tool '$cmd' not installed or not added to PATH" ; exit 1 ; } +done + +which curl > /dev/null && DOWNLOAD="curl -sLO" +which wget > /dev/null && DOWNLOAD="wget -q --no-check-certificate" + +if [ -z "$DOWNLOAD" ]; then + cecho $RED "No download application found, tried: curl, wget" + exit 1 +fi + +# Create log directory and file + +mkdir -p $DEPS_DIR/logs +LOG_FILE=$DEPS_DIR/logs/`date +"%Y%m%d"`.log + +BOOST_VERSION_UNDERSCORE=${BOOST_VERSION//./_} +ICU_VERSION_UNDERSCORE=${ICU_VERSION//./_} +CMAKE_VERSION_2=${CMAKE_VERSION:0:3} + +OCE_LOCATION=https://github.com/tpaviot/oce/archive/OCE-$OCE_VERSION.tar.gz +BOOST_LOCATION=http://downloads.sourceforge.net/project/boost/boost/$BOOST_VERSION/boost_$BOOST_VERSION_UNDERSCORE.tar.bz2 +OPENCOLLADA_LOCATION=https://github.com/KhronosGroup/OpenCOLLADA.git +OPENCOLLADA_COMMIT=f99d59e73e565a41715eaebc00c7664e1ee5e628 + +# Helper functions + +function download { + [ -f $2 ] || $DOWNLOAD $1$2 +} + +function run_autoconf { + if [ ! -f ../configure ]; then + pushd . >>$LOG_FILE 2>&1 + cd .. + ./autogen.sh >>$LOG_FILE 2>&1 + popd >>$LOG_FILE 2>&1 + fi + ../configure $2 --prefix=$DEPS_DIR/install/$1 >>$LOG_FILE 2>&1 +} + +function run_cmake { + if [ -z "$3" ]; then + P=.. + else + P=$3 + fi + $DEPS_DIR/install/cmake-$CMAKE_VERSION/bin/cmake $P $2 -DCMAKE_BUILD_TYPE=$BUILD_TYPE >>$LOG_FILE 2>&1 +} + +function run_icu { + PLATFORM=`uname -s` + if [ $PLATFORM == "Darwin" ]; then + PLATFORM=MacOSX + fi + ../source/runConfigureICU $PLATFORM $2 --prefix=$DEPS_DIR/install/$1 >>$LOG_FILE 2>&1 +} + +function git_clone { + [ -d $2 ] || git clone $1 >>$LOG_FILE 2>&1 + if [ ! -z "$3" ]; then + cd $2 + git checkout $3 >>$LOG_FILE 2>&1 + cd .. + fi +} + +function build_dependency { + if [ -e $DEPS_DIR/install/$1 ]; then + echo "Found existing $1" + return + fi + mkdir -p $DEPS_DIR/build/ + cd $DEPS_DIR/build/ + printf "\rFetching $1... " + $6 $4 $5 $7 + if [ -d $5 ]; then + DEP_NAME=$5 + else + DEP_NAME=`tar --exclude="*/*" -tf $5` + [ -z $DEP_NAME ] && DEP_NAME=`tar -tf $5 2> /dev/null | head -n 1 | cut -f1 -d /` + [ -d $DEP_NAME ] || tar -xf $5 + fi + cd $DEP_NAME + if [ "$2" != "bjam" ]; then + [ -d build ] && rm -rf build + mkdir build + cd build + printf "\rConfiguring $1..." + run_$2 $1 "$3" + printf "\rBuilding $1... " + make -j$IFCOS_NUM_BUILD_PROCS >>$LOG_FILE 2>&1 + printf "\rInstalling $1... " + make install >>$LOG_FILE 2>&1 + printf "\rInstalled $1 \n" + else + printf "\rConfiguring $1..." + ./bootstrap.sh >>$LOG_FILE 2>&1 + printf "\rBuilding $1... " + eval ./b2 $3 >>$LOG_FILE 2>&1 + printf "\rInstalling $1... " + cp -R boost $DEPS_DIR/install/boost-$BOOST_VERSION/ >>$LOG_FILE 2>&1 + printf "\rInstalled $1 \n" + fi +} + +cecho $GREEN "Collecting dependencies:" + +# Set compiler flags for 32bit builds on 64bit system +# TODO: This is untested + +if [ "$TARGET_ARCH" == "i686" ] && [ "$(uname -m)" == "x86_64" ]; then +ADDITIONAL_ARGS="-m32 -arch i386" +BOOST_ADDRESS_MODEL="architecture=x86 address-model=32" +fi + +if [ "$(uname)" == "Darwin" ]; then +ADDITIONAL_ARGS="-mmacosx-version-min=10.6 $ADDITIONAL_ARGS" +fi + +# If the linker supports GC sections, set it up to reduce binary file size +# -fPIC is required for the shared libraries to work + +if man ld 2> /dev/null | grep gc-sections &> /dev/null; then +export CXXFLAGS_MINIMAL="$CXXFLAGS -fPIC $ADDITIONAL_ARGS" +export CFLAGS_MINIMAL="$CFLAGS -fPIC $ADDITIONAL_ARGS" +export CXXFLAGS="$CXXFLAGS -fPIC -fdata-sections -ffunction-sections -fvisibility=hidden -fvisibility-inlines-hidden $ADDITIONAL_ARGS" +export CFLAGS="$CFLAGS -fPIC -fdata-sections -ffunction-sections -fvisibility=hidden $ADDITIONAL_ARGS" +export LDFLAGS="$LDFLAGS -Wl,--gc-sections $ADDITIONAL_ARGS" +else +export CXXFLAGS_MINIMAL="$CXXFLAGS -fPIC $ADDITIONAL_ARGS" +export CFLAGS_MINIMAL="$CFLAGS -fPIC $ADDITIONAL_ARGS" +export CXXFLAGS="$CXXFLAGS -fPIC -fvisibility=hidden -fvisibility-inlines-hidden $ADDITIONAL_ARGS" +export CFLAGS="$CFLAGS -fPIC -fvisibility=hidden -fvisibility-inlines-hidden $ADDITIONAL_ARGS" +export LDFLAGS="$LDFLAGS $ADDITIONAL_ARGS" +fi + +# Some dependencies need a more recent CMake version than most distros provide +build_dependency cmake-$CMAKE_VERSION autoconf "" https://cmake.org/files/v$CMAKE_VERSION_2/ cmake-$CMAKE_VERSION.tar.gz download + +# Extract compiler flags from CMake to harmonize settings with other autoconf dependencies +CMAKE_FLAG_EXTRACT_DIR=ifcopenshell_cmake_test_`cat /dev/urandom | env LC_CTYPE=C tr -dc 'a-zA-Z0-9' | head -c 32` +[ -e $CMAKE_FLAG_EXTRACT_DIR ] && rm -rf $CMAKE_FLAG_EXTRACT_DIR +mkdir $CMAKE_FLAG_EXTRACT_DIR +cd $CMAKE_FLAG_EXTRACT_DIR +BUILD_CFG_UPPER=`echo $BUILD_CFG | awk '{print toupper($0)}'` +for FL in C CXX; do + echo " + message(\"\${CMAKE_${FL}_FLAGS_${BUILD_CFG_UPPER}}\") + " > CMakeLists.txt + FL=${FL}FLAGS + FLM=${FL}FLAGS_MINIMAL + declare ${FL}FLAGS="`$DEPS_DIR/install/cmake-$CMAKE_VERSION/bin/cmake . 2>&1 >/dev/null` ${!FL}" + declare ${FL}FLAGS_MINIMAL="`$DEPS_DIR/install/cmake-$CMAKE_VERSION/bin/cmake . 2>&1 >/dev/null` ${!FLM}" +done +cd .. +rm -rf $CMAKE_FLAG_EXTRACT_DIR + +build_dependency pcre-$PCRE_VERSION autoconf "--disable-shared" ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/ pcre-$PCRE_VERSION.tar.bz2 download + +# An issue exists with swig-1.3 and python >= 3.2 +# Therefore, build a recent copy from source +build_dependency swig autoconf "--with-pcre-prefix=$DEPS_DIR/install/pcre-$PCRE_VERSION" https://github.com/swig/swig.git swig git_clone rel-3.0.8 + +build_dependency oce-$OCE_VERSION cmake "-DOCE_DISABLE_TKSERVICE_FONT=ON -DOCE_TESTING=OFF -DOCE_BUILD_SHARED_LIB=OFF -DOCE_DISABLE_X11=ON -DOCE_VISUALISATION=OFF -DOCE_OCAF=OFF -DOCE_INSTALL_PREFIX=$DEPS_DIR/install/oce-$OCE_VERSION/" https://github.com/tpaviot/oce/archive/ OCE-$OCE_VERSION.tar.gz download +build_dependency libxml2-$LIBXML_VERSION autoconf "--without-python --disable-shared --without-zlib --without-iconv --without-lzma" ftp://xmlsoft.org/libxml2/ libxml2-$LIBXML_VERSION.tar.gz download +build_dependency OpenCOLLADA cmake " +-DLIBXML2_INCLUDE_DIR=$DEPS_DIR/install/libxml2-$LIBXML_VERSION/include/libxml2 +-DLIBXML2_LIBRARIES=$DEPS_DIR/install/libxml2-$LIBXML_VERSION/lib/libxml2.a +-DPCRE_INCLUDE_DIR=$DEPS_DIR/install/pcre-$PCRE_VERSION/include +-DPCRE_PCREPOSIX_LIBRARY=$DEPS_DIR/install/pcre-$PCRE_VERSION/lib/libpcreposix.a +-DPCRE_PCRE_LIBRARY=$DEPS_DIR/install/pcre-$PCRE_VERSION/lib/libpcre.a +-DCMAKE_INSTALL_PREFIX=$DEPS_DIR/install/OpenCOLLADA/" https://github.com/KhronosGroup/OpenCOLLADA.git OpenCOLLADA git_clone $OPENCOLLADA_COMMIT + +# Python should not be built with -fvisibility=hidden, from experience that introduces segfaults + +OLD_CXX_FLAGS=$CXXFLAGS +OLD_C_FLAGS=$CFLAGS +export CXXFLAGS=$CXXFLAGS_MINIMAL +export CFLAGS=$CFLAGS_MINIMAL + +# On OSX a dynamic python library is built or it would not be compatible +# with the system python because of some threading initialization +if [ "$(uname)" == "Darwin" ]; then +PYTHON_CONFIGURE_ARGS="--disable-static --enable-shared" +fi + +for PYTHON_VERSION in "${PYTHON_VERSIONS[@]}"; do + build_dependency python-$PYTHON_VERSION autoconf "$PYTHON_CONFIGURE_ARGS" http://www.python.org/ftp/python/$PYTHON_VERSION/ Python-$PYTHON_VERSION.tgz download +done + +export CXXFLAGS=$OLD_CXX_FLAGS +export CFLAGS=$OLD_C_FLAGS + +build_dependency boost-$BOOST_VERSION bjam "--stagedir=$DEPS_DIR/install/boost-$BOOST_VERSION --with-system --with-program_options --with-regex --with-thread --with-date_time link=static $BOOST_ADDRESS_MODEL cxxflags=\"$CXXFLAGS\" linkflags=\"$LDFLAGS\" stage" http://downloads.sourceforge.net/project/boost/boost/$BOOST_VERSION/ boost_$BOOST_VERSION_UNDERSCORE.tar.bz2 download + +build_dependency icu-$ICU_VERSION icu "--enable-static --disable-shared" http://download.icu-project.org/files/icu4c/$ICU_VERSION/ icu4c-${ICU_VERSION_UNDERSCORE}-src.tgz download + +cecho $GREEN "Building IfcOpenShell:" + +IFCOS_DIR=$DEPS_DIR/build/ifcopenshell +[ -d $IFCOS_DIR ] && rm -rf $IFCOS_DIR +mkdir -p $IFCOS_DIR +cd $IFCOS_DIR + +mkdir -p executables +cd executables + +printf "\rConfiguring executables..." + +run_cmake "" " +-DBOOST_ROOT=$DEPS_DIR/install/boost-$BOOST_VERSION +-DOCC_INCLUDE_DIR=$DEPS_DIR/install/oce-$OCE_VERSION/include/oce +-DOCC_LIBRARY_DIR=$DEPS_DIR/install/oce-$OCE_VERSION/lib +-DOPENCOLLADA_INCLUDE_DIR=$DEPS_DIR/install/OpenCOLLADA/include/opencollada +-DOPENCOLLADA_LIBRARY_DIR=$DEPS_DIR/install/OpenCOLLADA/lib/opencollada +-DICU_INCLUDE_DIR=$DEPS_DIR/install/icu-$ICU_VERSION/include +-DICU_LIBRARY_DIR=$DEPS_DIR/install/icu-$ICU_VERSION/lib +-DPCRE_LIBRARY_DIR=$DEPS_DIR/install/pcre-$PCRE_VERSION/lib +-DBUILD_IFCPYTHON=OFF +" $CMAKE_DIR + +printf "\rBuilding executables... " + +make -j$IFCOS_NUM_BUILD_PROCS >>$LOG_FILE 2>&1 + +if [ "$(uname)" == "Darwin" ]; then + STRIP_OPTION=-x +else + STRIP_OPTION=-s +fi + +strip $STRIP_OPTION IfcConvert IfcGeomServer + +cd .. + +# On OSX the actual Python library is not linked against. +ADDITIONAL_ARGS= +if [ "$(uname)" == "Darwin" ]; then +ADDITIONAL_ARGS="-Wl,-flat_namespace,-undefined,suppress" +fi + +export CXXFLAGS="$CXXFLAGS_MINIMAL $ADDITIONAL_ARGS" +export CFLAGS="$CFLAGS_MINIMAL $ADDITIONAL_ARGS" +export LDFLAGS="$LDFLAGS $ADDITIONAL_ARGS" + +for PYTHON_VERSION in "${PYTHON_VERSIONS[@]}"; do + + printf "\rConfiguring python $PYTHON_VERSION wrapper..." + + mkdir -p python-$PYTHON_VERSION + cd python-$PYTHON_VERSION + + PYTHON_LIBRARY=`ls $DEPS_DIR/install/python-$PYTHON_VERSION/lib/libpython*.*` + PYTHON_INCLUDE=`ls -d $DEPS_DIR/install/python-$PYTHON_VERSION/include/python*` + PYTHON_EXECUTABLE=$DEPS_DIR/install/python-$PYTHON_VERSION/bin/python + export PYTHON_LIBRARY_BASENAME=`basename $PYTHON_LIBRARY` + + run_cmake "" " + -DBOOST_ROOT=$DEPS_DIR/install/boost-$BOOST_VERSION + -DOCC_INCLUDE_DIR=$DEPS_DIR/install/oce-$OCE_VERSION/include/oce + -DOCC_LIBRARY_DIR=$DEPS_DIR/install/oce-$OCE_VERSION/lib + -DOPENCOLLADA_INCLUDE_DIR=$DEPS_DIR/install/OpenCOLLADA/include/opencollada + -DOPENCOLLADA_LIBRARY_DIR=$DEPS_DIR/install/OpenCOLLADA/lib/opencollada + -DICU_INCLUDE_DIR=$DEPS_DIR/install/icu-$ICU_VERSION/include + -DICU_LIBRARY_DIR=$DEPS_DIR/install/icu-$ICU_VERSION/lib + -DPYTHON_LIBRARY=$PYTHON_LIBRARY + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE + -DPYTHON_INCLUDE_DIR=$PYTHON_INCLUDE + -DSWIG_EXECUTABLE=$DEPS_DIR/install/swig/bin/swig + " $CMAKE_DIR + + printf "\rBuilding python $PYTHON_VERSION wrapper... " + + make -j$IFCOS_NUM_BUILD_PROCS _ifcopenshell_wrapper >>$LOG_FILE 2>&1 + + if [ "$(uname)" != "Darwin" ]; then + # TODO: This symbol name depends on the Python version? + strip -s \ + -K PyInit__ifcopenshell_wrapper \ + ifcwrap/_ifcopenshell_wrapper.so + fi + + cd .. + +done + +printf "\rBuilt IfcOpenShell... \n\n" diff --git a/src/examples/CMakeLists.txt b/src/examples/CMakeLists.txt index e572379ec1..8805d40e8c 100644 --- a/src/examples/CMakeLists.txt +++ b/src/examples/CMakeLists.txt @@ -1,5 +1,26 @@ +################################################################################ +# # +# 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 . # +# # +################################################################################ + ADD_EXECUTABLE(IfcParseExamples IfcParseExamples.cpp) -TARGET_LINK_LIBRARIES (IfcParseExamples IfcParse) +TARGET_LINK_LIBRARIES(IfcParseExamples IfcParse) +set_target_properties(IfcParseExamples PROPERTIES FOLDER Examples) ADD_EXECUTABLE(IfcOpenHouse IfcOpenHouse.cpp) -TARGET_LINK_LIBRARIES (IfcOpenHouse IfcParse IfcGeom TKernel TKMath TKBRep TKGeomBase TKGeomAlgo TKG3d TKG2d TKShHealing TKTopAlgo TKMesh TKPrim TKBool TKBO TKFillet TKOffset) +TARGET_LINK_LIBRARIES(IfcOpenHouse IfcParse IfcGeom ${OPENCASCADE_LIBRARIES}) +set_target_properties(IfcOpenHouse PROPERTIES FOLDER Examples) diff --git a/src/examples/IfcOpenHouse.cpp b/src/examples/IfcOpenHouse.cpp index 00cfe1503d..c7414e76e7 100644 --- a/src/examples/IfcOpenHouse.cpp +++ b/src/examples/IfcOpenHouse.cpp @@ -41,6 +41,10 @@ #include "../ifcparse/IfcHierarchyHelper.h" #include "../ifcgeom/IfcGeom.h" +#if USE_VLD +#include +#endif + // Some convenience typedefs and definitions. typedef std::string S; typedef IfcParse::IfcGlobalId guid; @@ -50,7 +54,7 @@ boost::none_t const null = boost::none; // The creation of Nurbs-surface for the IfcSite mesh, to be implemented lateron void createGroundShape(TopoDS_Shape& shape); -int main(int argc, char** argv) { +int main() { // The IfcHierarchyHelper is a subclass of the regular IfcFile that provides several // convenience functions for working with geometry in IFC files. diff --git a/src/examples/IfcParseExamples.cpp b/src/examples/IfcParseExamples.cpp index 342a6e8674..7ae158a67f 100644 --- a/src/examples/IfcParseExamples.cpp +++ b/src/examples/IfcParseExamples.cpp @@ -19,6 +19,10 @@ #include "../ifcparse/IfcFile.h" +#if USE_VLD +#include +#endif + using namespace IfcSchema; int main(int argc, char** argv) { diff --git a/src/ifcconvert/ColladaSerializer.cpp b/src/ifcconvert/ColladaSerializer.cpp index 2f9b54fbf1..c8272aba64 100644 --- a/src/ifcconvert/ColladaSerializer.cpp +++ b/src/ifcconvert/ColladaSerializer.cpp @@ -19,48 +19,65 @@ #ifdef WITH_OPENCOLLADA -#include - #include "ColladaSerializer.h" -std::string collada_id(const std::string& s) { - std::string id; - id.reserve(s.size()); - for (std::string::const_iterator it = s.begin(); it != s.end(); ++it) { - const std::string::value_type c = *it; - if ((c >= '0' && c <= '9') || (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || (c == '_') || ( c == '-')) { - id.push_back(c); - } - } - return id; +#include +#include +#include +#include +#include +#include +#include + +#include + +#include +#include + +static void collada_id(std::string &s) +{ + IfcUtil::sanitate_material_name(s); + IfcUtil::escape_xml(s); } -void ColladaSerializer::ColladaExporter::ColladaGeometries::addFloatSource(const std::string& mesh_id, const std::string& suffix, const std::vector& floats, const char* coords /* = "XYZ" */) { +void ColladaSerializer::ColladaExporter::ColladaGeometries::addFloatSource(const std::string& mesh_id, + const std::string& suffix, const std::vector& floats, const char* coords /* = "XYZ" */) +{ COLLADASW::FloatSource source(mSW); source.setId(mesh_id + suffix); source.setArrayId(mesh_id + suffix + COLLADASW::LibraryGeometries::ARRAY_ID_SUFFIX); - source.setAccessorStride(strlen(coords)); - source.setAccessorCount(floats.size() / 3); - for (unsigned int i = 0; i < source.getAccessorStride(); ++i) { + const size_t num_elems = strlen(coords); + source.setAccessorStride(static_cast(num_elems)); + source.setAccessorCount(static_cast(floats.size() / num_elems)); + for (size_t i = 0; i < num_elems; ++i) { source.getParameterNameList().push_back(std::string(1, coords[i])); } source.prepareToAppendValues(); - for (std::vector::const_iterator it = floats.begin(); it != floats.end(); ++it) { + for (std::vector::const_iterator it = floats.begin(); it != floats.end(); ++it) { source.appendValues(*it); } source.finish(); } - -void ColladaSerializer::ColladaExporter::ColladaGeometries::write(const std::string mesh_id, const std::string& default_material_name, const std::vector& positions, const std::vector& normals, const std::vector& faces, const std::vector& edges, const std::vector material_ids, const std::vector& materials) { + +void ColladaSerializer::ColladaExporter::ColladaGeometries::write( + const std::string &mesh_id, const std::string& default_material_name, const std::vector& positions, + const std::vector& normals, const std::vector& faces, const std::vector& edges, + const std::vector material_ids, const std::vector& materials, + const std::vector& uvs) +{ openMesh(mesh_id); // The normals vector can be empty for example when the WELD_VERTICES setting is used. // IfcOpenShell does not provide them with multiple face normals collapsed into a single vertex. const bool has_normals = !normals.empty(); + const bool has_uvs = !uvs.empty(); addFloatSource(mesh_id, COLLADASW::LibraryGeometries::POSITIONS_SOURCE_ID_SUFFIX, positions); if (has_normals) { addFloatSource(mesh_id, COLLADASW::LibraryGeometries::NORMALS_SOURCE_ID_SUFFIX, normals); + if (has_uvs) { + addFloatSource(mesh_id, COLLADASW::LibraryGeometries::TEXCOORDS_SOURCE_ID_SUFFIX, uvs, "UV"); + } } COLLADASW::VerticesElement vertices(mSW); @@ -72,21 +89,36 @@ void ColladaSerializer::ColladaExporter::ColladaGeometries::write(const std::str std::vector::const_iterator material_it = material_ids.begin(); int previous_material_id = -1; for (std::vector::const_iterator it = faces.begin(); !faces.empty(); it += 3) { - const int current_material_id = *(material_it++); - const int num_triangles = std::distance(index_range_start, it) / 3; + + int current_material_id = 0; + if (material_it != material_ids.end()) { + // In order for the last range of equal material ids to be output as well, this loop iterates + // one element past the end of the vector. This needs to be observed when incrementing. + current_material_id = *(material_it++); + } + + const size_t num_triangles = std::distance(index_range_start, it) / 3; if ((previous_material_id != current_material_id && num_triangles > 0) || (it == faces.end())) { COLLADASW::Triangles triangles(mSW); - triangles.setMaterial(materials[previous_material_id].name()); - triangles.setCount(num_triangles); + std::string material_name = (serializer->settings().get(IfcGeom::IteratorSettings::USE_MATERIAL_NAMES) + ? materials[previous_material_id].original_name() : materials[previous_material_id].name()); + collada_id(material_name); + triangles.setMaterial(material_name); + triangles.setCount((unsigned long)num_triangles); int offset = 0; - triangles.getInputList().push_back(COLLADASW::Input(COLLADASW::InputSemantic::VERTEX,"#" + mesh_id + COLLADASW::LibraryGeometries::VERTICES_ID_SUFFIX, offset++ ) ); + triangles.getInputList().push_back(COLLADASW::Input(COLLADASW::InputSemantic::VERTEX,"#" + mesh_id + COLLADASW::LibraryGeometries::VERTICES_ID_SUFFIX, offset++)); if (has_normals) { - triangles.getInputList().push_back(COLLADASW::Input(COLLADASW::InputSemantic::NORMAL,"#" + mesh_id + COLLADASW::LibraryGeometries::NORMALS_SOURCE_ID_SUFFIX, offset++ ) ); + triangles.getInputList().push_back(COLLADASW::Input(COLLADASW::InputSemantic::NORMAL,"#" + mesh_id + COLLADASW::LibraryGeometries::NORMALS_SOURCE_ID_SUFFIX, offset++)); } + if (has_uvs) { + triangles.getInputList().push_back(COLLADASW::Input(COLLADASW::InputSemantic::TEXCOORD,"#" + mesh_id + COLLADASW::LibraryGeometries::TEXCOORDS_SOURCE_ID_SUFFIX, offset++)); + } triangles.prepareToAppendValues(); for (std::vector::const_iterator jt = index_range_start; jt != it; ++jt) { const int idx = *jt; - if (has_normals) { + if (has_normals && has_uvs) { + triangles.appendValues(idx, idx, idx); + } else if(has_normals) { triangles.appendValues(idx, idx); } else { triangles.appendValues(idx); @@ -125,10 +157,13 @@ void ColladaSerializer::ColladaExporter::ColladaGeometries::write(const std::str for (linelist_t::const_iterator it = linelist.begin(); it != linelist.end(); ++it) { COLLADASW::Lines lines(mSW); - lines.setMaterial(materials[it->first].name()); - lines.setCount(it->second.size()); + std::string material_name = (serializer->settings().get(IfcGeom::IteratorSettings::USE_MATERIAL_NAMES) + ? materials[it->first].original_name() : materials[it->first].name()); + collada_id(material_name); + lines.setMaterial(material_name); + lines.setCount((unsigned long)it->second.size()); int offset = 0; - lines.getInputList().push_back(COLLADASW::Input(COLLADASW::InputSemantic::VERTEX, "#" + mesh_id + COLLADASW::LibraryGeometries::VERTICES_ID_SUFFIX, 0)); + lines.getInputList().push_back(COLLADASW::Input(COLLADASW::InputSemantic::VERTEX, "#" + mesh_id + COLLADASW::LibraryGeometries::VERTICES_ID_SUFFIX, offset)); lines.prepareToAppendValues(); lines.appendValues(it->second); lines.finish(); @@ -141,8 +176,11 @@ void ColladaSerializer::ColladaExporter::ColladaGeometries::write(const std::str void ColladaSerializer::ColladaExporter::ColladaGeometries::close() { closeLibrary(); } - -void ColladaSerializer::ColladaExporter::ColladaScene::add(const std::string& node_id, const std::string& node_name, const std::string& geom_name, const std::vector& material_ids, const std::vector& matrix) { + +void ColladaSerializer::ColladaExporter::ColladaScene::add( + const std::string& node_id, const std::string& node_name, const std::string& geom_name, + const std::vector& material_ids, const std::vector& matrix) +{ if (!scene_opened) { openVisualScene(scene_id); scene_opened = true; @@ -156,18 +194,24 @@ void ColladaSerializer::ColladaExporter::ColladaScene::add(const std::string& no // The matrix attribute of an entity is basically a 4x3 representation of its ObjectPlacement. // Note that this placement is absolute, ie it is multiplied with all parent placements. double matrix_array[4][4] = { - {matrix[0], matrix[3], matrix[6], matrix[ 9]}, - {matrix[1], matrix[4], matrix[7], matrix[10]}, - {matrix[2], matrix[5], matrix[8], matrix[11]}, - { 0, 0, 0, 1} + { (double)matrix[0], (double)matrix[3], (double)matrix[6], (double)matrix[ 9] }, + { (double)matrix[1], (double)matrix[4], (double)matrix[7], (double)matrix[10] }, + { (double)matrix[2], (double)matrix[5], (double)matrix[8], (double)matrix[11] }, + { 0, 0, 0, 1 } }; + matrix_array[0][3] += serializer->settings().offset[0]; + matrix_array[1][3] += serializer->settings().offset[1]; + matrix_array[2][3] += serializer->settings().offset[2]; + node.start(); node.addMatrix(matrix_array); COLLADASW::InstanceGeometry instanceGeometry(mSW); instanceGeometry.setUrl ("#" + geom_name); - for (std::vector::const_iterator it = material_ids.begin(); it != material_ids.end(); ++it) { - COLLADASW::InstanceMaterial material (*it, "#" + *it); + foreach(std::string material_name, material_ids) { + /// @todo This is done 6 times in this file, try to perform this once and be done with the material naming for the export. + collada_id(material_name); + COLLADASW::InstanceMaterial material (material_name, "#" + material_name); instanceGeometry.getBindMaterial().getInstanceMaterialList().push_back(material); } instanceGeometry.add(); @@ -183,9 +227,13 @@ void ColladaSerializer::ColladaExporter::ColladaScene::write() { scene.add(); } } - -void ColladaSerializer::ColladaExporter::ColladaMaterials::ColladaEffects::write(const IfcGeom::Material& material) { - openEffect(collada_id(material.name()) + "-fx"); + +void ColladaSerializer::ColladaExporter::ColladaMaterials::ColladaEffects::write(const IfcGeom::Material& material) +{ + std::string material_name = (serializer->settings().get(IfcGeom::IteratorSettings::USE_MATERIAL_NAMES) + ? material.original_name() : material.name()); + collada_id(material_name); + openEffect(material_name + "-fx"); COLLADASW::EffectProfile effect(mSW); effect.setShaderType(COLLADASW::EffectProfile::LAMBERT); if (material.hasDiffuse()) { @@ -214,7 +262,7 @@ void ColladaSerializer::ColladaExporter::ColladaMaterials::ColladaEffects::write void ColladaSerializer::ColladaExporter::ColladaMaterials::ColladaEffects::close() { closeLibrary(); } - + void ColladaSerializer::ColladaExporter::ColladaMaterials::add(const IfcGeom::Material& material) { if (!contains(material)) { effects.write(material); @@ -228,15 +276,19 @@ bool ColladaSerializer::ColladaExporter::ColladaMaterials::contains(const IfcGeo void ColladaSerializer::ColladaExporter::ColladaMaterials::write() { effects.close(); - for (std::vector::const_iterator it = materials.begin(); it != materials.end(); ++it) { - const std::string& material_name = collada_id((*it).name()); + foreach(const IfcGeom::Material& material, materials) { + std::string material_name = (serializer->settings().get(IfcGeom::IteratorSettings::USE_MATERIAL_NAMES) + ? material.original_name() : material.name()); + std::string material_name_unescaped = material_name; // workaround double-escaping that would occur in addInstanceEffect() + IfcUtil::sanitate_material_name(material_name_unescaped); + collada_id(material_name); openMaterial(material_name); - addInstanceEffect("#" + material_name + "-fx"); + addInstanceEffect("#" + material_name_unescaped + "-fx"); closeMaterial(); } closeLibrary(); } - + void ColladaSerializer::ColladaExporter::startDocument(const std::string& unit_name, float unit_magnitude) { stream.startDocument(); @@ -247,35 +299,51 @@ void ColladaSerializer::ColladaExporter::startDocument(const std::string& unit_n asset.add(); } -void ColladaSerializer::ColladaExporter::write(const std::string& unique_id, const std::string& type, const std::vector& matrix, const std::vector& vertices, const std::vector& normals, const std::vector& faces, const std::vector& edges, const std::vector& material_ids, const std::vector& _materials) { +void ColladaSerializer::ColladaExporter::write(const IfcGeom::TriangulationElement* o) +{ + const IfcGeom::Representation::Triangulation& mesh = o->geometry(); + const std::string name = serializer->settings().get(IfcGeom::IteratorSettings::USE_ELEMENT_GUIDS) ? + o->guid() : (serializer->settings().get(IfcGeom::IteratorSettings::USE_ELEMENT_NAMES) ? o->name() : o->unique_id()); + const std::string representation_id = "representation-" + boost::lexical_cast(o->geometry().id()); + std::vector material_references; - for (std::vector::const_iterator it = _materials.begin(); it != _materials.end(); ++it) { - const IfcGeom::Material& material = *it; + foreach(const IfcGeom::Material& material, mesh.materials()) { if (!materials.contains(material)) { materials.add(material); } - material_references.push_back(collada_id(material.name())); + std::string material_name = (serializer->settings().get(IfcGeom::IteratorSettings::USE_MATERIAL_NAMES) + ? material.original_name() : material.name()); + collada_id(material_name); + material_references.push_back(material_name); } - deferreds.push_back(DeferredObject(unique_id, type, matrix, vertices, normals, faces, edges, material_ids, _materials, material_references)); + + deferreds.push_back( + DeferredObject(name, representation_id, o->type(), o->transformation().matrix().data(), mesh.verts(), mesh.normals(), + mesh.faces(), mesh.edges(), mesh.material_ids(), mesh.materials(), material_references, mesh.uvs()) + ); } void ColladaSerializer::ColladaExporter::endDocument() { // In fact due the XML based nature of Collada and its dependency on library nodes, // only at this point all objects are written to the stream. materials.write(); + std::set geometries_written; for (std::vector::const_iterator it = deferreds.begin(); it != deferreds.end(); ++it) { - const std::string object_name = it->unique_id + "-representation"; - geometries.write(object_name, it->type, it->vertices, it->normals, it->faces, it->edges, it->material_ids, it->materials); + if (geometries_written.find(it->representation_id) != geometries_written.end()) { + continue; + } + geometries_written.insert(it->representation_id); + geometries.write(it->representation_id, it->type, it->vertices, it->normals, it->faces, it->edges, it->material_ids, it->materials, it->uvs); } geometries.close(); for (std::vector::const_iterator it = deferreds.begin(); it != deferreds.end(); ++it) { const std::string object_name = it->unique_id; - scene.add(object_name, object_name, object_name + "-representation", it->material_references, it->matrix); + scene.add(object_name, object_name, it->representation_id, it->material_references, it->matrix); } scene.write(); stream.endDocument(); } - + bool ColladaSerializer::ready() { return true; } @@ -284,9 +352,8 @@ void ColladaSerializer::writeHeader() { exporter.startDocument(unit_name, unit_magnitude); } -void ColladaSerializer::write(const IfcGeom::TriangulationElement* o) { - const IfcGeom::Representation::Triangulation& mesh = o->geometry(); - exporter.write(o->unique_id(), o->type(), o->transformation().matrix().data(), mesh.verts(), mesh.normals(), mesh.faces(), mesh.edges(), mesh.material_ids(), mesh.materials()); +void ColladaSerializer::write(const IfcGeom::TriangulationElement* o) { + exporter.write(o); } void ColladaSerializer::finalize() { diff --git a/src/ifcconvert/ColladaSerializer.h b/src/ifcconvert/ColladaSerializer.h index 63421d5f85..11f06381a1 100644 --- a/src/ifcconvert/ColladaSerializer.h +++ b/src/ifcconvert/ColladaSerializer.h @@ -22,18 +22,18 @@ #ifndef COLLADASERIALIZER_H #define COLLADASERIALIZER_H +#ifdef _MSC_VER +#pragma warning(push) +#pragma warning(disable : 4201 4512) +#endif #include -#include #include -#include -#include -#include -#include #include #include #include -#include -#include +#ifdef _MSC_VER +#pragma warning(pop) +#endif #include "../ifcgeom/IfcGeomIterator.h" @@ -41,72 +41,98 @@ class ColladaSerializer : public GeometrySerializer { + // TODO The vast amount of implement details of ColladaSerializer could be hidden to the cpp file. private: class ColladaExporter { private: class ColladaGeometries : public COLLADASW::LibraryGeometries { + ColladaGeometries(const ColladaGeometries&); //N/A + ColladaGeometries& operator =(const ColladaGeometries&); //N/A public: - explicit ColladaGeometries(COLLADASW::StreamWriter& stream) + explicit ColladaGeometries(COLLADASW::StreamWriter& stream, ColladaSerializer *_serializer) : COLLADASW::LibraryGeometries(&stream) + , serializer(_serializer) {} - void addFloatSource(const std::string& mesh_id, const std::string& suffix, const std::vector& floats, const char* coords = "XYZ"); - void write(const std::string mesh_id, const std::string& default_material_name, const std::vector& positions, const std::vector& normals, const std::vector& faces, const std::vector& edges, const std::vector material_ids, const std::vector& materials); + void addFloatSource(const std::string& mesh_id, const std::string& suffix, + const std::vector& floats, const char* coords = "XYZ"); + void write(const std::string &mesh_id, const std::string& default_material_name, + const std::vector& positions, const std::vector& normals, + const std::vector& faces, const std::vector& edges, + const std::vector material_ids, const std::vector& materials, + const std::vector& uvs); void close(); + ColladaSerializer *serializer; }; class ColladaScene : public COLLADASW::LibraryVisualScenes { private: + ColladaScene(const ColladaScene&); //N/A + ColladaScene& operator =(const ColladaScene&); //N/A + const std::string scene_id; bool scene_opened; public: - ColladaScene(const std::string& scene_id, COLLADASW::StreamWriter& stream) + ColladaScene(const std::string& scene_id, COLLADASW::StreamWriter& stream, ColladaSerializer *_serializer) : COLLADASW::LibraryVisualScenes(&stream) , scene_id(scene_id) - , scene_opened(false) + , scene_opened(false) + , serializer(_serializer) {} - void add(const std::string& node_id, const std::string& node_name, const std::string& geom_name, const std::vector& material_ids, const std::vector& matrix); + void add(const std::string& node_id, const std::string& node_name, const std::string& geom_name, + const std::vector& material_ids, const std::vector& matrix); void write(); + ColladaSerializer *serializer; }; class ColladaMaterials : public COLLADASW::LibraryMaterials { + ColladaMaterials(const ColladaMaterials&); //N/A + ColladaMaterials& operator =(const ColladaMaterials&); //N/A private: class ColladaEffects : public COLLADASW::LibraryEffects { + ColladaEffects(const ColladaEffects&); //N/A + ColladaEffects& operator =(const ColladaEffects&); //N/A public: explicit ColladaEffects(COLLADASW::StreamWriter& stream) : COLLADASW::LibraryEffects(&stream) {} void write(const IfcGeom::Material& material); void close(); + ColladaSerializer *serializer; }; std::vector materials; - ColladaEffects effects; public: - explicit ColladaMaterials(COLLADASW::StreamWriter& stream) + explicit ColladaMaterials(COLLADASW::StreamWriter& stream, ColladaSerializer *_serializer) : COLLADASW::LibraryMaterials(&stream) , effects(stream) + , serializer(_serializer) {} void add(const IfcGeom::Material& material); bool contains(const IfcGeom::Material& material); void write(); + ColladaSerializer *serializer; + ColladaEffects effects; }; class DeferredObject { public: - std::string unique_id, type; - std::vector matrix; - std::vector vertices; - std::vector normals; + std::string unique_id, representation_id, type; + std::vector matrix; + std::vector vertices; + std::vector normals; std::vector faces; std::vector edges; std::vector material_ids; std::vector materials; std::vector material_references; - DeferredObject(const std::string& unique_id, const std::string& type, const std::vector& matrix, const std::vector& vertices, - const std::vector& normals, const std::vector& faces, const std::vector& edges, const std::vector& material_ids, - const std::vector& materials, const std::vector& material_references) + std::vector uvs; + DeferredObject(const std::string& unique_id, const std::string& representation_id, const std::string& type, const std::vector& matrix, + const std::vector& vertices, const std::vector& normals, const std::vector& faces, + const std::vector& edges, const std::vector& material_ids, const std::vector& materials, + const std::vector& material_references, const std::vector& uvs) : unique_id(unique_id) + , representation_id(representation_id) , type(type) , matrix(matrix) , vertices(vertices) @@ -116,39 +142,48 @@ private: , material_ids(material_ids) , materials(materials) , material_references(material_references) + , uvs(uvs) {} }; COLLADABU::NativeString filename; COLLADASW::StreamWriter stream; - ColladaGeometries geometries; ColladaScene scene; - ColladaMaterials materials; public: - ColladaExporter(const std::string& scene_name, const std::string& fn) - : filename(fn.c_str()) - , stream(filename) - , geometries(stream) - , scene(scene_name, stream) - , materials(stream) - {} + ColladaExporter(const std::string& scene_name, const std::string& fn, ColladaSerializer *_serializer) + : filename(fn) + , stream(filename, sizeof(real_t) == sizeof(double)) // utilise Collada stream's double precision feature + , geometries(stream, _serializer) + , scene(scene_name, stream, _serializer) + , materials(stream, _serializer) + , serializer(_serializer) + { + } + ColladaMaterials materials; + ColladaSerializer *serializer; + ColladaGeometries geometries; std::vector deferreds; virtual ~ColladaExporter() {} void startDocument(const std::string& unit_name, float unit_magnitude); - void write(const std::string& unique_id, const std::string& type, const std::vector& matrix, const std::vector& vertices, const std::vector& normals, const std::vector& faces, const std::vector& edges, const std::vector& material_ids, const std::vector& materials); + void write(const IfcGeom::TriangulationElement* o); void endDocument(); }; ColladaExporter exporter; std::string unit_name; float unit_magnitude; public: - ColladaSerializer(const std::string& dae_filename) - : GeometrySerializer() - , exporter("IfcOpenShell", dae_filename) - {} + ColladaSerializer(const std::string& dae_filename, const IfcGeom::IteratorSettings &settings) + : GeometrySerializer(settings) + , exporter("IfcOpenShell", dae_filename, this) + { + exporter.serializer = this; + exporter.materials.serializer = this; + exporter.materials.effects.serializer = this; + exporter.geometries.serializer = this; + } bool ready(); void writeHeader(); - void write(const IfcGeom::TriangulationElement* o); - void write(const IfcGeom::BRepElement* o) {} + void write(const IfcGeom::TriangulationElement* o); + void write(const IfcGeom::BRepElement* /*o*/) {} void finalize(); bool isTesselated() const { return true; } void setUnitNameAndMagnitude(const std::string& name, float magnitude) { diff --git a/src/ifcconvert/GeometrySerializer.h b/src/ifcconvert/GeometrySerializer.h index 0a62defa18..c2ee0f6416 100644 --- a/src/ifcconvert/GeometrySerializer.h +++ b/src/ifcconvert/GeometrySerializer.h @@ -20,17 +20,30 @@ #ifndef GEOMETRYSERIALIZER_H #define GEOMETRYSERIALIZER_H +#ifdef IFCCONVERT_DOUBLE_PRECISION +typedef double real_t; +#else +typedef float real_t; +#endif + #include "../ifcconvert/Serializer.h" #include "../ifcgeom/IfcGeomIterator.h" class GeometrySerializer : public Serializer { public: + GeometrySerializer(const IfcGeom::IteratorSettings &settings) : settings_(settings) {} virtual ~GeometrySerializer() {} virtual bool isTesselated() const = 0; - virtual void write(const IfcGeom::TriangulationElement* o) = 0; - virtual void write(const IfcGeom::BRepElement* o) = 0; + virtual void write(const IfcGeom::TriangulationElement* o) = 0; + virtual void write(const IfcGeom::BRepElement* o) = 0; virtual void setUnitNameAndMagnitude(const std::string& name, float magnitude) = 0; + + const IfcGeom::IteratorSettings& settings() const { return settings_; } + IfcGeom::IteratorSettings& settings() { return settings_; } + +protected: + IfcGeom::IteratorSettings settings_; }; -#endif \ No newline at end of file +#endif diff --git a/src/ifcconvert/IfcConvert.cpp b/src/ifcconvert/IfcConvert.cpp index 0f9cb743c7..f81c3a234d 100644 --- a/src/ifcconvert/IfcConvert.cpp +++ b/src/ifcconvert/IfcConvert.cpp @@ -26,16 +26,6 @@ * * ********************************************************************************/ -#include -#include -#include -#include - -#include -#include - -#include "../ifcgeom/IfcGeomIterator.h" - #include "../ifcconvert/ColladaSerializer.h" #include "../ifcconvert/IgesSerializer.h" #include "../ifcconvert/StepSerializer.h" @@ -43,28 +33,58 @@ #include "../ifcconvert/XmlSerializer.h" #include "../ifcconvert/SvgSerializer.h" -static std::string DEFAULT_EXTENSION = "obj"; +#include "../ifcgeom/IfcGeomIterator.h" -void printVersion() { - std::cerr << "IfcOpenShell IfcConvert " << IFCOPENSHELL_VERSION << std::endl; +#include +#include + +#include +#include +#include + +#include +#include +#include +#include + +#if USE_VLD +#include +#endif + +const std::string DEFAULT_EXTENSION = "obj"; +const std::string TEMP_FILE_EXTENSION = ".tmp"; + +void print_version() +{ + /// @todo Why cerr used for info prints? Change to cout. + std::cerr << "IfcOpenShell " << IfcSchema::Identifier << " IfcConvert " << IFCOPENSHELL_VERSION << std::endl; } -void printUsage(const boost::program_options::options_description& generic_options, const boost::program_options::options_description& geom_options) { - printVersion(); - std::cerr << "Usage: IfcConvert [options] []" << std::endl - << std::endl - << "Converts the geometry in an IFC file into one of the following formats:" << std::endl - << " .obj WaveFront OBJ (a .mtl file is also created)" << std::endl; -#ifdef WITH_OPENCOLLADA - std::cerr << " .dae Collada Digital Asset Exchange" << std::endl; +void print_usage(bool suggest_help = true) +{ + std::cerr << "Usage: IfcConvert [options] []" << "\n" + << "\n" + << "Converts the geometry in an IFC file into one of the following formats:" << "\n" + << " .obj WaveFront OBJ (a .mtl file is also created)" << "\n" +#ifdef WITH_OPENCOLLADA + << " .dae Collada Digital Assets Exchange" << "\n" #endif - std::cerr << " .stp STEP Standard for the Exchange of Product Data" << std::endl - << " .igs IGES Initial Graphics Exchange Specification" << std::endl - << " .xml XML Property definitions and decomposition tree" << std::endl - << " .svg SVG Scalable Vector Graphics (2d floor plan)" << std::endl - << std::endl - << "Command line options" << std::endl << generic_options << std::endl - << "Advanced options" << std::endl << geom_options << std::endl; + << " .stp STEP Standard for the Exchange of Product Data" << "\n" + << " .igs IGES Initial Graphics Exchange Specification" << "\n" + << " .xml XML Property definitions and decomposition tree" << "\n" + << " .svg SVG Scalable Vector Graphics (2D floor plan)" << "\n" + << "\n" + << "If no output filename given, ." + DEFAULT_EXTENSION + " will be used as the output file.\n"; + if (suggest_help) { + std::cerr << "\nRun 'IfcConvert --help' for more information."; + } + std::cerr << std::endl; +} + +void print_options(const boost::program_options::options_description& options) +{ + std::cerr << "\n" << options; + std::cerr << std::endl; } std::string change_extension(const std::string& fn, const std::string& ext) { @@ -76,24 +96,41 @@ std::string change_extension(const std::string& fn, const std::string& ext) { } } +bool file_exists(const std::string& filename) +{ + /// @todo Windows Unicode support + std::ifstream file(filename.c_str()); + return file.good(); +} + +bool rename_file(const std::string& old_filename, const std::string& new_filename) +{ + // Whether or not rename() replaces an existing file is implementation-specific, + // so remove() possible existing file always. + /// @todo Windows Unicode support + std::remove(new_filename.c_str()); + return std::rename(old_filename.c_str(), new_filename.c_str()) == 0; +} + static std::stringstream log_stream; void write_log(); int main(int argc, char** argv) { - boost::program_options::options_description generic_options; + boost::program_options::options_description generic_options("Command line options"); generic_options.add_options() - ("help", "display usage information") + ("help,h", "display usage information") ("version", "display version information") - ("verbose,v", "more verbose output"); + ("verbose,v", "more verbose output") + ("yes,y", "answer 'yes' automatically to possible confirmation queries (e.g overwriting an existing output file)"); boost::program_options::options_description fileio_options; fileio_options.add_options() ("input-file", boost::program_options::value(), "input IFC file") ("output-file", boost::program_options::value(), "output geometry file"); - std::string bounds; - std::vector entity_vector; - boost::program_options::options_description geom_options; + std::vector entity_vector, names; + double deflection_tolerance; + boost::program_options::options_description geom_options("Geometry options"); geom_options.add_options() ("plan", "Specifies whether to include curves in the output result. Typically " @@ -121,31 +158,68 @@ int main(int argc, char** argv) { "This is a potentially time consuming operation, but guarantees a " "consistent orientation of surface normals, even if the faces are not " "properly oriented in the IFC file.") +#if OCC_VERSION_HEX < 0x60900 + // In Open CASCADE version prior to 6.9.0 boolean operations with multiple + // arguments where not introduced yet and a work-around was implemented to + // subtract multiple openings as a single compound. This hack is obsolete + // for newer versions of Open CASCADE. ("merge-boolean-operands", "Specifies whether to merge all IfcOpeningElement operands into a single " "operand before applying the subtraction operation. This may " "introduce a performance improvement at the risk of failing, in " "which case the subtraction is applied one-by-one.") +#endif ("disable-opening-subtractions", "Specifies whether to disable the boolean subtraction of " "IfcOpeningElement Representations from their RelatingElements.") ("enable-layerset-slicing", "Specifies whether to enable the slicing of products according " "to their associated IfcMaterialLayerSet.") - ("bounds", boost::program_options::value(&bounds), - "Specifies the bounding rectangle, for example 512x512, to which the " - "output will be scaled. Only used when converting to SVG.") ("include", - "Specifies that the entities listed after --entities are to be included") + "Specifies that the entities listed after --entities or --names are to be included") ("exclude", - "Specifies that the entities listed after --entities are to be excluded") - ("entities", boost::program_options::value< std::vector >(&entity_vector)->multitoken(), + "Specifies that the entities listed after --entities or --names are to be excluded") + ("entities", boost::program_options::value< std::vector >(&entity_vector)->multitoken(), "A list of entities that should be included in or excluded from the " - "geometrical output, depending on whether --ignore or --include is " - "specified. Defaults to IfcOpeningElement and IfcSpace to be excluded."); - + "geometrical output, depending on whether --exclude or --include is specified. " + "Defaults to IfcOpeningElement and IfcSpace to be excluded. SVG output defaults " + "to IfcSpace to be included." + "The names are handled case-insensitively. Cannot be placed right before input file argument.") + ("names", boost::program_options::value< std::vector >(&names)->multitoken(), + "A list of names or wildcard patterns that should be included in or excluded from the " + "geometrical output, depending on whether --exclude or --include is specified. " + "The names are handled case-sensitively. Cannot be placed right before input file argument.") + ("no-normals", + "Disables computation of normals. Saves time and file size and is useful " + "in instances where you're going to recompute normals for the exported " + "model in other modelling application in any case.") + ("deflection-tolerance", boost::program_options::value(&deflection_tolerance), + "Sets the deflection tolerance of the mesher, 1e-3 by default if not specified.") + ("generate-uvs", + "Generates UVs (texture coordinates) by using simple box projection. Requires normals. " + "Not guaranteed to work properly if used with --weld-vertices."); + + std::string bounds; + boost::program_options::options_description serializer_options("Serialization options"); + serializer_options.add_options() + ("bounds", boost::program_options::value(&bounds), + "Specifies the bounding rectangle, for example 512x512, to which the " + "output will be scaled. Only used when converting to SVG.") + ("use-element-names", + "Use entity names instead of unique IDs for naming elements upon serialization. " + "Applicable for OBJ, DAE, and SVG output.") + ("use-element-guids", + "Use entity GUIDs instead of unique IDs for naming elements upon serialization. " + "Applicable for OBJ, DAE, and SVG output.") + ("use-material-names", + "Use material names instead of unique IDs for naming materials upon serialization. " + "Applicable for OBJ and DAE output.") + ("center-model", + "Centers the elements upon serialization by applying the center point of " + "all placements as an offset. Applicable for OBJ and DAE output."); + boost::program_options::options_description cmdline_options; - cmdline_options.add(generic_options).add(fileio_options).add(geom_options); + cmdline_options.add(generic_options).add(fileio_options).add(geom_options).add(serializer_options); boost::program_options::positional_options_description positional_options; positional_options.add("input-file", 1); @@ -157,21 +231,30 @@ int main(int argc, char** argv) { options(cmdline_options).positional(positional_options).run(), vmap); } catch (const boost::program_options::unknown_option& e) { std::cerr << "[Error] Unknown option '" << e.get_option_name() << "'" << std::endl << std::endl; - // Usage information will be emitted below + print_usage(); + return 1; } catch (...) { // Catch other errors such as invalid command line syntax + print_usage(); + return 1; } boost::program_options::notify(vmap); - if (vmap.count("version")) { - printVersion(); - return 0; - } else if (vmap.count("help") || !vmap.count("input-file")) { - printUsage(generic_options, geom_options); - return vmap.count("help") ? 0 : 1; + print_version(); + + if (vmap.count("version")) { + return 0; + } else if (vmap.count("help")) { + print_usage(false); + print_options(generic_options.add(geom_options).add(serializer_options)); + return 0; + } else if (!vmap.count("input-file")) { + std::cerr << "[Error] Input file not specified" << std::endl; + print_usage(); + return 1; } else if (vmap.count("include") && vmap.count("exclude")) { - std::cerr << "[Error] --include and --ignore can not be specified together" << std::endl; - printUsage(generic_options, geom_options); + std::cerr << "[Error] --include and --exclude can not be specified together" << std::endl; + print_options(geom_options); return 1; } @@ -180,12 +263,21 @@ int main(int argc, char** argv) { const bool use_world_coords = vmap.count("use-world-coords") != 0; const bool convert_back_units = vmap.count("convert-back-units") != 0; const bool sew_shells = vmap.count("sew-shells") != 0; +#if OCC_VERSION_HEX < 0x60900 const bool merge_boolean_operands = vmap.count("merge-boolean-operands") != 0; +#endif const bool disable_opening_subtractions = vmap.count("disable-opening-subtractions") != 0; bool include_entities = vmap.count("include") != 0; const bool include_plan = vmap.count("plan") != 0; const bool include_model = vmap.count("model") != 0 || (!include_plan); const bool enable_layerset_slicing = vmap.count("enable-layerset-slicing") != 0; + const bool use_element_names = vmap.count("use-element-names") != 0; + const bool use_element_guids = vmap.count("use-element-guids") != 0 ; + const bool use_material_names = vmap.count("use-material-names") != 0; + const bool no_normals = vmap.count("no-normals") != 0 ; + bool center_model = vmap.count("center-model") != 0 ; + const bool generate_uvs = vmap.count("generate-uvs") != 0 ; + const bool deflection_tolerance_specified = vmap.count("deflection-tolerance") != 0 ; boost::optional bounding_width, bounding_height; if (vmap.count("bounds") == 1) { @@ -195,19 +287,20 @@ int main(int argc, char** argv) { bounding_height = h; } else { std::cerr << "[Error] Invalid use of --bounds" << std::endl; - printUsage(generic_options, geom_options); + print_options(serializer_options); return 1; } } // Gets the set ifc types to be ignored from the command line. - std::set entities; - for (std::vector::const_iterator it = entity_vector.begin(); it != entity_vector.end(); ++it) { - const std::string& mixed_case_type = *it; - entities.insert(boost::to_lower_copy(mixed_case_type)); - } - + std::set entities(entity_vector.begin(), entity_vector.end()); + const std::string input_filename = vmap["input-file"].as(); + if (!file_exists(input_filename)) { + std::cerr << "[Error] Input file '" << input_filename << "' does not exist" << std::endl; + return 1; + } + // If no output filename is specified a Wavefront OBJ file will be output // to maintain backwards compatibility with the obsolete IfcObj executable. const std::string output_filename = vmap.count("output-file") == 1 @@ -215,21 +308,32 @@ int main(int argc, char** argv) { : change_extension(input_filename, DEFAULT_EXTENSION); if (output_filename.size() < 5) { - printUsage(generic_options, geom_options); + std::cerr << "[Error] Invalid or unsupported output file '" << output_filename << "' given" << std::endl; + print_usage(); return 1; } + if (file_exists(output_filename) && !vmap.count("yes")) { + std::string answer; + std::cout << "A file '" << output_filename << "' already exists. Overwrite the existing file?" << std::endl; + std::cin >> answer; + if (!boost::iequals(answer, "yes") && !boost::iequals(answer, "y")) { + return 0; + } + } + + std::string output_temp_filename = output_filename + TEMP_FILE_EXTENSION; + std::string output_extension = output_filename.substr(output_filename.size()-4); boost::to_lower(output_extension); - // If no entities are specified these are the defaults to skip from output - if (entity_vector.empty()) { + // If no entity or names filters are specified these are the defaults to skip from output + if (entities.empty() && names.empty()) { + entities.insert("IfcSpace"); if (output_extension == ".svg") { - entities.insert("ifcspace"); include_entities = true; } else { - entities.insert("ifcopeningelement"); - entities.insert("ifcspace"); + entities.insert("IfcOpeningElement"); } } @@ -239,13 +343,14 @@ int main(int argc, char** argv) { if (output_extension == ".xml") { int exit_code = 1; try { - XmlSerializer s(output_filename); + XmlSerializer s(output_temp_filename); IfcParse::IfcFile f; if (!f.Init(input_filename)) { - Logger::Message(Logger::LOG_ERROR, "Unable to parse .ifc file"); + Logger::Message(Logger::LOG_ERROR, "Unable to parse input file '" + input_filename + "'"); } else { s.setFile(&f); s.finalize(); + rename_file(output_temp_filename, output_filename); exit_code = 0; } } catch (...) {} @@ -254,67 +359,84 @@ int main(int argc, char** argv) { } IfcGeom::IteratorSettings settings; - + /// @todo Make APPLY_DEFAULT_MATERIALS configurable? Quickly tested setting this to false and using obj exporter caused the program to crash and burn. settings.set(IfcGeom::IteratorSettings::APPLY_DEFAULT_MATERIALS, true); settings.set(IfcGeom::IteratorSettings::USE_WORLD_COORDS, use_world_coords); settings.set(IfcGeom::IteratorSettings::WELD_VERTICES, weld_vertices); settings.set(IfcGeom::IteratorSettings::SEW_SHELLS, sew_shells); settings.set(IfcGeom::IteratorSettings::CONVERT_BACK_UNITS, convert_back_units); +#if OCC_VERSION_HEX < 0x60900 settings.set(IfcGeom::IteratorSettings::FASTER_BOOLEANS, merge_boolean_operands); +#endif settings.set(IfcGeom::IteratorSettings::DISABLE_OPENING_SUBTRACTIONS, disable_opening_subtractions); settings.set(IfcGeom::IteratorSettings::INCLUDE_CURVES, include_plan); settings.set(IfcGeom::IteratorSettings::EXCLUDE_SOLIDS_AND_SURFACES, !include_model); settings.set(IfcGeom::IteratorSettings::APPLY_LAYERSETS, enable_layerset_slicing); + settings.set(IfcGeom::IteratorSettings::USE_ELEMENT_NAMES, use_element_names); + settings.set(IfcGeom::IteratorSettings::USE_ELEMENT_GUIDS, use_element_guids); + settings.set(IfcGeom::IteratorSettings::USE_MATERIAL_NAMES, use_material_names); + settings.set(IfcGeom::IteratorSettings::NO_NORMALS, no_normals); + settings.set(IfcGeom::IteratorSettings::CENTER_MODEL, center_model); + settings.set(IfcGeom::IteratorSettings::GENERATE_UVS, generate_uvs); + if (deflection_tolerance_specified) { + settings.set_deflection_tolerance(deflection_tolerance); + } GeometrySerializer* serializer; if (output_extension == ".obj") { - const std::string mtl_filename = output_filename.substr(0,output_filename.size()-3) + "mtl"; + // Do not use temp file for MTL as it's such a small file. + const std::string mtl_filename = change_extension(output_filename, "mtl"); if (!use_world_coords) { Logger::Message(Logger::LOG_NOTICE, "Using world coords when writing WaveFront OBJ files"); settings.set(IfcGeom::IteratorSettings::USE_WORLD_COORDS, true); } - serializer = new WaveFrontOBJSerializer(output_filename, mtl_filename); + serializer = new WaveFrontOBJSerializer(output_temp_filename, mtl_filename, settings); #ifdef WITH_OPENCOLLADA } else if (output_extension == ".dae") { - serializer = new ColladaSerializer(output_filename); + serializer = new ColladaSerializer(output_temp_filename, settings); #endif } else if (output_extension == ".stp") { - serializer = new StepSerializer(output_filename); + serializer = new StepSerializer(output_temp_filename, settings); } else if (output_extension == ".igs") { - // Not sure why this is needed, but it is. - // See: http://tracker.dev.opencascade.org/view.php?id=23679 - IGESControl_Controller::Init(); - serializer = new IgesSerializer(output_filename); + IGESControl_Controller::Init(); // work around Open Cascade bug + serializer = new IgesSerializer(output_temp_filename, settings); } else if (output_extension == ".svg") { settings.set(IfcGeom::IteratorSettings::DISABLE_TRIANGULATION, true); - serializer = new SvgSerializer(output_filename); + serializer = new SvgSerializer(output_temp_filename, settings); if (bounding_width && bounding_height) { - ((SvgSerializer*) serializer)->setBoundingRectangle( - static_cast(*bounding_width), - static_cast(*bounding_height) - ); + static_cast(serializer)->setBoundingRectangle(*bounding_width, *bounding_height); } } else { - Logger::Message(Logger::LOG_ERROR, "Unknown output filename extension"); + Logger::Message(Logger::LOG_ERROR, "Unknown output filename extension '" + output_extension + "'"); write_log(); - printUsage(generic_options, geom_options); + print_usage(); return 1; } - if (!serializer->isTesselated()) { + const bool is_tesselated = serializer->isTesselated(); // isTesselated() doesn't change at run-time + if (!is_tesselated) { if (weld_vertices) { - Logger::Message(Logger::LOG_NOTICE, "Weld vertices setting ignored when writing STEP or IGES files"); + Logger::Message(Logger::LOG_NOTICE, "Weld vertices setting ignored when writing non-tesselated output"); } - settings.disable_triangulation() = true; + if (generate_uvs) { + Logger::Message(Logger::LOG_NOTICE, "Generate UVs setting ignored when writing non-tesselated output"); + } + if (center_model) { + Logger::Message(Logger::LOG_NOTICE, "Center model setting ignored when writing non-tesselated output"); + } + + settings.set(IfcGeom::IteratorSettings::DISABLE_TRIANGULATION, true); } - IfcGeom::Iterator context_iterator(settings, input_filename); + IfcGeom::Iterator context_iterator(settings, input_filename); try { if (include_entities) { context_iterator.includeEntities(entities); + context_iterator.include_entity_names(names); } else { context_iterator.excludeEntities(entities); + context_iterator.exclude_entity_names(names); } } catch (const IfcParse::IfcException& e) { std::cout << "[Error] " << e.what() << std::endl; @@ -322,7 +444,7 @@ int main(int argc, char** argv) { } if (!serializer->ready()) { - Logger::Message(Logger::LOG_ERROR, "Unable to open output file for writing"); + Logger::Message(Logger::LOG_ERROR, "Unable to open output '" + output_filename + "' file for writing"); write_log(); return 1; } @@ -331,24 +453,34 @@ int main(int argc, char** argv) { time(&start); if (!context_iterator.initialize()) { - Logger::Message(Logger::LOG_ERROR, "Unable to parse .ifc file or no geometrical entities found"); + Logger::Message(Logger::LOG_ERROR, "Unable to parse input file '" + input_filename + "' or no geometrical entities found"); write_log(); return 1; } - serializer->setFile(context_iterator.getFile()); + serializer->setFile(context_iterator.getFile()); if (convert_back_units) { - serializer->setUnitNameAndMagnitude(context_iterator.getUnitName(), static_cast(context_iterator.getUnitMagnitude())); + serializer->setUnitNameAndMagnitude(context_iterator.getUnitName(), static_cast(context_iterator.getUnitMagnitude())); } else { serializer->setUnitNameAndMagnitude("METER", 1.0f); } serializer->writeHeader(); - std::set materials; - int old_progress = -1; + + if (center_model) { + double* offset = serializer->settings().offset; + gp_XYZ center = (context_iterator.bounds_min() + context_iterator.bounds_max()) * 0.5; + offset[0] = -center.X(); + offset[1] = -center.Y(); + offset[2] = -center.Z(); + std::stringstream msg; + msg << "Using model offset (" << offset[0] << "," << offset[1] << "," << offset[2] << ")"; + Logger::Message(Logger::LOG_NOTICE, msg.str()); + } + Logger::Status("Creating geometry..."); // The functions IfcGeom::Iterator::get() and IfcGeom::Iterator::next() @@ -361,39 +493,60 @@ int main(int argc, char** argv) { // calling next() the entity to be returned has already been processed, a // true return value guarantees that a successfully processed product is // available. - do { - const IfcGeom::Element* geom_object = context_iterator.get(); - - if (serializer->isTesselated()) { - serializer->write(static_cast*>(geom_object)); - } else { - serializer->write(static_cast*>(geom_object)); - } - - const int progress = context_iterator.progress() / 2; - if (old_progress!= progress) Logger::ProgressBar(progress); - old_progress = progress; + size_t num_created = 0; - } while (context_iterator.next()); + do { + IfcGeom::Element *geom_object = context_iterator.get(); + if (is_tesselated) { + serializer->write(static_cast*>(geom_object)); + } else { + serializer->write(static_cast*>(geom_object)); + } + const int progress = context_iterator.progress() / 2; + if (old_progress != progress) Logger::ProgressBar(progress); + old_progress = progress; + } while (++num_created, context_iterator.next()); - serializer->finalize(); + Logger::Status("\rDone creating geometry (" + boost::lexical_cast(num_created) + + " objects) "); + + serializer->finalize(); delete serializer; - Logger::Status("\rDone creating geometry "); + // Renaming might fail (e.g. maybe the existing file was open in a viewer application) + // Do not remove the temp file as user can salvage the conversion result from it. + bool successful = rename_file(output_temp_filename, output_filename); + if (!successful) { + Logger::Message(Logger::LOG_ERROR, "Unable to write output file '" + output_filename + ""); + } write_log(); time(&end); - int dif = (int) difftime (end,start); - printf ("\nConversion took %d seconds\n", dif ); - return 0; + int seconds = (int)difftime(end, start); + std::stringstream msg; + int minutes = seconds / 60; + seconds = seconds % 60; + msg << "\nConversion took"; + if (minutes > 0) { + msg << " " << minutes << " minute"; + if (minutes > 1) { + msg << "s"; + } + } + msg << " " << seconds << " second"; + if (seconds > 1) { + msg << "s"; + } + Logger::Status(msg.str()); + + return successful ? 0 : 1; } void write_log() { std::string log = log_stream.str(); if (!log.empty()) { - std::cerr << std::endl << "Log:" << std::endl; - std::cerr << log << std::endl; + std::cerr << "\n" << "Log:\n" << log << std::endl; } -} \ No newline at end of file +} diff --git a/src/ifcconvert/IgesSerializer.h b/src/ifcconvert/IgesSerializer.h index 8591af9902..fb8045c2de 100644 --- a/src/ifcconvert/IgesSerializer.h +++ b/src/ifcconvert/IgesSerializer.h @@ -20,21 +20,20 @@ #ifndef IGESSERIALIZER_H #define IGESSERIALIZER_H -#include +#include "OpenCascadeBasedSerializer.h" + #include #include -#include "../ifcgeom/IfcGeomIterator.h" - -#include "../ifcconvert/OpenCascadeBasedSerializer.h" - class IgesSerializer : public OpenCascadeBasedSerializer { private: - IGESControl_Writer writer; + IGESControl_Writer writer; public: - explicit IgesSerializer(const std::string& out_filename) - : OpenCascadeBasedSerializer(out_filename) + /// @note IGESControl_Controller::Init() must be called prior to instantiating IgesSerializer. + /// See http://tracker.dev.opencascade.org/view.php?id=23679 for more information. + IgesSerializer(const std::string& out_filename, const IfcGeom::IteratorSettings &settings) + : OpenCascadeBasedSerializer(out_filename, settings) {} virtual ~IgesSerializer() {} void writeShape(const TopoDS_Shape& shape) { @@ -43,12 +42,13 @@ public: void finalize() { writer.Write(out_filename.c_str()); } - void setUnitNameAndMagnitude(const std::string& name, float magnitude) { + void setUnitNameAndMagnitude(const std::string& /*name*/, float magnitude) { const char* symbol = getSymbolForUnitMagnitude(magnitude); if (symbol) { + Interface_Static::SetCVal("xstep.cascade.unit", symbol); Interface_Static::SetCVal("write.iges.unit", symbol); } } }; -#endif \ No newline at end of file +#endif diff --git a/src/ifcconvert/OpenCascadeBasedSerializer.cpp b/src/ifcconvert/OpenCascadeBasedSerializer.cpp index 3dc8ad9386..1400d7c400 100644 --- a/src/ifcconvert/OpenCascadeBasedSerializer.cpp +++ b/src/ifcconvert/OpenCascadeBasedSerializer.cpp @@ -36,12 +36,18 @@ bool OpenCascadeBasedSerializer::ready() { return succeeded; } -void OpenCascadeBasedSerializer::write(const IfcGeom::BRepElement* o) { +void OpenCascadeBasedSerializer::write(const IfcGeom::BRepElement* o) { for (IfcGeom::IfcRepresentationShapeItems::const_iterator it = o->geometry().begin(); it != o->geometry().end(); ++ it) { gp_GTrsf gtrsf = it->Placement(); const gp_Trsf& o_trsf = o->transformation().data(); gtrsf.PreMultiply(o_trsf); + + if (o->geometry().settings().get(IfcGeom::IteratorSettings::CONVERT_BACK_UNITS)) { + gp_Trsf scale; + scale.SetScaleFactor(1.0 / o->geometry().settings().unit_magnitude()); + gtrsf.PreMultiply(scale); + } const TopoDS_Shape& s = it->Shape(); diff --git a/src/ifcconvert/OpenCascadeBasedSerializer.h b/src/ifcconvert/OpenCascadeBasedSerializer.h index 74a76ca341..f36a844609 100644 --- a/src/ifcconvert/OpenCascadeBasedSerializer.h +++ b/src/ifcconvert/OpenCascadeBasedSerializer.h @@ -25,23 +25,24 @@ #include "../ifcconvert/GeometrySerializer.h" class OpenCascadeBasedSerializer : public GeometrySerializer { + OpenCascadeBasedSerializer(const OpenCascadeBasedSerializer&); //N/A + OpenCascadeBasedSerializer& operator =(const OpenCascadeBasedSerializer&); //N/A protected: - const std::string& out_filename; + const std::string out_filename; const char* getSymbolForUnitMagnitude(float mag); public: - explicit OpenCascadeBasedSerializer(const std::string& out_filename) - : GeometrySerializer() + explicit OpenCascadeBasedSerializer(const std::string& out_filename, const IfcGeom::IteratorSettings &settings) + : GeometrySerializer(settings) , out_filename(out_filename) {} virtual ~OpenCascadeBasedSerializer() {} void writeHeader() {} - void writeMaterial(const IfcGeom::SurfaceStyle& style) {} bool ready(); virtual void writeShape(const TopoDS_Shape& shape) = 0; - void write(const IfcGeom::TriangulationElement* o) {} - void write(const IfcGeom::BRepElement* o); + void write(const IfcGeom::TriangulationElement* /*o*/) {} + void write(const IfcGeom::BRepElement* o); bool isTesselated() const { return false; } void setFile(IfcParse::IfcFile*) {} }; -#endif \ No newline at end of file +#endif diff --git a/src/ifcconvert/StepSerializer.h b/src/ifcconvert/StepSerializer.h index 4667104a38..99fff685b8 100644 --- a/src/ifcconvert/StepSerializer.h +++ b/src/ifcconvert/StepSerializer.h @@ -20,7 +20,6 @@ #ifndef STEPSERIALIZER_H #define STEPSERIALIZER_H -#include #include #include @@ -33,8 +32,8 @@ class StepSerializer : public OpenCascadeBasedSerializer private: STEPControl_Writer writer; public: - explicit StepSerializer(const std::string& out_filename) - : OpenCascadeBasedSerializer(out_filename) + explicit StepSerializer(const std::string& out_filename, const IfcGeom::IteratorSettings &settings) + : OpenCascadeBasedSerializer(out_filename, settings) {} virtual ~StepSerializer() {} void writeShape(const TopoDS_Shape& shape) { @@ -49,9 +48,10 @@ public: writer.Write(out_filename.c_str()); std::cout.rdbuf(sb); } - void setUnitNameAndMagnitude(const std::string& name, float magnitude) { + void setUnitNameAndMagnitude(const std::string& /*name*/, float magnitude) { const char* symbol = getSymbolForUnitMagnitude(magnitude); if (symbol) { + Interface_Static::SetCVal("xstep.cascade.unit", symbol); Interface_Static::SetCVal("write.step.unit", symbol); } } diff --git a/src/ifcconvert/SvgSerializer.cpp b/src/ifcconvert/SvgSerializer.cpp index 7c03241971..25fbe49198 100644 --- a/src/ifcconvert/SvgSerializer.cpp +++ b/src/ifcconvert/SvgSerializer.cpp @@ -43,7 +43,7 @@ #include #include #include - +#include #include "../ifcparse/IfcGlobalId.h" #include "SvgSerializer.h" @@ -168,7 +168,8 @@ SvgSerializer::path_object& SvgSerializer::start_path(IfcSchema::IfcBuildingStor return p; } -void SvgSerializer::write(const IfcGeom::BRepElement* o) { +void SvgSerializer::write(const IfcGeom::BRepElement* o) +{ IfcSchema::IfcBuildingStorey* storey = 0; IfcSchema::IfcObjectDefinition* obdef = static_cast(file->entityById(o->id())); @@ -178,7 +179,7 @@ void SvgSerializer::write(const IfcGeom::BRepElement* o) { typedef IfcSchema::IfcRelAggregates decomposition_element; #endif - while (true) { + for (;;) { // Iterate over the decomposing element to find the parent IfcBuildingStorey decomposition_element::list::ptr decomposes = obdef->Decomposes(); if (!decomposes->size()) { @@ -218,6 +219,8 @@ void SvgSerializer::write(const IfcGeom::BRepElement* o) { gp_GTrsf gtrsf = it->Placement(); const gp_Trsf& o_trsf = o->transformation().data(); + gtrsf.PreMultiply(o_trsf); + const TopoDS_Shape& s = it->Shape(); bool trsf_valid = false; @@ -294,7 +297,7 @@ void SvgSerializer::finalize() { const double cx = xmin * sc; const double cy = ymin * sc; - {std::vector< SHARED_PTR >::const_iterator it; + {std::vector< boost::shared_ptr >::const_iterator it; for (it = xcoords.begin(); it != xcoords.end(); ++it) { double& v = (*it)->value(); v = v * sc - cx; @@ -338,10 +341,14 @@ void SvgSerializer::writeHeader() { svg_file << "\n"; } -std::string SvgSerializer::nameElement(const IfcGeom::Element* elem) { +std::string SvgSerializer::nameElement(const IfcGeom::Element* elem) +{ std::ostringstream oss; const std::string type = "product"; - oss << "id=\"" << type << "-" << elem->unique_id() << "\""; + const std::string name = (settings().get(IfcGeom::IteratorSettings::USE_ELEMENT_GUIDS) + ? elem->guid() : (settings().get(IfcGeom::IteratorSettings::USE_ELEMENT_NAMES) + ? elem->name() : elem->unique_id())); + oss << "id=\"" << type << "-" << name<< "\""; return oss.str(); } @@ -350,4 +357,4 @@ std::string SvgSerializer::nameElement(const IfcSchema::IfcProduct* elem) { const std::string type = elem->is(IfcSchema::Type::IfcBuildingStorey) ? "storey" : "product"; oss << "id=\"product-" << IfcParse::IfcGlobalId(elem->GlobalId()).formatted() << "\""; return oss.str(); -} \ No newline at end of file +} diff --git a/src/ifcconvert/SvgSerializer.h b/src/ifcconvert/SvgSerializer.h index 2efb632b6d..ea4acb3aff 100644 --- a/src/ifcconvert/SvgSerializer.h +++ b/src/ifcconvert/SvgSerializer.h @@ -22,32 +22,29 @@ #ifndef SVGSERIALIZER_H #define SVGSERIALIZER_H +#include "../ifcconvert/GeometrySerializer.h" +#include "../ifcconvert/util.h" + #include #include #include -#include "../ifcgeom/IfcGeomIterator.h" - -#include "../ifcconvert/GeometrySerializer.h" -#include "../ifcconvert/util.h" - class SvgSerializer : public GeometrySerializer { public: typedef std::pair > path_object; protected: - const char* getSymbolForUnitMagnitude(float mag); std::ofstream svg_file; double xmin, ymin, xmax, ymax, width, height; boost::optional section_height; bool rescale; std::multimap paths; - std::vector< SHARED_PTR > xcoords; - std::vector< SHARED_PTR > ycoords; - std::vector< SHARED_PTR > radii; + std::vector< boost::shared_ptr > xcoords; + std::vector< boost::shared_ptr > ycoords; + std::vector< boost::shared_ptr > radii; IfcParse::IfcFile* file; public: - explicit SvgSerializer(const std::string& out_filename) - : GeometrySerializer() + SvgSerializer(const std::string& out_filename, const IfcGeom::IteratorSettings &settings) + : GeometrySerializer(settings) , svg_file(out_filename.c_str()) , xmin(+std::numeric_limits::infinity()) , xmax(-std::numeric_limits::infinity()) @@ -56,26 +53,24 @@ public: , rescale(false) , file(0) {} - virtual void addXCoordinate(const SHARED_PTR& fi) { xcoords.push_back(fi); } - virtual void addYCoordinate(const SHARED_PTR& fi) { ycoords.push_back(fi); } - virtual void addSizeComponent(const SHARED_PTR& fi) { radii.push_back(fi); } - virtual void growBoundingBox(double x, double y) { if (x < xmin) xmin = x; if (x > xmax) xmax = x; if (y < ymin) ymin = y; if (y > ymax) ymax = y; } - virtual ~SvgSerializer() {} - virtual void writeHeader(); - virtual void writeMaterial(const IfcGeom::SurfaceStyle& style) {} - virtual bool ready(); - virtual void write(const IfcGeom::TriangulationElement* o) {} - virtual void write(const IfcGeom::BRepElement* o); - virtual void write(path_object& p, const TopoDS_Wire& wire); - virtual path_object& start_path(IfcSchema::IfcBuildingStorey* storey, const std::string& id); - virtual bool isTesselated() const { return false; } - virtual void finalize(); - virtual void setUnitNameAndMagnitude(const std::string& name, float magnitude) {} - virtual void setFile(IfcParse::IfcFile* f) { file = f; } - virtual void setBoundingRectangle(double width, double height); - virtual void setSectionHeight(double h) { section_height = h; } - virtual std::string nameElement(const IfcGeom::Element* elem); - virtual std::string nameElement(const IfcSchema::IfcProduct* elem); + void addXCoordinate(const boost::shared_ptr& fi) { xcoords.push_back(fi); } + void addYCoordinate(const boost::shared_ptr& fi) { ycoords.push_back(fi); } + void addSizeComponent(const boost::shared_ptr& fi) { radii.push_back(fi); } + void growBoundingBox(double x, double y) { if (x < xmin) xmin = x; if (x > xmax) xmax = x; if (y < ymin) ymin = y; if (y > ymax) ymax = y; } + void writeHeader(); + bool ready(); + void write(const IfcGeom::TriangulationElement* /*o*/) {} + void write(const IfcGeom::BRepElement* o); + void write(path_object& p, const TopoDS_Wire& wire); + path_object& start_path(IfcSchema::IfcBuildingStorey* storey, const std::string& id); + bool isTesselated() const { return false; } + void finalize(); + void setUnitNameAndMagnitude(const std::string& /*name*/, float /*magnitude*/) {} + void setFile(IfcParse::IfcFile* f) { file = f; } + void setBoundingRectangle(double width, double height); + void setSectionHeight(double h) { section_height = h; } + std::string nameElement(const IfcGeom::Element* elem); + std::string nameElement(const IfcSchema::IfcProduct* elem); }; #endif diff --git a/src/ifcconvert/WavefrontObjSerializer.cpp b/src/ifcconvert/WavefrontObjSerializer.cpp index 19643be430..3be2357f39 100644 --- a/src/ifcconvert/WavefrontObjSerializer.cpp +++ b/src/ifcconvert/WavefrontObjSerializer.cpp @@ -17,10 +17,12 @@ * * ********************************************************************************/ -#include "../ifcgeom/IfcGeomRenderStyles.h" #include "WavefrontObjSerializer.h" +#include "../ifcgeom/IfcGeomRenderStyles.h" + +#include #include bool WaveFrontOBJSerializer::ready() { @@ -40,11 +42,15 @@ void WaveFrontOBJSerializer::writeHeader() { mtl_basename = mtl_basename.substr(slash+1); } obj_stream << "mtllib " << mtl_basename << "\n"; - mtl_stream << "# File generated by IfcOpenShell " << IFCOPENSHELL_VERSION << "\n"; + mtl_stream << "# File generated by IfcOpenShell " << IFCOPENSHELL_VERSION << "\n"; } -void WaveFrontOBJSerializer::writeMaterial(const IfcGeom::Material& style) { - mtl_stream << "newmtl " << style.name() << "\n"; +void WaveFrontOBJSerializer::writeMaterial(const IfcGeom::Material& style) +{ + std::string material_name = (settings().get(IfcGeom::IteratorSettings::USE_MATERIAL_NAMES) + ? style.original_name() : style.name()); + IfcUtil::sanitate_material_name(material_name); + mtl_stream << "newmtl " << material_name << "\n"; if (style.hasDiffuse()) { const double* diffuse = style.diffuse(); mtl_stream << "Kd " << diffuse[0] << " " << diffuse[1] << " " << diffuse[2] << "\n"; @@ -65,37 +71,50 @@ void WaveFrontOBJSerializer::writeMaterial(const IfcGeom::Material& style) { } } } -void WaveFrontOBJSerializer::write(const IfcGeom::TriangulationElement* o) { - obj_stream << "g " << o->unique_id() << "\n"; +void WaveFrontOBJSerializer::write(const IfcGeom::TriangulationElement* o) +{ + const std::string name = (settings().get(IfcGeom::IteratorSettings::USE_ELEMENT_GUIDS) + ? o->guid() : (settings().get(IfcGeom::IteratorSettings::USE_ELEMENT_NAMES) + ? o->name() : o->unique_id())); + obj_stream << "g " << name << "\n"; obj_stream << "s 1" << "\n"; - const IfcGeom::Representation::Triangulation& mesh = o->geometry(); + const IfcGeom::Representation::Triangulation& mesh = o->geometry(); - const int vcount = mesh.verts().size() / 3; - for ( std::vector::const_iterator it = mesh.verts().begin(); it != mesh.verts().end(); ) { - const double x = *(it++); - const double y = *(it++); - const double z = *(it++); + const int vcount = (int)mesh.verts().size() / 3; + for ( std::vector::const_iterator it = mesh.verts().begin(); it != mesh.verts().end(); ) { + const real_t x = *(it++) + (real_t)settings().offset[0]; + const real_t y = *(it++) + (real_t)settings().offset[1]; + const real_t z = *(it++) + (real_t)settings().offset[2]; obj_stream << "v " << x << " " << y << " " << z << "\n"; } - for ( std::vector::const_iterator it = mesh.normals().begin(); it != mesh.normals().end(); ) { - const double x = *(it++); - const double y = *(it++); - const double z = *(it++); + for ( std::vector::const_iterator it = mesh.normals().begin(); it != mesh.normals().end(); ) { + const real_t x = *(it++); + const real_t y = *(it++); + const real_t z = *(it++); obj_stream << "vn " << x << " " << y << " " << z << "\n"; } + for (std::vector::const_iterator it = mesh.uvs().begin(); it != mesh.uvs().end();) { + const real_t u = *it++; + const real_t v = *it++; + obj_stream << "vt " << u << " " << v << "\n"; + } + int previous_material_id = -2; std::vector::const_iterator material_it = mesh.material_ids().begin(); + const bool has_uvs = !mesh.uvs().empty(); for ( std::vector::const_iterator it = mesh.faces().begin(); it != mesh.faces().end(); ) { const int material_id = *(material_it++); if (material_id != previous_material_id) { const IfcGeom::Material& material = mesh.materials()[material_id]; - const std::string material_name = material.name(); + std::string material_name = (settings().get(IfcGeom::IteratorSettings::USE_MATERIAL_NAMES) + ? material.original_name() : material.name()); + IfcUtil::sanitate_material_name(material_name); obj_stream << "usemtl " << material_name << "\n"; if (materials.find(material_name) == materials.end()) { writeMaterial(material); @@ -107,7 +126,9 @@ void WaveFrontOBJSerializer::write(const IfcGeom::TriangulationElement* const int v1 = *(it++)+vcount_total; const int v2 = *(it++)+vcount_total; const int v3 = *(it++)+vcount_total; - obj_stream << "f " << v1 << "//" << v1 << " " << v2 << "//" << v2 << " " << v3 << "//" << v3 << "\n"; + obj_stream << "f " << v1 << "/" << (has_uvs ? boost::lexical_cast(v1) : "") << "/" << v1 << " " + << v2 << "/" << (has_uvs ? boost::lexical_cast(v2) : "") << "/" << v2 << " " + << v3 << "/" << (has_uvs ? boost::lexical_cast(v3) : "") << "/" << v3 << "\n"; } @@ -126,7 +147,9 @@ void WaveFrontOBJSerializer::write(const IfcGeom::TriangulationElement* if (material_id != previous_material_id) { const IfcGeom::Material& material = mesh.materials()[material_id]; - const std::string material_name = material.name(); + std::string material_name = (settings().get(IfcGeom::IteratorSettings::USE_MATERIAL_NAMES) + ? material.original_name() : material.name()); + IfcUtil::sanitate_material_name(material_name); obj_stream << "usemtl " << material_name << "\n"; if (materials.find(material_name) == materials.end()) { writeMaterial(material); diff --git a/src/ifcconvert/WavefrontObjSerializer.h b/src/ifcconvert/WavefrontObjSerializer.h index 7cb67909d2..52117c62a3 100644 --- a/src/ifcconvert/WavefrontObjSerializer.h +++ b/src/ifcconvert/WavefrontObjSerializer.h @@ -26,6 +26,7 @@ #include "../ifcconvert/GeometrySerializer.h" +// http://people.sc.fsu.edu/~jburkardt/txt/obj_format.txt class WaveFrontOBJSerializer : public GeometrySerializer { private: const std::string mtl_filename; @@ -34,8 +35,8 @@ private: unsigned int vcount_total; std::set materials; public: - WaveFrontOBJSerializer(const std::string& obj_filename, const std::string& mtl_filename) - : GeometrySerializer() + WaveFrontOBJSerializer(const std::string& obj_filename, const std::string& mtl_filename, const IfcGeom::IteratorSettings &settings) + : GeometrySerializer(settings) , obj_stream(obj_filename.c_str()) , mtl_filename(mtl_filename) , mtl_stream(mtl_filename.c_str()) @@ -45,12 +46,12 @@ public: bool ready(); void writeHeader(); void writeMaterial(const IfcGeom::Material& style); - void write(const IfcGeom::TriangulationElement* o); - void write(const IfcGeom::BRepElement* o) {} + void write(const IfcGeom::TriangulationElement* o); + void write(const IfcGeom::BRepElement* /*o*/) {} void finalize() {} bool isTesselated() const { return true; } - void setUnitNameAndMagnitude(const std::string& name, float magnitude) {} + void setUnitNameAndMagnitude(const std::string& /*name*/, float /*magnitude*/) {} void setFile(IfcParse::IfcFile*) {} }; -#endif \ No newline at end of file +#endif diff --git a/src/ifcconvert/XmlSerializer.cpp b/src/ifcconvert/XmlSerializer.cpp index 6106078999..fbec20e6c8 100644 --- a/src/ifcconvert/XmlSerializer.cpp +++ b/src/ifcconvert/XmlSerializer.cpp @@ -1,12 +1,32 @@ +/******************************************************************************** +* * +* 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 . * +* * +********************************************************************************/ + #include #include #include -#include #include #include "XmlSerializer.h" +#include + using boost::property_tree::ptree; using namespace IfcSchema; @@ -58,7 +78,8 @@ boost::optional format_attribute(const Argument* argument, IfcUtil: unit_name = unit->Name(); } - for (std::string::iterator c = unit_name.begin(); c != unit_name.end(); ++c) *c = tolower(*c); + // TODO add toLower() and toUpper() string helper functions for the project + std::transform(unit_name.begin(), unit_name.end(), unit_name.begin(), ::tolower); value = unit_name; } @@ -142,6 +163,16 @@ void descend(IfcProduct* product, ptree& tree) { } } + if (product->is(Type::IfcElement)) { + IfcElement* element = static_cast(product); + IfcOpeningElement::list::ptr openings = get_related( + element, &IfcElement::HasOpenings, &IfcRelVoidsElement::RelatedOpeningElement); + + for (IfcOpeningElement::list::it it = openings->begin(); it != openings->end(); ++it) { + descend(*it, child); + } + } + #ifdef USE_IFC2x3 IfcObjectDefinition::list::ptr structures = get_related @@ -224,16 +255,16 @@ void XmlSerializer::finalize() { ptree root, header, decomposition, properties; // Write the SPF header as XML nodes. - BOOST_FOREACH(const std::string& s, file->header().file_description().description()) { + foreach(const std::string& s, file->header().file_description().description()) { header.add_child("file_description.description", ptree(s)); } - BOOST_FOREACH(const std::string& s, file->header().file_name().author()) { + foreach(const std::string& s, file->header().file_name().author()) { header.add_child("file_name.author", ptree(s)); } - BOOST_FOREACH(const std::string& s, file->header().file_name().organization()) { + foreach(const std::string& s, file->header().file_name().organization()) { header.add_child("file_name.organization", ptree(s)); } - BOOST_FOREACH(const std::string& s, file->header().file_schema().schema_identifiers()) { + foreach(const std::string& s, file->header().file_schema().schema_identifiers()) { header.add_child("file_schema.schema_identifiers", ptree(s)); } header.put("file_description.implementation_level", file->header().file_description().implementation_level()); @@ -266,4 +297,4 @@ void XmlSerializer::finalize() { boost::property_tree::xml_writer_settings settings('\t', 1); #endif boost::property_tree::write_xml(xml_filename, root, std::locale(), settings); -} \ No newline at end of file +} diff --git a/src/ifcconvert/util.cpp b/src/ifcconvert/util.cpp index 3e6668f53b..cde3645d72 100644 --- a/src/ifcconvert/util.cpp +++ b/src/ifcconvert/util.cpp @@ -24,19 +24,19 @@ using namespace util; -SHARED_PTR string_buffer::add(const std::string& s) { - SHARED_PTR i = SHARED_PTR(new string_item(s)); +boost::shared_ptr string_buffer::add(const std::string& s) { + boost::shared_ptr i = boost::shared_ptr(new string_item(s)); items.push_back(i); return i; } -SHARED_PTR string_buffer::add(const double& d) { - SHARED_PTR i = SHARED_PTR(new float_item(d)); +boost::shared_ptr string_buffer::add(const double& d) { + boost::shared_ptr i = boost::shared_ptr(new float_item(d)); items.push_back(i); return i; } std::string string_buffer::str() const { std::stringstream ss; - for (std::vector< SHARED_PTR >::const_iterator it = items.begin(); it != items.end(); ++it) { + for (std::vector< boost::shared_ptr >::const_iterator it = items.begin(); it != items.end(); ++it) { ss << (**it).str(); } return ss.str(); diff --git a/src/ifcconvert/util.h b/src/ifcconvert/util.h index ee69f9f3b6..3a52c05973 100644 --- a/src/ifcconvert/util.h +++ b/src/ifcconvert/util.h @@ -23,7 +23,7 @@ #include #include -#include "../ifcparse/SharedPointer.h" +#include namespace util { class string_buffer { @@ -51,12 +51,12 @@ namespace util { std::string str() const { std::stringstream ss; ss << d; return ss.str(); } }; private: - std::vector< SHARED_PTR > items; + std::vector< boost::shared_ptr > items; void clear(); - void assign(const std::vector< SHARED_PTR >& other); + void assign(const std::vector< boost::shared_ptr >& other); public: - SHARED_PTR add(const std::string& s); - SHARED_PTR add(const double& d); + boost::shared_ptr add(const std::string& s); + boost::shared_ptr add(const double& d); std::string str() const; }; } diff --git a/src/ifcexpressparser/README.txt b/src/ifcexpressparser/README.txt index d4c4176084..ede43994d3 100644 --- a/src/ifcexpressparser/README.txt +++ b/src/ifcexpressparser/README.txt @@ -4,6 +4,8 @@ the IFC schema and will most likely fail on any other Express schema. The code can be invoked in the following way and results in two header files and a single implementation file named according to the schema name in the -Express file. A python 3 interpreter with the pyparsing library is required. +Express file. A python 3 interpreter with the pyparsing [1] library is required. $ python bootstrap.py express.bnf > express_parser.py && python express_parser.py IFC2X3_TC1.exp + +[1] http://pyparsing.wikispaces.com/Download+and+Installation diff --git a/src/ifcexpressparser/bootstrap.py b/src/ifcexpressparser/bootstrap.py index bb9e4a58e6..77e7f7131e 100644 --- a/src/ifcexpressparser/bootstrap.py +++ b/src/ifcexpressparser/bootstrap.py @@ -19,8 +19,14 @@ import sys import string +import operator +import itertools + from pyparsing import * +try: from functools import reduce +except: pass + class Expression: def __init__(self, contents): self.contents = contents[0] @@ -56,12 +62,12 @@ class Keyword: class Terminal: def __init__(self, contents): self.contents = contents[0] - def __repr__(self): s = self.contents - is_keyword = len(s) >= 4 and s[0::len(s)-1] == '""' and \ + self.is_keyword = len(s) >= 4 and s[0::len(s)-1] == '""' and \ all(c in alphanums+"_" for c in s[1:-1]) - ty = "CaselessKeyword" if is_keyword else "CaselessLiteral" - return "%s(%s)" % (ty, s) + def __repr__(self): + ty = "CaselessKeyword" if self.is_keyword else "CaselessLiteral" + return "%s(%s)" % (ty, self.contents) LPAREN = Suppress("(") @@ -94,16 +100,16 @@ grammar.ignore(HASH + restOfLine) express = grammar.parseFile(sys.argv[1]) -def find_keywords(expr, li = None): +def find_bytype(expr, ty, li = None): if li is None: li = [] if isinstance(expr, Term): expr = expr.contents - if isinstance(expr, Keyword): - li.append(repr(expr)) - return li + if isinstance(expr, ty): + li.append(expr) + return set(li) elif isinstance(expr, Expression): for term in expr: - find_keywords(term, li) + find_bytype(term, ty, li) return set(li) actions = { @@ -122,6 +128,8 @@ actions = { 'inverse_attr' : "lambda t: InverseAttribute(t)", 'bound_spec' : "lambda t: BoundSpecification(t)", 'explicit_attr' : "lambda t: ExplicitAttribute(t)", + 'width_spec' : "lambda t: WidthSpec(t)", + 'string_type' : "lambda t: StringType(t)", } to_emit = set(id for id, expr in express) @@ -129,18 +137,22 @@ emitted = set() to_combine = set(["simple_id"]) to_ignore = set(["where_clause", "supertype_constraint", "unique_clause"]) 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) while True: emitted_in_loop = set() for id, expr in express: - kws = find_keywords(expr) + kws = map(repr, find_bytype(expr, Keyword)) found = [k in emitted for k in kws] if id in to_emit and all(found): emitted_in_loop.add(id) emitted.add(id) stmt = "(%s)" % expr if id in to_combine: - stmt = "originalTextFor(Combine%s)" % stmt + stmt = " + ".join(itertools.chain(negated_keywords, ("originalTextFor(Combine%s)" % stmt,))) if id in actions: stmt = "%s.setParseAction(%s)" % (stmt, actions[id]) statements.append("%s = %s" % (id, stmt)) @@ -184,4 +196,6 @@ enum_header.EnumHeader(mapping).emit() implementation.Implementation(mapping).emit() latebound_header.LateBoundHeader(mapping).emit() latebound_implementation.LateBoundImplementation(mapping).emit() + +sys.stdout.write(schema.name) """%('\n'.join(statements))) diff --git a/src/ifcexpressparser/codegen.py b/src/ifcexpressparser/codegen.py new file mode 100644 index 0000000000..050562a591 --- /dev/null +++ b/src/ifcexpressparser/codegen.py @@ -0,0 +1,35 @@ +############################################################################### +# # +# 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 . # +# # +############################################################################### + +class Base(object): + """ + A base class for all code generation classes. Currently only working around + some python 2/3 incompatibilities in terms of unicode file handling. + """ + def emit(self): + import platform + if tuple(map(int, platform.python_version_tuple())) < (2, 8): + from io import open as unicode_open + unicode_type = unicode + else: + unicode_open = open + unicode_type = lambda x, *args, **kwargs: x + f = unicode_open(self.file_name, 'w', encoding='utf-8') + f.write(unicode_type(repr(self), encoding='utf-8', errors='ignore')) + f.close() diff --git a/src/ifcexpressparser/documentation.py b/src/ifcexpressparser/documentation.py index e83bc132a8..c099864a61 100644 --- a/src/ifcexpressparser/documentation.py +++ b/src/ifcexpressparser/documentation.py @@ -27,18 +27,25 @@ # # ############################################################################### -import re,csv +import re +import os import csv + +from schema import OrderedCaseInsensitiveDict + try: from html.entities import entitydefs except: from htmlentitydefs import entitydefs -name_to_oid = {} +make_absolute = lambda fn: os.path.join(os.path.dirname(os.path.realpath(__file__)), fn) + +name_to_oid = OrderedCaseInsensitiveDict() oid_to_desc = {} oid_to_name = {} oid_to_pid = {} regices = list(zip([re.compile(s,re.M) for s in [r'<[\w\n=" \-/\.;_\t:%#,\?\(\)]+>',r'(\n[\t ]*){2,}',r'^[\t ]+']],['','\n\n',' '])) definition_files = ['DocEntity.csv', 'DocEnumeration.csv', 'DocDefined.csv', 'DocSelect.csv'] +definition_files = map(make_absolute, definition_files) for fn in definition_files: with open(fn) as f: for oid, name, desc in csv.reader(f, delimiter=';', quotechar='"'): @@ -46,15 +53,15 @@ for fn in definition_files: oid_to_name[oid] = name oid_to_desc[oid] = desc -with open('DocEntityAttributes.csv') as f: +with open(make_absolute('DocEntityAttributes.csv')) as f: for pid, x, oid in csv.reader(f, delimiter=';', quotechar='"'): oid_to_pid[oid] = pid -with open('DocAttribute.csv') as f: +with open(make_absolute('DocAttribute.csv')) as f: for oid, name, desc in csv.reader(f, delimiter=';', quotechar='"'): pid = oid_to_pid[oid] pname = oid_to_name[pid] - name_to_oid[(pname, name)] = oid + name_to_oid[".".join((pname, name))] = oid oid_to_desc[oid] = desc def description(item): diff --git a/src/ifcexpressparser/enum_header.py b/src/ifcexpressparser/enum_header.py index 96993ec13f..eb382a3e7a 100644 --- a/src/ifcexpressparser/enum_header.py +++ b/src/ifcexpressparser/enum_header.py @@ -18,8 +18,9 @@ ############################################################################### import templates +import codegen -class EnumHeader: +class EnumHeader(codegen.Base): def __init__(self, mapping): enumerable_types = sorted(set([name for name, type in mapping.schema.types.items()] + [name for name, type in mapping.schema.entities.items()])) @@ -30,9 +31,9 @@ class EnumHeader: } self.schema_name = mapping.schema.name.capitalize() + + self.file_name = '%senum.h'%self.schema_name + + def __repr__(self): return self.str - def emit(self): - f = open('%senum.h'%self.schema_name, 'w', encoding='utf-8') - f.write(str(self)) - f.close() diff --git a/src/ifcexpressparser/express.bnf b/src/ifcexpressparser/express.bnf index 89acfd4fff..de40bfaf23 100644 --- a/src/ifcexpressparser/express.bnf +++ b/src/ifcexpressparser/express.bnf @@ -1,5 +1,3 @@ -# Taken from http://sourceforge.net/p/exp-engine/expresso/ci/master/tree/docs/iso-10303-11--2004.bnf - ABS = "abs" . ABSTRACT = "abstract" . ACOS = "acos" . @@ -202,7 +200,7 @@ constructed_types = enumeration_type | select_type . declaration = entity_decl | function_decl | procedure_decl | subtype_constraint_decl | type_decl . derived_attr = attribute_decl ":" parameter_type ":=" expression ";" . derive_clause = DERIVE derived_attr { derived_attr } . -domain_rule = rule_label_id ":" expression . +domain_rule = [ rule_label_id ":" ] expression . element = expression [ ":" repetition ] . entity_body = { explicit_attr } [ derive_clause ] [ inverse_clause ] [ unique_clause ] [ where_clause ] . entity_constructor = entity_ref "(" [ expression { "," expression } ] ")" . @@ -334,7 +332,7 @@ type_label_id = simple_id . unary_op = "+" | "-" | NOT . underlying_type = constructed_types | concrete_types . unique_clause = UNIQUE unique_rule ";" { unique_rule ";" } . -unique_rule = rule_label_id ":" referenced_attribute { "," referenced_attribute } . +unique_rule = [ rule_label_id ":" ] referenced_attribute { "," referenced_attribute } . until_control = UNTIL logical_expression . use_clause = USE FROM schema_ref [ "(" named_type_or_rename { "," named_type_or_rename } ")" ] ";" . variable_id = simple_id . diff --git a/src/ifcexpressparser/header.py b/src/ifcexpressparser/header.py index 51f4a89242..6d416cf37c 100644 --- a/src/ifcexpressparser/header.py +++ b/src/ifcexpressparser/header.py @@ -17,10 +17,11 @@ # # ############################################################################### +import codegen import templates import documentation -class Header: +class Header(codegen.Base): def __init__(self, mapping): declarations = [] @@ -40,15 +41,18 @@ class Header: emitted_simpletypes = set() while len(emitted_simpletypes) < len(mapping.schema.simpletypes): for name, type in mapping.schema.simpletypes.items(): - if name in emitted_simpletypes: continue + if name.lower() in emitted_simpletypes: continue type_str = mapping.make_type_string(mapping.flatten_type_string(type)) attr_type = mapping.make_argument_type(type) superclass = mapping.simple_type_parent(name) if superclass is None: superclass = "IfcUtil::IfcBaseType" - elif superclass not in emitted_simpletypes: + elif superclass.lower() not in emitted_simpletypes: continue - emitted_simpletypes.add(name) + else: + # Case normalize + superclass = [k for k in mapping.schema.simpletypes.keys() if k.lower() == superclass.lower()][0] + emitted_simpletypes.add(name.lower()) write(templates.simpletype, name=name, type=type_str, attr_type=attr_type, superclass=superclass) class_definitions = [] @@ -59,14 +63,14 @@ class Header: emitted_entities = set() while len(emitted_entities) < len(mapping.schema.entities): for name, type in mapping.schema.entities.items(): - if name in emitted_entities: continue - if len(type.supertypes) == 0 or set(type.supertypes) < emitted_entities: + if name.lower() in emitted_entities: continue + if len(type.supertypes) == 0 or set(map(str.lower, type.supertypes)) <= emitted_entities: attr_lines = [] def write_method(attr): if attr.optional: attr_lines.append(templates.optional_attribute_description % (attr.name, name)) attr_lines.append("bool has%s() const;"%(attr.name)) - attr_lines.extend(["/// %s"%d for d in documentation.description((name, attr.name))]) + attr_lines.extend(["/// %s"%d for d in documentation.description(".".join((name, attr.name)))]) type_str = mapping.get_parameter_type(attr, allow_optional=False, allow_entities=False) if mapping.make_argument_type(attr) != "IfcUtil::Argument_UNKNOWN": attr_lines.append("%s %s() const;"%(type_str, attr.name)) @@ -87,7 +91,11 @@ class Header: inverse = "\n".join(["%s%s"%(' '*4, a) for a in inv_lines]) if len(inverse): inverse += '\n' - supertypes = type.supertypes if len(type.supertypes) else ['IfcUtil::IfcBaseEntity'] + def case_norm(n): + n = n.lower() + return [k for k in mapping.schema.entities.keys() if k.lower() == n][0] + + supertypes = map(case_norm, type.supertypes) if len(type.supertypes) else ['IfcUtil::IfcBaseEntity'] superclass = ": %s "%(", ".join(["public %s"%c for c in supertypes])) argument_count = mapping.argument_count(type) @@ -123,10 +131,9 @@ class Header: } self.schema_name = mapping.schema.name.capitalize() + + self.file_name = '%s.h'%self.schema_name + + def __repr__(self): return self.str - def emit(self): - f = open('%s.h'%self.schema_name, 'w', encoding='utf-8') - f.write(str(self)) - f.close() - diff --git a/src/ifcexpressparser/implementation.py b/src/ifcexpressparser/implementation.py index f4e0759da3..21205df30e 100644 --- a/src/ifcexpressparser/implementation.py +++ b/src/ifcexpressparser/implementation.py @@ -17,9 +17,12 @@ # # ############################################################################### +import codegen import templates -class Implementation: +from schema import OrderedCaseInsensitiveDict + +class Implementation(codegen.Base): def __init__(self, mapping): enumeration_functions = [] entity_implementations = [] @@ -131,7 +134,7 @@ class Implementation: def get_attribute_index(entity, attr_name): related_entity = mapping.schema.entities[entity] - return [a['name'] for a in mapping.get_assignable_arguments(related_entity, include_derived=True)].index(attr_name) + return [a['name'].lower() for a in mapping.get_assignable_arguments(related_entity, include_derived=True)].index(attr_name.lower()) inverse = [templates.const_function % { 'class_name' : name, @@ -154,7 +157,7 @@ class Implementation: superclass = superclass ) - selectable_simple_types = sorted(set(sum([b.values for a,b in mapping.schema.selects.items()], [])) & set(mapping.schema.types.keys())) + selectable_simple_types = sorted(set(sum([b.values for a,b in mapping.schema.selects.items()], [])) & set(map(str, mapping.schema.types.keys()))) schema_entity_statements += [templates.schema_entity_stmt%locals() for name, type in mapping.schema.simpletypes.items()] schema_entity_statements += [templates.schema_entity_stmt%locals() for name, type in mapping.schema.entities.items()] @@ -166,12 +169,15 @@ class Implementation: 'name' : name, 'padding' : ' ' * (max_len - len(name)) } for name in enumerable_types] + + enumeration_index_by_str = OrderedCaseInsensitiveDict((j,i) for i,j in enumerate(enumerable_types)) + def get_parent_id(s): + e = mapping.schema.entities.get(s) + if e and e.supertypes: + return enumeration_index_by_str[e.supertypes[0]] + else: return -1 - parent_type_statements = [templates.parent_type_stmt % { - 'name' : name, - 'parent' : type.supertypes[0], - 'padding' : ' ' * (max_len - len(name)) - } for name, type in mapping.schema.entities.items() if type.supertypes and len(type.supertypes) == 1] + parent_type_statements = ",".join(map(str, map(get_parent_id, enumerable_types))) max_id = len(enumerable_types) @@ -224,16 +230,15 @@ class Implementation: 'type_name_strings' : type_name_strings, 'string_map_statements' : catnl(string_map_statements), 'simple_type_statement' : simple_type_statements, - 'parent_type_statements' : catnl(parent_type_statements), + 'parent_type_statements' : parent_type_statements, 'entity_implementations' : catnl(entity_implementations), 'simple_type_impl' : catnl(simple_type_impl) } self.schema_name = mapping.schema.name.capitalize() + + self.file_name = '%s.cpp'%self.schema_name + + def __repr__(self): return self.str - def emit(self): - f = open('%s.cpp'%self.schema_name, 'w', encoding='utf-8') - f.write(str(self)) - f.close() - diff --git a/src/ifcexpressparser/latebound_header.py b/src/ifcexpressparser/latebound_header.py index bf2db78f3e..251a288073 100644 --- a/src/ifcexpressparser/latebound_header.py +++ b/src/ifcexpressparser/latebound_header.py @@ -17,9 +17,10 @@ # # ############################################################################### +import codegen import templates -class LateBoundHeader: +class LateBoundHeader(codegen.Base): def __init__(self, mapping): self.str = templates.lb_header % { 'schema_name_upper' : mapping.schema.name.upper(), @@ -27,9 +28,9 @@ class LateBoundHeader: } self.schema_name = mapping.schema.name.capitalize() + + self.file_name = '%s-latebound.h'%self.schema_name + + def __repr__(self): return self.str - def emit(self): - f = open('%s-latebound.h'%self.schema_name, 'w', encoding='utf-8') - f.write(str(self)) - f.close() diff --git a/src/ifcexpressparser/latebound_implementation.py b/src/ifcexpressparser/latebound_implementation.py index fe9e600ecd..7b114460ae 100644 --- a/src/ifcexpressparser/latebound_implementation.py +++ b/src/ifcexpressparser/latebound_implementation.py @@ -17,9 +17,10 @@ # # ############################################################################### +import codegen import templates -class LateBoundImplementation: +class LateBoundImplementation(codegen.Base): def __init__(self, mapping): schema_name = mapping.schema.name.capitalize() @@ -40,11 +41,10 @@ class LateBoundImplementation: }) emitted_entities = set() - entities_to_emit = mapping.schema.entities.keys() while len(emitted_entities) < len(mapping.schema.entities): for name, type in mapping.schema.entities.items(): - if name in emitted_entities: continue - if len(type.supertypes) == 0 or set(type.supertypes) < emitted_entities: + if name.lower() in emitted_entities: continue + if len(type.supertypes) == 0 or set(map(str.lower, type.supertypes)) <= emitted_entities: constructor_arguments = mapping.get_assignable_arguments(type, include_derived = True) entity_descriptor_attributes = [] for arg in constructor_arguments: @@ -60,8 +60,9 @@ class LateBoundImplementation: }) emitted_entities.add(name) + parent_statement = '0' if len(type.supertypes) != 1 else templates.entity_descriptor_parent % { - 'type' : type.supertypes[0] + 'type' : [k for k in mapping.schema.entities.keys() if k.lower() == type.supertypes[0].lower()][0] } entity_descriptors.append(templates.entity_descriptor % { 'type' : name, @@ -91,13 +92,13 @@ class LateBoundImplementation: if type.inverse: for attr in type.inverse.elements: related_entity = mapping.schema.entities[attr.entity] - related_attrs = [a['name'] for a in mapping.get_assignable_arguments(related_entity, include_derived=True)] + related_attrs = [a['name'].lower() for a in mapping.get_assignable_arguments(related_entity, include_derived=True)] inverse_implementations.append(templates.inverse_implementation % { 'type' : name, 'name' : attr.name, 'related_type' : attr.entity, - 'index' : related_attrs.index(attr.attribute) + 'index' : related_attrs.index(attr.attribute.lower()) }) self.str = templates.lb_implementation % { @@ -110,10 +111,9 @@ class LateBoundImplementation: } self.schema_name = mapping.schema.name.capitalize() + + self.file_name = '%s-latebound.cpp'%self.schema_name + + def __repr__(self): return self.str - def emit(self): - f = open('%s-latebound.cpp'%self.schema_name, 'w', encoding='utf-8') - f.write(str(self)) - f.close() - diff --git a/src/ifcexpressparser/mapping.py b/src/ifcexpressparser/mapping.py index ee536697fd..285bd00a53 100644 --- a/src/ifcexpressparser/mapping.py +++ b/src/ifcexpressparser/mapping.py @@ -17,6 +17,8 @@ # # ############################################################################### +from __future__ import print_function + import sys import nodes import templates @@ -33,11 +35,11 @@ class Mapping: 'binary' : 'boost::dynamic_bitset<>' } - supported_argument_types = { + supported_argument_types = set([ 'INT', 'BOOL', 'DOUBLE', 'STRING', 'BINARY', 'ENUMERATION', 'ENTITY_INSTANCE', 'AGGREGATE_OF_INT', 'AGGREGATE_OF_DOUBLE', 'AGGREGATE_OF_STRING', 'AGGREGATE_OF_BINARY', 'AGGREGATE_OF_ENTITY_INSTANCE', 'AGGREGATE_OF_AGGREGATE_OF_INT', 'AGGREGATE_OF_AGGREGATE_OF_DOUBLE', 'AGGREGATE_OF_AGGREGATE_OF_ENTITY_INSTANCE', - } + ]) def __init__(self, schema): self.schema = schema @@ -55,7 +57,7 @@ class Mapping: return None if str(parent) in self.express_to_cpp_typemapping else parent def make_type_string(self, type): - if isinstance(type, (str, nodes.BinaryType)): + if isinstance(type, (str, nodes.BinaryType, nodes.StringType)): return self.express_to_cpp_typemapping.get(str(type), type) else: is_list = self.schema.is_entity(type.type) @@ -87,6 +89,8 @@ class Mapping: return "ENTITY_INSTANCE" elif isinstance(type, nodes.BinaryType): return "BINARY" + elif isinstance(type, nodes.StringType): + return "STRING" elif isinstance(type, nodes.EnumerationType): return "ENUMERATION" elif isinstance(type, nodes.AggregationType): @@ -126,10 +130,11 @@ class Mapping: type_str = templates.untyped_list elif self.schema.is_simpletype(ty) or str(ty) in self.express_to_cpp_typemapping.values(): tmpl = templates.nested_array_type if is_nested_list else templates.array_type + bounds = (attr_type.bounds.lower, attr_type.bounds.upper) if attr_type.bounds else (-1, -1) type_str = tmpl % { 'instance_type' : ty, - 'lower' : attr_type.bounds.lower, - 'upper' : attr_type.bounds.upper + 'lower' : bounds[0], + 'upper' : bounds[1] } else: tmpl = templates.list_list_type if is_nested_list else templates.list_type diff --git a/src/ifcexpressparser/nodes.py b/src/ifcexpressparser/nodes.py index d21a29df67..4a16a536da 100644 --- a/src/ifcexpressparser/nodes.py +++ b/src/ifcexpressparser/nodes.py @@ -21,8 +21,8 @@ import string import collections class Node: - def __init__(self, tokens): - self.tokens = tokens + def __init__(self, tokens = None): + self.tokens = tokens or [] self.init() def tokens_of_type(self, cls): return [t for t in self.tokens if isinstance(t, cls)] @@ -128,7 +128,7 @@ class AttributeList(Node): class InverseAttribute(Node): name = property(lambda self: self.tokens[0]) type = property(lambda self: self.tokens[2]) - bounds = property(lambda self: None if len(self.tokens) == 6 else self.tokens[3]) + bounds = property(lambda self: None if len(self.tokens) != 9 else self.tokens[3]) entity = property(lambda self: self.tokens[-4]) attribute = property(lambda self: self.tokens[-2]) def init(self): @@ -170,6 +170,23 @@ class ExplicitAttribute(Node): def init(self): # NB: This assumes a single name per attribute # definition, which is not necessarily the case. + if self.tokens[0] == "self": + i = list(self.tokens).index(":") + self.tokens = self.tokens[i-1:] assert self.tokens[1] == ':' def __repr__(self): return "%s : %s%s" % (self.name, self.type, " ?" if self.optional else "") + + +class WidthSpec(Node): + def init(self): + if self.tokens[-1] == "fixed": + self.tokens[-1:] = [] + assert (self.tokens[0], self.tokens[-1]) == ("(", ")") + self.width = int("".join(self.tokens[1:-1])) + +class StringType(Node): + def init(self): + pass + def __repr__(self): + return "string" diff --git a/src/ifcexpressparser/schema.py b/src/ifcexpressparser/schema.py index 74d62bfacb..4bd87a7c8b 100644 --- a/src/ifcexpressparser/schema.py +++ b/src/ifcexpressparser/schema.py @@ -18,8 +18,35 @@ ############################################################################### import nodes +import platform import collections +if tuple(map(int, platform.python_version_tuple())) < (2, 7): + import ordereddict + collections.OrderedDict = ordereddict.OrderedDict + +# According to ISO 10303-11 7.1.2: Letters: "... The case of +# letters is significant only within explicit string literals." +class OrderedCaseInsensitiveDict(collections.OrderedDict): + class KeyObject(str): + def __eq__(self, other): + return self.lower() == other.lower() + def __hash__(self): + return hash(self.lower()) + + def __init__(self, *args, **kwargs): + collections.OrderedDict.__init__(self) + for key, value in collections.OrderedDict(*args, **kwargs).items(): + self[OrderedCaseInsensitiveDict.KeyObject(key)] = value + def __setitem__(self, key, value): + return collections.OrderedDict.__setitem__(self, OrderedCaseInsensitiveDict.KeyObject(key), value) + def __getitem__(self, key): + return collections.OrderedDict.__getitem__(self, OrderedCaseInsensitiveDict.KeyObject(key)) + def get(self, key, *args, **kwargs): + return collections.OrderedDict.get(self, OrderedCaseInsensitiveDict.KeyObject(key), *args, **kwargs) + def __contains__(self, key): + return collections.OrderedDict.__contains__(self, OrderedCaseInsensitiveDict.KeyObject(key)) + class Schema: def is_enumeration(self, v): return str(v) in self.enumerations @@ -34,13 +61,13 @@ class Schema: def __init__(self, parsetree): self.name = parsetree[1] - sort = lambda d: collections.OrderedDict(sorted(d.items())) + sort = lambda d: OrderedCaseInsensitiveDict(sorted(d)) - self.types = sort({t.name:t for t in parsetree if isinstance(t, nodes.TypeDeclaration)}) - self.entities = sort({t.name:t for t in parsetree if isinstance(t, nodes.EntityDeclaration)}) + self.types = sort([(t.name,t) for t in parsetree if isinstance(t, nodes.TypeDeclaration)]) + self.entities = sort([(t.name,t) for t in parsetree if isinstance(t, nodes.EntityDeclaration)]) - of_type = lambda *types: sort({a: b.type.type for a,b in self.types.items() if any(isinstance(b.type.type, ty) for ty in types)}) + of_type = lambda *types: sort([(a, b.type.type) for a,b in self.types.items() if any(isinstance(b.type.type, ty) for ty in types)]) self.enumerations = of_type(nodes.EnumerationType) self.selects = of_type(nodes.SelectType) - self.simpletypes = of_type(str, nodes.AggregationType, nodes.BinaryType) + self.simpletypes = of_type(str, nodes.AggregationType, nodes.BinaryType, nodes.StringType) diff --git a/src/ifcexpressparser/templates.py b/src/ifcexpressparser/templates.py index 2cd9722cd9..4e84e36426 100644 --- a/src/ifcexpressparser/templates.py +++ b/src/ifcexpressparser/templates.py @@ -23,7 +23,6 @@ header = """ #include #include -#include #include @@ -31,6 +30,11 @@ header = """ #include "../ifcparse/IfcException.h" #include "../ifcparse/%(schema_name)senum.h" +#ifdef _MSC_VER +#pragma warning(push) +#pragma warning(disable : 4100) +#endif + #define IfcSchema %(schema_name)s namespace %(schema_name)s { @@ -47,6 +51,10 @@ void InitStringMap(); IfcUtil::IfcBaseClass* SchemaEntity(IfcAbstractEntity* e = 0); } +#ifdef _MSC_VER +#pragma warning(pop) +#endif + #endif """ @@ -54,6 +62,8 @@ enum_header = """ #ifndef %(schema_name_upper)sENUM_H #define %(schema_name_upper)sENUM_H +#include + #define IfcSchema %(schema_name)s namespace %(schema_name)s { @@ -62,7 +72,7 @@ namespace Type { typedef enum { %(types)s, UNDEFINED } Enum; - Enum Parent(Enum v); + boost::optional Parent(Enum v); Enum FromString(const std::string& s); std::string ToString(Enum v); bool IsSimple(Enum v); @@ -107,6 +117,8 @@ implementation= """ #include "../ifcparse/IfcWrite.h" #include "../ifcparse/IfcWritableEntity.h" +#include + using namespace %(schema_name)s; using namespace IfcParse; using namespace IfcWrite; @@ -136,10 +148,14 @@ Type::Enum Type::FromString(const std::string& s) { else return it->second; } -Type::Enum Type::Parent(Enum v){ - if (v < 0 || v >= %(max_id)d) return (Enum)-1; -%(parent_type_statements)s - return (Enum)-1; +static int parent_map[] = {%(parent_type_statements)s}; +boost::optional Type::Parent(Enum v){ + const int p = parent_map[static_cast(v)]; + if (p >= 0) { + return static_cast(p); + } else { + return boost::none; + } } bool Type::IsSimple(Enum v) { @@ -261,49 +277,61 @@ std::pair Type::GetEnumerationIndex(Enum t, const std::string& } std::pair Type::GetInverseAttribute(Enum t, const std::string& a) { - if (inverse_map.empty()) ::InitInverseMap(); - inverse_map_t::const_iterator it; - inverse_map_t::mapped_type::const_iterator jt; - while (true) { + if (inverse_map.empty()) ::InitInverseMap(); + inverse_map_t::const_iterator it; + inverse_map_t::mapped_type::const_iterator jt; + for(;;) { it = inverse_map.find(t); if (it != inverse_map.end()) { - jt = it->second.find(a); - if (jt != it->second.end()) { - return jt->second; - } - } - if ((t = Parent(t)) == -1) break; + jt = it->second.find(a); + if (jt != it->second.end()) { + return jt->second; + } + } + boost::optional pt = Parent(t); + if (pt) { + t = *pt; + } + else { + break; + } } throw IfcException("Attribute not found"); } std::set Type::GetInverseAttributeNames(Enum t) { - if (inverse_map.empty()) ::InitInverseMap(); - inverse_map_t::const_iterator it; - inverse_map_t::mapped_type::const_iterator jt; + if (inverse_map.empty()) ::InitInverseMap(); + inverse_map_t::const_iterator it; + inverse_map_t::mapped_type::const_iterator jt; - std::set return_value; + std::set return_value; - while (true) { + for (;;) { it = inverse_map.find(t); if (it != inverse_map.end()) { - for (jt = it->second.begin(); jt != it->second.end(); ++jt) { - return_value.insert(jt->first); - } - } - if ((t = Parent(t)) == -1) break; + for (jt = it->second.begin(); jt != it->second.end(); ++jt) { + return_value.insert(jt->first); + } + } + boost::optional pt = Parent(t); + if (pt) { + t = *pt; + } + else { + break; + } } - - return return_value; + + return return_value; } void Type::PopulateDerivedFields(IfcWrite::IfcWritableEntity* e) { std::map >::const_iterator i = derived_map.find(e->type()); - if (i != derived_map.end()) { - for (std::set::const_iterator it = i->second.begin(); it != i->second.end(); ++it) { - e->setArgumentDerived(*it); - } - } + if (i != derived_map.end()) { + for (std::set::const_iterator it = i->second.begin(); it != i->second.end(); ++it) { + e->setArgumentDerived(*it); + } + } } """ diff --git a/src/ifcgeom/IfcGeom.h b/src/ifcgeom/IfcGeom.h index 5e899e5461..f0c487c6b3 100644 --- a/src/ifcgeom/IfcGeom.h +++ b/src/ifcgeom/IfcGeom.h @@ -52,21 +52,34 @@ inline static bool ALMOST_THE_SAME(const T& a, const T& b, double tolerance=ALMO #include "../ifcgeom/IfcRepresentationShapeItem.h" #include "../ifcgeom/IfcGeomShapeType.h" +// Define this in case you want to conserve memory usage at all cost. This has been +// benchmarked extensively: https://github.com/IfcOpenShell/IfcOpenShell/pull/47 +// #define NO_CACHE + +#ifdef NO_CACHE + +#define IN_CACHE(T,E,t,e) +#define CACHE(T,E,e) + +#else + #define IN_CACHE(T,E,t,e) std::map::const_iterator it = cache.T.find(E->entity->id());\ if ( it != cache.T.end() ) { e = it->second; return true; } #define CACHE(T,E,e) cache.T[E->entity->id()] = e; +#endif + namespace IfcGeom { class Cache { public: #include "IfcRegisterCreateCache.h" - std::map Style; std::map Shape; }; class Kernel { private: + double deflection_tolerance; double wire_creation_tolerance; double minimal_face_area; @@ -77,7 +90,12 @@ private: double modelling_precision; double dimensionality; +#ifndef NO_CACHE Cache cache; +#endif + + std::map style_cache; + const SurfaceStyle* internalize_surface_style(const std::pair& shading_style); public: Kernel() @@ -179,6 +197,7 @@ public: bool find_wall_end_points(const IfcSchema::IfcWall*, gp_Pnt& start, gp_Pnt& end); IfcSchema::IfcSurfaceStyleShading* get_surface_style(IfcSchema::IfcRepresentationItem* item); + const IfcSchema::IfcRepresentationItem* find_item_carrying_style(const IfcSchema::IfcRepresentationItem* item); bool create_solid_from_compound(const TopoDS_Shape& compound, TopoDS_Shape& solid); bool is_compound(const TopoDS_Shape& shape); bool is_convex(const TopoDS_Wire& wire); @@ -193,7 +212,16 @@ public: void setValue(GeomValue var, double value); double getValue(GeomValue var) const; bool fill_nonmanifold_wires_with_planar_faces(TopoDS_Shape& shape); - void remove_redundant_points_from_loop(TColgp_SequenceOfPnt& polygon, bool closed, double tol=-1.); + void remove_duplicate_points_from_loop(TColgp_SequenceOfPnt& polygon, bool closed, double tol=-1.); + void remove_collinear_points_from_loop(TColgp_SequenceOfPnt& polygon, bool closed, double tol=-1.); + bool wire_to_sequence_of_point(const TopoDS_Wire&, TColgp_SequenceOfPnt&); + void sequence_of_point_to_wire(const TColgp_SequenceOfPnt&, TopoDS_Wire&, bool closed); + bool approximate_plane_through_wire(const TopoDS_Wire&, gp_Pln&); + bool flatten_wire(TopoDS_Wire&); + + bool is_identity_transform(IfcUtil::IfcBaseClass*); + + IfcSchema::IfcRelVoidsElement::list::ptr find_openings(IfcSchema::IfcProduct* product); IfcSchema::IfcRepresentation* find_representation(const IfcSchema::IfcProduct*, const std::string&); @@ -204,6 +232,9 @@ public: template IfcGeom::BRepElement

* create_brep_for_representation_and_product(const IteratorSettings&, IfcSchema::IfcRepresentation*, IfcSchema::IfcProduct*); + template + IfcGeom::BRepElement

* create_brep_for_processed_representation(const IteratorSettings&, IfcSchema::IfcRepresentation*, IfcSchema::IfcProduct*, IfcGeom::BRepElement

*); + const SurfaceStyle* get_style(const IfcSchema::IfcRepresentationItem*); const SurfaceStyle* get_style(const IfcSchema::IfcMaterial*); @@ -241,6 +272,10 @@ public: } template std::pair get_surface_style(const IfcSchema::IfcRepresentationItem* representation_item) { + // For certain representation items, most notably boolean operands, + // a style definition might reside on one of its operands. + representation_item = find_item_carrying_style(representation_item); + if (representation_item->as()) { return _get_surface_style(representation_item->as()); } @@ -252,6 +287,15 @@ public: return std::make_pair(0,0); } + void purge_cache() { + // Rather hack-ish, but a stopgap solution to keep memory under control + // for large files. SurfaceStyles need to be kept at all costs, as they + // are read later on when serializing Collada files. +#ifndef NO_CACHE + cache = Cache(); +#endif + } + #include "IfcRegisterGeomHeader.h" }; diff --git a/src/ifcgeom/IfcGeomCurves.cpp b/src/ifcgeom/IfcGeomCurves.cpp index 3d42984299..117df42f53 100644 --- a/src/ifcgeom/IfcGeomCurves.cpp +++ b/src/ifcgeom/IfcGeomCurves.cpp @@ -149,8 +149,8 @@ bool IfcGeom::Kernel::convert(const IfcSchema::IfcBSplineCurveWithKnots* l, Hand const std::vector knots = l->Knots(); TColgp_Array1OfPnt Poles(0, cps->size() - 1); - TColStd_Array1OfReal Knots(0, knots.size() - 1); - TColStd_Array1OfInteger Mults(0, mults.size() - 1); + TColStd_Array1OfReal Knots(0, (int)knots.size() - 1); + TColStd_Array1OfInteger Mults(0, (int)mults.size() - 1); Standard_Integer Degree = l->Degree(); Standard_Boolean Periodic = l->ClosedCurve(); diff --git a/src/ifcgeom/IfcGeomElement.h b/src/ifcgeom/IfcGeomElement.h index c65d890a94..b363c38e1a 100644 --- a/src/ifcgeom/IfcGeomElement.h +++ b/src/ifcgeom/IfcGeomElement.h @@ -44,7 +44,7 @@ namespace IfcGeom { for(int i = 1; i < 5; ++i) { for (int j = 1; j < 4; ++j) { const double trsf_value = trsf.Value(j,i); - const double matrix_value = i == 4 && settings.convert_back_units() + const double matrix_value = i == 4 && settings.get(IteratorSettings::CONVERT_BACK_UNITS) ? trsf_value / settings.unit_magnitude() : trsf_value; _data.push_back(static_cast

(matrix_value)); @@ -107,16 +107,14 @@ namespace IfcGeom { template class BRepElement : public Element

{ private: - Representation::BRep* _geometry; + boost::shared_ptr _geometry; public: + const boost::shared_ptr& geometry_pointer() const { return _geometry; } const Representation::BRep& geometry() const { return *_geometry; } - BRepElement(int id, int parent_id, const std::string& name, const std::string& type, const std::string& guid, const std::string& context, const gp_Trsf& trsf, Representation::BRep* geometry) + BRepElement(int id, int parent_id, const std::string& name, const std::string& type, const std::string& guid, const std::string& context, const gp_Trsf& trsf, const boost::shared_ptr& geometry) : Element

(geometry->settings(),id,parent_id,name,type,guid,context,trsf) , _geometry(geometry) {} - virtual ~BRepElement() { - delete _geometry; - } private: BRepElement(const BRepElement& other); BRepElement& operator=(const BRepElement& other); @@ -125,16 +123,18 @@ namespace IfcGeom { template class TriangulationElement : public Element

{ private: - Representation::Triangulation

* _geometry; + boost::shared_ptr< Representation::Triangulation

> _geometry; public: const Representation::Triangulation

& geometry() const { return *_geometry; } + const boost::shared_ptr< Representation::Triangulation

>& geometry_pointer() const { return _geometry; } TriangulationElement(const BRepElement

& shape_model) : Element

(shape_model) - , _geometry(new Representation::Triangulation

(shape_model.geometry())) + , _geometry(boost::shared_ptr>(new Representation::Triangulation

(shape_model.geometry()))) + {} + TriangulationElement(const Element

& element, const boost::shared_ptr>& geometry) + : Element

(element) + , _geometry(geometry) {} - virtual ~TriangulationElement() { - delete _geometry; - } private: TriangulationElement(const TriangulationElement& other); TriangulationElement& operator=(const TriangulationElement& other); diff --git a/src/ifcgeom/IfcGeomFaces.cpp b/src/ifcgeom/IfcGeomFaces.cpp index fe0b36681f..9b7b99c2fd 100644 --- a/src/ifcgeom/IfcGeomFaces.cpp +++ b/src/ifcgeom/IfcGeomFaces.cpp @@ -88,6 +88,8 @@ #include #include +#include + #ifdef USE_IFC4 #include #include @@ -101,7 +103,6 @@ bool IfcGeom::Kernel::convert(const IfcSchema::IfcFace* l, TopoDS_Shape& face) { IfcSchema::IfcFaceBound::list::ptr bounds = l->Bounds(); Handle(Geom_Surface) face_surface; - bool reversed_face_surface = false; const bool is_face_surface = l->is(IfcSchema::Type::IfcFaceSurface); if (is_face_surface) { @@ -201,7 +202,11 @@ bool IfcGeom::Kernel::convert(const IfcSchema::IfcFace* l, TopoDS_Shape& face) { ShapeFix_ShapeTolerance FTol; FTol.SetTolerance(wire, getValue(GV_PRECISION), TopAbs_WIRE); + bool flattened_wire = false; + if (!mf) { + process_wire: + if (face_surface.IsNull()) { mf = new BRepBuilderAPI_MakeFace(wire); } else { @@ -237,9 +242,9 @@ bool IfcGeom::Kernel::convert(const IfcSchema::IfcFace* l, TopoDS_Shape& face) { // If the wires are reversed the face needs to be reversed as well in order // to maintain the counter-clock-wise ordering of the bounding wire's vertices. bool all_reversed = true; - TopoDS_Iterator it(outer_face_bound, false); - for (; it.More(); it.Next()) { - const TopoDS_Wire& w = TopoDS::Wire(it.Value()); + TopoDS_Iterator jt(outer_face_bound, false); + for (; jt.More(); jt.Next()) { + const TopoDS_Wire& w = TopoDS::Wire(jt.Value()); if ((w.Orientation() != TopAbs_REVERSED) == same_sense) { all_reversed = false; } @@ -263,9 +268,16 @@ bool IfcGeom::Kernel::convert(const IfcSchema::IfcFace* l, TopoDS_Shape& face) { success = true; } } else { - Logger::Message(Logger::LOG_ERROR, "Failed to process face boundary", bound->entity); + const bool non_planar = mf->Error() == BRepBuilderAPI_NotPlanar; delete mf; - return false; + if (!non_planar || flattened_wire || !flatten_wire(wire)) { + Logger::Message(Logger::LOG_ERROR, "Failed to process face boundary", bound->entity); + return false; + } else { + Logger::Message(Logger::LOG_ERROR, "Flattening face boundary", bound->entity); + flattened_wire = true; + goto process_wire; + } } } else { @@ -856,7 +868,7 @@ bool IfcGeom::Kernel::convert(const IfcSchema::IfcCompositeProfileDef* l, TopoDS builder.MakeCompound(compound); IfcSchema::IfcProfileDef::list::ptr profiles = l->Profiles(); - bool first = true; + //bool first = true; for (IfcSchema::IfcProfileDef::list::it it = profiles->begin(); it != profiles->end(); ++it) { TopoDS_Face f; if (convert_face(*it, f)) { @@ -890,20 +902,32 @@ bool IfcGeom::Kernel::convert(const IfcSchema::IfcDerivedProfileDef* l, TopoDS_S } } +bool IfcGeom::Kernel::convert(const IfcSchema::IfcPlane* l, TopoDS_Shape& face) { + gp_Pln pln; + convert(l, pln); + Handle_Geom_Surface surf = new Geom_Plane(pln); +#if OCC_VERSION_HEX < 0x60502 + face = BRepBuilderAPI_MakeFace(surf); +#else + face = BRepBuilderAPI_MakeFace(surf, getValue(GV_PRECISION)); +#endif + return true; +} + #ifdef USE_IFC4 bool IfcGeom::Kernel::convert(const IfcSchema::IfcBSplineSurfaceWithKnots* l, TopoDS_Shape& face) { - SHARED_PTR< IfcTemplatedEntityListList > cps = l->ControlPointsList(); + boost::shared_ptr< IfcTemplatedEntityListList > cps = l->ControlPointsList(); std::vector uknots = l->UKnots(); std::vector vknots = l->VKnots(); std::vector umults = l->UMultiplicities(); std::vector vmults = l->VMultiplicities(); - TColgp_Array2OfPnt Poles (0, cps->size() - 1, 0, (*cps->begin()).size() - 1); - TColStd_Array1OfReal UKnots(0, uknots.size() - 1); - TColStd_Array1OfReal VKnots(0, vknots.size() - 1); - TColStd_Array1OfInteger UMults(0, umults.size() - 1); - TColStd_Array1OfInteger VMults(0, vmults.size() - 1); + TColgp_Array2OfPnt Poles (0, (int)cps->size() - 1, 0, (int)(*cps->begin()).size() - 1); + TColStd_Array1OfReal UKnots(0, (int)uknots.size() - 1); + TColStd_Array1OfReal VKnots(0, (int)vknots.size() - 1); + TColStd_Array1OfInteger UMults(0, (int)umults.size() - 1); + TColStd_Array1OfInteger VMults(0, (int)vmults.size() - 1); Standard_Integer UDegree = l->UDegree(); Standard_Integer VDegree = l->VDegree(); @@ -935,17 +959,13 @@ bool IfcGeom::Kernel::convert(const IfcSchema::IfcBSplineSurfaceWithKnots* l, To } Handle_Geom_Surface surf = new Geom_BSplineSurface(Poles, UKnots, VKnots, UMults, VMults, UDegree, VDegree); +#if OCC_VERSION_HEX < 0x60502 + face = BRepBuilderAPI_MakeFace(surf); +#else face = BRepBuilderAPI_MakeFace(surf, getValue(GV_PRECISION)); +#endif return true; } -bool IfcGeom::Kernel::convert(const IfcSchema::IfcPlane* l, TopoDS_Shape& face) { - gp_Pln pln; - convert(l, pln); - Handle_Geom_Surface surf = new Geom_Plane(pln); - face = BRepBuilderAPI_MakeFace(surf, getValue(GV_PRECISION)); - return true; -} - #endif \ No newline at end of file diff --git a/src/ifcgeom/IfcGeomFunctions.cpp b/src/ifcgeom/IfcGeomFunctions.cpp index e76dc721e2..63c975a8cb 100644 --- a/src/ifcgeom/IfcGeomFunctions.cpp +++ b/src/ifcgeom/IfcGeomFunctions.cpp @@ -74,6 +74,9 @@ #include #include #include +#include + +#include #include #include @@ -84,6 +87,8 @@ #include #include +#include + #include #include #include @@ -106,11 +111,11 @@ #include #include +#include #include #include -#include #include #include #include @@ -120,10 +125,20 @@ #include +#include + #include "../ifcparse/IfcSIPrefix.h" #include "../ifcparse/IfcFile.h" #include "../ifcgeom/IfcGeom.h" +#if OCC_VERSION_HEX < 0x60900 +#ifdef _MSC_VER +#pragma message("warning: You are linking against Open CASCADE version " OCC_VERSION_COMPLETE ". Version 6.9.0 introduces various improvements with relation to boolean operations. You are advised to upgrade.") +#else +#warning "You are linking against linking against an older version of Open CASCADE. Version 6.9.0 introduces various improvements with relation to boolean operations. You are advised to upgrade." +#endif +#endif + bool IfcGeom::Kernel::create_solid_from_compound(const TopoDS_Shape& compound, TopoDS_Shape& shape) { BRepOffsetAPI_Sewing builder; builder.SetTolerance(getValue(GV_POINT_EQUALITY_TOLERANCE)); @@ -137,11 +152,13 @@ bool IfcGeom::Kernel::create_solid_from_compound(const TopoDS_Shape& compound, T } builder.Perform(); shape = builder.SewedShape(); - try { - ShapeFix_Solid sf_solid; - sf_solid.LimitTolerance(getValue(GV_POINT_EQUALITY_TOLERANCE)); - shape = sf_solid.SolidFromShell(TopoDS::Shell(shape)); - } catch(...) {} + if (shape.ShapeType() == TopAbs_SHELL) { + try { + ShapeFix_Solid sf_solid; + sf_solid.LimitTolerance(getValue(GV_POINT_EQUALITY_TOLERANCE)); + shape = sf_solid.SolidFromShell(TopoDS::Shell(shape)); + } catch(...) {} + } return true; } @@ -181,10 +198,15 @@ bool IfcGeom::Kernel::convert_openings(const IfcSchema::IfcProduct* entity, cons IfcSchema::IfcRelVoidsElement* v = *it; IfcSchema::IfcFeatureElementSubtraction* fes = v->RelatedOpeningElement(); if ( fes->is(IfcSchema::Type::IfcOpeningElement) ) { + if (!fes->hasRepresentation()) continue; // Convert the IfcRepresentation of the IfcOpeningElement gp_Trsf opening_trsf; - IfcGeom::Kernel::convert(fes->ObjectPlacement(),opening_trsf); + if (fes->hasObjectPlacement()) { + try { + convert(fes->ObjectPlacement(),opening_trsf); + } catch (...) {} + } // Move the opening into the coordinate system of the IfcProduct opening_trsf.PreMultiply(entity_trsf.Inverted()); @@ -229,12 +251,11 @@ bool IfcGeom::Kernel::convert_openings(const IfcSchema::IfcProduct* entity, cons ? BRepBuilderAPI_GTransform(opening_shape_unlocated,opening_shape_gtrsf,true).Shape() : opening_shape_unlocated.Moved(opening_shape_gtrsf.Trsf()); - double opening_volume, original_shape_volume; + double opening_volume; if ( Logger::Verbosity() >= Logger::LOG_WARNING ) { opening_volume = shape_volume(opening_shape); if ( opening_volume <= ALMOST_ZERO ) Logger::Message(Logger::LOG_WARNING,"Empty opening for:",entity->entity); - original_shape_volume = shape_volume(entity_shape); } if (entity_shape.ShapeType() == TopAbs_COMPSOLID) { @@ -249,16 +270,30 @@ bool IfcGeom::Kernel::convert_openings(const IfcSchema::IfcProduct* entity, cons TopExp_Explorer exp(entity_shape, TopAbs_SOLID); for (; exp.More(); exp.Next()) { + +#if OCC_VERSION_HEX < 0x60900 BRepAlgoAPI_Cut brep_cut(exp.Current(), opening_shape); +#else + BRepAlgoAPI_Cut brep_cut; + TopTools_ListOfShape s1s; + s1s.Append(exp.Current()); + TopTools_ListOfShape s2s; + s2s.Append(opening_shape); + brep_cut.SetFuzzyValue(getValue(GV_PRECISION)); + brep_cut.SetArguments(s1s); + brep_cut.SetTools(s2s); + brep_cut.Build(); +#endif + bool added = false; if ( brep_cut.IsDone() ) { TopoDS_Shape brep_cut_result = brep_cut; BRepCheck_Analyzer analyser(brep_cut_result); bool is_valid = analyser.IsValid() != 0; if (is_valid) { - TopExp_Explorer exp(brep_cut_result, TopAbs_SOLID); - for (; exp.More(); exp.Next()) { - builder.Add(compound, exp.Current()); + TopExp_Explorer exp2(brep_cut_result, TopAbs_SOLID); + for (; exp2.More(); exp2.Next()) { + builder.Add(compound, exp2.Current()); added = true; } } @@ -274,7 +309,19 @@ bool IfcGeom::Kernel::convert_openings(const IfcSchema::IfcProduct* entity, cons entity_shape = compound; } else { +#if OCC_VERSION_HEX < 0x60900 BRepAlgoAPI_Cut brep_cut(entity_shape,opening_shape); +#else + BRepAlgoAPI_Cut brep_cut; + TopTools_ListOfShape s1s; + s1s.Append(entity_shape); + TopTools_ListOfShape s2s; + s2s.Append(opening_shape); + brep_cut.SetFuzzyValue(getValue(GV_PRECISION)); + brep_cut.SetArguments(s1s); + brep_cut.SetTools(s2s); + brep_cut.Build(); +#endif if ( brep_cut.IsDone() ) { TopoDS_Shape brep_cut_result = brep_cut; @@ -293,7 +340,7 @@ bool IfcGeom::Kernel::convert_openings(const IfcSchema::IfcProduct* entity, cons entity_shape = brep_cut_result; if ( Logger::Verbosity() >= Logger::LOG_WARNING ) { const double volume_after_subtraction = shape_volume(entity_shape); - + double original_shape_volume = shape_volume(entity_shape); if ( ALMOST_THE_SAME(original_shape_volume,volume_after_subtraction) ) Logger::Message(Logger::LOG_WARNING,"Subtraction yields unchanged volume:",entity->entity); } @@ -312,6 +359,7 @@ bool IfcGeom::Kernel::convert_openings(const IfcSchema::IfcProduct* entity, cons return true; } +#if OCC_VERSION_HEX < 0x60900 bool IfcGeom::Kernel::convert_openings_fast(const IfcSchema::IfcProduct* entity, const IfcSchema::IfcRelVoidsElement::list::ptr& openings, const IfcGeom::IfcRepresentationShapeItems& entity_shapes, const gp_Trsf& entity_trsf, IfcGeom::IfcRepresentationShapeItems& cut_shapes) { @@ -324,10 +372,15 @@ bool IfcGeom::Kernel::convert_openings_fast(const IfcSchema::IfcProduct* entity, IfcSchema::IfcRelVoidsElement* v = *it; IfcSchema::IfcFeatureElementSubtraction* fes = v->RelatedOpeningElement(); if ( fes->is(IfcSchema::Type::IfcOpeningElement) ) { + if (!fes->hasRepresentation()) continue; // Convert the IfcRepresentation of the IfcOpeningElement gp_Trsf opening_trsf; - IfcGeom::Kernel::convert(fes->ObjectPlacement(),opening_trsf); + if (fes->hasObjectPlacement()) { + try { + convert(fes->ObjectPlacement(),opening_trsf); + } catch (...) {} + } // Move the opening into the coordinate system of the IfcProduct opening_trsf.PreMultiply(entity_trsf.Inverted()); @@ -367,6 +420,7 @@ bool IfcGeom::Kernel::convert_openings_fast(const IfcSchema::IfcProduct* entity, } BRepAlgoAPI_Cut brep_cut(entity_shape,opening_compound); + bool is_valid = false; if ( brep_cut.IsDone() ) { TopoDS_Shape brep_cut_result = brep_cut; @@ -388,6 +442,93 @@ bool IfcGeom::Kernel::convert_openings_fast(const IfcSchema::IfcProduct* entity, } return true; } +#else +bool IfcGeom::Kernel::convert_openings_fast(const IfcSchema::IfcProduct* entity, const IfcSchema::IfcRelVoidsElement::list::ptr& openings, + const IfcGeom::IfcRepresentationShapeItems& entity_shapes, const gp_Trsf& entity_trsf, IfcGeom::IfcRepresentationShapeItems& cut_shapes) { + + TopTools_ListOfShape opening_shapelist; + + for ( IfcSchema::IfcRelVoidsElement::list::it it = openings->begin(); it != openings->end(); ++ it ) { + IfcSchema::IfcRelVoidsElement* v = *it; + IfcSchema::IfcFeatureElementSubtraction* fes = v->RelatedOpeningElement(); + if ( fes->is(IfcSchema::Type::IfcOpeningElement) ) { + if (!fes->hasRepresentation()) continue; + + // Convert the IfcRepresentation of the IfcOpeningElement + gp_Trsf opening_trsf; + if (fes->hasObjectPlacement()) { + try { + convert(fes->ObjectPlacement(),opening_trsf); + } catch (...) {} + } + + // Move the opening into the coordinate system of the IfcProduct + opening_trsf.PreMultiply(entity_trsf.Inverted()); + + IfcSchema::IfcProductRepresentation* prodrep = fes->Representation(); + IfcSchema::IfcRepresentation::list::ptr reps = prodrep->Representations(); + + IfcGeom::IfcRepresentationShapeItems opening_shapes; + + for ( IfcSchema::IfcRepresentation::list::it it2 = reps->begin(); it2 != reps->end(); ++ it2 ) { + convert_shapes(*it2,opening_shapes); + } + + for ( unsigned int i = 0; i < opening_shapes.size(); ++ i ) { + gp_GTrsf gtrsf = opening_shapes[i].Placement(); + gtrsf.PreMultiply(opening_trsf); + const TopoDS_Shape& opening_shape = gtrsf.Form() == gp_Other + ? BRepBuilderAPI_GTransform(opening_shapes[i].Shape(),gtrsf,true).Shape() + : (opening_shapes[i].Shape()).Moved(gtrsf.Trsf()); + opening_shapelist.Append(opening_shape); + } + + } + } + + // Iterate over the shapes of the IfcProduct + for ( IfcGeom::IfcRepresentationShapeItems::const_iterator it3 = entity_shapes.begin(); it3 != entity_shapes.end(); ++ it3 ) { + TopoDS_Shape entity_shape_solid; + const TopoDS_Shape& entity_shape_unlocated = ensure_fit_for_subtraction(it3->Shape(),entity_shape_solid); + const gp_GTrsf& entity_shape_gtrsf = it3->Placement(); + TopoDS_Shape entity_shape; + if ( entity_shape_gtrsf.Form() == gp_Other ) { + Logger::Message(Logger::LOG_WARNING,"Applying non uniform transformation to:",entity->entity); + entity_shape = BRepBuilderAPI_GTransform(entity_shape_unlocated,entity_shape_gtrsf,true).Shape(); + } else { + entity_shape = entity_shape_unlocated.Moved(entity_shape_gtrsf.Trsf()); + } + + BRepAlgoAPI_Cut brep_cut; + TopTools_ListOfShape s1s; + s1s.Append(entity_shape); + brep_cut.SetFuzzyValue(getValue(GV_PRECISION)); + brep_cut.SetArguments(s1s); + brep_cut.SetTools(opening_shapelist); + brep_cut.Build(); + + bool is_valid = false; + if ( brep_cut.IsDone() ) { + TopoDS_Shape brep_cut_result = brep_cut; + + BRepCheck_Analyzer analyser(brep_cut_result); + is_valid = analyser.IsValid() != 0; + if ( is_valid ) { + cut_shapes.push_back(IfcGeom::IfcRepresentationShapeItem(brep_cut_result, &it3->Style())); + } + } + if ( !is_valid ) { + // Apparently processing the boolean operation failed or resulted in an invalid result + // in which case the original shape without the subtractions is returned instead + // we try convert the openings in the original way, one by one. + Logger::Message(Logger::LOG_WARNING, "Subtracting combined openings compound failed:", entity->entity); + return false; + } + + } + return true; +} +#endif bool IfcGeom::Kernel::convert_wire_to_face(const TopoDS_Wire& wire, TopoDS_Face& face) { BRepBuilderAPI_MakeFace mf(wire, false); @@ -626,11 +767,11 @@ IfcSchema::IfcProductDefinitionShape* IfcGeom::tesselate(TopoDS_Shape& shape, do IfcSchema::IfcFaceOuterBound* bound = new IfcSchema::IfcFaceOuterBound(loop, face.Orientation() != TopAbs_REVERSED); IfcSchema::IfcFaceBound::list::ptr bounds (new IfcSchema::IfcFaceBound::list); bounds->push(bound); - IfcSchema::IfcFace* face = new IfcSchema::IfcFace(bounds); + IfcSchema::IfcFace* face2 = new IfcSchema::IfcFace(bounds); es->push(loop); es->push(bound); - es->push(face); - faces->push(face); + es->push(face2); + faces->push(face2); } } } @@ -714,7 +855,6 @@ bool IfcGeom::Kernel::fill_nonmanifold_wires_with_planar_faces(TopoDS_Shape& sha // Now loop over all the vertices that are part of the wire(s) to be filled for (int i = 1; i <= num_verts; ++i) { first = current = TopoDS::Vertex(vertex_to_edges.FindKey(i)); - const bool isSame = first.IsSame(current); // We keep track of the vertices we already used if (visited.find(vertex_to_edges.FindIndex(current)) != visited.end()) { continue; @@ -722,7 +862,7 @@ bool IfcGeom::Kernel::fill_nonmanifold_wires_with_planar_faces(TopoDS_Shape& sha // Given these vertices, try to find closed loops and create new // wires out of them. BRepBuilderAPI_MakeWire w; - while (true) { + for (;;) { visited.insert(vertex_to_edges.FindIndex(current)); // Find the edge that the current vertex is part of and points // away from the previous vertex (null for the first vertex). @@ -839,11 +979,11 @@ bool IfcGeom::Kernel::flatten_shape_list(const IfcGeom::IfcRepresentationShapeIt return success; } -void IfcGeom::Kernel::remove_redundant_points_from_loop(TColgp_SequenceOfPnt& polygon, bool closed, double tol) { +void IfcGeom::Kernel::remove_duplicate_points_from_loop(TColgp_SequenceOfPnt& polygon, bool closed, double tol) { if (tol <= 0.) tol = getValue(GV_POINT_EQUALITY_TOLERANCE); tol *= tol; - while (true) { + for (;;) { bool removed = false; int n = polygon.Length() - (closed ? 0 : 1); for (int i = 1; i <= n; ++i) { @@ -863,8 +1003,103 @@ void IfcGeom::Kernel::remove_redundant_points_from_loop(TColgp_SequenceOfPnt& po } } +void IfcGeom::Kernel::remove_collinear_points_from_loop(TColgp_SequenceOfPnt& polygon, bool closed, double tol) { + if (tol <= 0.) tol = getValue(GV_POINT_EQUALITY_TOLERANCE); + const int start = closed ? 1 : 2; + const int end = polygon.Length() - (closed ? 0 : 1); + std::vector to_remove(polygon.Length(), false); + for (int i = start; i <= end; ++i) { + const gp_Pnt& a = polygon.Value(((i - 2 + polygon.Length()) % polygon.Length()) + 1); + const gp_Pnt& b = polygon.Value(i); + const gp_Pnt& c = polygon.Value((i % polygon.Length()) + 1); + const gp_Vec d1 = c.XYZ() - a.XYZ(); + const gp_Vec d2 = b.XYZ() - a.XYZ(); + const double dt = d2.Dot(d1) / d1.Dot(d1); + const gp_Vec d3 = d1.Scaled(dt); + const gp_Pnt b2 = a.XYZ() + d3.XYZ(); + if (b.Distance(b2) < tol) { + to_remove[i-1] = true; + } + } + for (int i = (int) to_remove.size() - 1; i >= 0; --i) { + if (to_remove[i]) { + polygon.Remove(i+1); + } + } +} + +bool IfcGeom::Kernel::wire_to_sequence_of_point(const TopoDS_Wire& w, TColgp_SequenceOfPnt& p) { + TopExp_Explorer exp(w, TopAbs_EDGE); + for (; exp.More(); exp.Next()) { + double a, b; + Handle_Geom_Curve crv = BRep_Tool::Curve(TopoDS::Edge(exp.Current()), a, b); + if (crv->DynamicType() != STANDARD_TYPE(Geom_Line)) { + return false; + } + } + + exp.ReInit(); + + int i = 0; + for (; exp.More(); exp.Next(), ++i) { + TopoDS_Vertex v1, v2; + TopExp::Vertices(TopoDS::Edge(exp.Current()), v1, v2, true); + if (exp.More()) { + if (i == 0) { + p.Append(BRep_Tool::Pnt(v1)); + } + p.Append(BRep_Tool::Pnt(v2)); + } + } + + return true; +} + +void IfcGeom::Kernel::sequence_of_point_to_wire(const TColgp_SequenceOfPnt& p, TopoDS_Wire& w, bool close) { + BRepBuilderAPI_MakePolygon builder; + for (int i = 1; i <= p.Length(); ++i) { + builder.Add(p.Value(i)); + } + if (close) { + builder.Close(); + } + w = builder.Wire(); +} + +IfcSchema::IfcRelVoidsElement::list::ptr IfcGeom::Kernel::find_openings(IfcSchema::IfcProduct* product) { + + IfcSchema::IfcRelVoidsElement::list::ptr openings(new IfcSchema::IfcRelVoidsElement::list); + if ( product->is(IfcSchema::Type::IfcElement) && !product->is(IfcSchema::Type::IfcOpeningElement) ) { + IfcSchema::IfcElement* element = (IfcSchema::IfcElement*)product; + openings = element->HasOpenings(); + } + + // Is the IfcElement a decomposition of an IfcElement with any IfcOpeningElements? + IfcSchema::IfcObjectDefinition* obdef = product->as(); + for (;;) { +#ifdef USE_IFC4 + IfcSchema::IfcRelAggregates::list::ptr decomposes = obdef->Decomposes(); + for ( IfcSchema::IfcRelAggregates::list::it it = decomposes->begin(); it != decomposes->end(); ++ it ) { +#else + IfcSchema::IfcRelDecomposes::list::ptr decomposes = obdef->Decomposes(); + if (decomposes->size() != 1) break; + +#endif + IfcSchema::IfcObjectDefinition* rel_obdef = (*decomposes->begin())->RelatingObject(); + if ( rel_obdef->is(IfcSchema::Type::IfcElement) && !rel_obdef->is(IfcSchema::Type::IfcOpeningElement) ) { + IfcSchema::IfcElement* element = (IfcSchema::IfcElement*)rel_obdef; + openings->push(element->HasOpenings()); + } + + obdef = rel_obdef; + } + + return openings; +} + template IfcGeom::BRepElement

* IfcGeom::Kernel::create_brep_for_representation_and_product(const IteratorSettings& settings, IfcSchema::IfcRepresentation* representation, IfcSchema::IfcProduct* product) { + IfcGeom::Representation::BRep* shape; IfcGeom::IfcRepresentationShapeItems shapes, shapes2; @@ -872,7 +1107,7 @@ IfcGeom::BRepElement

* IfcGeom::Kernel::create_brep_for_representation_and_pro return 0; } - if (settings.apply_layersets()) { + if (settings.get(IteratorSettings::APPLY_LAYERSETS)) { TopoDS_Shape merge; if (flatten_shape_list(shapes, merge, false)) { if (count(merge, TopAbs_FACE) > 0) { @@ -913,36 +1148,20 @@ IfcGeom::BRepElement

* IfcGeom::Kernel::create_brep_for_representation_and_pro // Does the IfcElement have any IfcOpenings? // Note that openings for IfcOpeningElements are not processed - IfcSchema::IfcRelVoidsElement::list::ptr openings; - if ( product->is(IfcSchema::Type::IfcElement) && !product->is(IfcSchema::Type::IfcOpeningElement) ) { - IfcSchema::IfcElement* element = (IfcSchema::IfcElement*)product; - openings = element->HasOpenings(); - } - // Is the IfcElement a decomposition of an IfcElement with any IfcOpeningElements? - if ( product->is(IfcSchema::Type::IfcBuildingElementPart ) ) { - IfcSchema::IfcBuildingElementPart* part = (IfcSchema::IfcBuildingElementPart*)product; -#ifdef USE_IFC4 - IfcSchema::IfcRelAggregates::list::ptr decomposes = part->Decomposes(); - for ( IfcSchema::IfcRelAggregates::list::it it = decomposes->begin(); it != decomposes->end(); ++ it ) { -#else - IfcSchema::IfcRelDecomposes::list::ptr decomposes = part->Decomposes(); - for ( IfcSchema::IfcRelDecomposes::list::it it = decomposes->begin(); it != decomposes->end(); ++ it ) { -#endif - IfcSchema::IfcObjectDefinition* obdef = (*it)->RelatingObject(); - if ( obdef->is(IfcSchema::Type::IfcElement) ) { - IfcSchema::IfcElement* element = (IfcSchema::IfcElement*)obdef; - openings->push(element->HasOpenings()); - } - } - } + IfcSchema::IfcRelVoidsElement::list::ptr openings = find_openings(product); const std::string product_type = IfcSchema::Type::ToString(product->type()); ElementSettings element_settings(settings, getValue(GV_LENGTH_UNIT), product_type); - if ( !settings.disable_opening_subtractions() && openings && openings->size() ) { + if (!settings.get(IfcGeom::IteratorSettings::DISABLE_OPENING_SUBTRACTIONS) && openings && openings->size()) { IfcGeom::IfcRepresentationShapeItems opened_shapes; try { - if ( settings.faster_booleans() ) { +#if OCC_VERSION_HEX < 0x60900 + const bool faster_booleans = settings.get(IteratorSettings::FASTER_BOOLEANS); +#else + const bool faster_booleans = true; +#endif + if (faster_booleans) { bool succes = convert_openings_fast(product,openings,shapes,trsf,opened_shapes); if ( ! succes ) { opened_shapes.clear(); @@ -954,14 +1173,14 @@ IfcGeom::BRepElement

* IfcGeom::Kernel::create_brep_for_representation_and_pro } catch(...) { Logger::Message(Logger::LOG_ERROR,"Error processing openings for:",product->entity); } - if ( settings.use_world_coords() ) { + if (settings.get(IteratorSettings::USE_WORLD_COORDS)) { for ( IfcGeom::IfcRepresentationShapeItems::iterator it = opened_shapes.begin(); it != opened_shapes.end(); ++ it ) { it->prepend(trsf); } trsf = gp_Trsf(); } shape = new IfcGeom::Representation::BRep(element_settings, representation->entity->id(), opened_shapes); - } else if ( settings.use_world_coords() ) { + } else if (settings.get(IteratorSettings::USE_WORLD_COORDS)) { for ( IfcGeom::IfcRepresentationShapeItems::iterator it = shapes.begin(); it != shapes.end(); ++ it ) { it->prepend(trsf); } @@ -986,7 +1205,47 @@ IfcGeom::BRepElement

* IfcGeom::Kernel::create_brep_for_representation_and_pro guid, context_string, trsf, - shape + boost::shared_ptr(shape) + ); +} + +template +IfcGeom::BRepElement

* IfcGeom::Kernel::create_brep_for_processed_representation(const IteratorSettings& /*settings*/, IfcSchema::IfcRepresentation* representation, IfcSchema::IfcProduct* product, IfcGeom::BRepElement

* brep) { + + int parent_id = -1; + try { + IfcSchema::IfcObjectDefinition* parent_object = get_decomposing_entity(product); + if (parent_object) { + parent_id = parent_object->entity->id(); + } + } catch (...) {} + + const std::string name = product->hasName() ? product->Name() : ""; + const std::string guid = product->GlobalId(); + + gp_Trsf trsf; + try { + convert(product->ObjectPlacement(),trsf); + } catch (...) {} + + std::string context_string = ""; + if (representation->hasRepresentationIdentifier()) { + context_string = representation->RepresentationIdentifier(); + } else if (representation->ContextOfItems()->hasContextType()) { + context_string = representation->ContextOfItems()->ContextType(); + } + + const std::string product_type = IfcSchema::Type::ToString(product->type()); + + return new BRepElement

( + product->entity->id(), + parent_id, + name, + product_type, + guid, + context_string, + trsf, + brep->geometry_pointer() ); } @@ -1048,6 +1307,9 @@ IfcSchema::IfcObjectDefinition* IfcGeom::Kernel::get_decomposing_entity(IfcSchem template IfcGeom::BRepElement* IfcGeom::Kernel::create_brep_for_representation_and_product(const IteratorSettings& settings, IfcSchema::IfcRepresentation* representation, IfcSchema::IfcProduct* product); template IfcGeom::BRepElement* IfcGeom::Kernel::create_brep_for_representation_and_product(const IteratorSettings& settings, IfcSchema::IfcRepresentation* representation, IfcSchema::IfcProduct* product); +template IfcGeom::BRepElement* IfcGeom::Kernel::create_brep_for_processed_representation(const IteratorSettings& settings, IfcSchema::IfcRepresentation* representation, IfcSchema::IfcProduct* product, IfcGeom::BRepElement* brep); +template IfcGeom::BRepElement* IfcGeom::Kernel::create_brep_for_processed_representation(const IteratorSettings& settings, IfcSchema::IfcRepresentation* representation, IfcSchema::IfcProduct* product, IfcGeom::BRepElement* brep); + std::pair IfcGeom::Kernel::initializeUnits(IfcSchema::IfcUnitAssignment* unit_assignment) { // Set default units, set length to meters, angles to undefined setValue(IfcGeom::Kernel::GV_LENGTH_UNIT, 1.0); @@ -2017,4 +2279,135 @@ bool IfcGeom::Kernel::project(const Handle_Geom_Surface& srf, const TopoDS_Shape v2 += widen; return true; -} \ No newline at end of file +} + +const IfcSchema::IfcRepresentationItem* IfcGeom::Kernel::find_item_carrying_style(const IfcSchema::IfcRepresentationItem* item) { + if (item->StyledByItem()->size()) { + return item; + } + + while (item->is(IfcSchema::Type::IfcBooleanClippingResult)) { + // All instantiations of IfcBooleanOperand (type of FirstOperand) are subtypes of + // IfcGeometricRepresentationItem + item = (IfcSchema::IfcGeometricRepresentationItem*) ((IfcSchema::IfcBooleanClippingResult*) item)->FirstOperand(); + if (item->StyledByItem()->size()) { + return item; + } + } + + // TODO: Ideally this would be done for other entities (such as IfcCsgSolid) as well. + // But neither are these very prevalent, nor does the current IfcOpenShell style + // mechanism enable to conveniently style subshapes, which would be necessary for + // distinctly styled union operands. + + return item; +} + +bool IfcGeom::Kernel::is_identity_transform(IfcUtil::IfcBaseClass* l) { + IfcSchema::IfcAxis2Placement2D* ax2d; + IfcSchema::IfcAxis2Placement3D* ax3d; + + IfcSchema::IfcCartesianTransformationOperator2D* op2d; + IfcSchema::IfcCartesianTransformationOperator3D* op3d; + IfcSchema::IfcCartesianTransformationOperator2DnonUniform* op2dnonu; + IfcSchema::IfcCartesianTransformationOperator3DnonUniform* op3dnonu; + + if((op2dnonu = l->as()) != 0) { + gp_GTrsf2d gtrsf2d; + convert(op2dnonu, gtrsf2d); + return gtrsf2d.Form() == gp_Identity; + } else if ((op2d = l->as()) != 0) { + gp_Trsf2d trsf2d; + convert(op2d, trsf2d); + return trsf2d.Form() == gp_Identity; + } else if((op3dnonu = l->as()) != 0) { + gp_GTrsf gtrsf; + convert(op3dnonu, gtrsf); + return gtrsf.Form() == gp_Identity; + } else if ((op3d = l->as()) != 0) { + gp_Trsf trsf; + convert(op3d, trsf); + return trsf.Form() == gp_Identity; + } else if((ax2d = l->as()) != 0) { + gp_Trsf2d trsf2d; + convert(ax2d, trsf2d); + return trsf2d.Form() == gp_Identity; + } else if ((ax3d = l->as()) != 0) { + gp_Trsf trsf; + convert(ax3d, trsf); + return trsf.Form() == gp_Identity; + } else { + throw IfcParse::IfcException("Invalid valuation for IfcAxis2Placement / IfcCartesianTransformationOperator"); + } +} + +bool IfcGeom::Kernel::approximate_plane_through_wire(const TopoDS_Wire& wire, gp_Pln& plane) { + // Newell's Method is used for the normal calculation + // as a simple edge cross product can give opposite results + // for a concave face boundary. + // Reference: Graphics Gems III p. 231 + + double x = 0, y = 0, z = 0; + gp_Pnt current, previous, first; + gp_XYZ center; + int n = 0; + + BRepTools_WireExplorer exp(wire); + + for (;; exp.Next()) { + const bool has_more = exp.More(); + if (has_more) { + const TopoDS_Vertex& v = exp.CurrentVertex(); + current = BRep_Tool::Pnt(v); + center += current.XYZ(); + } else { + current = first; + } + if (n) { + const double& xn = previous.X(); + const double& yn = previous.Y(); + const double& zn = previous.Z(); + const double& xn1 = current.X(); + const double& yn1 = current.Y(); + const double& zn1 = current.Z(); + x += (yn - yn1)*(zn + zn1); + y += (xn + xn1)*(zn - zn1); + z += (xn - xn1)*(yn + yn1); + } else { + first = current; + } + if (!has_more) { + break; + } + previous = current; + ++n; + } + + if (n < 3) { + return false; + } + + plane = gp_Pln(center / n, gp_Dir(x, y, z)); + return true; +} + +bool IfcGeom::Kernel::flatten_wire(TopoDS_Wire& wire) { + gp_Pln pln; + if (!approximate_plane_through_wire(wire, pln)) { + return false; + } + TopoDS_Face face = BRepBuilderAPI_MakeFace(pln).Face(); + BRepAlgo_NormalProjection proj(face); + proj.Add(wire); + proj.Build(); + if (!proj.IsDone()) { + return false; + } + TopTools_ListOfShape list; + proj.BuildWire(list); + if (list.Extent() != 1) { + return false; + } + wire = TopoDS::Wire(list.First()); + return true; +} diff --git a/src/ifcgeom/IfcGeomHelpers.cpp b/src/ifcgeom/IfcGeomHelpers.cpp index bba462dd12..29851a2627 100644 --- a/src/ifcgeom/IfcGeomHelpers.cpp +++ b/src/ifcgeom/IfcGeomHelpers.cpp @@ -77,6 +77,53 @@ #include "../ifcgeom/IfcGeom.h" +// Helper functions (re)set gp_(G)Trsf(2d) forms explicitly to 'Identity' +// so that it can be easily identified in the IfcMappedItem processing + +// For axis placements detect equality early in order for the +// relatively computionaly expensive gp_Trsf calculation to be skipped +template +bool axis_equal(const T& a, const T& b, double tolerance); +template <> +bool axis_equal(const gp_Ax3& a, const gp_Ax3& b, double tolerance) { + if (!a.Location().IsEqual(b.Location(), tolerance)) return false; + // Note that the tolerance below is angular, above is linear. Since architectural + // objects are about 1m'ish in scale, it should be somewhat equivalent. Besides, + // this is mostly a filter for NULL or default values in the placements. + if (!a.Direction().IsEqual(b.Direction(), tolerance)) return false; + if (!a.XDirection().IsEqual(b.XDirection(), tolerance)) return false; + if (!a.YDirection().IsEqual(b.YDirection(), tolerance)) return false; + return true; +} + +bool axis_equal(const gp_Ax2d& a, const gp_Ax2d& b, double tolerance) { + if (!a.Location().IsEqual(b.Location(), tolerance)) return false; + if (!a.Direction().IsEqual(b.Direction(), tolerance)) return false; + return true; +} + +template struct dimension_count {}; +template <> struct dimension_count { static const int n = 2; }; +template <> struct dimension_count { static const int n = 2; }; +template <> struct dimension_count < gp_Trsf > { static const int n = 3; }; +template <> struct dimension_count < gp_GTrsf > { static const int n = 3; }; + +template +bool is_identity(const T& t, double tolerance) { + // Note the {1, n+1} range due to Open Cascade's 1-based indexing + // Note the {1, n+2} range due to the translation part of the matrix + for (int i = 1; i < dimension_count::n + 2; ++i) { + for (int j = 1; j < dimension_count::n + 1; ++j) { + const double iden_value = i == j ? 1. : 0.; + const double trsf_value = t.Value(j, i); + if (fabs(trsf_value - iden_value) > tolerance) { + return false; + } + } + } + return true; +} + bool IfcGeom::Kernel::convert(const IfcSchema::IfcCartesianPoint* l, gp_Pnt& point) { IN_CACHE(IfcCartesianPoint,l,gp_Pnt,point) std::vector xyz = l->Coordinates(); @@ -120,7 +167,11 @@ bool IfcGeom::Kernel::convert(const IfcSchema::IfcAxis2Placement3D* l, gp_Trsf& gp_Ax3 ax3; if ( hasRef ) ax3 = gp_Ax3(o,axis,refDirection); else ax3 = gp_Ax3(o,axis); - trsf.SetTransformation(ax3, gp_Ax3(gp_Pnt(),gp_Dir(0,0,1),gp_Dir(1,0,0))); + + if (!axis_equal(ax3, (gp_Ax3) gp::XOY(), getValue(GV_PRECISION))) { + trsf.SetTransformation(ax3, gp::XOY()); + } + CACHE(IfcAxis2Placement3D,l,trsf) return true; } @@ -147,9 +198,16 @@ bool IfcGeom::Kernel::convert(const IfcSchema::IfcCartesianTransformationOperato if ( l->hasAxis3() ) IfcGeom::Kernel::convert(l->Axis3(),axis3); gp_Ax3 ax3 (origin,axis3,axis1); if ( axis2.Dot(ax3.YDirection()) < 0 ) ax3.YReverse(); - trsf.SetTransformation(ax3); - trsf.Invert(); - if ( l->hasScale() ) trsf.SetScaleFactor(l->Scale()); + + if (!axis_equal(ax3, (gp_Ax3) gp::XOY(), getValue(GV_PRECISION))) { + trsf.SetTransformation(ax3); + trsf.Invert(); + } + + if (l->hasScale() && !ALMOST_THE_SAME(l->Scale(), 1.)) { + trsf.SetScaleFactor(l->Scale()); + } + CACHE(IfcCartesianTransformationOperator3D,l,trsf) return true; } @@ -183,7 +241,12 @@ bool IfcGeom::Kernel::convert(const IfcSchema::IfcCartesianTransformationOperato } trsf.Invert(); - if ( l->hasScale() ) trsf.SetScaleFactor(l->Scale()); + if ( l->hasScale() && !ALMOST_THE_SAME(l->Scale(), 1.) ) trsf.SetScaleFactor(l->Scale()); + + if (is_identity(trsf, getValue(GV_PRECISION))) { + trsf = gp_Trsf2d(); + } + CACHE(IfcCartesianTransformationOperator2D,l,trsf) return true; } @@ -211,6 +274,11 @@ bool IfcGeom::Kernel::convert(const IfcSchema::IfcCartesianTransformationOperato gtrsf.SetValue(2,2,scale2); gtrsf.SetValue(3,3,scale3); gtrsf.PreMultiply(trsf); + + if (is_identity(gtrsf, getValue(GV_PRECISION))) { + gtrsf = gp_GTrsf(); + } + CACHE(IfcCartesianTransformationOperator3DnonUniform,l,gtrsf) return true; } @@ -247,6 +315,11 @@ bool IfcGeom::Kernel::convert(const IfcSchema::IfcCartesianTransformationOperato gtrsf.SetValue(1,1,scale1); gtrsf.SetValue(2,2,scale2); gtrsf.Multiply(trsf); + + if (is_identity(gtrsf, getValue(GV_PRECISION))) { + gtrsf = gp_GTrsf2d(); + } + CACHE(IfcCartesianTransformationOperator2DnonUniform,l,gtrsf) return true; } @@ -274,8 +347,12 @@ bool IfcGeom::Kernel::convert(const IfcSchema::IfcAxis2Placement2D* l, gp_Trsf2d if ( l->hasRefDirection() ) IfcGeom::Kernel::convert(l->RefDirection(),V); - gp_Ax2d axis(gp_Pnt2d(P.X(),P.Y()),gp_Dir2d(V.X(),V.Y())); - trsf.SetTransformation(axis,gp_Ax2d()); + gp_Ax2d axis(gp_Pnt2d(P.X(),P.Y()), gp_Dir2d(V.X(),V.Y())); + + if (!axis_equal(axis, gp_Ax2d(), getValue(GV_PRECISION))) { + trsf.SetTransformation(axis, gp_Ax2d()); + } + CACHE(IfcAxis2Placement2D,l,trsf) return true; } @@ -287,7 +364,7 @@ bool IfcGeom::Kernel::convert(const IfcSchema::IfcObjectPlacement* l, gp_Trsf& t return false; } IfcSchema::IfcLocalPlacement* current = (IfcSchema::IfcLocalPlacement*)l; - while (1) { + for (;;) { gp_Trsf trsf2; IfcSchema::IfcAxis2Placement* relplacement = current->RelativePlacement(); if ( relplacement->is(IfcSchema::Type::IfcAxis2Placement3D) ) { diff --git a/src/ifcgeom/IfcGeomIterator.h b/src/ifcgeom/IfcGeomIterator.h index 70e24234ac..a536198c64 100644 --- a/src/ifcgeom/IfcGeomIterator.h +++ b/src/ifcgeom/IfcGeomIterator.h @@ -86,6 +86,9 @@ namespace IfcGeom { template class Iterator { private: + Iterator(const Iterator&); // N/I + Iterator& operator=(const Iterator&); // N/I + Kernel kernel; IteratorSettings settings; @@ -110,6 +113,8 @@ namespace IfcGeom { std::string unit_name; // double? P unit_magnitude; + gp_XYZ bounds_min_; + gp_XYZ bounds_max_; void initUnits() { IfcSchema::IfcProject::list::ptr projects = ifc_file->entitiesByType(); @@ -121,6 +126,7 @@ namespace IfcGeom { } } + std::set names_to_include_or_exclude; // regex containing a name or a wildcard expression std::set entities_to_include_or_exclude; bool include_entities_in_processing; @@ -148,7 +154,7 @@ namespace IfcGeom { } catch (...) {} std::set context_types; - if (!settings.exclude_solids_and_surfaces()) { + if (!settings.get(IteratorSettings::EXCLUDE_SOLIDS_AND_SURFACES)) { // Really this should only be 'Model', as per // the standard 'Design' is deprecated. So, // just for backwards compatibility: @@ -157,7 +163,7 @@ namespace IfcGeom { // DDS likes to output 'model view' context_types.insert("model view"); } - if (settings.include_curves()) { + if (settings.get(IteratorSettings::INCLUDE_CURVES)) { context_types.insert("plan"); } @@ -180,13 +186,15 @@ namespace IfcGeom { // by the parent's context inverse attributes. continue; } - if (context->hasContextType()) { - std::string context_type = context->ContextType(); - boost::to_lower(context_type); - if (context_types.find(context_type) != context_types.end()) { - filtered_contexts->push(context); + try { + if (context->hasContextType()) { + std::string context_type = context->ContextType(); + boost::to_lower(context_type); + if (context_types.find(context_type) != context_types.end()) { + filtered_contexts->push(context); + } } - } + } catch (const IfcParse::IfcException&) {} } // In case no contexts are identified based on their ContextType, all contexts are @@ -204,10 +212,12 @@ namespace IfcGeom { IfcSchema::IfcGeometricRepresentationContext* context = *it; representations->push(context->RepresentationsInContext()); - if (context->hasPrecision() && context->Precision() < lowest_precision_encountered) { - lowest_precision_encountered = context->Precision(); - any_precision_encountered = true; - } + try { + if (context->hasPrecision() && context->Precision() < lowest_precision_encountered) { + lowest_precision_encountered = context->Precision(); + any_precision_encountered = true; + } + } catch (const IfcParse::IfcException&) {} IfcSchema::IfcGeometricRepresentationSubContext::list::ptr sub_contexts = context->HasSubContexts(); for (jt = sub_contexts->begin(); jt != sub_contexts->end(); ++jt) { representations->push((*jt)->RepresentationsInContext()); @@ -243,49 +253,93 @@ namespace IfcGeom { done = 0; total = representations->size(); + for (int i = 1; i < 4; ++i) { + bounds_min_.SetCoord(i, std::numeric_limits::infinity()); + bounds_max_.SetCoord(i, -std::numeric_limits::infinity()); + } + + IfcSchema::IfcProduct::list::ptr products = ifc_file->entitiesByType(); + for (IfcSchema::IfcProduct::list::it iter = products->begin(); iter != products->end(); ++iter) { + IfcSchema::IfcProduct* product = *iter; + if (product->hasObjectPlacement()) { + gp_Trsf trsf; // Use a fresh trsf every time in order to prevent the result to be concatenated + if (kernel.convert(product->ObjectPlacement(), trsf)) { + const gp_XYZ& pos = trsf.TranslationPart(); + bounds_min_.SetX(std::min(bounds_min_.X(), pos.X())); + bounds_min_.SetY(std::min(bounds_min_.Y(), pos.Y())); + bounds_min_.SetZ(std::min(bounds_min_.Z(), pos.Z())); + bounds_max_.SetX(std::max(bounds_max_.X(), pos.X())); + bounds_max_.SetY(std::max(bounds_max_.Y(), pos.Y())); + bounds_max_.SetZ(std::max(bounds_max_.Z(), pos.Z())); + } + } + } + return true; } - int progress() { - return 100 * done / total; - } + int progress() const { return 100 * done / total; } - const std::string& getUnitName() { - return unit_name; - } + const std::string& getUnitName() const { return unit_name; } - const P getUnitMagnitude() { - return unit_magnitude; - } + P getUnitMagnitude() const { return unit_magnitude; } - const std::string getLog() { - return Logger::GetLog(); - } + std::string getLog() const { return Logger::GetLog(); } - IfcParse::IfcFile* getFile() { - return ifc_file; - } + IfcParse::IfcFile* getFile() const { return ifc_file; } + /// @note Entity names are handled case-insensitively. void includeEntities(const std::set& entities) { populate_set(entities); include_entities_in_processing = true; } + /// @note Entity names are handled case-insensitively. void excludeEntities(const std::set& entities) { populate_set(entities); include_entities_in_processing = false; } + /// @note Arbitrary names or wildcard expressions are handled case-sensitively. + void include_entity_names(const std::vector& names) + { + names_to_include_or_exclude.clear(); + foreach(const std::string &name, names) + names_to_include_or_exclude.insert(IfcUtil::wildcard_string_to_regex(name)); + include_entities_in_processing = true; + } + + /// @note Arbitrary names or wildcard expressions are handled case-sensitively. + void exclude_entity_names(const std::vector& names) + { + names_to_include_or_exclude.clear(); + foreach(const std::string &name, names) + names_to_include_or_exclude.insert(IfcUtil::wildcard_string_to_regex(name)); + include_entities_in_processing = false; + } + + const gp_XYZ& bounds_min() const { return bounds_min_; } + const gp_XYZ& bounds_max() const { return bounds_max_; } + private: // Move to the next IfcRepresentation void _nextShape() { + // In order to conserve memory and reduce cache insertion times, the cache is + // cleared after an arbitary number of processed representations. This has been + // benchmarked extensively: https://github.com/IfcOpenShell/IfcOpenShell/pull/47 + static const int clear_interval = 64; + if (done % clear_interval == clear_interval - 1) { + kernel.purge_cache(); + } ifcproducts.reset(); ++ representation_iterator; ++ done; } + std::set mapped_representations_processed; + BRepElement

* create_shape_model_for_next_entity() { - while ( true ) { + for (;;) { IfcSchema::IfcRepresentation* representation; // Have we reached the end of our list of representations? @@ -298,47 +352,158 @@ namespace IfcGeom { // Has the list of IfcProducts for this representation been initialized? if (!ifcproducts) { - IfcSchema::IfcProductRepresentation::list::ptr prodreps = representation->OfProductRepresentation(); ifcproducts = IfcSchema::IfcProduct::list::ptr(new IfcSchema::IfcProduct::list); IfcSchema::IfcProduct::list::ptr unfiltered_products(new IfcSchema::IfcProduct::list); - for ( IfcSchema::IfcProductRepresentation::list::it it = prodreps->begin(); it != prodreps->end(); ++it ) { - if ( (*it)->is(IfcSchema::Type::IfcProductDefinitionShape) ) { - IfcSchema::IfcProductDefinitionShape* pds = (IfcSchema::IfcProductDefinitionShape*)*it; - unfiltered_products->push(pds->ShapeOfProduct()); - } else { - // http://buildingsmart-tech.org/ifc/IFC2x3/TC1/html/ifcrepresentationresource/lexical/ifcproductrepresentation.htm - // IFC2x Edition 3 NOTE Users should not instantiate the entity IfcProductRepresentation from IFC2x Edition 3 onwards. - // It will be changed into an ABSTRACT supertype in future releases of IFC. + { + IfcSchema::IfcProductRepresentation::list::ptr prodreps = representation->OfProductRepresentation(); - // IfcProductRepresentation also lacks the INVERSE relation to IfcProduct - // Let's find the IfcProducts that reference the IfcProductRepresentation anyway - unfiltered_products->push((*it)->entity->getInverse(IfcSchema::Type::IfcProduct, -1)->as()); + for (IfcSchema::IfcProductRepresentation::list::it it = prodreps->begin(); it != prodreps->end(); ++it) { + if ((*it)->is(IfcSchema::Type::IfcProductDefinitionShape)) { + IfcSchema::IfcProductDefinitionShape* pds = (IfcSchema::IfcProductDefinitionShape*)*it; + unfiltered_products->push(pds->ShapeOfProduct()); + } + else { + // http://buildingsmart-tech.org/ifc/IFC2x3/TC1/html/ifcrepresentationresource/lexical/ifcproductrepresentation.htm + // IFC2x Edition 3 NOTE Users should not instantiate the entity IfcProductRepresentation from IFC2x Edition 3 onwards. + // It will be changed into an ABSTRACT supertype in future releases of IFC. + + // IfcProductRepresentation also lacks the INVERSE relation to IfcProduct + // Let's find the IfcProducts that reference the IfcProductRepresentation anyway + unfiltered_products->push((*it)->entity->getInverse(IfcSchema::Type::IfcProduct, -1)->as()); + } } + } - // Filter the products based on the set of entities being included or excluded for - // processing. The set is iterated over te able to filter on subtypes. - for ( IfcSchema::IfcProduct::list::it it = unfiltered_products->begin(); it != unfiltered_products->end(); ++it ) { - bool found = false; - for (std::set::const_iterator jt = entities_to_include_or_exclude.begin(); jt != entities_to_include_or_exclude.end(); ++jt) { - if ((*it)->is(*jt)) { - found = true; - break; + const int repid = representation->entity->id(); + + bool has_openings = false; + for (IfcSchema::IfcProduct::list::it it = unfiltered_products->begin(); it != unfiltered_products->end(); ++it) { + if (kernel.find_openings(*it)->size()) { + has_openings = true; + break; + } + } + + // With world coords enabled, object transformations are directly applied to + // the BRep. There is no way to re-use the geometry for multiple products. + const bool process_maps_for_current_representation = !settings.get(IteratorSettings::USE_WORLD_COORDS) && + (!has_openings || settings.get(IteratorSettings::DISABLE_OPENING_SUBTRACTIONS)); + bool representation_processed_as_mapped_item = false; + + IfcSchema::IfcRepresentation* representation_mapped_to = 0; + + if (process_maps_for_current_representation) { + IfcSchema::IfcRepresentationItem::list::ptr items = representation->Items(); + if (items->size() == 1) { + IfcSchema::IfcRepresentationItem* item = *items->begin(); + if (item->is(IfcSchema::Type::IfcMappedItem)) { + if (item->StyledByItem()->size() == 0) { + IfcSchema::IfcMappedItem* mapped_item = item->as(); + if (kernel.is_identity_transform(mapped_item->MappingTarget())) { + IfcSchema::IfcRepresentationMap* map = mapped_item->MappingSource(); + if (kernel.is_identity_transform(map->MappingOrigin())) { + representation_mapped_to = map->MappedRepresentation(); + IfcSchema::IfcProductRepresentation::list::ptr prodreps = representation_mapped_to->OfProductRepresentation(); + + bool all_product_without_openings = true; + IfcSchema::IfcProduct::list::ptr products; + + for (IfcSchema::IfcProductRepresentation::list::it it = prodreps->begin(); it != prodreps->end(); ++it) { + IfcSchema::IfcProduct::list::ptr products_of_prodrep = (*it)->entity->getInverse(IfcSchema::Type::IfcProduct, -1)->as(); + products->push(products_of_prodrep); + for (IfcSchema::IfcProduct::list::it jt = products_of_prodrep->begin(); jt != products_of_prodrep->end(); ++jt) { + if (kernel.find_openings(*jt)->size() > 0 && !settings.get(IteratorSettings::DISABLE_OPENING_SUBTRACTIONS)) { + all_product_without_openings = false; + break; + } + } + } + + if (all_product_without_openings) { + representation_processed_as_mapped_item = true; + } + } + } } } - if (found == include_entities_in_processing) { - ifcproducts->push(*it); - } + } + } + + if (representation_mapped_to) { + if (mapped_representations_processed.find(representation_mapped_to) != mapped_representations_processed.end()) { + _nextShape(); + continue; } + mapped_representations_processed.insert(representation_mapped_to); } - // Does this representation have any IfcProducts? - if (!ifcproducts->size()) { + + if (representation_processed_as_mapped_item) { _nextShape(); continue; } + + IfcSchema::IfcRepresentationMap::list::ptr maps = representation->RepresentationMap(); + + if (process_maps_for_current_representation && maps->size() == 1) { + IfcSchema::IfcRepresentationMap* map = *maps->begin(); + if (kernel.is_identity_transform(map->MappingOrigin())) { + IfcSchema::IfcMappedItem::list::ptr items = map->MapUsage(); + for (IfcSchema::IfcMappedItem::list::it it = items->begin(); it != items->end(); ++it) { + IfcSchema::IfcMappedItem* item = *it; + if (item->StyledByItem()->size() != 0) continue; + + if (!kernel.is_identity_transform(item->MappingTarget())) { + continue; + } + + IfcSchema::IfcRepresentation::list::ptr reps = item->entity->getInverse(IfcSchema::Type::IfcRepresentation, -1)->as(); + for (IfcSchema::IfcRepresentation::list::it jt = reps->begin(); jt != reps->end(); ++jt) { + IfcSchema::IfcRepresentation* rep = *jt; + if (rep->Items()->size() != 1) continue; + IfcSchema::IfcProductRepresentation::list::ptr prodreps = rep->OfProductRepresentation(); + for (IfcSchema::IfcProductRepresentation::list::it kt = prodreps->begin(); kt != prodreps->end(); ++kt) { + IfcSchema::IfcProduct::list::ptr prods = (*kt)->entity->getInverse(IfcSchema::Type::IfcProduct, -1)->as(); + for (IfcSchema::IfcProduct::list::it lt = prods->begin(); lt != prods->end(); ++lt) { + if (kernel.find_openings(*lt)->size() == 0 || settings.get(IteratorSettings::DISABLE_OPENING_SUBTRACTIONS)) { + if (!unfiltered_products->contains(*lt)) { + unfiltered_products->push(*lt); + } + } + } + } + } + } + } + } + + // Filter the products based on the set of entities being included or excluded for + // processing. The set is iterated over to able to filter on subtypes. + for ( IfcSchema::IfcProduct::list::it jt = unfiltered_products->begin(); jt != unfiltered_products->end(); ++jt ) { + bool found = false; + for (std::set::const_iterator kt = entities_to_include_or_exclude.begin(); kt != entities_to_include_or_exclude.end(); ++kt) { + if ((*jt)->is(*kt)) { + found = true; + break; + } + } + + foreach(const boost::regex& r, names_to_include_or_exclude) { + if (boost::regex_match((*jt)->Name(), r)) { + found = true; + break; + } + } + + if (found == include_entities_in_processing) { + ifcproducts->push(*jt); + } + } + ifcproduct_iterator = ifcproducts->begin(); } + // Have we reached the end of our list of IfcProducts? if ( ifcproduct_iterator == ifcproducts->end() ) { _nextShape(); @@ -346,8 +511,13 @@ namespace IfcGeom { } IfcSchema::IfcProduct* product = *ifcproduct_iterator; - - BRepElement

* element = kernel.create_brep_for_representation_and_product

(settings, representation, product); + + BRepElement

* element; + if (ifcproduct_iterator == ifcproducts->begin() || !settings.get(IteratorSettings::USE_WORLD_COORDS)) { + element = kernel.create_brep_for_representation_and_product

(settings, representation, product); + } else { + element = kernel.create_brep_for_processed_representation(settings, representation, product, current_shape_model); + } if ( !element ) { _nextShape(); @@ -358,9 +528,7 @@ namespace IfcGeom { } } - public: - - bool next() { + void free_shapes() { // Free all possible representations of the current geometrical entity delete current_triangulation; current_triangulation = 0; @@ -368,7 +536,11 @@ namespace IfcGeom { current_serialization = 0; delete current_shape_model; current_shape_model = 0; - + } + + public: + + bool next() { // Increment the iterator over the list of products using the current // shape representation if (ifcproducts) { @@ -378,13 +550,16 @@ namespace IfcGeom { return create(); } - Element

* get() { - // TODO: Test settings and throw - if (current_triangulation) return current_triangulation; - else if (current_serialization) return current_serialization; - else if (current_shape_model) return current_shape_model; - else return 0; - } + /// Gets the representation of the current geometrical entity. + Element

* get() + { + // TODO: Test settings and throw + Element

* ret = 0; + if (current_triangulation) { ret = current_triangulation; } + else if (current_serialization) { ret = current_serialization; } + else if (current_shape_model) { ret = current_shape_model; } + return ret; + } const Element

* getObject(int id) { @@ -422,23 +597,45 @@ namespace IfcGeom { } bool create() { + bool success = true; + + IfcGeom::BRepElement

* next_shape_model = 0; + IfcGeom::SerializedElement

* next_serialization = 0; + IfcGeom::TriangulationElement

* next_triangulation = 0; + try { - current_shape_model = create_shape_model_for_next_entity(); + next_shape_model = create_shape_model_for_next_entity(); } catch (...) {} - if (!current_shape_model) return false; - if (settings.use_brep_data()) { - try { - current_serialization = new SerializedElement

(*current_shape_model); - } catch (...) {} - return !!current_serialization; - } else if (!settings.disable_triangulation()) { - try { - current_triangulation = new TriangulationElement

(*current_shape_model); - } catch (...) {} - return !!current_triangulation; + + if (next_shape_model) { + if (settings.get(IteratorSettings::USE_BREP_DATA)) { + try { + next_serialization = new SerializedElement

(*next_shape_model); + } catch (...) { + success = false; + } + } else if (!settings.get(IteratorSettings::DISABLE_TRIANGULATION)) { + try { + if (ifcproduct_iterator == ifcproducts->begin() || settings.get(IteratorSettings::USE_WORLD_COORDS)) { + next_triangulation = new TriangulationElement

(*next_shape_model); + } else { + next_triangulation = new TriangulationElement

(*next_shape_model, current_triangulation->geometry_pointer()); + } + } catch (...) { + success = false; + } + } } else { - return true; + success = false; } + + free_shapes(); + + current_shape_model = next_shape_model; + current_serialization = next_serialization; + current_triangulation = next_triangulation; + + return success; } private: void _initialize() { @@ -453,8 +650,9 @@ namespace IfcGeom { unit_name = "METER"; unit_magnitude = 1.f; - kernel.setValue(IfcGeom::Kernel::GV_MAX_FACES_TO_SEW, settings.sew_shells() ? 1000 : -1); - kernel.setValue(IfcGeom::Kernel::GV_DIMENSIONALITY, (settings.include_curves() ? (settings.exclude_solids_and_surfaces() ? -1. : 0.) : +1.)); + kernel.setValue(IfcGeom::Kernel::GV_MAX_FACES_TO_SEW, settings.get(IteratorSettings::SEW_SHELLS) ? 1000 : -1); + kernel.setValue(IfcGeom::Kernel::GV_DIMENSIONALITY, (settings.get(IteratorSettings::INCLUDE_CURVES) + ? (settings.get(IteratorSettings::EXCLUDE_SOLIDS_AND_SURFACES) ? -1. : 0.) : +1.)); } bool owns_ifc_file; @@ -496,12 +694,7 @@ namespace IfcGeom { delete ifc_file; } - delete current_triangulation; - current_triangulation = 0; - delete current_serialization; - current_serialization = 0; - delete current_shape_model; - current_shape_model = 0; + free_shapes(); } }; } diff --git a/src/ifcgeom/IfcGeomIteratorSettings.h b/src/ifcgeom/IfcGeomIteratorSettings.h index 1d1a385a37..8e9f86b695 100644 --- a/src/ifcgeom/IfcGeomIteratorSettings.h +++ b/src/ifcgeom/IfcGeomIteratorSettings.h @@ -20,168 +20,147 @@ #ifndef IFCGEOMITERATORSETTINGS_H #define IFCGEOMITERATORSETTINGS_H -#include - #include "../ifcparse/IfcException.h" +#include "../ifcparse/IfcUtil.h" -namespace IfcGeom { +namespace IfcGeom +{ + class IteratorSettings + { + public: + /// Enumeration of setting identifiers. These settings define the + /// behaviour of various aspects of IfcOpenShell. + enum Setting + { + /// Specifies whether vertices are welded, meaning that the coordinates + /// vector will only contain unique xyz-triplets. This results in a + /// manifold mesh which is useful for modelling applications, but might + /// result in unwanted shading artifacts in rendering applications. + WELD_VERTICES = 1, + /// Specifies whether to apply the local placements of building elements + /// directly to the coordinates of the representation mesh rather than + /// to represent the local placement in the 4x3 matrix, which will in that + /// case be the identity matrix. + USE_WORLD_COORDS = 1 << 1, + /// Internally IfcOpenShell measures everything in meters. This settings + /// specifies whether to convert IfcGeomObjects back to the units in which + /// the geometry in the IFC file is specified. + CONVERT_BACK_UNITS = 1 << 2, + /// Specifies whether to use the Open Cascade BREP format for representation + /// items rather than to create triangle meshes. This is useful is IfcOpenShell + /// is used as a library in an application that is also built on Open Cascade. + USE_BREP_DATA = 1 << 3, + /// Specifies whether to sew IfcConnectedFaceSets (open and closed shells) to + /// TopoDS_Shells or whether to keep them as a loose collection of faces. + SEW_SHELLS = 1 << 4, + /// Specifies whether to compose IfcOpeningElements into a single compound + /// in order to speed up the processing of opening subtractions. + FASTER_BOOLEANS = 1 << 5, + /// Disables the subtraction of IfcOpeningElement representations from + /// the related building element representations. + DISABLE_OPENING_SUBTRACTIONS = 1 << 6, + /// Disables the triangulation of the topological representations. Useful if + /// the client application understands Open Cascade's native format. + DISABLE_TRIANGULATION = 1 << 7, + /// Applies default materials to entity instances without a surface style. + APPLY_DEFAULT_MATERIALS = 1 << 8, + /// Specifies whether to include subtypes of IfcCurve. + INCLUDE_CURVES = 1 << 9, + /// Specifies whether to exclude subtypes of IfcSolidModel and IfcSurface. + EXCLUDE_SOLIDS_AND_SURFACES = 1 << 10, + /// Disables computation of normals. Saves time and file size and is useful + /// in instances where you're going to recompute normals for the exported + /// model in other modelling application in any case. + NO_NORMALS = 1 << 11, + /// Use entity names instead of unique IDs for naming elements. + /// Applicable for OBJ, DAE, and SVG output. + USE_ELEMENT_NAMES = 1 << 12, + /// Use entity GUIDs instead of unique IDs for naming elements. + /// Applicable for OBJ, DAE, and SVG output. + USE_ELEMENT_GUIDS = 1 << 13, + /// Use material names instead of unique IDs for naming materials. + /// Applicable for OBJ and DAE output. + USE_MATERIAL_NAMES = 1 << 14, + /// Centers the models upon serialization by the applying the center point of + /// the scene bounds as an offset. Applicable only for DAE output currently. + CENTER_MODEL = 1 << 15, + /// Generates UVs by using simple box projection. Requires normals. + /// Applicable only for DAE output currently. + GENERATE_UVS = 1 << 16, + /// Specifies whether to slide representations according to associated IfcLayerSets. + APPLY_LAYERSETS = 1 << 17, + /// Number of different setting flags. + NUM_SETTINGS = 17 + }; + /// Used to store logical OR combination of setting flags. + typedef unsigned SettingField; - class IteratorSettings { - public: - // Enumeration of setting identifiers. These settings define the - // behaviour of various aspects of IfcOpenShell. + IteratorSettings() + : settings_(WELD_VERTICES) // OR options that default to true here + , deflection_tolerance_(1.e-3) + { + memset(offset, 0, sizeof(offset)); + } - // Specifies whether vertices are welded, meaning that the coordinates - // vector will only contain unique xyz-triplets. This results in a - // manifold mesh which is useful for modelling applications, but might - // result in unwanted shading artifacts in rendering applications. - static const int WELD_VERTICES = 1; - // Specifies whether to apply the local placements of building elements - // directly to the coordinates of the representation mesh rather than - // to represent the local placement in the 4x3 matrix, which will in that - // case be the identity matrix. - static const int USE_WORLD_COORDS = 2; - // Internally IfcOpenShell measures everything in meters. This settings - // specifies whether to convert IfcGeomObjects back to the units in which - // the geometry in the IFC file is specified. - static const int CONVERT_BACK_UNITS = 3; - // Specifies whether to use the Open Cascade BREP format for representation - // items rather than to create triangle meshes. This is useful is IfcOpenShell - // is used as a library in an application that is also built on Open Cascade. - static const int USE_BREP_DATA = 4; - // Specifies whether to sew IfcConnectedFaceSets (open and closed shells) to - // TopoDS_Shells or whether to keep them as a loose collection of faces. - static const int SEW_SHELLS = 5; - // Specifies whether to compose IfcOpeningElements into a single compound - // in order to speed up the processing of opening subtractions. - static const int FASTER_BOOLEANS = 6; - // Disables the subtraction of IfcOpeningElement representations from - // the related building element representations. - static const int DISABLE_OPENING_SUBTRACTIONS = 8; - // Disables the triangulation of the topological representations. Useful if - // the client application understands Open Cascade's native format. - static const int DISABLE_TRIANGULATION = 9; - // Applies default materials to entity instances without a surface style. - static const int APPLY_DEFAULT_MATERIALS = 10; - // Specifies whether to include subtypes of IfcCurve. - static const int INCLUDE_CURVES = 11; - // Specifies whether to exclude subtypes of IfcSolidModel and IfcSurface. - static const int EXCLUDE_SOLIDS_AND_SURFACES = 12; - // Specifies whether to slide representations according to associated IfcLayerSets. - static const int APPLY_LAYERSETS = 13; + /// Optional offset that is applied to serialized objects, (0,0,0) by default. + double offset[3]; - // End of settings enumeration. + /// Note that this is independent of the IFC length unit, one millimeter by default. + double deflection_tolerance() const { return deflection_tolerance_; } - private: - bool _weld_vertices, _use_world_coords, _convert_back_units, _use_brep_data, _sew_shells, _faster_booleans, _disable_opening_subtractions, _disable_triangulation, _apply_default_materials, _include_curves, _exclude_solids_and_surfaces, _apply_layersets; - double _deflection_tolerance; - public: - IteratorSettings() - : _weld_vertices(true) - , _use_world_coords(false) - , _convert_back_units(false) - , _use_brep_data(false) - , _sew_shells(false) - , _faster_booleans(false) - , _disable_opening_subtractions(false) - , _disable_triangulation(false) - , _apply_default_materials(false) - , _include_curves(false) - , _exclude_solids_and_surfaces(false) - , _apply_layersets(false) - // TODO: Make deflection tolerance into a command line argument - // For now, stick to one millimeter. Note that this is independent of the IFC length unit. - , _deflection_tolerance(1.e-3) - {} + void set_deflection_tolerance(double value) + { + /// @todo Using deflection tolerance of 1e-6 or smaller hangs the conversion, research more in-depth. + /// This bug can be reproduced e.g. with the Duplex model that can be found from http://www.nibs.org/?page=bsa_commonbimfiles#project1 + deflection_tolerance_ = value; + if (deflection_tolerance_ <= 1e-6) { + Logger::Message(Logger::LOG_WARNING, "Deflection tolerance cannot be set to <= 1e-6; using the default value 1e-3"); + deflection_tolerance_ = 1e-3; + } + } - const bool& weld_vertices() const { return _weld_vertices; } - bool& weld_vertices() { return _weld_vertices; } - const bool& use_world_coords() const { return _use_world_coords; } - bool& use_world_coords() { return _use_world_coords; } - const bool& convert_back_units() const { return _convert_back_units; } - bool& convert_back_units() { return _convert_back_units; } - const bool& use_brep_data() const { return _use_brep_data; } - bool& use_brep_data() { return _use_brep_data; } - const bool& sew_shells() const { return _sew_shells; } - bool& sew_shells() { return _sew_shells; } - const bool& faster_booleans() const { return _faster_booleans; } - bool& faster_booleans() { return _faster_booleans; } - const bool& disable_opening_subtractions() const { return _disable_opening_subtractions; } - bool& disable_opening_subtractions() { return _disable_opening_subtractions; } - const bool& disable_triangulation() const { return _disable_triangulation; } - bool& disable_triangulation() { return _disable_triangulation; } - const bool& apply_default_materials() const { return _apply_default_materials; } - bool& apply_default_materials() { return _apply_default_materials; } - const bool& include_curves() const { return _include_curves; } - bool& include_curves() { return _include_curves; } - const bool& exclude_solids_and_surfaces() const { return _exclude_solids_and_surfaces; } - bool& exclude_solids_and_surfaces() { return _exclude_solids_and_surfaces; } - const bool& apply_layersets() const { return _apply_layersets; } - bool& apply_layersets() { return _apply_layersets; } - - const double& deflection_tolerance() const { return _deflection_tolerance; } - double& deflection_tolerance() { return _deflection_tolerance; } - - void set(int setting, bool value) { - switch (setting) { - case USE_WORLD_COORDS: - _use_world_coords = value; - break; - case WELD_VERTICES: - _weld_vertices = value; - break; - case CONVERT_BACK_UNITS: - _convert_back_units = value; - break; - case USE_BREP_DATA: - _use_brep_data = value; - break; - case FASTER_BOOLEANS: - _faster_booleans = value; - break; - case SEW_SHELLS: - _sew_shells = value; - break; - case DISABLE_OPENING_SUBTRACTIONS: - _disable_opening_subtractions = value; - break; - case DISABLE_TRIANGULATION: - _disable_triangulation = value; - break; - case APPLY_DEFAULT_MATERIALS: - _apply_default_materials = value; - break; - case INCLUDE_CURVES: - _include_curves = value; - break; - case EXCLUDE_SOLIDS_AND_SURFACES: - _exclude_solids_and_surfaces = value; - break; - case APPLY_LAYERSETS: - _apply_layersets = value; - break; - default: throw IfcParse::IfcException("Invalid IteratorSetting"); - } - } - }; - - class ElementSettings : public IteratorSettings { - private: - double _unit_magnitude; - std::string _element_type; - public: - ElementSettings(const IteratorSettings& settings, - double unit_magnitude, - const std::string& element_type) - : IteratorSettings(settings) - , _unit_magnitude(unit_magnitude) - , _element_type(element_type) - {} + /// Get boolean value for a single settings or for a combination of settings. + bool get(SettingField setting) const + { + /// @todo If unknown setting value/combination: throw IfcParse::IfcException("Invalid IteratorSetting")? + return (settings_ & setting) != 0; + } - const double& unit_magnitude() const { return _unit_magnitude; } - const std::string& element_type() const { return _element_type; } - }; + /// Set boolean value for a single settings or for a combination of settings. + void set(SettingField setting, bool value) + { + /// @todo If unknown setting value/combination: throw IfcParse::IfcException("Invalid IteratorSetting")? + if (value) { + settings_ |= setting; + } else { + settings_ &= ~setting; + } + } + protected: + SettingField settings_; + double deflection_tolerance_; + }; + + class ElementSettings : public IteratorSettings + { + public: + ElementSettings(const IteratorSettings& settings, + double unit_magnitude, + const std::string& element_type) + : IteratorSettings(settings) + , unit_magnitude_(unit_magnitude) + , element_type_(element_type) + { + } + + double unit_magnitude() const { return unit_magnitude_; } + const std::string& element_type() const { return element_type_; } + + private: + double unit_magnitude_; + std::string element_type_; + }; } -#endif \ No newline at end of file +#endif diff --git a/src/ifcgeom/IfcGeomMaterial.cpp b/src/ifcgeom/IfcGeomMaterial.cpp index b96eeebcc6..3593ed7673 100644 --- a/src/ifcgeom/IfcGeomMaterial.cpp +++ b/src/ifcgeom/IfcGeomMaterial.cpp @@ -30,5 +30,6 @@ const double* IfcGeom::Material::diffuse() const { if (hasDiffuse()) return &((* const double* IfcGeom::Material::specular() const { if (hasSpecular()) return &((*style->Specular()).R()); else return black; } double IfcGeom::Material::transparency() const { if (hasTransparency()) return *style->Transparency(); else return 0; } double IfcGeom::Material::specularity() const { if (hasSpecularity()) return *style->Specularity(); else return 0; } -const std::string IfcGeom::Material::name() const { return style->Name(); } +const std::string &IfcGeom::Material::name() const { return style->Name(); } +const std::string &IfcGeom::Material::original_name() const { return style->original_name(); } bool IfcGeom::Material::operator==(const IfcGeom::Material& other) const { return style == other.style; } diff --git a/src/ifcgeom/IfcGeomMaterial.h b/src/ifcgeom/IfcGeomMaterial.h index 43228c2d00..9dc4dd7995 100644 --- a/src/ifcgeom/IfcGeomMaterial.h +++ b/src/ifcgeom/IfcGeomMaterial.h @@ -41,10 +41,11 @@ namespace IfcGeom { const double* specular() const; double transparency() const; double specularity() const; - const std::string name() const; + const std::string &name() const; + const std::string &original_name() const; bool operator==(const Material& other) const; }; } -#endif \ No newline at end of file +#endif diff --git a/src/ifcgeom/IfcGeomRenderStyles.cpp b/src/ifcgeom/IfcGeomRenderStyles.cpp index 7f03295e0d..39c0d4ef37 100644 --- a/src/ifcgeom/IfcGeomRenderStyles.cpp +++ b/src/ifcgeom/IfcGeomRenderStyles.cpp @@ -21,7 +21,7 @@ #include "IfcGeom.h" -bool process_colour(IfcSchema::IfcColourRgb* colour, std::tr1::array& rgb) { +bool process_colour(IfcSchema::IfcColourRgb* colour, double* rgb) { if (colour != 0) { rgb[0] = colour->Red(); rgb[1] = colour->Green(); @@ -30,7 +30,7 @@ bool process_colour(IfcSchema::IfcColourRgb* colour, std::tr1::array& return colour != 0; } -bool process_colour(IfcSchema::IfcNormalisedRatioMeasure* factor, std::tr1::array& rgb) { +bool process_colour(IfcSchema::IfcNormalisedRatioMeasure* factor, double* rgb) { if (factor != 0) { const double f = *factor; rgb[0] = rgb[1] = rgb[2] = f; @@ -38,7 +38,7 @@ bool process_colour(IfcSchema::IfcNormalisedRatioMeasure* factor, std::tr1::arra return factor != 0; } -bool process_colour(IfcSchema::IfcColourOrFactor* colour_or_factor, std::tr1::array& rgb) { +bool process_colour(IfcSchema::IfcColourOrFactor* colour_or_factor, double* rgb) { if (colour_or_factor == 0) { return false; } else if (colour_or_factor->is(IfcSchema::Type::IfcColourRgb)) { @@ -55,8 +55,8 @@ const IfcGeom::SurfaceStyle* IfcGeom::Kernel::internalize_surface_style(const st return 0; } int surface_style_id = shading_styles.first->entity->id(); - std::map::const_iterator it = cache.Style.find(surface_style_id); - if (it != cache.Style.end()) { + std::map::const_iterator it = style_cache.find(surface_style_id); + if (it != style_cache.end()) { return &(it->second); } SurfaceStyle surface_style; @@ -65,7 +65,7 @@ const IfcGeom::SurfaceStyle* IfcGeom::Kernel::internalize_surface_style(const st } else { surface_style = SurfaceStyle(surface_style_id); } - std::tr1::array rgb; + double rgb[3]; if (process_colour(shading_styles.second->SurfaceColour(), rgb)) { surface_style.Diffuse().reset(SurfaceStyle::ColorComponent(rgb[0], rgb[1], rgb[2])); } @@ -103,7 +103,7 @@ const IfcGeom::SurfaceStyle* IfcGeom::Kernel::internalize_surface_style(const st surface_style.Transparency().reset(d); } } - return &(cache.Style[surface_style_id] = surface_style); + return &(style_cache[surface_style_id] = surface_style); } const IfcGeom::SurfaceStyle* IfcGeom::Kernel::get_style(const IfcSchema::IfcRepresentationItem* item) { diff --git a/src/ifcgeom/IfcGeomRenderStyles.h b/src/ifcgeom/IfcGeomRenderStyles.h index cd8d771246..4c97b06406 100644 --- a/src/ifcgeom/IfcGeomRenderStyles.h +++ b/src/ifcgeom/IfcGeomRenderStyles.h @@ -20,16 +20,6 @@ #ifndef IFCGEOMRENDERSTYLES_H #define IFCGEOMRENDERSTYLES_H -#ifdef __GNUC__ -#include -#else -#if _MSC_VER < 1600 -#include -#else -#include -#endif -#endif - #ifdef USE_IFC4 #include "../ifcparse/Ifc4.h" #else @@ -41,7 +31,7 @@ namespace IfcGeom { public: class ColorComponent { private: - std::tr1::array data; + double data[3]; public: ColorComponent(double r, double g, double b) { data[0] = r; data[1] = g; data[2] = b; @@ -54,22 +44,22 @@ namespace IfcGeom { double& B() { return data[2]; } }; private: - boost::optional name; + std::string name; + std::string original_name_; boost::optional id; boost::optional diffuse, specular; boost::optional transparency; boost::optional specularity; public: - SurfaceStyle() { - this->name = "surface-style"; - } + SurfaceStyle() : name("surface-style") {} SurfaceStyle(int id) : id(id) { std::stringstream sstr; sstr << "surface-style-" << id; this->name = sstr.str(); } - SurfaceStyle(const std::string& name) : name(name) {} - SurfaceStyle(int id, const std::string& name) : id(id) { + SurfaceStyle(const std::string& name) : name(name), original_name_(name) {} + SurfaceStyle(int id, const std::string& name) : id(id), original_name_(name) + { std::stringstream sstr; std::string sanitized = name; std::transform(sanitized.begin(), sanitized.end(), sanitized.begin(), ::tolower); @@ -83,16 +73,14 @@ namespace IfcGeom { // pointer addresses of the styles, as they are always referenced // from out of a global map of some sort. bool operator==(const SurfaceStyle& other) { - if (name && other.name) { - return *name == *other.name; - } else if (id && other.id) { - return *id == *other.id; - } else { - return false; - } + return name == other.name; } - const std::string& Name() const { return *name; } + /// ID name, e.g. "surface-style-66675-metal---aluminium" + const std::string& Name() const { return name; } + + /// Original name, if available, e.g. "Metal - Aluminium" + const std::string& original_name() const { return original_name_; } const boost::optional& Diffuse() const { return diffuse; } const boost::optional& Specular() const { return specular; } @@ -107,4 +95,4 @@ namespace IfcGeom { const SurfaceStyle* get_default_style(const std::string& ifc_type); } -#endif \ No newline at end of file +#endif diff --git a/src/ifcgeom/IfcGeomRepresentation.cpp b/src/ifcgeom/IfcGeomRepresentation.cpp index 15801265ae..06e5266cac 100644 --- a/src/ifcgeom/IfcGeomRepresentation.cpp +++ b/src/ifcgeom/IfcGeomRepresentation.cpp @@ -38,7 +38,24 @@ IfcGeom::Representation::Serialization::Serialization(const BRep& brep) for (IfcGeom::IfcRepresentationShapeItems::const_iterator it = brep.begin(); it != brep.end(); ++ it) { const TopoDS_Shape& s = it->Shape(); gp_GTrsf trsf = it->Placement(); - if (settings().convert_back_units()) { + + if (it->hasStyle() && it->Style().Diffuse()) { + const IfcGeom::SurfaceStyle::ColorComponent& clr = *it->Style().Diffuse(); + _surface_styles.push_back(clr.R()); + _surface_styles.push_back(clr.G()); + _surface_styles.push_back(clr.B()); + } else { + _surface_styles.push_back(-1.); + _surface_styles.push_back(-1.); + _surface_styles.push_back(-1.); + } + if (it->hasStyle() && it->Style().Transparency()) { + _surface_styles.push_back(1. - *it->Style().Transparency()); + } else { + _surface_styles.push_back(1.); + } + + if (settings().get(IteratorSettings::CONVERT_BACK_UNITS)) { gp_Trsf scale; scale.SetScaleFactor(1.0 / settings().unit_magnitude()); trsf.PreMultiply(scale); diff --git a/src/ifcgeom/IfcGeomRepresentation.h b/src/ifcgeom/IfcGeomRepresentation.h index bd7abee278..4c7d3a0578 100644 --- a/src/ifcgeom/IfcGeomRepresentation.h +++ b/src/ifcgeom/IfcGeomRepresentation.h @@ -28,6 +28,7 @@ #include #include +#include #include #include @@ -41,6 +42,8 @@ namespace IfcGeom { namespace Representation { class Representation { + Representation(const Representation&); //N/A + Representation& operator =(const Representation&); //N/A protected: const ElementSettings _settings; public: @@ -74,9 +77,11 @@ namespace IfcGeom { private: int _id; std::string _brep_data; + std::vector _surface_styles; public: int id() const { return _id; } const std::string& brep_data() const { return _brep_data; } + const std::vector& surface_styles() const { return _surface_styles; } Serialization(const BRep& brep); virtual ~Serialization() {} private: @@ -100,6 +105,7 @@ namespace IfcGeom { std::vector _faces; std::vector _edges; std::vector

_normals; + std::vector

uvs_; std::vector _material_ids; std::vector _materials; VertexKeyMap welds; @@ -110,39 +116,41 @@ namespace IfcGeom { const std::vector& faces() const { return _faces; } const std::vector& edges() const { return _edges; } const std::vector

& normals() const { return _normals; } + const std::vector

& uvs() const { return uvs_; } const std::vector& material_ids() const { return _material_ids; } const std::vector& materials() const { return _materials; } + Triangulation(const BRep& shape_model) : Representation(shape_model.settings()) , _id(shape_model.getId()) { - for ( IfcGeom::IfcRepresentationShapeItems::const_iterator it = shape_model.begin(); it != shape_model.end(); ++ it ) { + for ( IfcGeom::IfcRepresentationShapeItems::const_iterator iit = shape_model.begin(); iit != shape_model.end(); ++ iit ) { int surface_style_id = -1; - if (it->hasStyle()) { - Material adapter(&it->Style()); + if (iit->hasStyle()) { + Material adapter(&iit->Style()); std::vector::const_iterator jt = std::find(_materials.begin(), _materials.end(), adapter); if (jt == _materials.end()) { - surface_style_id = _materials.size(); + surface_style_id = (int)_materials.size(); _materials.push_back(adapter); } else { - surface_style_id = jt - _materials.begin(); + surface_style_id = (int)(jt - _materials.begin()); } } - if (settings().apply_default_materials() && surface_style_id == -1) { + if (settings().get(IteratorSettings::APPLY_DEFAULT_MATERIALS) && surface_style_id == -1) { Material material(IfcGeom::get_default_style(settings().element_type())); - std::vector::const_iterator it = std::find(_materials.begin(), _materials.end(), material); - if (it == _materials.end()) { - surface_style_id = _materials.size(); + std::vector::const_iterator mit = std::find(_materials.begin(), _materials.end(), material); + if (mit == _materials.end()) { + surface_style_id = (int)_materials.size(); _materials.push_back(material); } else { - surface_style_id = it - _materials.begin(); + surface_style_id = (int)(mit - _materials.begin()); } } - const TopoDS_Shape& s = it->Shape(); - const gp_GTrsf& trsf = it->Placement(); + const TopoDS_Shape& s = iit->Shape(); + const gp_GTrsf& trsf = iit->Placement(); // Triangulate the shape try { @@ -179,8 +187,9 @@ namespace IfcGeom { BRepGProp_Face prop(face); std::map dict; - // Vertex normals are only calculated if vertices are not welded - const bool calculate_normals = !settings().weld_vertices(); + // Vertex normals are only calculated if vertices are not welded and calculation is not disable explicitly. + const bool calculate_normals = !settings().get(IteratorSettings::WELD_VERTICES) && + !settings().get(IteratorSettings::NO_NORMALS); for( int i = 1; i <= nodes.Length(); ++ i ) { coords.push_back(nodes(i).Transformed(loc).XYZ()); @@ -233,25 +242,29 @@ namespace IfcGeom { addEdge(dict[n2], dict[n3], edgecount, edges_temp); addEdge(dict[n3], dict[n1], edgecount, edges_temp); } - for ( std::vector >::const_iterator it = edges_temp.begin(); it != edges_temp.end(); ++it ) { - if (edgecount[*it] == 1) { + for ( std::vector >::const_iterator jt = edges_temp.begin(); jt != edges_temp.end(); ++jt ) { + if (edgecount[*jt] == 1) { // non manifold edge, face boundary - _edges.push_back(it->first); - _edges.push_back(it->second); + _edges.push_back(jt->first); + _edges.push_back(jt->second); } } } } + if (!_normals.empty() && settings().get(IfcGeom::IteratorSettings::GENERATE_UVS)) { + uvs_ = box_project_uvs(_verts, _normals); + } + if (num_faces == 0) { // Edges are only emitted if there are no faces. A mixed representation of faces // and loose edges is discouraged by the standard. An alternative would be to use // TopExp::MapShapesAndAncestors() to find edges that do not belong to any face. - for (TopExp_Explorer exp(s, TopAbs_EDGE); exp.More(); exp.Next()) { - BRepAdaptor_Curve crv(TopoDS::Edge(exp.Current())); + for (TopExp_Explorer texp(s, TopAbs_EDGE); texp.More(); texp.Next()) { + BRepAdaptor_Curve crv(TopoDS::Edge(texp.Current())); GCPnts_QuasiUniformDeflection tessellater(crv, settings().deflection_tolerance()); int n = tessellater.NbPoints(); - int start = _verts.size() / 3; + int start = (int)_verts.size() / 3; for (int i = 1; i <= n; ++i) { gp_XYZ p = tessellater.Value(i).XYZ(); trsf.Transforms(p); @@ -270,17 +283,50 @@ namespace IfcGeom { } } + BRepTools::Clean(s); } } virtual ~Triangulation() {} + + /// Generates UVs for a single mesh using box projection. + /// @todo Very simple impl. Assumes that input vertices and normals match 1:1. + static std::vector

box_project_uvs(const std::vector

&vertices, const std::vector

&normals) + { + std::vector

uvs; + uvs.resize(vertices.size() / 3 * 2); + for (size_t uv_idx = 0, v_idx = 0; + uv_idx < uvs.size() && v_idx < vertices.size() && v_idx < normals.size(); + uv_idx += 2, v_idx += 3) { + + P n_x = normals[v_idx], n_y = normals[v_idx + 1], n_z = normals[v_idx + 2]; + P v_x = vertices[v_idx], v_y = vertices[v_idx + 1], v_z = vertices[v_idx + 2]; + + if (std::abs(n_x) > std::abs(n_y) && std::abs(n_x) > std::abs(n_z)) { + uvs[uv_idx] = v_z; + uvs[uv_idx + 1] = v_y; + } + if (std::abs(n_y) > std::abs(n_x) && std::abs(n_y) > std::abs(n_z)) { + uvs[uv_idx] = v_x; + uvs[uv_idx + 1] = v_z; + } + if (std::abs(n_z) > std::abs(n_x) && std::abs(n_z) > std::abs(n_y)) { + uvs[uv_idx] = v_x; + uvs[uv_idx + 1] = v_y; + } + } + + return uvs; + } + private: // Welds vertices that belong to different faces int addVertex(int material_index, const gp_XYZ& p) { - const P X = static_cast

(settings().convert_back_units() ? (p.X() / settings().unit_magnitude()) : p.X()); - const P Y = static_cast

(settings().convert_back_units() ? (p.Y() / settings().unit_magnitude()) : p.Y()); - const P Z = static_cast

(settings().convert_back_units() ? (p.Z() / settings().unit_magnitude()) : p.Z()); + const bool convert = settings().get(IteratorSettings::CONVERT_BACK_UNITS); + const P X = static_cast

(convert ? (p.X() / settings().unit_magnitude()) : p.X()); + const P Y = static_cast

(convert ? (p.Y() / settings().unit_magnitude()) : p.Y()); + const P Z = static_cast

(convert ? (p.Z() / settings().unit_magnitude()) : p.Z()); int i = (int) _verts.size() / 3; - if (settings().weld_vertices()) { + if (settings().get(IteratorSettings::WELD_VERTICES)) { const VertexKey key = std::make_pair(material_index, std::make_pair(X, std::make_pair(Y, Z))); typename VertexKeyMap::const_iterator it = welds.find(key); if ( it != welds.end() ) return it->second; @@ -306,4 +352,4 @@ namespace IfcGeom { } } -#endif \ No newline at end of file +#endif diff --git a/src/ifcgeom/IfcGeomShapes.cpp b/src/ifcgeom/IfcGeomShapes.cpp index 896863805d..6a91581410 100644 --- a/src/ifcgeom/IfcGeomShapes.cpp +++ b/src/ifcgeom/IfcGeomShapes.cpp @@ -65,6 +65,8 @@ #include #include #include +#include + #include #include @@ -96,13 +98,20 @@ #include +#include + #include "../ifcgeom/IfcGeom.h" bool IfcGeom::Kernel::convert(const IfcSchema::IfcExtrudedAreaSolid* l, TopoDS_Shape& shape) { + const double height = l->Depth() * getValue(GV_LENGTH_UNIT); + if (height < getValue(GV_PRECISION)) { + Logger::Message(Logger::LOG_ERROR, "Non-positive extrusion height encountered for:", l->entity); + return false; + } + TopoDS_Shape face; if ( !convert_face(l->SweptArea(),face) ) return false; - const double height = l->Depth() * getValue(GV_LENGTH_UNIT); gp_Trsf trsf; IfcGeom::Kernel::convert(l->Position(),trsf); @@ -244,10 +253,20 @@ bool IfcGeom::Kernel::convert(const IfcSchema::IfcHalfSpaceSolid* l, TopoDS_Shap bool IfcGeom::Kernel::convert(const IfcSchema::IfcPolygonalBoundedHalfSpace* l, TopoDS_Shape& shape) { TopoDS_Shape halfspace; if ( ! IfcGeom::Kernel::convert((IfcSchema::IfcHalfSpaceSolid*)l,halfspace) ) return false; + TopoDS_Wire wire; - if ( ! convert_wire(l->PolygonalBoundary(),wire) || ! wire.Closed() ) return false; + if ( ! convert_wire(l->PolygonalBoundary(),wire) || ! wire.Closed() ) return false; + gp_Trsf trsf; - convert(l->Position(),trsf); + if ( ! convert(l->Position(),trsf) ) return false; + + TColgp_SequenceOfPnt points; + if (wire_to_sequence_of_point(wire, points)) { + remove_duplicate_points_from_loop(points, wire.Closed()); // Note: wire always closed, as per if statement above + remove_collinear_points_from_loop(points, wire.Closed()); + sequence_of_point_to_wire(points, wire, wire.Closed()); + } + TopoDS_Shape prism = BRepPrimAPI_MakePrism(BRepBuilderAPI_MakeFace(wire),gp_Vec(0,0,200)); gp_Trsf down; down.SetTranslation(gp_Vec(0,0,-100.0)); prism.Move(trsf*down); @@ -272,6 +291,7 @@ bool IfcGeom::Kernel::convert(const IfcSchema::IfcShellBasedSurfaceModel* l, Ifc } bool IfcGeom::Kernel::convert(const IfcSchema::IfcBooleanResult* l, TopoDS_Shape& shape) { + TopoDS_Shape s1, s2; IfcRepresentationShapeItems items1, items2; TopoDS_Wire boundary_wire; @@ -325,10 +345,36 @@ bool IfcGeom::Kernel::convert(const IfcSchema::IfcBooleanResult* l, TopoDS_Shape const IfcSchema::IfcBooleanOperator::IfcBooleanOperator op = l->Operator(); + /* + // TK: A little debugging trick to output both operands for visual inspection + + BRep_Builder builder; + TopoDS_Compound compound; + builder.MakeCompound(compound); + builder.Add(compound, s1); + builder.Add(compound, s2); + shape = compound; + return true; + */ + if (op == IfcSchema::IfcBooleanOperator::IfcBooleanOperator_DIFFERENCE) { bool valid_cut = false; - BRepAlgoAPI_Cut brep_cut(s1,s2); + +#if OCC_VERSION_HEX < 0x60900 + BRepAlgoAPI_Cut brep_cut(s1, s2); +#else + BRepAlgoAPI_Cut brep_cut; + TopTools_ListOfShape s1s; + s1s.Append(s1); + TopTools_ListOfShape s2s; + s2s.Append(s2); + brep_cut.SetFuzzyValue(getValue(GV_PRECISION)); + brep_cut.SetArguments(s1s); + brep_cut.SetTools(s2s); + brep_cut.Build(); +#endif + if ( brep_cut.IsDone() ) { TopoDS_Shape result = brep_cut; @@ -398,28 +444,38 @@ bool IfcGeom::Kernel::convert(const IfcSchema::IfcBooleanResult* l, TopoDS_Shape bool IfcGeom::Kernel::convert(const IfcSchema::IfcConnectedFaceSet* l, TopoDS_Shape& shape) { IfcSchema::IfcFace::list::ptr faces = l->CfsFaces(); - bool facesAdded = false; - const unsigned int num_faces = faces->size(); + + TopTools_ListOfShape face_list; + for (IfcSchema::IfcFace::list::it it = faces->begin(); it != faces->end(); ++it) { + TopoDS_Face face; + try { + convert_face(*it, face); + } catch (...) { + continue; + } + if (face_area(face) > getValue(GV_MINIMAL_FACE_AREA)) { + face_list.Append(face); + } else { + Logger::Message(Logger::LOG_WARNING, "Invalid face:", (*it)->entity); + } + } + + if (face_list.Extent() == 0) { + return false; + } + bool valid_shell = false; - if ( num_faces < getValue(GV_MAX_FACES_TO_SEW) ) { + + TopTools_ListIteratorOfListOfShape face_iterator; + + if ( face_list.Extent() < getValue(GV_MAX_FACES_TO_SEW) ) { BRepOffsetAPI_Sewing builder; builder.SetTolerance(getValue(GV_POINT_EQUALITY_TOLERANCE)); builder.SetMaxTolerance(getValue(GV_POINT_EQUALITY_TOLERANCE)); builder.SetMinTolerance(getValue(GV_POINT_EQUALITY_TOLERANCE)); - for( IfcSchema::IfcFace::list::it it = faces->begin(); it != faces->end(); ++ it ) { - TopoDS_Face face; - bool converted_face = false; - try { - converted_face = convert_face(*it,face); - } catch (...) {} - if ( converted_face && face_area(face) > getValue(GV_MINIMAL_FACE_AREA) ) { - builder.Add(face); - facesAdded = true; - } else { - Logger::Message(Logger::LOG_WARNING,"Invalid face:",(*it)->entity); - } + for (face_iterator.Initialize(face_list); face_iterator.More(); face_iterator.Next()) { + builder.Add(face_iterator.Value()); } - if ( ! facesAdded ) return false; try { builder.Perform(); shape = builder.SewedShape(); @@ -445,20 +501,9 @@ bool IfcGeom::Kernel::convert(const IfcSchema::IfcConnectedFaceSet* l, TopoDS_Sh TopoDS_Compound compound; BRep_Builder builder; builder.MakeCompound(compound); - for( IfcSchema::IfcFace::list::it it = faces->begin(); it != faces->end(); ++ it ) { - TopoDS_Face face; - bool converted_face = false; - try { - converted_face = convert_face(*it,face); - } catch (...) {} - if ( converted_face && face_area(face) > getValue(GV_MINIMAL_FACE_AREA) ) { - builder.Add(compound,face); - facesAdded = true; - } else { - Logger::Message(Logger::LOG_WARNING,"Invalid face:",(*it)->entity); - } + for (face_iterator.Initialize(face_list); face_iterator.More(); face_iterator.Next()) { + builder.Add(compound, face_iterator.Value()); } - if ( ! facesAdded ) return false; shape = compound; } return true; @@ -492,11 +537,22 @@ bool IfcGeom::Kernel::convert(const IfcSchema::IfcMappedItem* l, IfcRepresentati trsf = trsf_2d; } gtrsf.Multiply(trsf); + + const IfcGeom::SurfaceStyle* mapped_item_style = get_style(l); + const unsigned int previous_size = (const unsigned int) shapes.size(); - bool b = convert_shapes(map->MappedRepresentation(),shapes); + bool b = convert_shapes(map->MappedRepresentation(), shapes); + for ( unsigned int i = previous_size; i < shapes.size(); ++ i ) { shapes[i].append(gtrsf); + + // Apply styles assigned to the mapped item only if on + // a more granular level no styles have been applied + if (!shapes[i].hasStyle()) { + shapes[i].setStyle(mapped_item_style); + } } + return b; } @@ -627,9 +683,9 @@ bool IfcGeom::Kernel::convert(const IfcSchema::IfcCurveBoundedPlane* l, TopoDS_S BRepBuilderAPI_MakeFace mf (outer); mf.Add(outer); - IfcSchema::IfcCurve::list::ptr inner = l->InnerBoundaries(); + IfcSchema::IfcCurve::list::ptr boundaries = l->InnerBoundaries(); - for (IfcSchema::IfcCurve::list::it it = inner->begin(); it != inner->end(); ++it) { + for (IfcSchema::IfcCurve::list::it it = boundaries->begin(); it != boundaries->end(); ++it) { TopoDS_Wire inner; convert_wire(*it, inner); @@ -762,8 +818,8 @@ bool IfcGeom::Kernel::convert(const IfcSchema::IfcSweptDiskSolid* l, TopoDS_Shap // Subtraction of pipes with small radii is unstable. hasInnerRadius = false; } else { - Handle(Geom_Circle) circle = new Geom_Circle(directrix, r2); - section2 = BRepBuilderAPI_MakeWire(BRepBuilderAPI_MakeEdge(circle)); + Handle(Geom_Circle) circle2 = new Geom_Circle(directrix, r2); + section2 = BRepBuilderAPI_MakeWire(BRepBuilderAPI_MakeEdge(circle2)); } } @@ -817,7 +873,11 @@ bool IfcGeom::Kernel::convert(const IfcSchema::IfcCylindricalSurface* l, TopoDS_ gp_Trsf trsf; IfcGeom::Kernel::convert(l->Position(),trsf); +#if OCC_VERSION_HEX < 0x60502 + face = BRepBuilderAPI_MakeFace(new Geom_CylindricalSurface(gp::XOY(), l->Radius())).Face().Moved(trsf); +#else face = BRepBuilderAPI_MakeFace(new Geom_CylindricalSurface(gp::XOY(), l->Radius()), getValue(GV_PRECISION)).Face().Moved(trsf); +#endif return true; } @@ -882,7 +942,7 @@ bool IfcGeom::Kernel::convert(const IfcSchema::IfcTriangulatedFaceSet* l, TopoDS if (faces.empty()) return false; - const unsigned int num_faces = indices.size(); + const unsigned int num_faces = (unsigned)indices.size(); bool valid_shell = false; if (faces.size() < getValue(GV_MAX_FACES_TO_SEW)) { diff --git a/src/ifcgeom/IfcGeomWires.cpp b/src/ifcgeom/IfcGeomWires.cpp index a4b74f995d..d6e32ecbf0 100644 --- a/src/ifcgeom/IfcGeomWires.cpp +++ b/src/ifcgeom/IfcGeomWires.cpp @@ -168,6 +168,25 @@ bool IfcGeom::Kernel::convert(const IfcSchema::IfcCompositeCurve* l, TopoDS_Wire //last_vertex = w.Vertex(); if ( w.Error() != BRepBuilderAPI_WireDone ) { Logger::Message(Logger::LOG_ERROR,"Failed to join curve segments:",l->entity); + + TopoDS_Vertex v1, v2, last; + last = w.Vertex(); + + if (!last.IsNull()) { + std::stringstream ss; + gp_Pnt p = BRep_Tool::Pnt(last); + ss << std::setprecision(4) << "Last vertex at (" << p.X() << " " << p.Y() << " " << p.Z() << ")"; + Logger::Message(Logger::LOG_NOTICE, ss.str()); + } + + TopExp::Vertices(wire2, v1, v2); + if (!v1.IsNull()) { + std::stringstream ss; + gp_Pnt p = BRep_Tool::Pnt(v1); + ss << std::setprecision(4) << "Segment starts at (" << p.X() << " " << p.Y() << " " << p.Z() << ") for:"; + Logger::Message(Logger::LOG_NOTICE, ss.str(), (*it)->entity); + } + return false; } } @@ -184,8 +203,6 @@ bool IfcGeom::Kernel::convert(const IfcSchema::IfcTrimmedCurve* l, TopoDS_Wire& bool trim_cartesian = l->MasterRepresentation() == IfcSchema::IfcTrimmingPreference::IfcTrimmingPreference_CARTESIAN; IfcEntityList::ptr trims1 = l->Trim1(); IfcEntityList::ptr trims2 = l->Trim2(); - bool trimmed1 = false; - bool trimmed2 = false; unsigned sense_agreement = l->SenseAgreement() ? 0 : 1; double flts[2]; gp_Pnt pnts[2]; @@ -286,7 +303,7 @@ bool IfcGeom::Kernel::convert(const IfcSchema::IfcPolyline* l, TopoDS_Wire& resu } // Remove points that are too close to one another - remove_redundant_points_from_loop(polygon, false); + remove_duplicate_points_from_loop(polygon, false); BRepBuilderAPI_MakePolygon w; for (int i = 1; i <= polygon.Length(); ++i) { @@ -316,7 +333,7 @@ bool IfcGeom::Kernel::convert(const IfcSchema::IfcPolyLoop* l, TopoDS_Wire& resu } // Remove points that are too close to one another - remove_redundant_points_from_loop(polygon, true); + remove_duplicate_points_from_loop(polygon, true); int count = polygon.Length(); if (original_count - count != 0) { @@ -411,9 +428,9 @@ bool IfcGeom::Kernel::convert(const IfcSchema::IfcEdgeLoop* l, TopoDS_Wire& resu TopoDS_Wire w; if (convert_wire(*it, w)) { if (!(*it)->Orientation()) w.Reverse(); - TopoDS_Iterator it(w, false); - for (; it.More(); it.Next()) { - const TopoDS_Edge& e = TopoDS::Edge(it.Value()); + TopoDS_Iterator topoit(w, false); + for (; topoit.More(); topoit.Next()) { + const TopoDS_Edge& e = TopoDS::Edge(topoit.Value()); mw.Add(e); } // mw.Add(w); diff --git a/src/ifcgeom/IfcRegister.cpp b/src/ifcgeom/IfcRegister.cpp index 2b7d836c63..ba119c12bc 100644 --- a/src/ifcgeom/IfcRegister.cpp +++ b/src/ifcgeom/IfcRegister.cpp @@ -49,8 +49,10 @@ bool IfcGeom::Kernel::convert_shape(const IfcBaseClass* l, TopoDS_Shape& r) { bool processed = false; bool ignored = false; +#ifndef NO_CACHE std::map::const_iterator it = cache.Shape.find(id); if ( it != cache.Shape.end() ) { r = it->second; return true; } +#endif const bool include_curves = getValue(GV_DIMENSIONALITY) != +1; const bool include_solids_and_surfaces = getValue(GV_DIMENSIONALITY) != -1; @@ -85,7 +87,9 @@ bool IfcGeom::Kernel::convert_shape(const IfcBaseClass* l, TopoDS_Shape& r) { if ( processed && success ) { const double precision = getValue(GV_PRECISION); apply_tolerance(r, precision); +#ifndef NO_CACHE cache.Shape[id] = r; +#endif } else if (!ignored) { const char* const msg = processed ? "Failed to convert:" diff --git a/src/ifcgeom/IfcRegister.h b/src/ifcgeom/IfcRegister.h index dc231b2b40..305c0c9f5e 100644 --- a/src/ifcgeom/IfcRegister.h +++ b/src/ifcgeom/IfcRegister.h @@ -53,9 +53,9 @@ SHAPE(IfcCylindricalSurface); SHAPE(IfcAdvancedBrep); // FIXME: Surfaces should have a shape type of their own SHAPE(IfcBSplineSurfaceWithKnots); -SHAPE(IfcPlane); SHAPE(IfcTriangulatedFaceSet); #endif +SHAPE(IfcPlane); SHAPE(IfcExtrudedAreaSolid); SHAPE(IfcRevolvedAreaSolid); SHAPE(IfcConnectedFaceSet); diff --git a/src/ifcgeom/IfcRepresentationShapeItem.h b/src/ifcgeom/IfcRepresentationShapeItem.h index 88ac340214..1d2c3fa8b5 100644 --- a/src/ifcgeom/IfcRepresentationShapeItem.h +++ b/src/ifcgeom/IfcRepresentationShapeItem.h @@ -46,6 +46,7 @@ namespace IfcGeom { const gp_GTrsf& Placement() const { return placement; } bool hasStyle() const { return style != 0; } const SurfaceStyle& Style() const { return *style; } + void setStyle(const SurfaceStyle* style) { this->style = style; } }; typedef std::vector IfcRepresentationShapeItems; } diff --git a/src/ifcgeomserver/IfcGeomServer.cpp b/src/ifcgeomserver/IfcGeomServer.cpp index 22eaca9844..0b37b739aa 100644 --- a/src/ifcgeomserver/IfcGeomServer.cpp +++ b/src/ifcgeomserver/IfcGeomServer.cpp @@ -37,6 +37,10 @@ #include "../ifcgeom/IfcGeomIterator.h" +#if USE_VLD +#include +#endif + using namespace boost; template @@ -69,7 +73,7 @@ void swrite(std::ostream& s, T t) { template <> void swrite(std::ostream& s, std::string t) { - int32_t len = t.size(); + int32_t len = (int32_t)t.size(); swrite(s, len); s.write(t.c_str(), len); while (len++ % 4) s.put(0); @@ -156,16 +160,16 @@ public: class Get : public Command { protected: - void read_content(std::istream& s) {} - void write_content(std::ostream& s) {} + void read_content(std::istream& /*s*/) {} + void write_content(std::ostream& /*s*/) {} public: Get() : Command(GET) {}; }; class GetLog : public Command { protected: - void read_content(std::istream& s) {} - void write_content(std::ostream& s) {} + void read_content(std::istream& /*s*/) {} + void write_content(std::ostream& /*s*/) {} public: GetLog() : Command(GET_LOG) {}; }; @@ -189,7 +193,7 @@ private: const IfcGeom::TriangulationElement* geom; bool append_line_data; protected: - void read_content(std::istream& s) {} + void read_content(std::istream& /*s*/) {} void write_content(std::ostream& s) { swrite(s, geom->id()); swrite(s, geom->guid()); @@ -238,9 +242,9 @@ protected: } { std::vector diffuse_color_array; for (std::vector::const_iterator it = geom->geometry().materials().begin(); it != geom->geometry().materials().end(); ++it) { - const IfcGeom::Material& m = *it; - if (m.hasDiffuse()) { - const double* color = m.diffuse(); + const IfcGeom::Material& mat = *it; + if (mat.hasDiffuse()) { + const double* color = mat.diffuse(); diffuse_color_array.push_back(static_cast(color[0])); diffuse_color_array.push_back(static_cast(color[1])); diffuse_color_array.push_back(static_cast(color[2])); @@ -249,8 +253,8 @@ protected: diffuse_color_array.push_back(0.f); diffuse_color_array.push_back(0.f); } - if (m.hasTransparency()) { - diffuse_color_array.push_back(static_cast(1. - m.transparency())); + if (mat.hasTransparency()) { + diffuse_color_array.push_back(static_cast(1. - mat.transparency())); } else { diffuse_color_array.push_back(1.f); } @@ -268,25 +272,21 @@ public: class Next : public Command { protected: - void read_content(std::istream& s) {} - void write_content(std::ostream& s) {} + void read_content(std::istream& /*s*/) {} + void write_content(std::ostream& /*s*/) {} public: Next() : Command(NEXT) {}; }; class Bye : public Command { protected: - void read_content(std::istream& s) {} - void write_content(std::ostream& s) {} + void read_content(std::istream& /*s*/) {} + void write_content(std::ostream& /*s*/) {} public: Bye() : Command(BYE) {}; }; -int main (int argc, char** argv) { - if (sizeof(float) != 4 || sizeof(int32_t) != 4) { - return 1; - } - +int main () { // Redirect stdout to this stream, so that involuntary // writes to stdout do not interfere with our protocol. std::ostringstream oss; @@ -308,7 +308,7 @@ int main (int argc, char** argv) { Hello().write(std::cout); int exit_code = 0; - while (1) { + for (;;) { const int32_t msg_type = sread(std::cin); switch (msg_type) { case IFC_MODEL: { @@ -318,12 +318,12 @@ int main (int argc, char** argv) { memcpy(data, m.string().c_str(), len); IfcGeom::IteratorSettings settings; - settings.use_world_coords() = false; - settings.weld_vertices() = false; - settings.convert_back_units() = true; - settings.include_curves() = true; + settings.set(IfcGeom::IteratorSettings::USE_WORLD_COORDS, false); + settings.set(IfcGeom::IteratorSettings::WELD_VERTICES, false); + settings.set(IfcGeom::IteratorSettings::CONVERT_BACK_UNITS, true); + settings.set(IfcGeom::IteratorSettings::INCLUDE_CURVES, true); - iterator = new IfcGeom::Iterator(settings, data, len); + iterator = new IfcGeom::Iterator(settings, data, (int)len); has_more = iterator->initialize(); More(has_more).write(std::cout); diff --git a/src/ifcgeomserver/README.md b/src/ifcgeomserver/README.md new file mode 100644 index 0000000000..141b766d5a --- /dev/null +++ b/src/ifcgeomserver/README.md @@ -0,0 +1,4 @@ +IfcGeomServer +------------- + +A command-line executable intented to be ran as a child process that receives an IFC model from stdin and will send binary geometry information of products found in the IFC file in separate messages on stdout. The advantage over conventional static or dynamic linking is that, in case the IfcOpenShell process would crash (either due to invalid input, heap overflow, bugs, ...), this does not affect the main process. Currently, the only implementation of a consumer for this process is the Java module over at: https://github.com/opensourceBIM/IfcOpenShell-BIMserver-plugin/blob/master/src/org/ifcopenshell/IfcGeomServerClient.java diff --git a/src/ifcmax/CMakeLists.txt b/src/ifcmax/CMakeLists.txt new file mode 100644 index 0000000000..923532b073 --- /dev/null +++ b/src/ifcmax/CMakeLists.txt @@ -0,0 +1,39 @@ +################################################################################ +# # +# 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 . # +# # +################################################################################ + +INCLUDE_DIRECTORIES(${INCLUDE_DIRECTORIES} ${OCC_INCLUDE_DIR} ${OPENCOLLADA_INCLUDE_DIRS} ${ICU_INCLUDE_DIR} + ${Boost_INCLUDE_DIRS} ${THREEDS_MAX_SDK_HOME}/include +) + +# All recent versions of 3ds Max (2014 and newer) are 64-bit only so assume lib/x64 directory +LINK_DIRECTORIES(${LINK_DIRECTORIES} ${IfcOpenShell_BINARY_DIR} ${OCC_LIBRARY_DIR} ${OPENCOLLADA_LIBRARY_DIR} + ${ICU_LIBRARY_DIR} ${Boost_LIBRARY_DIRS} ${THREEDS_MAX_SDK_HOME}/lib/x64/Release +) + +ADD_LIBRARY(IfcMax SHARED IfcMax.h IfcMax.cpp) + +TARGET_LINK_LIBRARIES(IfcMax IfcParse IfcGeom Comctl32.lib zlibdll.lib bmm.lib core.lib CustDlg.lib edmodel.lib expr.lib + flt.lib geom.lib gfx.lib gup.lib imageViewers.lib ManipSys.lib maxnet.lib Maxscrpt.lib + maxutil.lib MenuMan.lib menus.lib mesh.lib MNMath.lib Paramblk2.lib particle.lib Poly.lib RenderUtil.lib + tessint.lib viewfile.lib ${OPENCASCADE_LIBRARIES} +) + +SET_TARGET_PROPERTIES(IfcMax PROPERTIES SUFFIX ".dli") + +INSTALL(TARGETS IfcMax RUNTIME DESTINATION bin) diff --git a/src/ifcmax/IfcMax.cpp b/src/ifcmax/IfcMax.cpp index dde5cc8547..28ab422882 100644 --- a/src/ifcmax/IfcMax.cpp +++ b/src/ifcmax/IfcMax.cpp @@ -20,49 +20,54 @@ #include #include -#include #include #include -#include "../ifcmax/IfcMax.h" +#include "IfcMax.h" #include "../ifcgeom/IfcGeomIterator.h" static const int NUM_MATERIAL_SLOTS = 24; -int controlsInit = false; - -BOOL WINAPI DllMain(HINSTANCE hinstDLL,ULONG fdwReason,LPVOID lpvReserved) { +BOOL WINAPI DllMain(HINSTANCE /*hinstDLL*/, ULONG /*fdwReason*/, LPVOID /*lpvReserved*/) { + static int controlsInit = false; if (!controlsInit) { controlsInit = true; InitCommonControls(); - } - return true; + } + return TRUE; } -__declspec( dllexport ) const TCHAR* LibDescription() { - return _T("IfcOpenShell IFC Importer"); -} - -__declspec( dllexport ) int LibNumberClasses() { return 1; } - -static class IFCImpClassDesc:public ClassDesc { +static class IFCImpClassDesc :public ClassDesc { public: - int IsPublic() {return 1;} - void * Create(BOOL loading = FALSE) {return new IFCImp;} - const TCHAR * ClassName() {return _T("IFCImp");} - SClass_ID SuperClassID() {return SCENE_IMPORT_CLASS_ID;} - Class_ID ClassID() {return Class_ID(0x3f230dbf, 0x5b3015c2);} - const TCHAR* Category() {return _T("Chrutilities");} + int IsPublic() { return 1; } + void * Create(BOOL /*loading = FALSE*/) { return new IFCImp; } + // TODO Delete() function? + const TCHAR * ClassName() { return _T("IFCImp"); } + SClass_ID SuperClassID() { return SCENE_IMPORT_CLASS_ID; } + Class_ID ClassID() { return Class_ID(0x3f230dbf, 0x5b3015c2); } + const TCHAR* Category() { return _T("Chrutilities"); } } IFCImpDesc; -__declspec( dllexport ) ClassDesc* LibClassDesc(int i) { - return i == 0 ? &IFCImpDesc : 0; +#define DLLEXPORT __declspec(dllexport) + +extern "C" { + +DLLEXPORT const TCHAR* LibDescription() { + return _T("IfcOpenShell IFC Importer"); } -__declspec( dllexport ) ULONG LibVersion() { - return VERSION_3DSMAX; +DLLEXPORT int LibNumberClasses() { return 1; } + +DLLEXPORT ClassDesc* LibClassDesc(int i) { + return i == 0 ? &IFCImpDesc : 0; } +DLLEXPORT ULONG LibVersion() { + return VERSION_3DSMAX; +} + +} // extern "C" + int IFCImp::ExtCount() { return 1; } const TCHAR * IFCImp::Ext(int n) { @@ -82,7 +87,7 @@ const TCHAR * IFCImp::AuthorName() { } const TCHAR * IFCImp::CopyrightMessage() { - return _T("Copyight (c) 2011 IfcOpenShell"); + return _T("Copyright (c) 2011-2016 IfcOpenShell"); } const TCHAR * IFCImp::OtherMessage1() { @@ -97,13 +102,14 @@ unsigned int IFCImp::Version() { return 12; } -static BOOL CALLBACK AboutBoxDlgProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) { - return TRUE; -} +// TODO Use this in IFCImp::ShowAbout() if/when wanted +//static BOOL CALLBACK AboutBoxDlgProc(HWND /*hWnd*/, UINT /*msg*/, WPARAM /*wParam*/, LPARAM /*lParam*/) { +// return TRUE; +//} -void IFCImp::ShowAbout(HWND hWnd) {} +void IFCImp::ShowAbout(HWND /*hWnd*/) {} -DWORD WINAPI fn(LPVOID arg) { return 0; } +DWORD WINAPI fn(LPVOID /*arg*/) { return 0; } #if MAX_RELEASE > 14000 # define S(x) (TSTR::FromCStr(x.c_str())) @@ -113,8 +119,9 @@ DWORD WINAPI fn(LPVOID arg) { return 0; } # define S(x) (CStr(x.c_str())) #endif -Mtl* FindMaterialByName(MtlBaseLib* library, const std::string& material_name) { - const int mat_index = library->FindMtlByName(S(material_name)); +static Mtl* FindMaterialByName(MtlBaseLib* library, const std::string& material_name) { + TSTR mat_name = S(material_name); + const int mat_index = library->FindMtlByName(mat_name); Mtl* m = 0; if (mat_index != -1) { m = static_cast((*library)[mat_index]); @@ -122,7 +129,7 @@ Mtl* FindMaterialByName(MtlBaseLib* library, const std::string& material_name) { return m; } -Mtl* FindOrCreateMaterial(MtlBaseLib* library, Interface* max_interface, int& slot, const IfcGeom::Material& material) { +static Mtl* FindOrCreateMaterial(MtlBaseLib* library, Interface* max_interface, int& slot, const IfcGeom::Material& material) { Mtl* m = FindMaterialByName(library, material.name()); if (m == 0) { StdMat2* stdm = NewDefaultStdMat(); @@ -136,10 +143,10 @@ Mtl* FindOrCreateMaterial(MtlBaseLib* library, Interface* max_interface, int& sl stdm->SetSpecular(Color(specular[0], specular[1], specular[2]),t); } if (material.hasSpecularity()) { - stdm->SetShininess(material.specularity(), t); + stdm->SetShininess((float)material.specularity(), t); } if (material.hasTransparency()) { - stdm->SetOpacity(1.0 - material.transparency(), t); + stdm->SetOpacity(1.0f - (float)material.transparency(), t); } m = stdm; m->SetName(S(material.name())); @@ -151,7 +158,10 @@ Mtl* FindOrCreateMaterial(MtlBaseLib* library, Interface* max_interface, int& sl return m; } -Mtl* ComposeMultiMaterial(std::map, Mtl*>& multi_mats, MtlBaseLib* library, Interface* max_interface, int& slot, const std::vector& materials, const std::string& object_type, const std::vector& material_ids) { +static Mtl* ComposeMultiMaterial(std::map, Mtl*>& multi_mats, MtlBaseLib* library, + Interface* max_interface, int& slot, const std::vector& materials, + const std::string& object_type, const std::vector& material_ids) +{ std::vector material_names; bool needs_default = std::find(material_ids.begin(), material_ids.end(), -1) != material_ids.end(); if (needs_default) { @@ -184,7 +194,7 @@ Mtl* ComposeMultiMaterial(std::map, Mtl*>& multi_mats, return i->second; } MultiMtl* multi_mat = NewDefaultMultiMtl(); - multi_mat->SetNumSubMtls(material_names.size()); + multi_mat->SetNumSubMtls((int)material_names.size()); int mtl_id = 0; if (needs_default) { multi_mat->SetSubMtlAndName(mtl_id ++, default_material, default_material->GetName()); @@ -201,12 +211,12 @@ Mtl* ComposeMultiMaterial(std::map, Mtl*>& multi_mats, return multi_mat; } -int IFCImp::DoImport(const TCHAR *name, ImpInterface *impitfc, Interface *itfc, BOOL suppressPrompts) { +int IFCImp::DoImport(const TCHAR *name, ImpInterface *impitfc, Interface *itfc, BOOL /*suppressPrompts*/) { IfcGeom::IteratorSettings settings; - settings.use_world_coords() = false; - settings.weld_vertices() = true; - settings.sew_shells() = true; + settings.set(IfcGeom::IteratorSettings::USE_WORLD_COORDS, false); + settings.set(IfcGeom::IteratorSettings::WELD_VERTICES, true); + settings.set(IfcGeom::IteratorSettings::SEW_SHELLS, true); #ifdef _UNICODE int fn_buffer_size = WideCharToMultiByte(CP_UTF8, 0, name, -1, 0, 0, 0, 0); @@ -217,7 +227,7 @@ int IFCImp::DoImport(const TCHAR *name, ImpInterface *impitfc, Interface *itfc, #endif IfcGeom::Iterator iterator(settings, fn_mb); - + delete fn_mb; if (!iterator.initialize()) return false; itfc->ProgressStart(_T("Importing file..."), TRUE, fn, NULL); @@ -237,12 +247,12 @@ int IFCImp::DoImport(const TCHAR *name, ImpInterface *impitfc, Interface *itfc, TriObject* tri = CreateNewTriObject(); - const int numVerts = o->geometry().verts().size()/3; + const int numVerts = (int)o->geometry().verts().size()/3; tri->mesh.setNumVerts(numVerts); for( int i = 0; i < numVerts; i ++ ) { tri->mesh.setVert(i,o->geometry().verts()[3*i+0],o->geometry().verts()[3*i+1],o->geometry().verts()[3*i+2]); } - const int numFaces = o->geometry().faces().size()/3; + const int numFaces = (int)o->geometry().faces().size()/3; tri->mesh.setNumFaces(numFaces); bool needs_default = std::find(o->geometry().material_ids().begin(), o->geometry().material_ids().end(), -1) != o->geometry().material_ids().end(); @@ -274,7 +284,7 @@ int IFCImp::DoImport(const TCHAR *name, ImpInterface *impitfc, Interface *itfc, tri->mesh.faces[i].setVerts(v1, v2, v3); tri->mesh.faces[i].setEdgeVisFlags(b1, b2, b3); - MtlID mtlid = o->geometry().material_ids()[i]; + MtlID mtlid = (MtlID)o->geometry().material_ids()[i]; if (needs_default) { mtlid ++; } @@ -310,4 +320,4 @@ int IFCImp::DoImport(const TCHAR *name, ImpInterface *impitfc, Interface *itfc, itfc->ProgressEnd(); return true; -} \ No newline at end of file +} diff --git a/src/ifcmax/IfcMax.def b/src/ifcmax/IfcMax.def deleted file mode 100644 index 03d30e4b97..0000000000 --- a/src/ifcmax/IfcMax.def +++ /dev/null @@ -1,8 +0,0 @@ -LIBRARY ifcmax.dli -EXPORTS - LibDescription @1 - LibNumberClasses @2 - LibClassDesc @3 - LibVersion @4 -SECTIONS - .data READ WRITE \ No newline at end of file diff --git a/src/ifcmax/IfcMax.h b/src/ifcmax/IfcMax.h index d144f9c777..19a89d9da0 100644 --- a/src/ifcmax/IfcMax.h +++ b/src/ifcmax/IfcMax.h @@ -21,12 +21,6 @@ #define IFCMAX_H #include "Max.h" -#include "istdplug.h" -#include "stdmat.h" -#include "decomp.h" -#include "shape.h" -#include "splshape.h" -#include "dummy.h" extern ClassDesc* GetIFCImpDesc(); @@ -38,7 +32,7 @@ public: const TCHAR * LongDesc(); // = "IfcOpenShell IFC Importer for 3ds Max" const TCHAR * ShortDesc(); // = "Industry Foundation Classes" const TCHAR * AuthorName(); // = "Thomas Krijnen" - const TCHAR * CopyrightMessage(); // = "Copyight (c) 2011 IfcOpenShell" + const TCHAR * CopyrightMessage(); // = "Copyright (c) 2011-2016 IfcOpenShell" const TCHAR * OtherMessage1(); // = "" const TCHAR * OtherMessage2(); // = "" unsigned int Version(); // = 12 diff --git a/src/ifcopenshell-python/ifcopenshell/__init__.py b/src/ifcopenshell-python/ifcopenshell/__init__.py index eb14ece33a..1fe59e2b03 100644 --- a/src/ifcopenshell-python/ifcopenshell/__init__.py +++ b/src/ifcopenshell-python/ifcopenshell/__init__.py @@ -91,6 +91,11 @@ class entity_instance(object): def __repr__(self): return repr(self.wrapped_data) def is_a(self, *args): return self.wrapped_data.is_a(*args) def id(self): return self.wrapped_data.id() + def __eq__(self, other): + if type(self) != type(other): return False + return self.wrapped_data == other.wrapped_data + def __hash__(self): + return hash((self.id(), self.wrapped_data.file_pointer())) def __dir__(self): return sorted(set(itertools.chain( dir(type(self)), @@ -147,3 +152,4 @@ def create_entity(type,*args,**kwargs): version = ifcopenshell_wrapper.version() schema_identifier = ifcopenshell_wrapper.schema_identifier() +get_supertype = ifcopenshell_wrapper.get_supertype diff --git a/src/ifcopenshell-python/ifcopenshell/geom/__init__.py b/src/ifcopenshell-python/ifcopenshell/geom/__init__.py index 8550f4013d..347851aa07 100644 --- a/src/ifcopenshell-python/ifcopenshell/geom/__init__.py +++ b/src/ifcopenshell-python/ifcopenshell/geom/__init__.py @@ -1,88 +1,2 @@ -############################################################################### -# # -# 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 . # -# # -############################################################################### - -import os -import sys - -from .. import ifcopenshell_wrapper - -def has_occ(): - try: import OCC.BRepTools - except: return False - return True - - -has_occ = has_occ() -wrap_shape_creation = lambda settings, shape: shape -if has_occ: - import occ_utils as utils - wrap_shape_creation = lambda settings, shape: utils.create_shape_from_serialization(shape) if getattr(settings, 'use_python_opencascade', False) else shape - - -# Subclass the settings module to provide an additional -# setting to enable pythonOCC when available -class settings(ifcopenshell_wrapper.settings): - if has_occ: - USE_PYTHON_OPENCASCADE = -1 - def set(self, *args): - setting, value = args - if setting == settings.USE_PYTHON_OPENCASCADE: - self.set(settings.USE_BREP_DATA, value) - self.set(settings.USE_WORLD_COORDS, value) - self.set(settings.DISABLE_TRIANGULATION, value) - self.use_python_opencascade = value - else: - ifcopenshell_wrapper.settings.set(self, *args) - - -# Hide templating precision to the user by choosing based on Python's -# internal float type. This is probably always going to be a double. -for ty in (ifcopenshell_wrapper.iterator_single_precision, ifcopenshell_wrapper.iterator_double_precision): - if ty.mantissa_size() == sys.float_info.mant_dig: - _iterator = ty - - -# Make sure people are able to use python's platform agnostic paths -class iterator(_iterator): - def __init__(self, settings, filename): - self.settings = settings - _iterator.__init__(self, settings, os.path.abspath(filename)) - if has_occ: - def get(self): - return wrap_shape_creation(self.settings, _iterator.get(self)) - - -def create_shape(settings, inst, repr=None): - return wrap_shape_creation( - settings, - ifcopenshell_wrapper.create_shape( - settings, - inst.wrapped_data, - repr.wrapped_data if repr is not None else None - )) - - -def iterate(settings, filename): - it = iterator(settings, filename) - if it.initialize(): - while True: - yield it.get() - if not it.next(): break - - +from . import occ_utils as utils +from .main import * diff --git a/src/ifcopenshell-python/ifcopenshell/geom/app.py b/src/ifcopenshell-python/ifcopenshell/geom/app.py new file mode 100644 index 0000000000..37f2c09f72 --- /dev/null +++ b/src/ifcopenshell-python/ifcopenshell/geom/app.py @@ -0,0 +1,370 @@ +import sys +import time +import operator +import functools + +import OCC.AIS + +import ifcopenshell + +from collections import defaultdict, Iterable + +from PyQt4 import QtGui, QtCore + +try: from OCC.Display.pyqt4Display import qtViewer3d +except: + import OCC.Display + OCC.Display.backend.get_backend("qt-pyqt4") + from OCC.Display.qtDisplay import qtViewer3d + +from .main import create_shape, settings +from .occ_utils import display_shape + +# Depending on Python version and what not there may or may not be a QString +try: + from PyQt4.QtCore import QString +except ImportError: + QString = str + +class application(QtGui.QApplication): + + """A pythonOCC, PyQt based IfcOpenShell application + with two tree views and a graphical 3d view""" + + class abstract_treeview(QtGui.QTreeWidget): + + """Base class for the two treeview controls""" + + instanceSelected = QtCore.pyqtSignal([object]) + instanceVisibilityChanged = QtCore.pyqtSignal([object, int]) + instanceDisplayModeChanged = QtCore.pyqtSignal([object, int]) + + def __init__(self): + QtGui.QTreeView.__init__(self) + self.setColumnCount(len(self.ATTRIBUTES)) + self.setHeaderLabels(self.ATTRIBUTES) + self.children = defaultdict(list) + + def get_children(self, inst): + c = [inst] + i = 0 + while i < len(c): + c.extend(self.children[c[i]]) + i += 1 + return c + + def contextMenuEvent(self, event): + menu = QtGui.QMenu(self) + visibility = [menu.addAction("Show"), menu.addAction("Hide")] + displaymode = [menu.addAction("Solid"), menu.addAction("Wireframe")] + action = menu.exec_(self.mapToGlobal(event.pos())) + index = self.selectionModel().currentIndex() + inst = index.data(QtCore.Qt.UserRole) + if hasattr(inst, 'toPyObject'): + inst = inst.toPyObject() + if action in visibility: + self.instanceVisibilityChanged.emit(inst, visibility.index(action)) + elif action in displaymode: + self.instanceDisplayModeChanged.emit(inst, displaymode.index(action)) + + def clicked(self, index): + inst = index.data(QtCore.Qt.UserRole) + if hasattr(inst, 'toPyObject'): + inst = inst.toPyObject() + if inst: + self.instanceSelected.emit(inst) + + def select(self, product): + itm = self.product_to_item.get(product) + if itm is None: return + self.selectionModel().setCurrentIndex(itm, QtGui.QItemSelectionModel.SelectCurrent | QtGui.QItemSelectionModel.Rows); + + class decomposition_treeview(abstract_treeview): + + """Treeview with typical IFC decomposition relationships""" + + ATTRIBUTES = ['Entity', 'GlobalId', 'Name'] + + def parent(self, instance): + if instance.is_a("IfcOpeningElement"): + return instance.VoidsElements[0].RelatingBuildingElement + if instance.is_a("IfcElement"): + fills = instance.FillsVoids + if len(fills): + return fills[0].RelatingOpeningElement + containments = instance.ContainedInStructure + if len(containments): + return containments[0].RelatingStructure + if instance.is_a("IfcObjectDefinition"): + decompositions = instance.Decomposes + if len(decompositions): + return decompositions[0].RelatingObject + + def load_file(self, f): + products = list(f.by_type("IfcProduct")) + list(f.by_type("IfcProject")) + parents = list(map(self.parent, products)) + items = {} + skipped = 0 + ATTRS = self.ATTRIBUTES + while len(items) + skipped < len(products): + for product, parent in zip(products, parents): + if parent is None and not product.is_a("IfcProject"): + skipped += 1 + continue + if (parent is None or parent in items) and product not in items: + sl = [] + for attr in ATTRS: + if attr == 'Entity': + sl.append(product.is_a()) + else: + sl.append(getattr(product, attr) or '') + itm = items[product] = QtGui.QTreeWidgetItem(items.get(parent, self), sl) + itm.setData(0, QtCore.Qt.UserRole, product) + self.children[parent].append(product) + self.product_to_item = dict(zip(items.keys(), map(self.indexFromItem, items.values()))) + self.connect(self, QtCore.SIGNAL("clicked(const QModelIndex &)"), self.clicked) + self.expandAll() + + class type_treeview(abstract_treeview): + + """Treeview with typical IFC decomposition relationships""" + + ATTRIBUTES = ['Name'] + + def load_file(self, f): + products = list(f.by_type("IfcProduct")) + types = set(map(lambda i: i.is_a(), products)) + items = {} + for t in types: + def add(t): + s = ifcopenshell.get_supertype(t) + if s: add(s) + s2, t2 = map(QString, (s,t)) + if t2 not in items: + itm = items[t2] = QtGui.QTreeWidgetItem(items.get(s2, self), [t2]) + itm.setData(0, QtCore.Qt.UserRole, t2) + self.children[s2].append(t2) + add(t) + + for p in products: + t = QString(p.is_a()) + itm = items[p] = QtGui.QTreeWidgetItem(items.get(t, self), [p.Name or '']) + itm.setData(0, QtCore.Qt.UserRole, t) + self.children[t].append(p) + + self.product_to_item = dict(zip(items.keys(), map(self.indexFromItem, items.values()))) + self.connect(self, QtCore.SIGNAL("clicked(const QModelIndex &)"), self.clicked) + self.expandAll() + + class viewer(qtViewer3d): + + instanceSelected = QtCore.pyqtSignal([object]) + + @staticmethod + def ais_to_key(ais_handle): + def yield_shapes(): + ais = ais_handle.GetObject() + if hasattr(ais, 'Shape'): + yield ais.Shape() + return + shp = OCC.AIS.Handle_AIS_Shape.DownCast(ais_handle) + if not shp.IsNull(): yield shp.Shape() + return + mult = ais_handle + if mult.IsNull(): + shp = OCC.AIS.Handle_AIS_Shape.DownCast(ais_handle) + if not shp.IsNull(): yield shp + else: + li = mult.GetObject().ConnectedTo() + for i in range(li.Length()): + shp = OCC.AIS.Handle_AIS_Shape.DownCast(li.Value(i+1)) + if not shp.IsNull(): yield shp + return tuple(shp.HashCode(1 << 24) for shp in yield_shapes()) + + def __init__(self, widget): + qtViewer3d.__init__(self, widget) + self.ais_to_product = {} + self.product_to_ais = {} + self.counter = 0 + self.window = widget + + def initialize(self): + self.InitDriver() + self._display.Select = self.HandleSelection + + def load_file(self, f): + + s = settings() + s.set(s.USE_PYTHON_OPENCASCADE, True) + + v = self._display + + t = {0: time.time()} + def update(dt = None): + t1 = time.time() + if t1 - t[0] > (dt or -1): + v.FitAll() + v.Repaint() + t[0] = t1 + + terminate = [False] + self.window.window_closed.connect(lambda *args: operator.setitem(terminate, 0, True)) + + for p in f.by_type("IfcProduct"): + if terminate[0]: break + if p.Representation is None: continue + shape = create_shape(s, p) + ais = display_shape(shape, viewer_handle=v) + ais.GetObject().SetSelectionPriority(self.counter) + self.ais_to_product[self.counter] = p + self.product_to_ais[p] = ais + self.counter += 1 + QtGui.QApplication.processEvents() + if p.is_a() in {'IfcSpace', 'IfcOpeningElement'}: + v.Context.Erase(ais, True) + update(0.1) + update() + + def select(self, product): + ais = self.product_to_ais.get(product) + if ais is None: return + v = self._display.Context + v.ClearSelected(False) + v.SetSelected(ais, True) + + def toggle(self, product_or_products, fn): + if not isinstance(product_or_products, Iterable): + product_or_products = [product_or_products] + aiss = list(filter(None, map(self.product_to_ais.get, product_or_products))) + last = len(aiss) - 1 + for i, ais in enumerate(aiss): + fn(ais, i == last) + + def toggle_visibility(self, product_or_products, flag): + v = self._display.Context + if flag: + def visibility(ais, last): + v.Erase(ais, last) + else: + def visibility(ais, last): + v.Display(ais, last) + self.toggle(product_or_products, visibility) + + def toggle_wireframe(self, product_or_products, flag): + v = self._display.Context + if flag: + def wireframe(ais, last): + if v.IsDisplayed(ais): + v.SetDisplayMode(ais, 0, last) + else: + def wireframe(ais, last): + if v.IsDisplayed(ais): + v.SetDisplayMode(ais, 1, last) + self.toggle(product_or_products, wireframe) + + def HandleSelection(self, X, Y): + v = self._display.Context + v.Select() + v.InitSelected() + if v.MoreSelected(): + ais = v.SelectedInteractive() + inst = self.ais_to_product[ais.GetObject().SelectionPriority()] + self.instanceSelected.emit(inst) + + class window(QtGui.QMainWindow): + + TITLE = "IfcOpenShell IFC viewer" + + window_closed = QtCore.pyqtSignal([]) + + def __init__(self): + QtGui.QMainWindow.__init__(self) + self.setWindowTitle(self.TITLE) + self.menu = self.menuBar() + self.menus = {} + + def closeEvent(self, *args): + self.window_closed.emit() + + def add_menu_item(self, menu, label, callback, icon=None, shortcut=None): + m = self.menus.get(menu) + if m is None: + m = self.menu.addMenu(menu) + self.menus[menu] = m + + if icon: + a = QtGui.QAction(QtGui.QIcon(icon), label, self) + else: + a = QtGui.QAction(label, self) + + if shortcut: + a.setShortcut(shortcut) + + a.triggered.connect(callback) + m.addAction(a) + + + def makeSelectionHandler(self, component): + def handler(inst): + for c in self.components: + if c != component: + c.select(inst) + return handler + + def __init__(self): + QtGui.QApplication.__init__(self, sys.argv) + self.window = application.window() + self.tree = application.decomposition_treeview() + self.tree2 = application.type_treeview() + self.canvas = application.viewer(self.window) + self.tabs = QtGui.QTabWidget() + self.window.resize(800, 600) + splitter = QtGui.QSplitter(QtCore.Qt.Horizontal) + splitter.addWidget(self.tabs) + self.tabs.addTab(self.tree, 'Decomposition') + self.tabs.addTab(self.tree2, 'Types') + splitter.addWidget(self.canvas) + splitter.setSizes([200,600]) + self.window.setCentralWidget(splitter) + self.canvas.initialize() + self.components = [self.tree, self.tree2, self.canvas] + self.files = {} + + self.window.add_menu_item('File', '&Open', self.browse, shortcut='CTRL+O') + self.window.add_menu_item('File', '&Close', self.clear, shortcut='CTRL+W') + self.window.add_menu_item('File', '&Exit', self.window.close, shortcut='ALT+F4') + + self.tree.instanceSelected.connect(self.makeSelectionHandler(self.tree)) + self.tree2.instanceSelected.connect(self.makeSelectionHandler(self.tree2)) + self.canvas.instanceSelected.connect(self.makeSelectionHandler(self.canvas)) + for t in [self.tree, self.tree2]: + t.instanceVisibilityChanged.connect(functools.partial(self.change_visibility, t)) + t.instanceDisplayModeChanged.connect(functools.partial(self.change_displaymode, t)) + + def change_visibility(self, tree, inst, flag): + insts = tree.get_children(inst) + self.canvas.toggle_visibility(insts, flag) + + def change_displaymode(self, tree, inst, flag): + insts = tree.get_children(inst) + self.canvas.toggle_wireframe(insts, flag) + + def start(self): + self.window.show() + sys.exit(self.exec_()) + + def browse(self): + filename = QtGui.QFileDialog.getOpenFileName(self.window, 'Open file',".","Industry Foundation Classes (*.ifc)") + self.load(filename) + + def clear(self): + self.canvas._display.Context.RemoveAll() + self.tree.clear() + self.files.clear() + + def load(self, fn): + if fn in self.files: return + f = ifcopenshell.open(fn) + self.files[fn] = f + for c in self.components: + c.load_file(f) diff --git a/src/ifcopenshell-python/ifcopenshell/geom/main.py b/src/ifcopenshell-python/ifcopenshell/geom/main.py new file mode 100644 index 0000000000..b325793df2 --- /dev/null +++ b/src/ifcopenshell-python/ifcopenshell/geom/main.py @@ -0,0 +1,86 @@ +############################################################################### +# # +# 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 . # +# # +############################################################################### + +import os +import sys + +from .. import ifcopenshell_wrapper + +def has_occ(): + try: import OCC.BRepTools + except: return False + return True + + +has_occ = has_occ() +wrap_shape_creation = lambda settings, shape: shape +if has_occ: + from . import occ_utils as utils + wrap_shape_creation = lambda settings, shape: utils.create_shape_from_serialization(shape) if getattr(settings, 'use_python_opencascade', False) else shape + +# Subclass the settings module to provide an additional +# setting to enable pythonOCC when available +class settings(ifcopenshell_wrapper.settings): + if has_occ: + USE_PYTHON_OPENCASCADE = -1 + def set(self, *args): + setting, value = args + if setting == settings.USE_PYTHON_OPENCASCADE: + self.set(settings.USE_BREP_DATA, value) + self.set(settings.USE_WORLD_COORDS, value) + self.set(settings.DISABLE_TRIANGULATION, value) + self.use_python_opencascade = value + else: + ifcopenshell_wrapper.settings.set(self, *args) + +# Hide templating precision to the user by choosing based on Python's +# internal float type. This is probably always going to be a double. +for ty in (ifcopenshell_wrapper.iterator_single_precision, ifcopenshell_wrapper.iterator_double_precision): + if ty.mantissa_size() == sys.float_info.mant_dig: + _iterator = ty + + +# Make sure people are able to use python's platform agnostic paths +class iterator(_iterator): + def __init__(self, settings, filename): + self.settings = settings + _iterator.__init__(self, settings, os.path.abspath(filename)) + if has_occ: + def get(self): + return wrap_shape_creation(self.settings, _iterator.get(self)) + + +def create_shape(settings, inst, repr=None): + return wrap_shape_creation( + settings, + ifcopenshell_wrapper.create_shape( + settings, + inst.wrapped_data, + repr.wrapped_data if repr is not None else None + )) + + +def iterate(settings, filename): + it = iterator(settings, filename) + if it.initialize(): + while True: + yield it.get() + if not it.next(): break + + diff --git a/src/ifcopenshell-python/ifcopenshell/geom/occ_utils.py b/src/ifcopenshell-python/ifcopenshell/geom/occ_utils.py index 591b0b1909..e8ec739f94 100644 --- a/src/ifcopenshell-python/ifcopenshell/geom/occ_utils.py +++ b/src/ifcopenshell-python/ifcopenshell/geom/occ_utils.py @@ -1,16 +1,52 @@ +############################################################################### +# # +# 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 . # +# # +############################################################################### + import random -from collections import namedtuple +import operator +from collections import namedtuple, Iterable import OCC.gp import OCC.V3d +import OCC.AIS import OCC.Quantity import OCC.BRepTools import OCC.Display.SimpleGui -tuple = namedtuple('shape', ('data', 'geometry')) +shape_tuple = namedtuple('shape_tuple', ('data', 'geometry', 'styles')) handle, main_loop, add_menu, add_function_to_menu = None, None, None, None +DEFAULT_STYLES = { + "DEFAULT" : (.7 , .7, .7 ), + "IfcWall" : (.8 , .8, .8 ), + "IfcSite" : (.75, .8, .65 ), + "IfcSlab" : (.4 , .4, .4 ), + "IfcWallStandardCase": (.9 , .9, .9 ), + "IfcWall" : (.9 , .9, .9 ), + "IfcWindow" : (.75, .8, .75, .3), + "IfcDoor" : (.55, .3, .15 ), + "IfcBeam" : (.75, .7, .7 ), + "IfcRailing" : (.65, .6, .6 ), + "IfcMember" : (.65, .6, .6 ), + "IfcPlate" : (.8 , .8, .8 ) +} + def initialize_display(): global handle, main_loop, add_menu, add_function_to_menu handle, main_loop, add_menu, add_function_to_menu = OCC.Display.SimpleGui.init_display() @@ -18,25 +54,117 @@ def initialize_display(): def setup(): viewer_handle = handle.GetViewer() viewer = viewer_handle.GetObject() - while True: + + def lights(): viewer.InitActiveLights() - try: active_light = viewer.ActiveLight() - except: break - viewer.DelLight(active_light) - viewer.NextActiveLights() - for dir in [(1,2,-3), (-2,-1,1)]: + while True: + try: active_light = viewer.ActiveLight() + except: break + yield active_light + viewer.NextActiveLights() + + lights = list(lights()) + for l in lights: + viewer.DelLight(l) + + for dir in [(3,2,1), (-1,-2,-3)]: light = OCC.V3d.V3d_DirectionalLight(viewer_handle) light.SetDirection(*dir) viewer.SetLightOn(light.GetHandle()) + setup() return handle +def yield_subshapes(shape): + it = OCC.TopoDS.TopoDS_Iterator(shape) + while it.More(): + yield it.Value() + it.Next() + +def display_shape(shape, clr=None, viewer_handle=None): + if viewer_handle is None: viewer_handle = handle -def display_shape(shape, clr=None): - if not clr: + if isinstance(shape, shape_tuple): + shape, representation = shape.geometry, shape + else: representation = None + + material = OCC.Graphic3d.Graphic3d_MaterialAspect(OCC.Graphic3d.Graphic3d_NOM_PLASTER) + material.SetDiffuse(1) + + if representation and not clr: + if len(set(representation.styles)) == 1: + clr = representation.styles[0] + if min(clr) < 0. or max(clr) > 1.: + clr = DEFAULT_STYLES.get(representation.data.type, DEFAULT_STYLES["DEFAULT"]) + + if clr: + ais = OCC.AIS.AIS_Shape(shape) + ais.SetMaterial(material) + + if isinstance(clr, str): + qclr = getattr(OCC.Quantity, "Quantity_NOC_%s" % clr.upper(), getattr(OCC.Quantity, "Quantity_NOC_%s1" % clr.upper(), None)) + if qclr is None: + raise Exception("No color named '%s'" % clr.upper()) + elif isinstance(clr, Iterable): + clr = tuple(clr) + if len(clr) < 3 and len(clr) > 4: + raise Exception("Need 3 or 4 colour components. Got '%r'." % clr) + qclr = OCC.Quantity.Quantity_Color(clr[0], clr[1], clr[2], OCC.Quantity.Quantity_TOC_RGB) + elif isinstance(clr, OCC.Quantity.Quantity_Color): + qclr = clr + else: + raise Exception("Object of type %r cannot be used as a color." % type(clr)) + + ais.SetColor(qclr) + if isinstance(clr, tuple) and len(clr) == 4 and clr[3] < 1.: + ais.SetTransparency(1. - clr[3]) + + elif representation: + default_style_applied = None + + ais = OCC.AIS.AIS_MultipleConnectedShape(shape) + + subshapes = list(yield_subshapes(shape)) + lens = len(representation.styles), len(subshapes) + if lens[0] != lens[1]: + import warnings + warnings.warn("Unable to assign styles to subshapes. Encountered %d styles for %d shapes." % lens) + else: + for shp, stl in zip(subshapes, representation.styles): + subshape = OCC.AIS.AIS_Shape(shp) + if min(stl) < 0. or max(stl) > 1.: + default_style_applied = stl = DEFAULT_STYLES.get(representation.data.type, DEFAULT_STYLES["DEFAULT"]) + subshape.SetColor(OCC.Quantity.Quantity_Color(stl[0], stl[1], stl[2], OCC.Quantity.Quantity_TOC_RGB)) + subshape.SetMaterial(material) + if len(stl) == 4 and stl[3] < 1.: + subshape.SetTransparency(1. - stl[3]) + ais.Connect(subshape.GetHandle()) + + # For some reason it is necessary to set transparency here again + # in order for transparency to be rendered on the subshape. + applied_styles = representation.styles + if default_style_applied: + if len(default_style_applied) == 3: default_style_applied += (1.,) + applied_styles += (default_style_applied,) + + if len(applied_styles): + # The only way for this not to be true if is the entire shape is NULL + min_transp = min(map(operator.itemgetter(3), applied_styles)) + if min_transp < 1.: + ais.SetTransparency(1.) + + else: + ais = OCC.AIS.AIS_Shape(shape) + ais.SetMaterial(material) + r = lambda: random.random() * 0.3 + 0.7 clr = OCC.Quantity.Quantity_Color(r(), r(), r(), OCC.Quantity.Quantity_TOC_RGB) - return handle.DisplayShape(shape, color=clr, update=True) + ais.SetColor(clr) + + ais_handle = ais.GetHandle() + viewer_handle.Context.Display(ais_handle, False) + + return ais_handle def set_shape_transparency(ais, t): @@ -50,17 +178,22 @@ def get_bounding_box_center(bbox): def create_shape_from_serialization(brep_object): - brep_data, occ_shape = None, None + brep_data, occ_shape, styles = None, None, () is_product_shape = True try: brep_data = brep_object.geometry.brep_data + styles = brep_object.geometry.surface_styles except: try: brep_data = brep_object.brep_data + styles = brep_object.surface_styles is_product_shape = False except: pass - if not brep_data: return tuple(brep_object, None) + + styles = tuple(styles[i:i+4] for i in range(0, len(styles), 4)) + + if not brep_data: return shape_tuple(brep_object, None, styles) try: ss = OCC.BRepTools.BRepTools_ShapeSet() @@ -69,7 +202,7 @@ def create_shape_from_serialization(brep_object): except: pass if is_product_shape: - return tuple(brep_object, occ_shape) + return shape_tuple(brep_object, occ_shape, styles) else: return occ_shape diff --git a/src/ifcparse/Ifc2x3-latebound.cpp b/src/ifcparse/Ifc2x3-latebound.cpp index 289b4279c4..6cfb2675f1 100644 --- a/src/ifcparse/Ifc2x3-latebound.cpp +++ b/src/ifcparse/Ifc2x3-latebound.cpp @@ -4247,48 +4247,60 @@ std::pair Type::GetEnumerationIndex(Enum t, const std::string& } std::pair Type::GetInverseAttribute(Enum t, const std::string& a) { - if (inverse_map.empty()) ::InitInverseMap(); - inverse_map_t::const_iterator it; - inverse_map_t::mapped_type::const_iterator jt; - while (true) { + if (inverse_map.empty()) ::InitInverseMap(); + inverse_map_t::const_iterator it; + inverse_map_t::mapped_type::const_iterator jt; + for(;;) { it = inverse_map.find(t); if (it != inverse_map.end()) { - jt = it->second.find(a); - if (jt != it->second.end()) { - return jt->second; - } - } - if ((t = Parent(t)) == -1) break; + jt = it->second.find(a); + if (jt != it->second.end()) { + return jt->second; + } + } + boost::optional pt = Parent(t); + if (pt) { + t = *pt; + } + else { + break; + } } throw IfcException("Attribute not found"); } std::set Type::GetInverseAttributeNames(Enum t) { - if (inverse_map.empty()) ::InitInverseMap(); - inverse_map_t::const_iterator it; - inverse_map_t::mapped_type::const_iterator jt; + if (inverse_map.empty()) ::InitInverseMap(); + inverse_map_t::const_iterator it; + inverse_map_t::mapped_type::const_iterator jt; - std::set return_value; + std::set return_value; - while (true) { + for (;;) { it = inverse_map.find(t); if (it != inverse_map.end()) { - for (jt = it->second.begin(); jt != it->second.end(); ++jt) { - return_value.insert(jt->first); - } - } - if ((t = Parent(t)) == -1) break; + for (jt = it->second.begin(); jt != it->second.end(); ++jt) { + return_value.insert(jt->first); + } + } + boost::optional pt = Parent(t); + if (pt) { + t = *pt; + } + else { + break; + } } - - return return_value; + + return return_value; } void Type::PopulateDerivedFields(IfcWrite::IfcWritableEntity* e) { std::map >::const_iterator i = derived_map.find(e->type()); - if (i != derived_map.end()) { - for (std::set::const_iterator it = i->second.begin(); it != i->second.end(); ++it) { - e->setArgumentDerived(*it); - } - } + if (i != derived_map.end()) { + for (std::set::const_iterator it = i->second.begin(); it != i->second.end(); ++it) { + e->setArgumentDerived(*it); + } + } } #endif diff --git a/src/ifcparse/Ifc2x3.cpp b/src/ifcparse/Ifc2x3.cpp index 5406ae5c6b..b10bd81c51 100644 --- a/src/ifcparse/Ifc2x3.cpp +++ b/src/ifcparse/Ifc2x3.cpp @@ -31,6 +31,8 @@ #include "../ifcparse/IfcWrite.h" #include "../ifcparse/IfcWritableEntity.h" +#include + using namespace Ifc2x3; using namespace IfcParse; using namespace IfcWrite; @@ -1808,561 +1810,14 @@ Type::Enum Type::FromString(const std::string& s) { else return it->second; } -Type::Enum Type::Parent(Enum v){ - if (v < 0 || v >= 980) return (Enum)-1; - if(v==Ifc2DCompositeCurve ) { return IfcCompositeCurve; } - if(v==IfcActionRequest ) { return IfcControl; } - if(v==IfcActor ) { return IfcObject; } - if(v==IfcActuatorType ) { return IfcDistributionControlElementType; } - if(v==IfcAirTerminalBoxType ) { return IfcFlowControllerType; } - if(v==IfcAirTerminalType ) { return IfcFlowTerminalType; } - if(v==IfcAirToAirHeatRecoveryType ) { return IfcEnergyConversionDeviceType; } - if(v==IfcAlarmType ) { return IfcDistributionControlElementType; } - if(v==IfcAngularDimension ) { return IfcDimensionCurveDirectedCallout; } - if(v==IfcAnnotation ) { return IfcProduct; } - if(v==IfcAnnotationCurveOccurrence ) { return IfcAnnotationOccurrence; } - if(v==IfcAnnotationFillArea ) { return IfcGeometricRepresentationItem; } - if(v==IfcAnnotationFillAreaOccurrence ) { return IfcAnnotationOccurrence; } - if(v==IfcAnnotationOccurrence ) { return IfcStyledItem; } - if(v==IfcAnnotationSurface ) { return IfcGeometricRepresentationItem; } - if(v==IfcAnnotationSurfaceOccurrence ) { return IfcAnnotationOccurrence; } - if(v==IfcAnnotationSymbolOccurrence ) { return IfcAnnotationOccurrence; } - if(v==IfcAnnotationTextOccurrence ) { return IfcAnnotationOccurrence; } - if(v==IfcArbitraryClosedProfileDef ) { return IfcProfileDef; } - if(v==IfcArbitraryOpenProfileDef ) { return IfcProfileDef; } - if(v==IfcArbitraryProfileDefWithVoids ) { return IfcArbitraryClosedProfileDef; } - if(v==IfcAsset ) { return IfcGroup; } - if(v==IfcAsymmetricIShapeProfileDef ) { return IfcIShapeProfileDef; } - if(v==IfcAxis1Placement ) { return IfcPlacement; } - if(v==IfcAxis2Placement2D ) { return IfcPlacement; } - if(v==IfcAxis2Placement3D ) { return IfcPlacement; } - if(v==IfcBSplineCurve ) { return IfcBoundedCurve; } - if(v==IfcBeam ) { return IfcBuildingElement; } - if(v==IfcBeamType ) { return IfcBuildingElementType; } - if(v==IfcBezierCurve ) { return IfcBSplineCurve; } - if(v==IfcBlobTexture ) { return IfcSurfaceTexture; } - if(v==IfcBlock ) { return IfcCsgPrimitive3D; } - if(v==IfcBoilerType ) { return IfcEnergyConversionDeviceType; } - if(v==IfcBooleanClippingResult ) { return IfcBooleanResult; } - if(v==IfcBooleanResult ) { return IfcGeometricRepresentationItem; } - if(v==IfcBoundaryEdgeCondition ) { return IfcBoundaryCondition; } - if(v==IfcBoundaryFaceCondition ) { return IfcBoundaryCondition; } - if(v==IfcBoundaryNodeCondition ) { return IfcBoundaryCondition; } - if(v==IfcBoundaryNodeConditionWarping ) { return IfcBoundaryNodeCondition; } - if(v==IfcBoundedCurve ) { return IfcCurve; } - if(v==IfcBoundedSurface ) { return IfcSurface; } - if(v==IfcBoundingBox ) { return IfcGeometricRepresentationItem; } - if(v==IfcBoxedHalfSpace ) { return IfcHalfSpaceSolid; } - if(v==IfcBuilding ) { return IfcSpatialStructureElement; } - if(v==IfcBuildingElement ) { return IfcElement; } - if(v==IfcBuildingElementComponent ) { return IfcBuildingElement; } - if(v==IfcBuildingElementPart ) { return IfcBuildingElementComponent; } - if(v==IfcBuildingElementProxy ) { return IfcBuildingElement; } - if(v==IfcBuildingElementProxyType ) { return IfcBuildingElementType; } - if(v==IfcBuildingElementType ) { return IfcElementType; } - if(v==IfcBuildingStorey ) { return IfcSpatialStructureElement; } - if(v==IfcCShapeProfileDef ) { return IfcParameterizedProfileDef; } - if(v==IfcCableCarrierFittingType ) { return IfcFlowFittingType; } - if(v==IfcCableCarrierSegmentType ) { return IfcFlowSegmentType; } - if(v==IfcCableSegmentType ) { return IfcFlowSegmentType; } - if(v==IfcCartesianPoint ) { return IfcPoint; } - if(v==IfcCartesianTransformationOperator ) { return IfcGeometricRepresentationItem; } - if(v==IfcCartesianTransformationOperator2D ) { return IfcCartesianTransformationOperator; } - if(v==IfcCartesianTransformationOperator2DnonUniform) { return IfcCartesianTransformationOperator2D; } - if(v==IfcCartesianTransformationOperator3D ) { return IfcCartesianTransformationOperator; } - if(v==IfcCartesianTransformationOperator3DnonUniform) { return IfcCartesianTransformationOperator3D; } - if(v==IfcCenterLineProfileDef ) { return IfcArbitraryOpenProfileDef; } - if(v==IfcChamferEdgeFeature ) { return IfcEdgeFeature; } - if(v==IfcChillerType ) { return IfcEnergyConversionDeviceType; } - if(v==IfcCircle ) { return IfcConic; } - if(v==IfcCircleHollowProfileDef ) { return IfcCircleProfileDef; } - if(v==IfcCircleProfileDef ) { return IfcParameterizedProfileDef; } - if(v==IfcClassificationReference ) { return IfcExternalReference; } - if(v==IfcClosedShell ) { return IfcConnectedFaceSet; } - if(v==IfcCoilType ) { return IfcEnergyConversionDeviceType; } - if(v==IfcColourRgb ) { return IfcColourSpecification; } - if(v==IfcColumn ) { return IfcBuildingElement; } - if(v==IfcColumnType ) { return IfcBuildingElementType; } - if(v==IfcComplexProperty ) { return IfcProperty; } - if(v==IfcCompositeCurve ) { return IfcBoundedCurve; } - if(v==IfcCompositeCurveSegment ) { return IfcGeometricRepresentationItem; } - if(v==IfcCompositeProfileDef ) { return IfcProfileDef; } - if(v==IfcCompressorType ) { return IfcFlowMovingDeviceType; } - if(v==IfcCondenserType ) { return IfcEnergyConversionDeviceType; } - if(v==IfcCondition ) { return IfcGroup; } - if(v==IfcConditionCriterion ) { return IfcControl; } - if(v==IfcConic ) { return IfcCurve; } - if(v==IfcConnectedFaceSet ) { return IfcTopologicalRepresentationItem; } - if(v==IfcConnectionCurveGeometry ) { return IfcConnectionGeometry; } - if(v==IfcConnectionPointEccentricity ) { return IfcConnectionPointGeometry; } - if(v==IfcConnectionPointGeometry ) { return IfcConnectionGeometry; } - if(v==IfcConnectionPortGeometry ) { return IfcConnectionGeometry; } - if(v==IfcConnectionSurfaceGeometry ) { return IfcConnectionGeometry; } - if(v==IfcConstructionEquipmentResource ) { return IfcConstructionResource; } - if(v==IfcConstructionMaterialResource ) { return IfcConstructionResource; } - if(v==IfcConstructionProductResource ) { return IfcConstructionResource; } - if(v==IfcConstructionResource ) { return IfcResource; } - if(v==IfcContextDependentUnit ) { return IfcNamedUnit; } - if(v==IfcControl ) { return IfcObject; } - if(v==IfcControllerType ) { return IfcDistributionControlElementType; } - if(v==IfcConversionBasedUnit ) { return IfcNamedUnit; } - if(v==IfcCooledBeamType ) { return IfcEnergyConversionDeviceType; } - if(v==IfcCoolingTowerType ) { return IfcEnergyConversionDeviceType; } - if(v==IfcCostItem ) { return IfcControl; } - if(v==IfcCostSchedule ) { return IfcControl; } - if(v==IfcCostValue ) { return IfcAppliedValue; } - if(v==IfcCovering ) { return IfcBuildingElement; } - if(v==IfcCoveringType ) { return IfcBuildingElementType; } - if(v==IfcCraneRailAShapeProfileDef ) { return IfcParameterizedProfileDef; } - if(v==IfcCraneRailFShapeProfileDef ) { return IfcParameterizedProfileDef; } - if(v==IfcCrewResource ) { return IfcConstructionResource; } - if(v==IfcCsgPrimitive3D ) { return IfcGeometricRepresentationItem; } - if(v==IfcCsgSolid ) { return IfcSolidModel; } - if(v==IfcCurtainWall ) { return IfcBuildingElement; } - if(v==IfcCurtainWallType ) { return IfcBuildingElementType; } - if(v==IfcCurve ) { return IfcGeometricRepresentationItem; } - if(v==IfcCurveBoundedPlane ) { return IfcBoundedSurface; } - if(v==IfcCurveStyle ) { return IfcPresentationStyle; } - if(v==IfcDamperType ) { return IfcFlowControllerType; } - if(v==IfcDefinedSymbol ) { return IfcGeometricRepresentationItem; } - if(v==IfcDerivedProfileDef ) { return IfcProfileDef; } - if(v==IfcDiameterDimension ) { return IfcDimensionCurveDirectedCallout; } - if(v==IfcDimensionCalloutRelationship ) { return IfcDraughtingCalloutRelationship; } - if(v==IfcDimensionCurve ) { return IfcAnnotationCurveOccurrence; } - if(v==IfcDimensionCurveDirectedCallout ) { return IfcDraughtingCallout; } - if(v==IfcDimensionCurveTerminator ) { return IfcTerminatorSymbol; } - if(v==IfcDimensionPair ) { return IfcDraughtingCalloutRelationship; } - if(v==IfcDirection ) { return IfcGeometricRepresentationItem; } - if(v==IfcDiscreteAccessory ) { return IfcElementComponent; } - if(v==IfcDiscreteAccessoryType ) { return IfcElementComponentType; } - if(v==IfcDistributionChamberElement ) { return IfcDistributionFlowElement; } - if(v==IfcDistributionChamberElementType ) { return IfcDistributionFlowElementType; } - if(v==IfcDistributionControlElement ) { return IfcDistributionElement; } - if(v==IfcDistributionControlElementType ) { return IfcDistributionElementType; } - if(v==IfcDistributionElement ) { return IfcElement; } - if(v==IfcDistributionElementType ) { return IfcElementType; } - if(v==IfcDistributionFlowElement ) { return IfcDistributionElement; } - if(v==IfcDistributionFlowElementType ) { return IfcDistributionElementType; } - if(v==IfcDistributionPort ) { return IfcPort; } - if(v==IfcDocumentReference ) { return IfcExternalReference; } - if(v==IfcDoor ) { return IfcBuildingElement; } - if(v==IfcDoorLiningProperties ) { return IfcPropertySetDefinition; } - if(v==IfcDoorPanelProperties ) { return IfcPropertySetDefinition; } - if(v==IfcDoorStyle ) { return IfcTypeProduct; } - if(v==IfcDraughtingCallout ) { return IfcGeometricRepresentationItem; } - if(v==IfcDraughtingPreDefinedColour ) { return IfcPreDefinedColour; } - if(v==IfcDraughtingPreDefinedCurveFont ) { return IfcPreDefinedCurveFont; } - if(v==IfcDraughtingPreDefinedTextFont ) { return IfcPreDefinedTextFont; } - if(v==IfcDuctFittingType ) { return IfcFlowFittingType; } - if(v==IfcDuctSegmentType ) { return IfcFlowSegmentType; } - if(v==IfcDuctSilencerType ) { return IfcFlowTreatmentDeviceType; } - if(v==IfcEdge ) { return IfcTopologicalRepresentationItem; } - if(v==IfcEdgeCurve ) { return IfcEdge; } - if(v==IfcEdgeFeature ) { return IfcFeatureElementSubtraction; } - if(v==IfcEdgeLoop ) { return IfcLoop; } - if(v==IfcElectricApplianceType ) { return IfcFlowTerminalType; } - if(v==IfcElectricDistributionPoint ) { return IfcFlowController; } - if(v==IfcElectricFlowStorageDeviceType ) { return IfcFlowStorageDeviceType; } - if(v==IfcElectricGeneratorType ) { return IfcEnergyConversionDeviceType; } - if(v==IfcElectricHeaterType ) { return IfcFlowTerminalType; } - if(v==IfcElectricMotorType ) { return IfcEnergyConversionDeviceType; } - if(v==IfcElectricTimeControlType ) { return IfcFlowControllerType; } - if(v==IfcElectricalBaseProperties ) { return IfcEnergyProperties; } - if(v==IfcElectricalCircuit ) { return IfcSystem; } - if(v==IfcElectricalElement ) { return IfcElement; } - if(v==IfcElement ) { return IfcProduct; } - if(v==IfcElementAssembly ) { return IfcElement; } - if(v==IfcElementComponent ) { return IfcElement; } - if(v==IfcElementComponentType ) { return IfcElementType; } - if(v==IfcElementQuantity ) { return IfcPropertySetDefinition; } - if(v==IfcElementType ) { return IfcTypeProduct; } - if(v==IfcElementarySurface ) { return IfcSurface; } - if(v==IfcEllipse ) { return IfcConic; } - if(v==IfcEllipseProfileDef ) { return IfcParameterizedProfileDef; } - if(v==IfcEnergyConversionDevice ) { return IfcDistributionFlowElement; } - if(v==IfcEnergyConversionDeviceType ) { return IfcDistributionFlowElementType; } - if(v==IfcEnergyProperties ) { return IfcPropertySetDefinition; } - if(v==IfcEnvironmentalImpactValue ) { return IfcAppliedValue; } - if(v==IfcEquipmentElement ) { return IfcElement; } - if(v==IfcEquipmentStandard ) { return IfcControl; } - if(v==IfcEvaporativeCoolerType ) { return IfcEnergyConversionDeviceType; } - if(v==IfcEvaporatorType ) { return IfcEnergyConversionDeviceType; } - if(v==IfcExtendedMaterialProperties ) { return IfcMaterialProperties; } - if(v==IfcExternallyDefinedHatchStyle ) { return IfcExternalReference; } - if(v==IfcExternallyDefinedSurfaceStyle ) { return IfcExternalReference; } - if(v==IfcExternallyDefinedSymbol ) { return IfcExternalReference; } - if(v==IfcExternallyDefinedTextFont ) { return IfcExternalReference; } - if(v==IfcExtrudedAreaSolid ) { return IfcSweptAreaSolid; } - if(v==IfcFace ) { return IfcTopologicalRepresentationItem; } - if(v==IfcFaceBasedSurfaceModel ) { return IfcGeometricRepresentationItem; } - if(v==IfcFaceBound ) { return IfcTopologicalRepresentationItem; } - if(v==IfcFaceOuterBound ) { return IfcFaceBound; } - if(v==IfcFaceSurface ) { return IfcFace; } - if(v==IfcFacetedBrep ) { return IfcManifoldSolidBrep; } - if(v==IfcFacetedBrepWithVoids ) { return IfcManifoldSolidBrep; } - if(v==IfcFailureConnectionCondition ) { return IfcStructuralConnectionCondition; } - if(v==IfcFanType ) { return IfcFlowMovingDeviceType; } - if(v==IfcFastener ) { return IfcElementComponent; } - if(v==IfcFastenerType ) { return IfcElementComponentType; } - if(v==IfcFeatureElement ) { return IfcElement; } - if(v==IfcFeatureElementAddition ) { return IfcFeatureElement; } - if(v==IfcFeatureElementSubtraction ) { return IfcFeatureElement; } - if(v==IfcFillAreaStyle ) { return IfcPresentationStyle; } - if(v==IfcFillAreaStyleHatching ) { return IfcGeometricRepresentationItem; } - if(v==IfcFillAreaStyleTileSymbolWithStyle ) { return IfcGeometricRepresentationItem; } - if(v==IfcFillAreaStyleTiles ) { return IfcGeometricRepresentationItem; } - if(v==IfcFilterType ) { return IfcFlowTreatmentDeviceType; } - if(v==IfcFireSuppressionTerminalType ) { return IfcFlowTerminalType; } - if(v==IfcFlowController ) { return IfcDistributionFlowElement; } - if(v==IfcFlowControllerType ) { return IfcDistributionFlowElementType; } - if(v==IfcFlowFitting ) { return IfcDistributionFlowElement; } - if(v==IfcFlowFittingType ) { return IfcDistributionFlowElementType; } - if(v==IfcFlowInstrumentType ) { return IfcDistributionControlElementType; } - if(v==IfcFlowMeterType ) { return IfcFlowControllerType; } - if(v==IfcFlowMovingDevice ) { return IfcDistributionFlowElement; } - if(v==IfcFlowMovingDeviceType ) { return IfcDistributionFlowElementType; } - if(v==IfcFlowSegment ) { return IfcDistributionFlowElement; } - if(v==IfcFlowSegmentType ) { return IfcDistributionFlowElementType; } - if(v==IfcFlowStorageDevice ) { return IfcDistributionFlowElement; } - if(v==IfcFlowStorageDeviceType ) { return IfcDistributionFlowElementType; } - if(v==IfcFlowTerminal ) { return IfcDistributionFlowElement; } - if(v==IfcFlowTerminalType ) { return IfcDistributionFlowElementType; } - if(v==IfcFlowTreatmentDevice ) { return IfcDistributionFlowElement; } - if(v==IfcFlowTreatmentDeviceType ) { return IfcDistributionFlowElementType; } - if(v==IfcFluidFlowProperties ) { return IfcPropertySetDefinition; } - if(v==IfcFooting ) { return IfcBuildingElement; } - if(v==IfcFuelProperties ) { return IfcMaterialProperties; } - if(v==IfcFurnishingElement ) { return IfcElement; } - if(v==IfcFurnishingElementType ) { return IfcElementType; } - if(v==IfcFurnitureStandard ) { return IfcControl; } - if(v==IfcFurnitureType ) { return IfcFurnishingElementType; } - if(v==IfcGasTerminalType ) { return IfcFlowTerminalType; } - if(v==IfcGeneralMaterialProperties ) { return IfcMaterialProperties; } - if(v==IfcGeneralProfileProperties ) { return IfcProfileProperties; } - if(v==IfcGeometricCurveSet ) { return IfcGeometricSet; } - if(v==IfcGeometricRepresentationContext ) { return IfcRepresentationContext; } - if(v==IfcGeometricRepresentationItem ) { return IfcRepresentationItem; } - if(v==IfcGeometricRepresentationSubContext ) { return IfcGeometricRepresentationContext; } - if(v==IfcGeometricSet ) { return IfcGeometricRepresentationItem; } - if(v==IfcGrid ) { return IfcProduct; } - if(v==IfcGridPlacement ) { return IfcObjectPlacement; } - if(v==IfcGroup ) { return IfcObject; } - if(v==IfcHalfSpaceSolid ) { return IfcGeometricRepresentationItem; } - if(v==IfcHeatExchangerType ) { return IfcEnergyConversionDeviceType; } - if(v==IfcHumidifierType ) { return IfcEnergyConversionDeviceType; } - if(v==IfcHygroscopicMaterialProperties ) { return IfcMaterialProperties; } - if(v==IfcIShapeProfileDef ) { return IfcParameterizedProfileDef; } - if(v==IfcImageTexture ) { return IfcSurfaceTexture; } - if(v==IfcInventory ) { return IfcGroup; } - if(v==IfcIrregularTimeSeries ) { return IfcTimeSeries; } - if(v==IfcJunctionBoxType ) { return IfcFlowFittingType; } - if(v==IfcLShapeProfileDef ) { return IfcParameterizedProfileDef; } - if(v==IfcLaborResource ) { return IfcConstructionResource; } - if(v==IfcLampType ) { return IfcFlowTerminalType; } - if(v==IfcLibraryReference ) { return IfcExternalReference; } - if(v==IfcLightFixtureType ) { return IfcFlowTerminalType; } - if(v==IfcLightSource ) { return IfcGeometricRepresentationItem; } - if(v==IfcLightSourceAmbient ) { return IfcLightSource; } - if(v==IfcLightSourceDirectional ) { return IfcLightSource; } - if(v==IfcLightSourceGoniometric ) { return IfcLightSource; } - if(v==IfcLightSourcePositional ) { return IfcLightSource; } - if(v==IfcLightSourceSpot ) { return IfcLightSourcePositional; } - if(v==IfcLine ) { return IfcCurve; } - if(v==IfcLinearDimension ) { return IfcDimensionCurveDirectedCallout; } - if(v==IfcLocalPlacement ) { return IfcObjectPlacement; } - if(v==IfcLoop ) { return IfcTopologicalRepresentationItem; } - if(v==IfcManifoldSolidBrep ) { return IfcSolidModel; } - if(v==IfcMappedItem ) { return IfcRepresentationItem; } - if(v==IfcMaterialDefinitionRepresentation ) { return IfcProductRepresentation; } - if(v==IfcMechanicalConcreteMaterialProperties ) { return IfcMechanicalMaterialProperties; } - if(v==IfcMechanicalFastener ) { return IfcFastener; } - if(v==IfcMechanicalFastenerType ) { return IfcFastenerType; } - if(v==IfcMechanicalMaterialProperties ) { return IfcMaterialProperties; } - if(v==IfcMechanicalSteelMaterialProperties ) { return IfcMechanicalMaterialProperties; } - if(v==IfcMember ) { return IfcBuildingElement; } - if(v==IfcMemberType ) { return IfcBuildingElementType; } - if(v==IfcMetric ) { return IfcConstraint; } - if(v==IfcMotorConnectionType ) { return IfcEnergyConversionDeviceType; } - if(v==IfcMove ) { return IfcTask; } - if(v==IfcObject ) { return IfcObjectDefinition; } - if(v==IfcObjectDefinition ) { return IfcRoot; } - if(v==IfcObjective ) { return IfcConstraint; } - if(v==IfcOccupant ) { return IfcActor; } - if(v==IfcOffsetCurve2D ) { return IfcCurve; } - if(v==IfcOffsetCurve3D ) { return IfcCurve; } - if(v==IfcOneDirectionRepeatFactor ) { return IfcGeometricRepresentationItem; } - if(v==IfcOpenShell ) { return IfcConnectedFaceSet; } - if(v==IfcOpeningElement ) { return IfcFeatureElementSubtraction; } - if(v==IfcOpticalMaterialProperties ) { return IfcMaterialProperties; } - if(v==IfcOrderAction ) { return IfcTask; } - if(v==IfcOrientedEdge ) { return IfcEdge; } - if(v==IfcOutletType ) { return IfcFlowTerminalType; } - if(v==IfcParameterizedProfileDef ) { return IfcProfileDef; } - if(v==IfcPath ) { return IfcTopologicalRepresentationItem; } - if(v==IfcPerformanceHistory ) { return IfcControl; } - if(v==IfcPermeableCoveringProperties ) { return IfcPropertySetDefinition; } - if(v==IfcPermit ) { return IfcControl; } - if(v==IfcPhysicalComplexQuantity ) { return IfcPhysicalQuantity; } - if(v==IfcPhysicalSimpleQuantity ) { return IfcPhysicalQuantity; } - if(v==IfcPile ) { return IfcBuildingElement; } - if(v==IfcPipeFittingType ) { return IfcFlowFittingType; } - if(v==IfcPipeSegmentType ) { return IfcFlowSegmentType; } - if(v==IfcPixelTexture ) { return IfcSurfaceTexture; } - if(v==IfcPlacement ) { return IfcGeometricRepresentationItem; } - if(v==IfcPlanarBox ) { return IfcPlanarExtent; } - if(v==IfcPlanarExtent ) { return IfcGeometricRepresentationItem; } - if(v==IfcPlane ) { return IfcElementarySurface; } - if(v==IfcPlate ) { return IfcBuildingElement; } - if(v==IfcPlateType ) { return IfcBuildingElementType; } - if(v==IfcPoint ) { return IfcGeometricRepresentationItem; } - if(v==IfcPointOnCurve ) { return IfcPoint; } - if(v==IfcPointOnSurface ) { return IfcPoint; } - if(v==IfcPolyLoop ) { return IfcLoop; } - if(v==IfcPolygonalBoundedHalfSpace ) { return IfcHalfSpaceSolid; } - if(v==IfcPolyline ) { return IfcBoundedCurve; } - if(v==IfcPort ) { return IfcProduct; } - if(v==IfcPostalAddress ) { return IfcAddress; } - if(v==IfcPreDefinedColour ) { return IfcPreDefinedItem; } - if(v==IfcPreDefinedCurveFont ) { return IfcPreDefinedItem; } - if(v==IfcPreDefinedDimensionSymbol ) { return IfcPreDefinedSymbol; } - if(v==IfcPreDefinedPointMarkerSymbol ) { return IfcPreDefinedSymbol; } - if(v==IfcPreDefinedSymbol ) { return IfcPreDefinedItem; } - if(v==IfcPreDefinedTerminatorSymbol ) { return IfcPreDefinedSymbol; } - if(v==IfcPreDefinedTextFont ) { return IfcPreDefinedItem; } - if(v==IfcPresentationLayerWithStyle ) { return IfcPresentationLayerAssignment; } - if(v==IfcProcedure ) { return IfcProcess; } - if(v==IfcProcess ) { return IfcObject; } - if(v==IfcProduct ) { return IfcObject; } - if(v==IfcProductDefinitionShape ) { return IfcProductRepresentation; } - if(v==IfcProductsOfCombustionProperties ) { return IfcMaterialProperties; } - if(v==IfcProject ) { return IfcObject; } - if(v==IfcProjectOrder ) { return IfcControl; } - if(v==IfcProjectOrderRecord ) { return IfcControl; } - if(v==IfcProjectionCurve ) { return IfcAnnotationCurveOccurrence; } - if(v==IfcProjectionElement ) { return IfcFeatureElementAddition; } - if(v==IfcPropertyBoundedValue ) { return IfcSimpleProperty; } - if(v==IfcPropertyDefinition ) { return IfcRoot; } - if(v==IfcPropertyEnumeratedValue ) { return IfcSimpleProperty; } - if(v==IfcPropertyListValue ) { return IfcSimpleProperty; } - if(v==IfcPropertyReferenceValue ) { return IfcSimpleProperty; } - if(v==IfcPropertySet ) { return IfcPropertySetDefinition; } - if(v==IfcPropertySetDefinition ) { return IfcPropertyDefinition; } - if(v==IfcPropertySingleValue ) { return IfcSimpleProperty; } - if(v==IfcPropertyTableValue ) { return IfcSimpleProperty; } - if(v==IfcProtectiveDeviceType ) { return IfcFlowControllerType; } - if(v==IfcProxy ) { return IfcProduct; } - if(v==IfcPumpType ) { return IfcFlowMovingDeviceType; } - if(v==IfcQuantityArea ) { return IfcPhysicalSimpleQuantity; } - if(v==IfcQuantityCount ) { return IfcPhysicalSimpleQuantity; } - if(v==IfcQuantityLength ) { return IfcPhysicalSimpleQuantity; } - if(v==IfcQuantityTime ) { return IfcPhysicalSimpleQuantity; } - if(v==IfcQuantityVolume ) { return IfcPhysicalSimpleQuantity; } - if(v==IfcQuantityWeight ) { return IfcPhysicalSimpleQuantity; } - if(v==IfcRadiusDimension ) { return IfcDimensionCurveDirectedCallout; } - if(v==IfcRailing ) { return IfcBuildingElement; } - if(v==IfcRailingType ) { return IfcBuildingElementType; } - if(v==IfcRamp ) { return IfcBuildingElement; } - if(v==IfcRampFlight ) { return IfcBuildingElement; } - if(v==IfcRampFlightType ) { return IfcBuildingElementType; } - if(v==IfcRationalBezierCurve ) { return IfcBezierCurve; } - if(v==IfcRectangleHollowProfileDef ) { return IfcRectangleProfileDef; } - if(v==IfcRectangleProfileDef ) { return IfcParameterizedProfileDef; } - if(v==IfcRectangularPyramid ) { return IfcCsgPrimitive3D; } - if(v==IfcRectangularTrimmedSurface ) { return IfcBoundedSurface; } - if(v==IfcRegularTimeSeries ) { return IfcTimeSeries; } - if(v==IfcReinforcementDefinitionProperties ) { return IfcPropertySetDefinition; } - if(v==IfcReinforcingBar ) { return IfcReinforcingElement; } - if(v==IfcReinforcingElement ) { return IfcBuildingElementComponent; } - if(v==IfcReinforcingMesh ) { return IfcReinforcingElement; } - if(v==IfcRelAggregates ) { return IfcRelDecomposes; } - if(v==IfcRelAssigns ) { return IfcRelationship; } - if(v==IfcRelAssignsTasks ) { return IfcRelAssignsToControl; } - if(v==IfcRelAssignsToActor ) { return IfcRelAssigns; } - if(v==IfcRelAssignsToControl ) { return IfcRelAssigns; } - if(v==IfcRelAssignsToGroup ) { return IfcRelAssigns; } - if(v==IfcRelAssignsToProcess ) { return IfcRelAssigns; } - if(v==IfcRelAssignsToProduct ) { return IfcRelAssigns; } - if(v==IfcRelAssignsToProjectOrder ) { return IfcRelAssignsToControl; } - if(v==IfcRelAssignsToResource ) { return IfcRelAssigns; } - if(v==IfcRelAssociates ) { return IfcRelationship; } - if(v==IfcRelAssociatesAppliedValue ) { return IfcRelAssociates; } - if(v==IfcRelAssociatesApproval ) { return IfcRelAssociates; } - if(v==IfcRelAssociatesClassification ) { return IfcRelAssociates; } - if(v==IfcRelAssociatesConstraint ) { return IfcRelAssociates; } - if(v==IfcRelAssociatesDocument ) { return IfcRelAssociates; } - if(v==IfcRelAssociatesLibrary ) { return IfcRelAssociates; } - if(v==IfcRelAssociatesMaterial ) { return IfcRelAssociates; } - if(v==IfcRelAssociatesProfileProperties ) { return IfcRelAssociates; } - if(v==IfcRelConnects ) { return IfcRelationship; } - if(v==IfcRelConnectsElements ) { return IfcRelConnects; } - if(v==IfcRelConnectsPathElements ) { return IfcRelConnectsElements; } - if(v==IfcRelConnectsPortToElement ) { return IfcRelConnects; } - if(v==IfcRelConnectsPorts ) { return IfcRelConnects; } - if(v==IfcRelConnectsStructuralActivity ) { return IfcRelConnects; } - if(v==IfcRelConnectsStructuralElement ) { return IfcRelConnects; } - if(v==IfcRelConnectsStructuralMember ) { return IfcRelConnects; } - if(v==IfcRelConnectsWithEccentricity ) { return IfcRelConnectsStructuralMember; } - if(v==IfcRelConnectsWithRealizingElements ) { return IfcRelConnectsElements; } - if(v==IfcRelContainedInSpatialStructure ) { return IfcRelConnects; } - if(v==IfcRelCoversBldgElements ) { return IfcRelConnects; } - if(v==IfcRelCoversSpaces ) { return IfcRelConnects; } - if(v==IfcRelDecomposes ) { return IfcRelationship; } - if(v==IfcRelDefines ) { return IfcRelationship; } - if(v==IfcRelDefinesByProperties ) { return IfcRelDefines; } - if(v==IfcRelDefinesByType ) { return IfcRelDefines; } - if(v==IfcRelFillsElement ) { return IfcRelConnects; } - if(v==IfcRelFlowControlElements ) { return IfcRelConnects; } - if(v==IfcRelInteractionRequirements ) { return IfcRelConnects; } - if(v==IfcRelNests ) { return IfcRelDecomposes; } - if(v==IfcRelOccupiesSpaces ) { return IfcRelAssignsToActor; } - if(v==IfcRelOverridesProperties ) { return IfcRelDefinesByProperties; } - if(v==IfcRelProjectsElement ) { return IfcRelConnects; } - if(v==IfcRelReferencedInSpatialStructure ) { return IfcRelConnects; } - if(v==IfcRelSchedulesCostItems ) { return IfcRelAssignsToControl; } - if(v==IfcRelSequence ) { return IfcRelConnects; } - if(v==IfcRelServicesBuildings ) { return IfcRelConnects; } - if(v==IfcRelSpaceBoundary ) { return IfcRelConnects; } - if(v==IfcRelVoidsElement ) { return IfcRelConnects; } - if(v==IfcRelationship ) { return IfcRoot; } - if(v==IfcResource ) { return IfcObject; } - if(v==IfcRevolvedAreaSolid ) { return IfcSweptAreaSolid; } - if(v==IfcRibPlateProfileProperties ) { return IfcProfileProperties; } - if(v==IfcRightCircularCone ) { return IfcCsgPrimitive3D; } - if(v==IfcRightCircularCylinder ) { return IfcCsgPrimitive3D; } - if(v==IfcRoof ) { return IfcBuildingElement; } - if(v==IfcRoundedEdgeFeature ) { return IfcEdgeFeature; } - if(v==IfcRoundedRectangleProfileDef ) { return IfcRectangleProfileDef; } - if(v==IfcSIUnit ) { return IfcNamedUnit; } - if(v==IfcSanitaryTerminalType ) { return IfcFlowTerminalType; } - if(v==IfcScheduleTimeControl ) { return IfcControl; } - if(v==IfcSectionedSpine ) { return IfcGeometricRepresentationItem; } - if(v==IfcSensorType ) { return IfcDistributionControlElementType; } - if(v==IfcServiceLife ) { return IfcControl; } - if(v==IfcServiceLifeFactor ) { return IfcPropertySetDefinition; } - if(v==IfcShapeModel ) { return IfcRepresentation; } - if(v==IfcShapeRepresentation ) { return IfcShapeModel; } - if(v==IfcShellBasedSurfaceModel ) { return IfcGeometricRepresentationItem; } - if(v==IfcSimpleProperty ) { return IfcProperty; } - if(v==IfcSite ) { return IfcSpatialStructureElement; } - if(v==IfcSlab ) { return IfcBuildingElement; } - if(v==IfcSlabType ) { return IfcBuildingElementType; } - if(v==IfcSlippageConnectionCondition ) { return IfcStructuralConnectionCondition; } - if(v==IfcSolidModel ) { return IfcGeometricRepresentationItem; } - if(v==IfcSoundProperties ) { return IfcPropertySetDefinition; } - if(v==IfcSoundValue ) { return IfcPropertySetDefinition; } - if(v==IfcSpace ) { return IfcSpatialStructureElement; } - if(v==IfcSpaceHeaterType ) { return IfcEnergyConversionDeviceType; } - if(v==IfcSpaceProgram ) { return IfcControl; } - if(v==IfcSpaceThermalLoadProperties ) { return IfcPropertySetDefinition; } - if(v==IfcSpaceType ) { return IfcSpatialStructureElementType; } - if(v==IfcSpatialStructureElement ) { return IfcProduct; } - if(v==IfcSpatialStructureElementType ) { return IfcElementType; } - if(v==IfcSphere ) { return IfcCsgPrimitive3D; } - if(v==IfcStackTerminalType ) { return IfcFlowTerminalType; } - if(v==IfcStair ) { return IfcBuildingElement; } - if(v==IfcStairFlight ) { return IfcBuildingElement; } - if(v==IfcStairFlightType ) { return IfcBuildingElementType; } - if(v==IfcStructuralAction ) { return IfcStructuralActivity; } - if(v==IfcStructuralActivity ) { return IfcProduct; } - if(v==IfcStructuralAnalysisModel ) { return IfcSystem; } - if(v==IfcStructuralConnection ) { return IfcStructuralItem; } - if(v==IfcStructuralCurveConnection ) { return IfcStructuralConnection; } - if(v==IfcStructuralCurveMember ) { return IfcStructuralMember; } - if(v==IfcStructuralCurveMemberVarying ) { return IfcStructuralCurveMember; } - if(v==IfcStructuralItem ) { return IfcProduct; } - if(v==IfcStructuralLinearAction ) { return IfcStructuralAction; } - if(v==IfcStructuralLinearActionVarying ) { return IfcStructuralLinearAction; } - if(v==IfcStructuralLoadGroup ) { return IfcGroup; } - if(v==IfcStructuralLoadLinearForce ) { return IfcStructuralLoadStatic; } - if(v==IfcStructuralLoadPlanarForce ) { return IfcStructuralLoadStatic; } - if(v==IfcStructuralLoadSingleDisplacement ) { return IfcStructuralLoadStatic; } - if(v==IfcStructuralLoadSingleDisplacementDistortion ) { return IfcStructuralLoadSingleDisplacement; } - if(v==IfcStructuralLoadSingleForce ) { return IfcStructuralLoadStatic; } - if(v==IfcStructuralLoadSingleForceWarping ) { return IfcStructuralLoadSingleForce; } - if(v==IfcStructuralLoadStatic ) { return IfcStructuralLoad; } - if(v==IfcStructuralLoadTemperature ) { return IfcStructuralLoadStatic; } - if(v==IfcStructuralMember ) { return IfcStructuralItem; } - if(v==IfcStructuralPlanarAction ) { return IfcStructuralAction; } - if(v==IfcStructuralPlanarActionVarying ) { return IfcStructuralPlanarAction; } - if(v==IfcStructuralPointAction ) { return IfcStructuralAction; } - if(v==IfcStructuralPointConnection ) { return IfcStructuralConnection; } - if(v==IfcStructuralPointReaction ) { return IfcStructuralReaction; } - if(v==IfcStructuralProfileProperties ) { return IfcGeneralProfileProperties; } - if(v==IfcStructuralReaction ) { return IfcStructuralActivity; } - if(v==IfcStructuralResultGroup ) { return IfcGroup; } - if(v==IfcStructuralSteelProfileProperties ) { return IfcStructuralProfileProperties; } - if(v==IfcStructuralSurfaceConnection ) { return IfcStructuralConnection; } - if(v==IfcStructuralSurfaceMember ) { return IfcStructuralMember; } - if(v==IfcStructuralSurfaceMemberVarying ) { return IfcStructuralSurfaceMember; } - if(v==IfcStructuredDimensionCallout ) { return IfcDraughtingCallout; } - if(v==IfcStyleModel ) { return IfcRepresentation; } - if(v==IfcStyledItem ) { return IfcRepresentationItem; } - if(v==IfcStyledRepresentation ) { return IfcStyleModel; } - if(v==IfcSubContractResource ) { return IfcConstructionResource; } - if(v==IfcSubedge ) { return IfcEdge; } - if(v==IfcSurface ) { return IfcGeometricRepresentationItem; } - if(v==IfcSurfaceCurveSweptAreaSolid ) { return IfcSweptAreaSolid; } - if(v==IfcSurfaceOfLinearExtrusion ) { return IfcSweptSurface; } - if(v==IfcSurfaceOfRevolution ) { return IfcSweptSurface; } - if(v==IfcSurfaceStyle ) { return IfcPresentationStyle; } - if(v==IfcSurfaceStyleRendering ) { return IfcSurfaceStyleShading; } - if(v==IfcSweptAreaSolid ) { return IfcSolidModel; } - if(v==IfcSweptDiskSolid ) { return IfcSolidModel; } - if(v==IfcSweptSurface ) { return IfcSurface; } - if(v==IfcSwitchingDeviceType ) { return IfcFlowControllerType; } - if(v==IfcSymbolStyle ) { return IfcPresentationStyle; } - if(v==IfcSystem ) { return IfcGroup; } - if(v==IfcSystemFurnitureElementType ) { return IfcFurnishingElementType; } - if(v==IfcTShapeProfileDef ) { return IfcParameterizedProfileDef; } - if(v==IfcTankType ) { return IfcFlowStorageDeviceType; } - if(v==IfcTask ) { return IfcProcess; } - if(v==IfcTelecomAddress ) { return IfcAddress; } - if(v==IfcTendon ) { return IfcReinforcingElement; } - if(v==IfcTendonAnchor ) { return IfcReinforcingElement; } - if(v==IfcTerminatorSymbol ) { return IfcAnnotationSymbolOccurrence; } - if(v==IfcTextLiteral ) { return IfcGeometricRepresentationItem; } - if(v==IfcTextLiteralWithExtent ) { return IfcTextLiteral; } - if(v==IfcTextStyle ) { return IfcPresentationStyle; } - if(v==IfcTextStyleFontModel ) { return IfcPreDefinedTextFont; } - if(v==IfcTextureCoordinateGenerator ) { return IfcTextureCoordinate; } - if(v==IfcTextureMap ) { return IfcTextureCoordinate; } - if(v==IfcThermalMaterialProperties ) { return IfcMaterialProperties; } - if(v==IfcTimeSeriesSchedule ) { return IfcControl; } - if(v==IfcTopologicalRepresentationItem ) { return IfcRepresentationItem; } - if(v==IfcTopologyRepresentation ) { return IfcShapeModel; } - if(v==IfcTransformerType ) { return IfcEnergyConversionDeviceType; } - if(v==IfcTransportElement ) { return IfcElement; } - if(v==IfcTransportElementType ) { return IfcElementType; } - if(v==IfcTrapeziumProfileDef ) { return IfcParameterizedProfileDef; } - if(v==IfcTrimmedCurve ) { return IfcBoundedCurve; } - if(v==IfcTubeBundleType ) { return IfcEnergyConversionDeviceType; } - if(v==IfcTwoDirectionRepeatFactor ) { return IfcOneDirectionRepeatFactor; } - if(v==IfcTypeObject ) { return IfcObjectDefinition; } - if(v==IfcTypeProduct ) { return IfcTypeObject; } - if(v==IfcUShapeProfileDef ) { return IfcParameterizedProfileDef; } - if(v==IfcUnitaryEquipmentType ) { return IfcEnergyConversionDeviceType; } - if(v==IfcValveType ) { return IfcFlowControllerType; } - if(v==IfcVector ) { return IfcGeometricRepresentationItem; } - if(v==IfcVertex ) { return IfcTopologicalRepresentationItem; } - if(v==IfcVertexLoop ) { return IfcLoop; } - if(v==IfcVertexPoint ) { return IfcVertex; } - if(v==IfcVibrationIsolatorType ) { return IfcDiscreteAccessoryType; } - if(v==IfcVirtualElement ) { return IfcElement; } - if(v==IfcWall ) { return IfcBuildingElement; } - if(v==IfcWallStandardCase ) { return IfcWall; } - if(v==IfcWallType ) { return IfcBuildingElementType; } - if(v==IfcWasteTerminalType ) { return IfcFlowTerminalType; } - if(v==IfcWaterProperties ) { return IfcMaterialProperties; } - if(v==IfcWindow ) { return IfcBuildingElement; } - if(v==IfcWindowLiningProperties ) { return IfcPropertySetDefinition; } - if(v==IfcWindowPanelProperties ) { return IfcPropertySetDefinition; } - if(v==IfcWindowStyle ) { return IfcTypeProduct; } - if(v==IfcWorkControl ) { return IfcControl; } - if(v==IfcWorkPlan ) { return IfcWorkControl; } - if(v==IfcWorkSchedule ) { return IfcWorkControl; } - if(v==IfcZShapeProfileDef ) { return IfcParameterizedProfileDef; } - if(v==IfcZone ) { return IfcGroup; } - return (Enum)-1; +static int parent_map[] = {133,-1,-1,164,-1,-1,515,-1,-1,234,-1,-1,-1,-1,354,-1,369,-1,309,-1,234,-1,-1,-1,-1,221,-1,600,31,392,31,840,392,31,31,31,-1,-1,-1,-1,-1,-1,-1,-1,604,604,44,-1,-1,-1,401,412,560,-1,560,560,77,-1,83,89,-1,-1,56,857,184,309,-1,-1,71,-1,-1,392,-1,72,72,72,75,193,844,392,-1,402,786,297,83,84,83,89,-1,304,786,540,357,-1,365,-1,365,-1,-1,569,392,100,101,100,103,45,271,-1,-1,309,-1,144,113,540,-1,-1,-1,-1,-1,-1,322,145,309,-1,-1,-1,127,-1,83,89,-1,-1,615,77,392,604,-1,363,-1,309,-1,401,164,-1,193,916,147,-1,149,147,147,147,-1,-1,-1,-1,-1,-1,161,161,161,722,-1,511,515,234,-1,511,309,-1,309,-1,-1,164,164,-1,37,-1,83,89,-1,540,540,161,392,-1,773,-1,-1,83,89,-1,-1,392,78,-1,-1,593,-1,-1,-1,-1,354,-1,-1,-1,-1,-1,-1,392,-1,-1,604,-1,-1,-1,-1,221,258,-1,28,256,879,-1,258,-1,392,-1,300,301,237,238,-1,235,236,297,304,235,236,576,-1,-1,-1,-1,322,-1,-1,83,625,-1,-1,625,933,-1,-1,-1,392,-1,-1,582,583,589,357,-1,365,-1,371,-1,-1,916,269,342,464,369,-1,-1,-1,-1,-1,-1,353,-1,367,-1,309,-1,369,-1,309,-1,-1,354,-1,-1,311,866,297,600,297,-1,297,304,-1,625,933,844,144,540,237,238,-1,625,-1,-1,37,297,164,309,-1,309,-1,483,-1,322,322,322,322,859,916,392,916,330,328,470,470,806,363,-1,300,301,297,340,340,593,392,-1,392,392,-1,371,-1,369,-1,237,238,-1,237,238,234,-1,354,-1,237,238,237,238,237,238,237,238,237,238,625,-1,-1,-1,83,-1,-1,-1,483,297,304,164,382,369,-1,483,605,394,-1,719,720,391,392,-1,-1,-1,600,-1,517,515,392,-1,309,-1,-1,-1,-1,309,-1,483,540,-1,-1,857,-1,-1,-1,-1,401,-1,-1,909,-1,-1,357,-1,-1,540,-1,161,369,-1,-1,-1,-1,-1,322,-1,-1,-1,-1,-1,369,-1,-1,392,447,447,447,447,451,193,221,-1,-1,-1,-1,-1,517,-1,-1,-1,916,-1,-1,-1,-1,-1,773,720,-1,-1,-1,-1,-1,-1,602,-1,-1,-1,-1,-1,-1,-1,-1,490,338,339,483,490,83,89,-1,153,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,309,-1,873,-1,-1,-1,-1,516,732,-1,-1,-1,153,-1,6,-1,193,193,392,145,342,483,873,-1,-1,-1,269,369,-1,-1,-1,-1,604,916,164,-1,625,164,-1,-1,550,-1,-1,550,83,-1,-1,357,-1,365,-1,857,392,562,392,-1,305,-1,83,89,-1,392,569,569,-1,464,402,77,600,-1,-1,-1,11,-1,585,585,587,-1,587,585,587,585,-1,-1,591,-1,-1,-1,-1,599,-1,515,515,602,-1,483,-1,-1,-1,515,164,164,-1,-1,-1,28,341,-1,764,-1,732,-1,764,-1,764,764,625,618,764,-1,764,354,-1,600,363,-1,551,551,551,551,551,551,-1,221,83,89,-1,83,83,89,-1,-1,-1,62,-1,654,540,184,78,-1,-1,909,-1,625,665,-1,-1,84,665,699,716,671,668,668,668,668,668,671,668,716,677,677,677,677,677,677,677,677,716,686,687,686,686,686,686,686,693,687,686,686,686,716,716,700,700,686,686,686,699,670,701,686,686,671,686,686,686,686,732,-1,-1,-1,-1,-1,515,-1,859,-1,605,184,184,-1,83,-1,-1,-1,-1,-1,271,654,-1,511,-1,369,-1,164,-1,-1,-1,-1,-1,-1,392,234,-1,-1,164,625,-1,-1,-1,718,759,-1,-1,392,615,-1,786,-1,83,89,-1,806,-1,392,-1,-1,625,-1,625,786,309,-1,164,625,787,-1,600,304,-1,-1,-1,-1,184,369,-1,83,83,89,-1,-1,-1,802,600,-1,866,811,-1,805,824,808,-1,600,801,812,-1,401,822,822,822,818,822,820,814,822,811,801,825,801,805,831,388,802,401,830,805,824,835,-1,256,718,720,839,161,269,392,859,861,861,-1,-1,593,-1,-1,-1,855,-1,-1,-1,-1,773,773,844,354,-1,593,-1,401,382,540,-1,-1,367,-1,599,11,-1,665,665,-1,34,-1,-1,-1,-1,-1,392,885,-1,593,589,-1,-1,-1,-1,-1,-1,895,895,-1,-1,-1,-1,-1,-1,483,-1,-1,-1,-1,-1,-1,-1,164,-1,-1,-1,720,759,-1,309,-1,-1,297,304,-1,540,77,-1,-1,309,-1,526,516,932,540,-1,-1,-1,309,-1,-1,354,-1,-1,392,-1,916,-1,464,946,229,-1,297,-1,-1,-1,83,956,89,-1,-1,-1,369,-1,483,83,625,-1,-1,625,933,-1,-1,164,-1,973,973,-1,540,401}; +boost::optional Type::Parent(Enum v){ + const int p = parent_map[static_cast(v)]; + if (p >= 0) { + return static_cast(p); + } else { + return boost::none; + } } bool Type::IsSimple(Enum v) { diff --git a/src/ifcparse/Ifc2x3.h b/src/ifcparse/Ifc2x3.h index 963ae54e08..9f1309ef56 100644 --- a/src/ifcparse/Ifc2x3.h +++ b/src/ifcparse/Ifc2x3.h @@ -29,7 +29,6 @@ #include #include -#include #include @@ -37,6 +36,11 @@ #include "../ifcparse/IfcException.h" #include "../ifcparse/Ifc2x3enum.h" +#ifdef _MSC_VER +#pragma warning(push) +#pragma warning(disable : 4100) +#endif + #define IfcSchema Ifc2x3 namespace Ifc2x3 { @@ -14460,6 +14464,7 @@ public: /// HISTORY  New entity in Release IFC2x2. class IfcImageTexture : public IfcSurfaceTexture { public: + /// Location, provided as an URI, at which the image texture is electronically published. std::string UrlReference() const; void setUrlReference(std::string v); virtual unsigned int getArgumentCount() const { return 5; } @@ -41583,4 +41588,8 @@ void InitStringMap(); IfcUtil::IfcBaseClass* SchemaEntity(IfcAbstractEntity* e = 0); } +#ifdef _MSC_VER +#pragma warning(pop) +#endif + #endif diff --git a/src/ifcparse/Ifc2x3enum.h b/src/ifcparse/Ifc2x3enum.h index 40b1950e9f..651253ebb7 100644 --- a/src/ifcparse/Ifc2x3enum.h +++ b/src/ifcparse/Ifc2x3enum.h @@ -27,6 +27,8 @@ #ifndef IFC2X3ENUM_H #define IFC2X3ENUM_H +#include + #define IfcSchema Ifc2x3 namespace Ifc2x3 { @@ -35,7 +37,7 @@ namespace Type { typedef enum { Ifc2DCompositeCurve, IfcAbsorbedDoseMeasure, IfcAccelerationMeasure, IfcActionRequest, IfcActionSourceTypeEnum, IfcActionTypeEnum, IfcActor, IfcActorRole, IfcActorSelect, IfcActuatorType, IfcActuatorTypeEnum, IfcAddress, IfcAddressTypeEnum, IfcAheadOrBehind, IfcAirTerminalBoxType, IfcAirTerminalBoxTypeEnum, IfcAirTerminalType, IfcAirTerminalTypeEnum, IfcAirToAirHeatRecoveryType, IfcAirToAirHeatRecoveryTypeEnum, IfcAlarmType, IfcAlarmTypeEnum, IfcAmountOfSubstanceMeasure, IfcAnalysisModelTypeEnum, IfcAnalysisTheoryTypeEnum, IfcAngularDimension, IfcAngularVelocityMeasure, IfcAnnotation, IfcAnnotationCurveOccurrence, IfcAnnotationFillArea, IfcAnnotationFillAreaOccurrence, IfcAnnotationOccurrence, IfcAnnotationSurface, IfcAnnotationSurfaceOccurrence, IfcAnnotationSymbolOccurrence, IfcAnnotationTextOccurrence, IfcApplication, IfcAppliedValue, IfcAppliedValueRelationship, IfcAppliedValueSelect, IfcApproval, IfcApprovalActorRelationship, IfcApprovalPropertyRelationship, IfcApprovalRelationship, IfcArbitraryClosedProfileDef, IfcArbitraryOpenProfileDef, IfcArbitraryProfileDefWithVoids, IfcAreaMeasure, IfcArithmeticOperatorEnum, IfcAssemblyPlaceEnum, IfcAsset, IfcAsymmetricIShapeProfileDef, IfcAxis1Placement, IfcAxis2Placement, IfcAxis2Placement2D, IfcAxis2Placement3D, IfcBSplineCurve, IfcBSplineCurveForm, IfcBeam, IfcBeamType, IfcBeamTypeEnum, IfcBenchmarkEnum, IfcBezierCurve, IfcBlobTexture, IfcBlock, IfcBoilerType, IfcBoilerTypeEnum, IfcBoolean, IfcBooleanClippingResult, IfcBooleanOperand, IfcBooleanOperator, IfcBooleanResult, IfcBoundaryCondition, IfcBoundaryEdgeCondition, IfcBoundaryFaceCondition, IfcBoundaryNodeCondition, IfcBoundaryNodeConditionWarping, IfcBoundedCurve, IfcBoundedSurface, IfcBoundingBox, IfcBoxAlignment, IfcBoxedHalfSpace, IfcBuilding, IfcBuildingElement, IfcBuildingElementComponent, IfcBuildingElementPart, IfcBuildingElementProxy, IfcBuildingElementProxyType, IfcBuildingElementProxyTypeEnum, IfcBuildingElementType, IfcBuildingStorey, IfcCShapeProfileDef, IfcCableCarrierFittingType, IfcCableCarrierFittingTypeEnum, IfcCableCarrierSegmentType, IfcCableCarrierSegmentTypeEnum, IfcCableSegmentType, IfcCableSegmentTypeEnum, IfcCalendarDate, IfcCartesianPoint, IfcCartesianTransformationOperator, IfcCartesianTransformationOperator2D, IfcCartesianTransformationOperator2DnonUniform, IfcCartesianTransformationOperator3D, IfcCartesianTransformationOperator3DnonUniform, IfcCenterLineProfileDef, IfcChamferEdgeFeature, IfcChangeActionEnum, IfcCharacterStyleSelect, IfcChillerType, IfcChillerTypeEnum, IfcCircle, IfcCircleHollowProfileDef, IfcCircleProfileDef, IfcClassification, IfcClassificationItem, IfcClassificationItemRelationship, IfcClassificationNotation, IfcClassificationNotationFacet, IfcClassificationNotationSelect, IfcClassificationReference, IfcClosedShell, IfcCoilType, IfcCoilTypeEnum, IfcColour, IfcColourOrFactor, IfcColourRgb, IfcColourSpecification, IfcColumn, IfcColumnType, IfcColumnTypeEnum, IfcComplexNumber, IfcComplexProperty, IfcCompositeCurve, IfcCompositeCurveSegment, IfcCompositeProfileDef, IfcCompoundPlaneAngleMeasure, IfcCompressorType, IfcCompressorTypeEnum, IfcCondenserType, IfcCondenserTypeEnum, IfcCondition, IfcConditionCriterion, IfcConditionCriterionSelect, IfcConic, IfcConnectedFaceSet, IfcConnectionCurveGeometry, IfcConnectionGeometry, IfcConnectionPointEccentricity, IfcConnectionPointGeometry, IfcConnectionPortGeometry, IfcConnectionSurfaceGeometry, IfcConnectionTypeEnum, IfcConstraint, IfcConstraintAggregationRelationship, IfcConstraintClassificationRelationship, IfcConstraintEnum, IfcConstraintRelationship, IfcConstructionEquipmentResource, IfcConstructionMaterialResource, IfcConstructionProductResource, IfcConstructionResource, IfcContextDependentMeasure, IfcContextDependentUnit, IfcControl, IfcControllerType, IfcControllerTypeEnum, IfcConversionBasedUnit, IfcCooledBeamType, IfcCooledBeamTypeEnum, IfcCoolingTowerType, IfcCoolingTowerTypeEnum, IfcCoordinatedUniversalTimeOffset, IfcCostItem, IfcCostSchedule, IfcCostScheduleTypeEnum, IfcCostValue, IfcCountMeasure, IfcCovering, IfcCoveringType, IfcCoveringTypeEnum, IfcCraneRailAShapeProfileDef, IfcCraneRailFShapeProfileDef, IfcCrewResource, IfcCsgPrimitive3D, IfcCsgSelect, IfcCsgSolid, IfcCurrencyEnum, IfcCurrencyRelationship, IfcCurtainWall, IfcCurtainWallType, IfcCurtainWallTypeEnum, IfcCurvatureMeasure, IfcCurve, IfcCurveBoundedPlane, IfcCurveFontOrScaledCurveFontSelect, IfcCurveOrEdgeCurve, IfcCurveStyle, IfcCurveStyleFont, IfcCurveStyleFontAndScaling, IfcCurveStyleFontPattern, IfcCurveStyleFontSelect, IfcDamperType, IfcDamperTypeEnum, IfcDataOriginEnum, IfcDateAndTime, IfcDateTimeSelect, IfcDayInMonthNumber, IfcDaylightSavingHour, IfcDefinedSymbol, IfcDefinedSymbolSelect, IfcDerivedMeasureValue, IfcDerivedProfileDef, IfcDerivedUnit, IfcDerivedUnitElement, IfcDerivedUnitEnum, IfcDescriptiveMeasure, IfcDiameterDimension, IfcDimensionCalloutRelationship, IfcDimensionCount, IfcDimensionCurve, IfcDimensionCurveDirectedCallout, IfcDimensionCurveTerminator, IfcDimensionExtentUsage, IfcDimensionPair, IfcDimensionalExponents, IfcDirection, IfcDirectionSenseEnum, IfcDiscreteAccessory, IfcDiscreteAccessoryType, IfcDistributionChamberElement, IfcDistributionChamberElementType, IfcDistributionChamberElementTypeEnum, IfcDistributionControlElement, IfcDistributionControlElementType, IfcDistributionElement, IfcDistributionElementType, IfcDistributionFlowElement, IfcDistributionFlowElementType, IfcDistributionPort, IfcDocumentConfidentialityEnum, IfcDocumentElectronicFormat, IfcDocumentInformation, IfcDocumentInformationRelationship, IfcDocumentReference, IfcDocumentSelect, IfcDocumentStatusEnum, IfcDoor, IfcDoorLiningProperties, IfcDoorPanelOperationEnum, IfcDoorPanelPositionEnum, IfcDoorPanelProperties, IfcDoorStyle, IfcDoorStyleConstructionEnum, IfcDoorStyleOperationEnum, IfcDoseEquivalentMeasure, IfcDraughtingCallout, IfcDraughtingCalloutElement, IfcDraughtingCalloutRelationship, IfcDraughtingPreDefinedColour, IfcDraughtingPreDefinedCurveFont, IfcDraughtingPreDefinedTextFont, IfcDuctFittingType, IfcDuctFittingTypeEnum, IfcDuctSegmentType, IfcDuctSegmentTypeEnum, IfcDuctSilencerType, IfcDuctSilencerTypeEnum, IfcDynamicViscosityMeasure, IfcEdge, IfcEdgeCurve, IfcEdgeFeature, IfcEdgeLoop, IfcElectricApplianceType, IfcElectricApplianceTypeEnum, IfcElectricCapacitanceMeasure, IfcElectricChargeMeasure, IfcElectricConductanceMeasure, IfcElectricCurrentEnum, IfcElectricCurrentMeasure, IfcElectricDistributionPoint, IfcElectricDistributionPointFunctionEnum, IfcElectricFlowStorageDeviceType, IfcElectricFlowStorageDeviceTypeEnum, IfcElectricGeneratorType, IfcElectricGeneratorTypeEnum, IfcElectricHeaterType, IfcElectricHeaterTypeEnum, IfcElectricMotorType, IfcElectricMotorTypeEnum, IfcElectricResistanceMeasure, IfcElectricTimeControlType, IfcElectricTimeControlTypeEnum, IfcElectricVoltageMeasure, IfcElectricalBaseProperties, IfcElectricalCircuit, IfcElectricalElement, IfcElement, IfcElementAssembly, IfcElementAssemblyTypeEnum, IfcElementComponent, IfcElementComponentType, IfcElementCompositionEnum, IfcElementQuantity, IfcElementType, IfcElementarySurface, IfcEllipse, IfcEllipseProfileDef, IfcEnergyConversionDevice, IfcEnergyConversionDeviceType, IfcEnergyMeasure, IfcEnergyProperties, IfcEnergySequenceEnum, IfcEnvironmentalImpactCategoryEnum, IfcEnvironmentalImpactValue, IfcEquipmentElement, IfcEquipmentStandard, IfcEvaporativeCoolerType, IfcEvaporativeCoolerTypeEnum, IfcEvaporatorType, IfcEvaporatorTypeEnum, IfcExtendedMaterialProperties, IfcExternalReference, IfcExternallyDefinedHatchStyle, IfcExternallyDefinedSurfaceStyle, IfcExternallyDefinedSymbol, IfcExternallyDefinedTextFont, IfcExtrudedAreaSolid, IfcFace, IfcFaceBasedSurfaceModel, IfcFaceBound, IfcFaceOuterBound, IfcFaceSurface, IfcFacetedBrep, IfcFacetedBrepWithVoids, IfcFailureConnectionCondition, IfcFanType, IfcFanTypeEnum, IfcFastener, IfcFastenerType, IfcFeatureElement, IfcFeatureElementAddition, IfcFeatureElementSubtraction, IfcFillAreaStyle, IfcFillAreaStyleHatching, IfcFillAreaStyleTileShapeSelect, IfcFillAreaStyleTileSymbolWithStyle, IfcFillAreaStyleTiles, IfcFillStyleSelect, IfcFilterType, IfcFilterTypeEnum, IfcFireSuppressionTerminalType, IfcFireSuppressionTerminalTypeEnum, IfcFlowController, IfcFlowControllerType, IfcFlowDirectionEnum, IfcFlowFitting, IfcFlowFittingType, IfcFlowInstrumentType, IfcFlowInstrumentTypeEnum, IfcFlowMeterType, IfcFlowMeterTypeEnum, IfcFlowMovingDevice, IfcFlowMovingDeviceType, IfcFlowSegment, IfcFlowSegmentType, IfcFlowStorageDevice, IfcFlowStorageDeviceType, IfcFlowTerminal, IfcFlowTerminalType, IfcFlowTreatmentDevice, IfcFlowTreatmentDeviceType, IfcFluidFlowProperties, IfcFontStyle, IfcFontVariant, IfcFontWeight, IfcFooting, IfcFootingTypeEnum, IfcForceMeasure, IfcFrequencyMeasure, IfcFuelProperties, IfcFurnishingElement, IfcFurnishingElementType, IfcFurnitureStandard, IfcFurnitureType, IfcGasTerminalType, IfcGasTerminalTypeEnum, IfcGeneralMaterialProperties, IfcGeneralProfileProperties, IfcGeometricCurveSet, IfcGeometricProjectionEnum, IfcGeometricRepresentationContext, IfcGeometricRepresentationItem, IfcGeometricRepresentationSubContext, IfcGeometricSet, IfcGeometricSetSelect, IfcGlobalOrLocalEnum, IfcGloballyUniqueId, IfcGrid, IfcGridAxis, IfcGridPlacement, IfcGroup, IfcHalfSpaceSolid, IfcHatchLineDistanceSelect, IfcHeatExchangerType, IfcHeatExchangerTypeEnum, IfcHeatFluxDensityMeasure, IfcHeatingValueMeasure, IfcHourInDay, IfcHumidifierType, IfcHumidifierTypeEnum, IfcHygroscopicMaterialProperties, IfcIShapeProfileDef, IfcIdentifier, IfcIlluminanceMeasure, IfcImageTexture, IfcInductanceMeasure, IfcInteger, IfcIntegerCountRateMeasure, IfcInternalOrExternalEnum, IfcInventory, IfcInventoryTypeEnum, IfcIonConcentrationMeasure, IfcIrregularTimeSeries, IfcIrregularTimeSeriesValue, IfcIsothermalMoistureCapacityMeasure, IfcJunctionBoxType, IfcJunctionBoxTypeEnum, IfcKinematicViscosityMeasure, IfcLShapeProfileDef, IfcLabel, IfcLaborResource, IfcLampType, IfcLampTypeEnum, IfcLayerSetDirectionEnum, IfcLayeredItem, IfcLengthMeasure, IfcLibraryInformation, IfcLibraryReference, IfcLibrarySelect, IfcLightDistributionCurveEnum, IfcLightDistributionData, IfcLightDistributionDataSourceSelect, IfcLightEmissionSourceEnum, IfcLightFixtureType, IfcLightFixtureTypeEnum, IfcLightIntensityDistribution, IfcLightSource, IfcLightSourceAmbient, IfcLightSourceDirectional, IfcLightSourceGoniometric, IfcLightSourcePositional, IfcLightSourceSpot, IfcLine, IfcLinearDimension, IfcLinearForceMeasure, IfcLinearMomentMeasure, IfcLinearStiffnessMeasure, IfcLinearVelocityMeasure, IfcLoadGroupTypeEnum, IfcLocalPlacement, IfcLocalTime, IfcLogical, IfcLogicalOperatorEnum, IfcLoop, IfcLuminousFluxMeasure, IfcLuminousIntensityDistributionMeasure, IfcLuminousIntensityMeasure, IfcMagneticFluxDensityMeasure, IfcMagneticFluxMeasure, IfcManifoldSolidBrep, IfcMappedItem, IfcMassDensityMeasure, IfcMassFlowRateMeasure, IfcMassMeasure, IfcMassPerLengthMeasure, IfcMaterial, IfcMaterialClassificationRelationship, IfcMaterialDefinitionRepresentation, IfcMaterialLayer, IfcMaterialLayerSet, IfcMaterialLayerSetUsage, IfcMaterialList, IfcMaterialProperties, IfcMaterialSelect, IfcMeasureValue, IfcMeasureWithUnit, IfcMechanicalConcreteMaterialProperties, IfcMechanicalFastener, IfcMechanicalFastenerType, IfcMechanicalMaterialProperties, IfcMechanicalSteelMaterialProperties, IfcMember, IfcMemberType, IfcMemberTypeEnum, IfcMetric, IfcMetricValueSelect, IfcMinuteInHour, IfcModulusOfElasticityMeasure, IfcModulusOfLinearSubgradeReactionMeasure, IfcModulusOfRotationalSubgradeReactionMeasure, IfcModulusOfSubgradeReactionMeasure, IfcMoistureDiffusivityMeasure, IfcMolecularWeightMeasure, IfcMomentOfInertiaMeasure, IfcMonetaryMeasure, IfcMonetaryUnit, IfcMonthInYearNumber, IfcMotorConnectionType, IfcMotorConnectionTypeEnum, IfcMove, IfcNamedUnit, IfcNormalisedRatioMeasure, IfcNullStyle, IfcNumericMeasure, IfcObject, IfcObjectDefinition, IfcObjectPlacement, IfcObjectReferenceSelect, IfcObjectTypeEnum, IfcObjective, IfcObjectiveEnum, IfcOccupant, IfcOccupantTypeEnum, IfcOffsetCurve2D, IfcOffsetCurve3D, IfcOneDirectionRepeatFactor, IfcOpenShell, IfcOpeningElement, IfcOpticalMaterialProperties, IfcOrderAction, IfcOrganization, IfcOrganizationRelationship, IfcOrientationSelect, IfcOrientedEdge, IfcOutletType, IfcOutletTypeEnum, IfcOwnerHistory, IfcPHMeasure, IfcParameterValue, IfcParameterizedProfileDef, IfcPath, IfcPerformanceHistory, IfcPermeableCoveringOperationEnum, IfcPermeableCoveringProperties, IfcPermit, IfcPerson, IfcPersonAndOrganization, IfcPhysicalComplexQuantity, IfcPhysicalOrVirtualEnum, IfcPhysicalQuantity, IfcPhysicalSimpleQuantity, IfcPile, IfcPileConstructionEnum, IfcPileTypeEnum, IfcPipeFittingType, IfcPipeFittingTypeEnum, IfcPipeSegmentType, IfcPipeSegmentTypeEnum, IfcPixelTexture, IfcPlacement, IfcPlanarBox, IfcPlanarExtent, IfcPlanarForceMeasure, IfcPlane, IfcPlaneAngleMeasure, IfcPlate, IfcPlateType, IfcPlateTypeEnum, IfcPoint, IfcPointOnCurve, IfcPointOnSurface, IfcPointOrVertexPoint, IfcPolyLoop, IfcPolygonalBoundedHalfSpace, IfcPolyline, IfcPort, IfcPositiveLengthMeasure, IfcPositivePlaneAngleMeasure, IfcPositiveRatioMeasure, IfcPostalAddress, IfcPowerMeasure, IfcPreDefinedColour, IfcPreDefinedCurveFont, IfcPreDefinedDimensionSymbol, IfcPreDefinedItem, IfcPreDefinedPointMarkerSymbol, IfcPreDefinedSymbol, IfcPreDefinedTerminatorSymbol, IfcPreDefinedTextFont, IfcPresentableText, IfcPresentationLayerAssignment, IfcPresentationLayerWithStyle, IfcPresentationStyle, IfcPresentationStyleAssignment, IfcPresentationStyleSelect, IfcPressureMeasure, IfcProcedure, IfcProcedureTypeEnum, IfcProcess, IfcProduct, IfcProductDefinitionShape, IfcProductRepresentation, IfcProductsOfCombustionProperties, IfcProfileDef, IfcProfileProperties, IfcProfileTypeEnum, IfcProject, IfcProjectOrder, IfcProjectOrderRecord, IfcProjectOrderRecordTypeEnum, IfcProjectOrderTypeEnum, IfcProjectedOrTrueLengthEnum, IfcProjectionCurve, IfcProjectionElement, IfcProperty, IfcPropertyBoundedValue, IfcPropertyConstraintRelationship, IfcPropertyDefinition, IfcPropertyDependencyRelationship, IfcPropertyEnumeratedValue, IfcPropertyEnumeration, IfcPropertyListValue, IfcPropertyReferenceValue, IfcPropertySet, IfcPropertySetDefinition, IfcPropertySingleValue, IfcPropertySourceEnum, IfcPropertyTableValue, IfcProtectiveDeviceType, IfcProtectiveDeviceTypeEnum, IfcProxy, IfcPumpType, IfcPumpTypeEnum, IfcQuantityArea, IfcQuantityCount, IfcQuantityLength, IfcQuantityTime, IfcQuantityVolume, IfcQuantityWeight, IfcRadioActivityMeasure, IfcRadiusDimension, IfcRailing, IfcRailingType, IfcRailingTypeEnum, IfcRamp, IfcRampFlight, IfcRampFlightType, IfcRampFlightTypeEnum, IfcRampTypeEnum, IfcRatioMeasure, IfcRationalBezierCurve, IfcReal, IfcRectangleHollowProfileDef, IfcRectangleProfileDef, IfcRectangularPyramid, IfcRectangularTrimmedSurface, IfcReferencesValueDocument, IfcReflectanceMethodEnum, IfcRegularTimeSeries, IfcReinforcementBarProperties, IfcReinforcementDefinitionProperties, IfcReinforcingBar, IfcReinforcingBarRoleEnum, IfcReinforcingBarSurfaceEnum, IfcReinforcingElement, IfcReinforcingMesh, IfcRelAggregates, IfcRelAssigns, IfcRelAssignsTasks, IfcRelAssignsToActor, IfcRelAssignsToControl, IfcRelAssignsToGroup, IfcRelAssignsToProcess, IfcRelAssignsToProduct, IfcRelAssignsToProjectOrder, IfcRelAssignsToResource, IfcRelAssociates, IfcRelAssociatesAppliedValue, IfcRelAssociatesApproval, IfcRelAssociatesClassification, IfcRelAssociatesConstraint, IfcRelAssociatesDocument, IfcRelAssociatesLibrary, IfcRelAssociatesMaterial, IfcRelAssociatesProfileProperties, IfcRelConnects, IfcRelConnectsElements, IfcRelConnectsPathElements, IfcRelConnectsPortToElement, IfcRelConnectsPorts, IfcRelConnectsStructuralActivity, IfcRelConnectsStructuralElement, IfcRelConnectsStructuralMember, IfcRelConnectsWithEccentricity, IfcRelConnectsWithRealizingElements, IfcRelContainedInSpatialStructure, IfcRelCoversBldgElements, IfcRelCoversSpaces, IfcRelDecomposes, IfcRelDefines, IfcRelDefinesByProperties, IfcRelDefinesByType, IfcRelFillsElement, IfcRelFlowControlElements, IfcRelInteractionRequirements, IfcRelNests, IfcRelOccupiesSpaces, IfcRelOverridesProperties, IfcRelProjectsElement, IfcRelReferencedInSpatialStructure, IfcRelSchedulesCostItems, IfcRelSequence, IfcRelServicesBuildings, IfcRelSpaceBoundary, IfcRelVoidsElement, IfcRelationship, IfcRelaxation, IfcRepresentation, IfcRepresentationContext, IfcRepresentationItem, IfcRepresentationMap, IfcResource, IfcResourceConsumptionEnum, IfcRevolvedAreaSolid, IfcRibPlateDirectionEnum, IfcRibPlateProfileProperties, IfcRightCircularCone, IfcRightCircularCylinder, IfcRoleEnum, IfcRoof, IfcRoofTypeEnum, IfcRoot, IfcRotationalFrequencyMeasure, IfcRotationalMassMeasure, IfcRotationalStiffnessMeasure, IfcRoundedEdgeFeature, IfcRoundedRectangleProfileDef, IfcSIPrefix, IfcSIUnit, IfcSIUnitName, IfcSanitaryTerminalType, IfcSanitaryTerminalTypeEnum, IfcScheduleTimeControl, IfcSecondInMinute, IfcSectionModulusMeasure, IfcSectionProperties, IfcSectionReinforcementProperties, IfcSectionTypeEnum, IfcSectionalAreaIntegralMeasure, IfcSectionedSpine, IfcSensorType, IfcSensorTypeEnum, IfcSequenceEnum, IfcServiceLife, IfcServiceLifeFactor, IfcServiceLifeFactorTypeEnum, IfcServiceLifeTypeEnum, IfcShapeAspect, IfcShapeModel, IfcShapeRepresentation, IfcShearModulusMeasure, IfcShell, IfcShellBasedSurfaceModel, IfcSimpleProperty, IfcSimpleValue, IfcSite, IfcSizeSelect, IfcSlab, IfcSlabType, IfcSlabTypeEnum, IfcSlippageConnectionCondition, IfcSolidAngleMeasure, IfcSolidModel, IfcSoundPowerMeasure, IfcSoundPressureMeasure, IfcSoundProperties, IfcSoundScaleEnum, IfcSoundValue, IfcSpace, IfcSpaceHeaterType, IfcSpaceHeaterTypeEnum, IfcSpaceProgram, IfcSpaceThermalLoadProperties, IfcSpaceType, IfcSpaceTypeEnum, IfcSpatialStructureElement, IfcSpatialStructureElementType, IfcSpecificHeatCapacityMeasure, IfcSpecularExponent, IfcSpecularHighlightSelect, IfcSpecularRoughness, IfcSphere, IfcStackTerminalType, IfcStackTerminalTypeEnum, IfcStair, IfcStairFlight, IfcStairFlightType, IfcStairFlightTypeEnum, IfcStairTypeEnum, IfcStateEnum, IfcStructuralAction, IfcStructuralActivity, IfcStructuralActivityAssignmentSelect, IfcStructuralAnalysisModel, IfcStructuralConnection, IfcStructuralConnectionCondition, IfcStructuralCurveConnection, IfcStructuralCurveMember, IfcStructuralCurveMemberVarying, IfcStructuralCurveTypeEnum, IfcStructuralItem, IfcStructuralLinearAction, IfcStructuralLinearActionVarying, IfcStructuralLoad, IfcStructuralLoadGroup, IfcStructuralLoadLinearForce, IfcStructuralLoadPlanarForce, IfcStructuralLoadSingleDisplacement, IfcStructuralLoadSingleDisplacementDistortion, IfcStructuralLoadSingleForce, IfcStructuralLoadSingleForceWarping, IfcStructuralLoadStatic, IfcStructuralLoadTemperature, IfcStructuralMember, IfcStructuralPlanarAction, IfcStructuralPlanarActionVarying, IfcStructuralPointAction, IfcStructuralPointConnection, IfcStructuralPointReaction, IfcStructuralProfileProperties, IfcStructuralReaction, IfcStructuralResultGroup, IfcStructuralSteelProfileProperties, IfcStructuralSurfaceConnection, IfcStructuralSurfaceMember, IfcStructuralSurfaceMemberVarying, IfcStructuralSurfaceTypeEnum, IfcStructuredDimensionCallout, IfcStyleModel, IfcStyledItem, IfcStyledRepresentation, IfcSubContractResource, IfcSubedge, IfcSurface, IfcSurfaceCurveSweptAreaSolid, IfcSurfaceOfLinearExtrusion, IfcSurfaceOfRevolution, IfcSurfaceOrFaceSurface, IfcSurfaceSide, IfcSurfaceStyle, IfcSurfaceStyleElementSelect, IfcSurfaceStyleLighting, IfcSurfaceStyleRefraction, IfcSurfaceStyleRendering, IfcSurfaceStyleShading, IfcSurfaceStyleWithTextures, IfcSurfaceTexture, IfcSurfaceTextureEnum, IfcSweptAreaSolid, IfcSweptDiskSolid, IfcSweptSurface, IfcSwitchingDeviceType, IfcSwitchingDeviceTypeEnum, IfcSymbolStyle, IfcSymbolStyleSelect, IfcSystem, IfcSystemFurnitureElementType, IfcTShapeProfileDef, IfcTable, IfcTableRow, IfcTankType, IfcTankTypeEnum, IfcTask, IfcTelecomAddress, IfcTemperatureGradientMeasure, IfcTendon, IfcTendonAnchor, IfcTendonTypeEnum, IfcTerminatorSymbol, IfcText, IfcTextAlignment, IfcTextDecoration, IfcTextFontName, IfcTextFontSelect, IfcTextLiteral, IfcTextLiteralWithExtent, IfcTextPath, IfcTextStyle, IfcTextStyleFontModel, IfcTextStyleForDefinedFont, IfcTextStyleSelect, IfcTextStyleTextModel, IfcTextStyleWithBoxCharacteristics, IfcTextTransformation, IfcTextureCoordinate, IfcTextureCoordinateGenerator, IfcTextureMap, IfcTextureVertex, IfcThermalAdmittanceMeasure, IfcThermalConductivityMeasure, IfcThermalExpansionCoefficientMeasure, IfcThermalLoadSourceEnum, IfcThermalLoadTypeEnum, IfcThermalMaterialProperties, IfcThermalResistanceMeasure, IfcThermalTransmittanceMeasure, IfcThermodynamicTemperatureMeasure, IfcTimeMeasure, IfcTimeSeries, IfcTimeSeriesDataTypeEnum, IfcTimeSeriesReferenceRelationship, IfcTimeSeriesSchedule, IfcTimeSeriesScheduleTypeEnum, IfcTimeSeriesValue, IfcTimeStamp, IfcTopologicalRepresentationItem, IfcTopologyRepresentation, IfcTorqueMeasure, IfcTransformerType, IfcTransformerTypeEnum, IfcTransitionCode, IfcTransportElement, IfcTransportElementType, IfcTransportElementTypeEnum, IfcTrapeziumProfileDef, IfcTrimmedCurve, IfcTrimmingPreference, IfcTrimmingSelect, IfcTubeBundleType, IfcTubeBundleTypeEnum, IfcTwoDirectionRepeatFactor, IfcTypeObject, IfcTypeProduct, IfcUShapeProfileDef, IfcUnit, IfcUnitAssignment, IfcUnitEnum, IfcUnitaryEquipmentType, IfcUnitaryEquipmentTypeEnum, IfcValue, IfcValveType, IfcValveTypeEnum, IfcVaporPermeabilityMeasure, IfcVector, IfcVectorOrDirection, IfcVertex, IfcVertexBasedTextureMap, IfcVertexLoop, IfcVertexPoint, IfcVibrationIsolatorType, IfcVibrationIsolatorTypeEnum, IfcVirtualElement, IfcVirtualGridIntersection, IfcVolumeMeasure, IfcVolumetricFlowRateMeasure, IfcWall, IfcWallStandardCase, IfcWallType, IfcWallTypeEnum, IfcWarpingConstantMeasure, IfcWarpingMomentMeasure, IfcWasteTerminalType, IfcWasteTerminalTypeEnum, IfcWaterProperties, IfcWindow, IfcWindowLiningProperties, IfcWindowPanelOperationEnum, IfcWindowPanelPositionEnum, IfcWindowPanelProperties, IfcWindowStyle, IfcWindowStyleConstructionEnum, IfcWindowStyleOperationEnum, IfcWorkControl, IfcWorkControlTypeEnum, IfcWorkPlan, IfcWorkSchedule, IfcYearNumber, IfcZShapeProfileDef, IfcZone, UNDEFINED } Enum; - Enum Parent(Enum v); + boost::optional Parent(Enum v); Enum FromString(const std::string& s); std::string ToString(Enum v); bool IsSimple(Enum v); diff --git a/src/ifcparse/Ifc4-latebound.cpp b/src/ifcparse/Ifc4-latebound.cpp index 4cb4bb0364..bcf8cee5f2 100644 --- a/src/ifcparse/Ifc4-latebound.cpp +++ b/src/ifcparse/Ifc4-latebound.cpp @@ -66,10 +66,14 @@ void InitDescriptorMap() { current->add("wrappedValue",false,IfcUtil::Argument_DOUBLE); current = entity_descriptor_map[Type::IfcAngularVelocityMeasure] = new IfcEntityDescriptor(Type::IfcAngularVelocityMeasure,0); current->add("wrappedValue",false,IfcUtil::Argument_DOUBLE); + current = entity_descriptor_map[Type::IfcArcIndex] = new IfcEntityDescriptor(Type::IfcArcIndex,0); + current->add("wrappedValue",false,IfcUtil::Argument_AGGREGATE_OF_INT); current = entity_descriptor_map[Type::IfcAreaDensityMeasure] = new IfcEntityDescriptor(Type::IfcAreaDensityMeasure,0); current->add("wrappedValue",false,IfcUtil::Argument_DOUBLE); current = entity_descriptor_map[Type::IfcAreaMeasure] = new IfcEntityDescriptor(Type::IfcAreaMeasure,0); current->add("wrappedValue",false,IfcUtil::Argument_DOUBLE); + current = entity_descriptor_map[Type::IfcBinary] = new IfcEntityDescriptor(Type::IfcBinary,0); + current->add("wrappedValue",false,IfcUtil::Argument_BINARY); current = entity_descriptor_map[Type::IfcBoolean] = new IfcEntityDescriptor(Type::IfcBoolean,0); current->add("wrappedValue",false,IfcUtil::Argument_BOOL); current = entity_descriptor_map[Type::IfcBoxAlignment] = new IfcEntityDescriptor(Type::IfcBoxAlignment,0); @@ -156,6 +160,8 @@ void InitDescriptorMap() { current->add("wrappedValue",false,IfcUtil::Argument_STRING); current = entity_descriptor_map[Type::IfcLengthMeasure] = new IfcEntityDescriptor(Type::IfcLengthMeasure,0); current->add("wrappedValue",false,IfcUtil::Argument_DOUBLE); + current = entity_descriptor_map[Type::IfcLineIndex] = new IfcEntityDescriptor(Type::IfcLineIndex,0); + current->add("wrappedValue",false,IfcUtil::Argument_AGGREGATE_OF_INT); current = entity_descriptor_map[Type::IfcLinearForceMeasure] = new IfcEntityDescriptor(Type::IfcLinearForceMeasure,0); current->add("wrappedValue",false,IfcUtil::Argument_DOUBLE); current = entity_descriptor_map[Type::IfcLinearMomentMeasure] = new IfcEntityDescriptor(Type::IfcLinearMomentMeasure,0); @@ -216,6 +222,8 @@ void InitDescriptorMap() { current->add("wrappedValue",false,IfcUtil::Argument_DOUBLE); current = entity_descriptor_map[Type::IfcPlaneAngleMeasure] = new IfcEntityDescriptor(Type::IfcPlaneAngleMeasure,0); current->add("wrappedValue",false,IfcUtil::Argument_DOUBLE); + current = entity_descriptor_map[Type::IfcPositiveInteger] = new IfcEntityDescriptor(Type::IfcPositiveInteger,0); + current->add("wrappedValue",false,IfcUtil::Argument_INT); current = entity_descriptor_map[Type::IfcPositiveLengthMeasure] = new IfcEntityDescriptor(Type::IfcPositiveLengthMeasure,0); current->add("wrappedValue",false,IfcUtil::Argument_DOUBLE); current = entity_descriptor_map[Type::IfcPositivePlaneAngleMeasure] = new IfcEntityDescriptor(Type::IfcPositivePlaneAngleMeasure,0); @@ -389,9 +397,9 @@ void InitDescriptorMap() { current->add("SourceCRS",false,IfcUtil::Argument_ENTITY_INSTANCE,Type::IfcCoordinateReferenceSystemSelect); current->add("TargetCRS",false,IfcUtil::Argument_ENTITY_INSTANCE,Type::IfcCoordinateReferenceSystem); current = entity_descriptor_map[Type::IfcCoordinateReferenceSystem] = new IfcEntityDescriptor(Type::IfcCoordinateReferenceSystem,0); - current->add("Name",true,IfcUtil::Argument_STRING,Type::IfcLabel); + current->add("Name",false,IfcUtil::Argument_STRING,Type::IfcLabel); current->add("Description",true,IfcUtil::Argument_STRING,Type::IfcText); - current->add("GeodeticDatum",false,IfcUtil::Argument_STRING,Type::IfcIdentifier); + current->add("GeodeticDatum",true,IfcUtil::Argument_STRING,Type::IfcIdentifier); current->add("VerticalDatum",true,IfcUtil::Argument_STRING,Type::IfcIdentifier); current = entity_descriptor_map[Type::IfcCostValue] = new IfcEntityDescriptor(Type::IfcCostValue,entity_descriptor_map.find(Type::IfcAppliedValue)->second); @@ -498,7 +506,7 @@ void InitDescriptorMap() { current = entity_descriptor_map[Type::IfcMetric] = new IfcEntityDescriptor(Type::IfcMetric,entity_descriptor_map.find(Type::IfcConstraint)->second); current->add("Benchmark",false,IfcUtil::Argument_ENUMERATION,Type::IfcBenchmarkEnum); current->add("ValueSource",true,IfcUtil::Argument_STRING,Type::IfcLabel); - current->add("DataValue",false,IfcUtil::Argument_ENTITY_INSTANCE,Type::IfcMetricValueSelect); + current->add("DataValue",true,IfcUtil::Argument_ENTITY_INSTANCE,Type::IfcMetricValueSelect); current->add("ReferencePath",true,IfcUtil::Argument_ENTITY_INSTANCE,Type::IfcReference); current = entity_descriptor_map[Type::IfcMonetaryUnit] = new IfcEntityDescriptor(Type::IfcMonetaryUnit,0); current->add("Currency",false,IfcUtil::Argument_STRING,Type::IfcLabel); @@ -561,9 +569,9 @@ void InitDescriptorMap() { current->add("AssignedItems",false,IfcUtil::Argument_AGGREGATE_OF_ENTITY_INSTANCE,Type::IfcLayeredItem); current->add("Identifier",true,IfcUtil::Argument_STRING,Type::IfcIdentifier); current = entity_descriptor_map[Type::IfcPresentationLayerWithStyle] = new IfcEntityDescriptor(Type::IfcPresentationLayerWithStyle,entity_descriptor_map.find(Type::IfcPresentationLayerAssignment)->second); - current->add("LayerOn",false,IfcUtil::Argument_BOOL,Type::UNDEFINED); - current->add("LayerFrozen",false,IfcUtil::Argument_BOOL,Type::UNDEFINED); - current->add("LayerBlocked",false,IfcUtil::Argument_BOOL,Type::UNDEFINED); + current->add("LayerOn",false,IfcUtil::Argument_BOOL,Type::IfcLogical); + current->add("LayerFrozen",false,IfcUtil::Argument_BOOL,Type::IfcLogical); + current->add("LayerBlocked",false,IfcUtil::Argument_BOOL,Type::IfcLogical); current->add("LayerStyles",false,IfcUtil::Argument_AGGREGATE_OF_ENTITY_INSTANCE,Type::IfcPresentationStyle); current = entity_descriptor_map[Type::IfcPresentationStyle] = new IfcEntityDescriptor(Type::IfcPresentationStyle,0); current->add("Name",true,IfcUtil::Argument_STRING,Type::IfcLabel); @@ -617,7 +625,7 @@ void InitDescriptorMap() { current->add("TypeIdentifier",true,IfcUtil::Argument_STRING,Type::IfcIdentifier); current->add("AttributeIdentifier",true,IfcUtil::Argument_STRING,Type::IfcIdentifier); current->add("InstanceName",true,IfcUtil::Argument_STRING,Type::IfcLabel); - current->add("ListPositions",true,IfcUtil::Argument_AGGREGATE_OF_INT,Type::UNDEFINED); + current->add("ListPositions",true,IfcUtil::Argument_AGGREGATE_OF_INT,Type::IfcInteger); current->add("InnerReference",true,IfcUtil::Argument_ENTITY_INSTANCE,Type::IfcReference); current = entity_descriptor_map[Type::IfcRepresentation] = new IfcEntityDescriptor(Type::IfcRepresentation,0); current->add("ContextOfItems",false,IfcUtil::Argument_ENTITY_INSTANCE,Type::IfcRepresentationContext); @@ -651,7 +659,7 @@ void InitDescriptorMap() { current->add("ShapeRepresentations",false,IfcUtil::Argument_AGGREGATE_OF_ENTITY_INSTANCE,Type::IfcShapeModel); current->add("Name",true,IfcUtil::Argument_STRING,Type::IfcLabel); current->add("Description",true,IfcUtil::Argument_STRING,Type::IfcText); - current->add("ProductDefinitional",false,IfcUtil::Argument_BOOL,Type::UNDEFINED); + current->add("ProductDefinitional",false,IfcUtil::Argument_BOOL,Type::IfcLogical); current->add("PartOfProductDefinitionShape",true,IfcUtil::Argument_ENTITY_INSTANCE,Type::IfcProductRepresentationSelect); current = entity_descriptor_map[Type::IfcShapeModel] = new IfcEntityDescriptor(Type::IfcShapeModel,entity_descriptor_map.find(Type::IfcRepresentation)->second); @@ -700,8 +708,8 @@ void InitDescriptorMap() { current = entity_descriptor_map[Type::IfcSurfaceStyleWithTextures] = new IfcEntityDescriptor(Type::IfcSurfaceStyleWithTextures,entity_descriptor_map.find(Type::IfcPresentationItem)->second); current->add("Textures",false,IfcUtil::Argument_AGGREGATE_OF_ENTITY_INSTANCE,Type::IfcSurfaceTexture); current = entity_descriptor_map[Type::IfcSurfaceTexture] = new IfcEntityDescriptor(Type::IfcSurfaceTexture,entity_descriptor_map.find(Type::IfcPresentationItem)->second); - current->add("RepeatS",false,IfcUtil::Argument_BOOL,Type::UNDEFINED); - current->add("RepeatT",false,IfcUtil::Argument_BOOL,Type::UNDEFINED); + current->add("RepeatS",false,IfcUtil::Argument_BOOL,Type::IfcBoolean); + current->add("RepeatT",false,IfcUtil::Argument_BOOL,Type::IfcBoolean); current->add("Mode",true,IfcUtil::Argument_STRING,Type::IfcIdentifier); current->add("TextureTransform",true,IfcUtil::Argument_ENTITY_INSTANCE,Type::IfcCartesianTransformationOperator2D); current->add("Parameter",true,IfcUtil::Argument_AGGREGATE_OF_STRING,Type::IfcIdentifier); @@ -717,7 +725,7 @@ void InitDescriptorMap() { current->add("ReferencePath",true,IfcUtil::Argument_ENTITY_INSTANCE,Type::IfcReference); current = entity_descriptor_map[Type::IfcTableRow] = new IfcEntityDescriptor(Type::IfcTableRow,0); current->add("RowCells",true,IfcUtil::Argument_AGGREGATE_OF_ENTITY_INSTANCE,Type::IfcValue); - current->add("IsHeading",true,IfcUtil::Argument_BOOL,Type::UNDEFINED); + current->add("IsHeading",true,IfcUtil::Argument_BOOL,Type::IfcBoolean); current = entity_descriptor_map[Type::IfcTaskTime] = new IfcEntityDescriptor(Type::IfcTaskTime,entity_descriptor_map.find(Type::IfcSchedulingTime)->second); current->add("DurationType",true,IfcUtil::Argument_ENUMERATION,Type::IfcTaskDurationEnum); current->add("ScheduleDuration",true,IfcUtil::Argument_STRING,Type::IfcDuration); @@ -729,7 +737,7 @@ void InitDescriptorMap() { current->add("LateFinish",true,IfcUtil::Argument_STRING,Type::IfcDateTime); current->add("FreeFloat",true,IfcUtil::Argument_STRING,Type::IfcDuration); current->add("TotalFloat",true,IfcUtil::Argument_STRING,Type::IfcDuration); - current->add("IsCritical",true,IfcUtil::Argument_BOOL,Type::UNDEFINED); + current->add("IsCritical",true,IfcUtil::Argument_BOOL,Type::IfcBoolean); current->add("StatusTime",true,IfcUtil::Argument_STRING,Type::IfcDateTime); current->add("ActualDuration",true,IfcUtil::Argument_STRING,Type::IfcDuration); current->add("ActualStart",true,IfcUtil::Argument_STRING,Type::IfcDateTime); @@ -737,7 +745,7 @@ void InitDescriptorMap() { current->add("RemainingTime",true,IfcUtil::Argument_STRING,Type::IfcDuration); current->add("Completion",true,IfcUtil::Argument_DOUBLE,Type::IfcPositiveRatioMeasure); current = entity_descriptor_map[Type::IfcTaskTimeRecurring] = new IfcEntityDescriptor(Type::IfcTaskTimeRecurring,entity_descriptor_map.find(Type::IfcTaskTime)->second); - current->add("Recurrance",false,IfcUtil::Argument_ENTITY_INSTANCE,Type::IfcRecurrencePattern); + current->add("Recurrence",false,IfcUtil::Argument_ENTITY_INSTANCE,Type::IfcRecurrencePattern); current = entity_descriptor_map[Type::IfcTelecomAddress] = new IfcEntityDescriptor(Type::IfcTelecomAddress,entity_descriptor_map.find(Type::IfcAddress)->second); current->add("TelephoneNumbers",true,IfcUtil::Argument_AGGREGATE_OF_STRING,Type::IfcLabel); current->add("FacsimileNumbers",true,IfcUtil::Argument_AGGREGATE_OF_STRING,Type::IfcLabel); @@ -749,7 +757,7 @@ void InitDescriptorMap() { current->add("TextCharacterAppearance",true,IfcUtil::Argument_ENTITY_INSTANCE,Type::IfcTextStyleForDefinedFont); current->add("TextStyle",true,IfcUtil::Argument_ENTITY_INSTANCE,Type::IfcTextStyleTextModel); current->add("TextFontStyle",false,IfcUtil::Argument_ENTITY_INSTANCE,Type::IfcTextFontSelect); - current->add("ModelOrDraughting",true,IfcUtil::Argument_BOOL,Type::UNDEFINED); + current->add("ModelOrDraughting",true,IfcUtil::Argument_BOOL,Type::IfcBoolean); current = entity_descriptor_map[Type::IfcTextStyleForDefinedFont] = new IfcEntityDescriptor(Type::IfcTextStyleForDefinedFont,entity_descriptor_map.find(Type::IfcPresentationItem)->second); current->add("Colour",false,IfcUtil::Argument_ENTITY_INSTANCE,Type::IfcColour); current->add("BackgroundColour",true,IfcUtil::Argument_ENTITY_INSTANCE,Type::IfcColour); @@ -815,7 +823,7 @@ void InitDescriptorMap() { current->add("InnerCurves",false,IfcUtil::Argument_AGGREGATE_OF_ENTITY_INSTANCE,Type::IfcCurve); current = entity_descriptor_map[Type::IfcBlobTexture] = new IfcEntityDescriptor(Type::IfcBlobTexture,entity_descriptor_map.find(Type::IfcSurfaceTexture)->second); current->add("RasterFormat",false,IfcUtil::Argument_STRING,Type::IfcIdentifier); - current->add("RasterCode",false,IfcUtil::Argument_BINARY,Type::UNDEFINED); + current->add("RasterCode",false,IfcUtil::Argument_BINARY,Type::IfcBinary); current = entity_descriptor_map[Type::IfcCenterLineProfileDef] = new IfcEntityDescriptor(Type::IfcCenterLineProfileDef,entity_descriptor_map.find(Type::IfcArbitraryOpenProfileDef)->second); current->add("Thickness",false,IfcUtil::Argument_DOUBLE,Type::IfcPositiveLengthMeasure); current = entity_descriptor_map[Type::IfcClassification] = new IfcEntityDescriptor(Type::IfcClassification,entity_descriptor_map.find(Type::IfcExternalInformation)->second); @@ -863,7 +871,7 @@ void InitDescriptorMap() { current->add("CurveFont",true,IfcUtil::Argument_ENTITY_INSTANCE,Type::IfcCurveFontOrScaledCurveFontSelect); current->add("CurveWidth",true,IfcUtil::Argument_ENTITY_INSTANCE,Type::IfcSizeSelect); current->add("CurveColour",true,IfcUtil::Argument_ENTITY_INSTANCE,Type::IfcColour); - current->add("ModelOrDraughting",true,IfcUtil::Argument_BOOL,Type::UNDEFINED); + current->add("ModelOrDraughting",true,IfcUtil::Argument_BOOL,Type::IfcBoolean); current = entity_descriptor_map[Type::IfcCurveStyleFont] = new IfcEntityDescriptor(Type::IfcCurveStyleFont,entity_descriptor_map.find(Type::IfcPresentationItem)->second); current->add("Name",true,IfcUtil::Argument_STRING,Type::IfcLabel); current->add("PatternList",false,IfcUtil::Argument_AGGREGATE_OF_ENTITY_INSTANCE,Type::IfcCurveStyleFontPattern); @@ -908,7 +916,7 @@ void InitDescriptorMap() { current->add("EdgeEnd",false,IfcUtil::Argument_ENTITY_INSTANCE,Type::IfcVertex); current = entity_descriptor_map[Type::IfcEdgeCurve] = new IfcEntityDescriptor(Type::IfcEdgeCurve,entity_descriptor_map.find(Type::IfcEdge)->second); current->add("EdgeGeometry",false,IfcUtil::Argument_ENTITY_INSTANCE,Type::IfcCurve); - current->add("SameSense",false,IfcUtil::Argument_BOOL,Type::UNDEFINED); + current->add("SameSense",false,IfcUtil::Argument_BOOL,Type::IfcBoolean); current = entity_descriptor_map[Type::IfcEventTime] = new IfcEntityDescriptor(Type::IfcEventTime,entity_descriptor_map.find(Type::IfcSchedulingTime)->second); current->add("ActualDate",true,IfcUtil::Argument_STRING,Type::IfcDateTime); current->add("EarlyDate",true,IfcUtil::Argument_STRING,Type::IfcDateTime); @@ -925,12 +933,12 @@ void InitDescriptorMap() { current->add("Bounds",false,IfcUtil::Argument_AGGREGATE_OF_ENTITY_INSTANCE,Type::IfcFaceBound); current = entity_descriptor_map[Type::IfcFaceBound] = new IfcEntityDescriptor(Type::IfcFaceBound,entity_descriptor_map.find(Type::IfcTopologicalRepresentationItem)->second); current->add("Bound",false,IfcUtil::Argument_ENTITY_INSTANCE,Type::IfcLoop); - current->add("Orientation",false,IfcUtil::Argument_BOOL,Type::UNDEFINED); + current->add("Orientation",false,IfcUtil::Argument_BOOL,Type::IfcBoolean); current = entity_descriptor_map[Type::IfcFaceOuterBound] = new IfcEntityDescriptor(Type::IfcFaceOuterBound,entity_descriptor_map.find(Type::IfcFaceBound)->second); current = entity_descriptor_map[Type::IfcFaceSurface] = new IfcEntityDescriptor(Type::IfcFaceSurface,entity_descriptor_map.find(Type::IfcFace)->second); current->add("FaceSurface",false,IfcUtil::Argument_ENTITY_INSTANCE,Type::IfcSurface); - current->add("SameSense",false,IfcUtil::Argument_BOOL,Type::UNDEFINED); + current->add("SameSense",false,IfcUtil::Argument_BOOL,Type::IfcBoolean); current = entity_descriptor_map[Type::IfcFailureConnectionCondition] = new IfcEntityDescriptor(Type::IfcFailureConnectionCondition,entity_descriptor_map.find(Type::IfcStructuralConnectionCondition)->second); current->add("TensionFailureX",true,IfcUtil::Argument_DOUBLE,Type::IfcForceMeasure); current->add("TensionFailureY",true,IfcUtil::Argument_DOUBLE,Type::IfcForceMeasure); @@ -940,10 +948,10 @@ void InitDescriptorMap() { current->add("CompressionFailureZ",true,IfcUtil::Argument_DOUBLE,Type::IfcForceMeasure); current = entity_descriptor_map[Type::IfcFillAreaStyle] = new IfcEntityDescriptor(Type::IfcFillAreaStyle,entity_descriptor_map.find(Type::IfcPresentationStyle)->second); current->add("FillStyles",false,IfcUtil::Argument_AGGREGATE_OF_ENTITY_INSTANCE,Type::IfcFillStyleSelect); - current->add("ModelorDraughting",true,IfcUtil::Argument_BOOL,Type::UNDEFINED); + current->add("ModelorDraughting",true,IfcUtil::Argument_BOOL,Type::IfcBoolean); current = entity_descriptor_map[Type::IfcGeometricRepresentationContext] = new IfcEntityDescriptor(Type::IfcGeometricRepresentationContext,entity_descriptor_map.find(Type::IfcRepresentationContext)->second); current->add("CoordinateSpaceDimension",false,IfcUtil::Argument_INT,Type::IfcDimensionCount); - current->add("Precision",true,IfcUtil::Argument_DOUBLE,Type::UNDEFINED); + current->add("Precision",true,IfcUtil::Argument_DOUBLE,Type::IfcReal); current->add("WorldCoordinateSystem",false,IfcUtil::Argument_ENTITY_INSTANCE,Type::IfcAxis2Placement); current->add("TrueNorth",true,IfcUtil::Argument_ENTITY_INSTANCE,Type::IfcDirection); current = entity_descriptor_map[Type::IfcGeometricRepresentationItem] = new IfcEntityDescriptor(Type::IfcGeometricRepresentationItem,entity_descriptor_map.find(Type::IfcRepresentationItem)->second); @@ -960,19 +968,19 @@ void InitDescriptorMap() { current->add("PlacementRefDirection",true,IfcUtil::Argument_ENTITY_INSTANCE,Type::IfcGridPlacementDirectionSelect); current = entity_descriptor_map[Type::IfcHalfSpaceSolid] = new IfcEntityDescriptor(Type::IfcHalfSpaceSolid,entity_descriptor_map.find(Type::IfcGeometricRepresentationItem)->second); current->add("BaseSurface",false,IfcUtil::Argument_ENTITY_INSTANCE,Type::IfcSurface); - current->add("AgreementFlag",false,IfcUtil::Argument_BOOL,Type::UNDEFINED); + current->add("AgreementFlag",false,IfcUtil::Argument_BOOL,Type::IfcBoolean); current = entity_descriptor_map[Type::IfcImageTexture] = new IfcEntityDescriptor(Type::IfcImageTexture,entity_descriptor_map.find(Type::IfcSurfaceTexture)->second); current->add("URLReference",false,IfcUtil::Argument_STRING,Type::IfcURIReference); current = entity_descriptor_map[Type::IfcIndexedColourMap] = new IfcEntityDescriptor(Type::IfcIndexedColourMap,entity_descriptor_map.find(Type::IfcPresentationItem)->second); current->add("MappedTo",false,IfcUtil::Argument_ENTITY_INSTANCE,Type::IfcTessellatedFaceSet); current->add("Overrides",true,IfcUtil::Argument_ENTITY_INSTANCE,Type::IfcSurfaceStyleShading); current->add("Colours",false,IfcUtil::Argument_ENTITY_INSTANCE,Type::IfcColourRgbList); - current->add("ColourIndex",false,IfcUtil::Argument_AGGREGATE_OF_INT,Type::UNDEFINED); + current->add("ColourIndex",false,IfcUtil::Argument_AGGREGATE_OF_INT,Type::IfcPositiveInteger); current = entity_descriptor_map[Type::IfcIndexedTextureMap] = new IfcEntityDescriptor(Type::IfcIndexedTextureMap,entity_descriptor_map.find(Type::IfcTextureCoordinate)->second); current->add("MappedTo",false,IfcUtil::Argument_ENTITY_INSTANCE,Type::IfcTessellatedFaceSet); current->add("TexCoords",false,IfcUtil::Argument_ENTITY_INSTANCE,Type::IfcTextureVertexList); current = entity_descriptor_map[Type::IfcIndexedTriangleTextureMap] = new IfcEntityDescriptor(Type::IfcIndexedTriangleTextureMap,entity_descriptor_map.find(Type::IfcIndexedTextureMap)->second); - current->add("TexCoordIndex",true,IfcUtil::Argument_AGGREGATE_OF_AGGREGATE_OF_INT,Type::UNDEFINED); + current->add("TexCoordIndex",true,IfcUtil::Argument_AGGREGATE_OF_AGGREGATE_OF_INT,Type::IfcPositiveInteger); current = entity_descriptor_map[Type::IfcIrregularTimeSeries] = new IfcEntityDescriptor(Type::IfcIrregularTimeSeries,entity_descriptor_map.find(Type::IfcTimeSeries)->second); current->add("Values",false,IfcUtil::Argument_AGGREGATE_OF_ENTITY_INSTANCE,Type::IfcIrregularTimeSeriesValue); current = entity_descriptor_map[Type::IfcLagTime] = new IfcEntityDescriptor(Type::IfcLagTime,entity_descriptor_map.find(Type::IfcSchedulingTime)->second); @@ -1059,7 +1067,7 @@ void InitDescriptorMap() { current->add("RelatedOrganizations",false,IfcUtil::Argument_AGGREGATE_OF_ENTITY_INSTANCE,Type::IfcOrganization); current = entity_descriptor_map[Type::IfcOrientedEdge] = new IfcEntityDescriptor(Type::IfcOrientedEdge,entity_descriptor_map.find(Type::IfcEdge)->second); current->add("EdgeElement",false,IfcUtil::Argument_ENTITY_INSTANCE,Type::IfcEdge); - current->add("Orientation",false,IfcUtil::Argument_BOOL,Type::UNDEFINED); + current->add("Orientation",false,IfcUtil::Argument_BOOL,Type::IfcBoolean); current = entity_descriptor_map[Type::IfcParameterizedProfileDef] = new IfcEntityDescriptor(Type::IfcParameterizedProfileDef,entity_descriptor_map.find(Type::IfcProfileDef)->second); current->add("Position",true,IfcUtil::Argument_ENTITY_INSTANCE,Type::IfcAxis2Placement2D); current = entity_descriptor_map[Type::IfcPath] = new IfcEntityDescriptor(Type::IfcPath,entity_descriptor_map.find(Type::IfcTopologicalRepresentationItem)->second); @@ -1073,7 +1081,7 @@ void InitDescriptorMap() { current->add("Width",false,IfcUtil::Argument_INT,Type::IfcInteger); current->add("Height",false,IfcUtil::Argument_INT,Type::IfcInteger); current->add("ColourComponents",false,IfcUtil::Argument_INT,Type::IfcInteger); - current->add("Pixel",false,IfcUtil::Argument_AGGREGATE_OF_BINARY,Type::UNDEFINED); + current->add("Pixel",false,IfcUtil::Argument_AGGREGATE_OF_BINARY,Type::IfcBinary); current = entity_descriptor_map[Type::IfcPlacement] = new IfcEntityDescriptor(Type::IfcPlacement,entity_descriptor_map.find(Type::IfcGeometricRepresentationItem)->second); current->add("Location",false,IfcUtil::Argument_ENTITY_INSTANCE,Type::IfcCartesianPoint); current = entity_descriptor_map[Type::IfcPlanarExtent] = new IfcEntityDescriptor(Type::IfcPlanarExtent,entity_descriptor_map.find(Type::IfcGeometricRepresentationItem)->second); @@ -1146,7 +1154,7 @@ void InitDescriptorMap() { current->add("ScheduleFinish",true,IfcUtil::Argument_STRING,Type::IfcDateTime); current->add("ScheduleContour",true,IfcUtil::Argument_STRING,Type::IfcLabel); current->add("LevelingDelay",true,IfcUtil::Argument_STRING,Type::IfcDuration); - current->add("IsOverAllocated",true,IfcUtil::Argument_BOOL,Type::UNDEFINED); + current->add("IsOverAllocated",true,IfcUtil::Argument_BOOL,Type::IfcBoolean); current->add("StatusTime",true,IfcUtil::Argument_STRING,Type::IfcDateTime); current->add("ActualWork",true,IfcUtil::Argument_STRING,Type::IfcDuration); current->add("ActualUsage",true,IfcUtil::Argument_DOUBLE,Type::IfcPositiveRatioMeasure); @@ -1298,8 +1306,8 @@ void InitDescriptorMap() { current = entity_descriptor_map[Type::IfcWindowStyle] = new IfcEntityDescriptor(Type::IfcWindowStyle,entity_descriptor_map.find(Type::IfcTypeProduct)->second); current->add("ConstructionType",false,IfcUtil::Argument_ENUMERATION,Type::IfcWindowStyleConstructionEnum); current->add("OperationType",false,IfcUtil::Argument_ENUMERATION,Type::IfcWindowStyleOperationEnum); - current->add("ParameterTakesPrecedence",false,IfcUtil::Argument_BOOL,Type::UNDEFINED); - current->add("Sizeable",false,IfcUtil::Argument_BOOL,Type::UNDEFINED); + current->add("ParameterTakesPrecedence",false,IfcUtil::Argument_BOOL,Type::IfcBoolean); + current->add("Sizeable",false,IfcUtil::Argument_BOOL,Type::IfcBoolean); current = entity_descriptor_map[Type::IfcZShapeProfileDef] = new IfcEntityDescriptor(Type::IfcZShapeProfileDef,entity_descriptor_map.find(Type::IfcParameterizedProfileDef)->second); current->add("Depth",false,IfcUtil::Argument_DOUBLE,Type::IfcPositiveLengthMeasure); current->add("FlangeWidth",false,IfcUtil::Argument_DOUBLE,Type::IfcPositiveLengthMeasure); @@ -1355,22 +1363,24 @@ void InitDescriptorMap() { current->add("Coordinates",false,IfcUtil::Argument_AGGREGATE_OF_DOUBLE,Type::IfcLengthMeasure); current = entity_descriptor_map[Type::IfcCartesianPointList] = new IfcEntityDescriptor(Type::IfcCartesianPointList,entity_descriptor_map.find(Type::IfcGeometricRepresentationItem)->second); + current = entity_descriptor_map[Type::IfcCartesianPointList2D] = new IfcEntityDescriptor(Type::IfcCartesianPointList2D,entity_descriptor_map.find(Type::IfcCartesianPointList)->second); + current->add("CoordList",false,IfcUtil::Argument_AGGREGATE_OF_AGGREGATE_OF_DOUBLE,Type::IfcLengthMeasure); current = entity_descriptor_map[Type::IfcCartesianPointList3D] = new IfcEntityDescriptor(Type::IfcCartesianPointList3D,entity_descriptor_map.find(Type::IfcCartesianPointList)->second); current->add("CoordList",false,IfcUtil::Argument_AGGREGATE_OF_AGGREGATE_OF_DOUBLE,Type::IfcLengthMeasure); current = entity_descriptor_map[Type::IfcCartesianTransformationOperator] = new IfcEntityDescriptor(Type::IfcCartesianTransformationOperator,entity_descriptor_map.find(Type::IfcGeometricRepresentationItem)->second); current->add("Axis1",true,IfcUtil::Argument_ENTITY_INSTANCE,Type::IfcDirection); current->add("Axis2",true,IfcUtil::Argument_ENTITY_INSTANCE,Type::IfcDirection); current->add("LocalOrigin",false,IfcUtil::Argument_ENTITY_INSTANCE,Type::IfcCartesianPoint); - current->add("Scale",true,IfcUtil::Argument_DOUBLE,Type::UNDEFINED); + current->add("Scale",true,IfcUtil::Argument_DOUBLE,Type::IfcReal); current = entity_descriptor_map[Type::IfcCartesianTransformationOperator2D] = new IfcEntityDescriptor(Type::IfcCartesianTransformationOperator2D,entity_descriptor_map.find(Type::IfcCartesianTransformationOperator)->second); current = entity_descriptor_map[Type::IfcCartesianTransformationOperator2DnonUniform] = new IfcEntityDescriptor(Type::IfcCartesianTransformationOperator2DnonUniform,entity_descriptor_map.find(Type::IfcCartesianTransformationOperator2D)->second); - current->add("Scale2",true,IfcUtil::Argument_DOUBLE,Type::UNDEFINED); + current->add("Scale2",true,IfcUtil::Argument_DOUBLE,Type::IfcReal); current = entity_descriptor_map[Type::IfcCartesianTransformationOperator3D] = new IfcEntityDescriptor(Type::IfcCartesianTransformationOperator3D,entity_descriptor_map.find(Type::IfcCartesianTransformationOperator)->second); current->add("Axis3",true,IfcUtil::Argument_ENTITY_INSTANCE,Type::IfcDirection); current = entity_descriptor_map[Type::IfcCartesianTransformationOperator3DnonUniform] = new IfcEntityDescriptor(Type::IfcCartesianTransformationOperator3DnonUniform,entity_descriptor_map.find(Type::IfcCartesianTransformationOperator3D)->second); - current->add("Scale2",true,IfcUtil::Argument_DOUBLE,Type::UNDEFINED); - current->add("Scale3",true,IfcUtil::Argument_DOUBLE,Type::UNDEFINED); + current->add("Scale2",true,IfcUtil::Argument_DOUBLE,Type::IfcReal); + current->add("Scale3",true,IfcUtil::Argument_DOUBLE,Type::IfcReal); current = entity_descriptor_map[Type::IfcCircleProfileDef] = new IfcEntityDescriptor(Type::IfcCircleProfileDef,entity_descriptor_map.find(Type::IfcParameterizedProfileDef)->second); current->add("Radius",false,IfcUtil::Argument_DOUBLE,Type::IfcPositiveLengthMeasure); current = entity_descriptor_map[Type::IfcClosedShell] = new IfcEntityDescriptor(Type::IfcClosedShell,entity_descriptor_map.find(Type::IfcConnectedFaceSet)->second); @@ -1384,7 +1394,7 @@ void InitDescriptorMap() { current->add("HasProperties",false,IfcUtil::Argument_AGGREGATE_OF_ENTITY_INSTANCE,Type::IfcProperty); current = entity_descriptor_map[Type::IfcCompositeCurveSegment] = new IfcEntityDescriptor(Type::IfcCompositeCurveSegment,entity_descriptor_map.find(Type::IfcGeometricRepresentationItem)->second); current->add("Transition",false,IfcUtil::Argument_ENUMERATION,Type::IfcTransitionCode); - current->add("SameSense",false,IfcUtil::Argument_BOOL,Type::UNDEFINED); + current->add("SameSense",false,IfcUtil::Argument_BOOL,Type::IfcBoolean); current->add("ParentCurve",false,IfcUtil::Argument_ENTITY_INSTANCE,Type::IfcCurve); current = entity_descriptor_map[Type::IfcConstructionResourceType] = new IfcEntityDescriptor(Type::IfcConstructionResourceType,entity_descriptor_map.find(Type::IfcTypeResource)->second); current->add("BaseCosts",true,IfcUtil::Argument_AGGREGATE_OF_ENTITY_INSTANCE,Type::IfcAppliedValue); @@ -1410,14 +1420,14 @@ void InitDescriptorMap() { current = entity_descriptor_map[Type::IfcCurveBoundedSurface] = new IfcEntityDescriptor(Type::IfcCurveBoundedSurface,entity_descriptor_map.find(Type::IfcBoundedSurface)->second); current->add("BasisSurface",false,IfcUtil::Argument_ENTITY_INSTANCE,Type::IfcSurface); current->add("Boundaries",false,IfcUtil::Argument_AGGREGATE_OF_ENTITY_INSTANCE,Type::IfcBoundaryCurve); - current->add("ImplicitOuter",false,IfcUtil::Argument_BOOL,Type::UNDEFINED); + current->add("ImplicitOuter",false,IfcUtil::Argument_BOOL,Type::IfcBoolean); current = entity_descriptor_map[Type::IfcDirection] = new IfcEntityDescriptor(Type::IfcDirection,entity_descriptor_map.find(Type::IfcGeometricRepresentationItem)->second); - current->add("DirectionRatios",false,IfcUtil::Argument_AGGREGATE_OF_DOUBLE,Type::UNDEFINED); + current->add("DirectionRatios",false,IfcUtil::Argument_AGGREGATE_OF_DOUBLE,Type::IfcReal); current = entity_descriptor_map[Type::IfcDoorStyle] = new IfcEntityDescriptor(Type::IfcDoorStyle,entity_descriptor_map.find(Type::IfcTypeProduct)->second); current->add("OperationType",false,IfcUtil::Argument_ENUMERATION,Type::IfcDoorStyleOperationEnum); current->add("ConstructionType",false,IfcUtil::Argument_ENUMERATION,Type::IfcDoorStyleConstructionEnum); - current->add("ParameterTakesPrecedence",false,IfcUtil::Argument_BOOL,Type::UNDEFINED); - current->add("Sizeable",false,IfcUtil::Argument_BOOL,Type::UNDEFINED); + current->add("ParameterTakesPrecedence",false,IfcUtil::Argument_BOOL,Type::IfcBoolean); + current->add("Sizeable",false,IfcUtil::Argument_BOOL,Type::IfcBoolean); current = entity_descriptor_map[Type::IfcEdgeLoop] = new IfcEntityDescriptor(Type::IfcEdgeLoop,entity_descriptor_map.find(Type::IfcLoop)->second); current->add("EdgeList",false,IfcUtil::Argument_AGGREGATE_OF_ENTITY_INSTANCE,Type::IfcOrientedEdge); current = entity_descriptor_map[Type::IfcElementQuantity] = new IfcEntityDescriptor(Type::IfcElementQuantity,entity_descriptor_map.find(Type::IfcQuantitySet)->second); @@ -1492,11 +1502,11 @@ void InitDescriptorMap() { current = entity_descriptor_map[Type::IfcOffsetCurve2D] = new IfcEntityDescriptor(Type::IfcOffsetCurve2D,entity_descriptor_map.find(Type::IfcCurve)->second); current->add("BasisCurve",false,IfcUtil::Argument_ENTITY_INSTANCE,Type::IfcCurve); current->add("Distance",false,IfcUtil::Argument_DOUBLE,Type::IfcLengthMeasure); - current->add("SelfIntersect",false,IfcUtil::Argument_BOOL,Type::UNDEFINED); + current->add("SelfIntersect",false,IfcUtil::Argument_BOOL,Type::IfcLogical); current = entity_descriptor_map[Type::IfcOffsetCurve3D] = new IfcEntityDescriptor(Type::IfcOffsetCurve3D,entity_descriptor_map.find(Type::IfcCurve)->second); current->add("BasisCurve",false,IfcUtil::Argument_ENTITY_INSTANCE,Type::IfcCurve); current->add("Distance",false,IfcUtil::Argument_DOUBLE,Type::IfcLengthMeasure); - current->add("SelfIntersect",false,IfcUtil::Argument_BOOL,Type::UNDEFINED); + current->add("SelfIntersect",false,IfcUtil::Argument_BOOL,Type::IfcLogical); current->add("RefDirection",false,IfcUtil::Argument_ENTITY_INSTANCE,Type::IfcDirection); current = entity_descriptor_map[Type::IfcPcurve] = new IfcEntityDescriptor(Type::IfcPcurve,entity_descriptor_map.find(Type::IfcCurve)->second); current->add("BasisSurface",false,IfcUtil::Argument_ENTITY_INSTANCE,Type::IfcSurface); @@ -1572,8 +1582,8 @@ void InitDescriptorMap() { current->add("V1",false,IfcUtil::Argument_DOUBLE,Type::IfcParameterValue); current->add("U2",false,IfcUtil::Argument_DOUBLE,Type::IfcParameterValue); current->add("V2",false,IfcUtil::Argument_DOUBLE,Type::IfcParameterValue); - current->add("Usense",false,IfcUtil::Argument_BOOL,Type::UNDEFINED); - current->add("Vsense",false,IfcUtil::Argument_BOOL,Type::UNDEFINED); + current->add("Usense",false,IfcUtil::Argument_BOOL,Type::IfcBoolean); + current->add("Vsense",false,IfcUtil::Argument_BOOL,Type::IfcBoolean); current = entity_descriptor_map[Type::IfcReinforcementDefinitionProperties] = new IfcEntityDescriptor(Type::IfcReinforcementDefinitionProperties,entity_descriptor_map.find(Type::IfcPreDefinedPropertySet)->second); current->add("DefinitionType",true,IfcUtil::Argument_STRING,Type::IfcLabel); current->add("ReinforcementSectionDefinitions",false,IfcUtil::Argument_AGGREGATE_OF_ENTITY_INSTANCE,Type::IfcSectionReinforcementProperties); @@ -1618,8 +1628,8 @@ void InitDescriptorMap() { current->add("RelatingElement",false,IfcUtil::Argument_ENTITY_INSTANCE,Type::IfcElement); current->add("RelatedElement",false,IfcUtil::Argument_ENTITY_INSTANCE,Type::IfcElement); current = entity_descriptor_map[Type::IfcRelConnectsPathElements] = new IfcEntityDescriptor(Type::IfcRelConnectsPathElements,entity_descriptor_map.find(Type::IfcRelConnectsElements)->second); - current->add("RelatingPriorities",false,IfcUtil::Argument_AGGREGATE_OF_DOUBLE,Type::UNDEFINED); - current->add("RelatedPriorities",false,IfcUtil::Argument_AGGREGATE_OF_DOUBLE,Type::UNDEFINED); + current->add("RelatingPriorities",false,IfcUtil::Argument_AGGREGATE_OF_INT,Type::IfcInteger); + current->add("RelatedPriorities",false,IfcUtil::Argument_AGGREGATE_OF_INT,Type::IfcInteger); current->add("RelatedConnectionType",false,IfcUtil::Argument_ENUMERATION,Type::IfcConnectionTypeEnum); current->add("RelatingConnectionType",false,IfcUtil::Argument_ENUMERATION,Type::IfcConnectionTypeEnum); current = entity_descriptor_map[Type::IfcRelConnectsPortToElement] = new IfcEntityDescriptor(Type::IfcRelConnectsPortToElement,entity_descriptor_map.find(Type::IfcRelConnects)->second); @@ -1788,8 +1798,8 @@ void InitDescriptorMap() { current = entity_descriptor_map[Type::IfcTask] = new IfcEntityDescriptor(Type::IfcTask,entity_descriptor_map.find(Type::IfcProcess)->second); current->add("Status",true,IfcUtil::Argument_STRING,Type::IfcLabel); current->add("WorkMethod",true,IfcUtil::Argument_STRING,Type::IfcLabel); - current->add("IsMilestone",false,IfcUtil::Argument_BOOL,Type::UNDEFINED); - current->add("Priority",true,IfcUtil::Argument_INT,Type::UNDEFINED); + current->add("IsMilestone",false,IfcUtil::Argument_BOOL,Type::IfcBoolean); + current->add("Priority",true,IfcUtil::Argument_INT,Type::IfcInteger); current->add("TaskTime",true,IfcUtil::Argument_ENTITY_INSTANCE,Type::IfcTaskTime); current->add("PredefinedType",true,IfcUtil::Argument_ENUMERATION,Type::IfcTaskTypeEnum); current = entity_descriptor_map[Type::IfcTaskType] = new IfcEntityDescriptor(Type::IfcTaskType,entity_descriptor_map.find(Type::IfcTypeProcess)->second); @@ -1798,12 +1808,12 @@ void InitDescriptorMap() { current = entity_descriptor_map[Type::IfcTessellatedFaceSet] = new IfcEntityDescriptor(Type::IfcTessellatedFaceSet,entity_descriptor_map.find(Type::IfcTessellatedItem)->second); current->add("Coordinates",false,IfcUtil::Argument_ENTITY_INSTANCE,Type::IfcCartesianPointList3D); current->add("Normals",true,IfcUtil::Argument_AGGREGATE_OF_AGGREGATE_OF_DOUBLE,Type::IfcParameterValue); - current->add("Closed",true,IfcUtil::Argument_BOOL,Type::UNDEFINED); + current->add("Closed",true,IfcUtil::Argument_BOOL,Type::IfcBoolean); current = entity_descriptor_map[Type::IfcTransportElementType] = new IfcEntityDescriptor(Type::IfcTransportElementType,entity_descriptor_map.find(Type::IfcElementType)->second); current->add("PredefinedType",false,IfcUtil::Argument_ENUMERATION,Type::IfcTransportElementTypeEnum); current = entity_descriptor_map[Type::IfcTriangulatedFaceSet] = new IfcEntityDescriptor(Type::IfcTriangulatedFaceSet,entity_descriptor_map.find(Type::IfcTessellatedFaceSet)->second); - current->add("CoordIndex",false,IfcUtil::Argument_AGGREGATE_OF_AGGREGATE_OF_INT,Type::UNDEFINED); - current->add("NormalIndex",true,IfcUtil::Argument_AGGREGATE_OF_AGGREGATE_OF_INT,Type::UNDEFINED); + current->add("CoordIndex",false,IfcUtil::Argument_AGGREGATE_OF_AGGREGATE_OF_INT,Type::IfcPositiveInteger); + current->add("NormalIndex",true,IfcUtil::Argument_AGGREGATE_OF_AGGREGATE_OF_INT,Type::IfcPositiveInteger); current = entity_descriptor_map[Type::IfcWindowLiningProperties] = new IfcEntityDescriptor(Type::IfcWindowLiningProperties,entity_descriptor_map.find(Type::IfcPreDefinedPropertySet)->second); current->add("LiningDepth",true,IfcUtil::Argument_DOUBLE,Type::IfcPositiveLengthMeasure); current->add("LiningThickness",true,IfcUtil::Argument_DOUBLE,Type::IfcNonNegativeLengthMeasure); @@ -1832,16 +1842,16 @@ void InitDescriptorMap() { current = entity_descriptor_map[Type::IfcAnnotation] = new IfcEntityDescriptor(Type::IfcAnnotation,entity_descriptor_map.find(Type::IfcProduct)->second); current = entity_descriptor_map[Type::IfcBSplineSurface] = new IfcEntityDescriptor(Type::IfcBSplineSurface,entity_descriptor_map.find(Type::IfcBoundedSurface)->second); - current->add("UDegree",false,IfcUtil::Argument_INT,Type::UNDEFINED); - current->add("VDegree",false,IfcUtil::Argument_INT,Type::UNDEFINED); + current->add("UDegree",false,IfcUtil::Argument_INT,Type::IfcInteger); + current->add("VDegree",false,IfcUtil::Argument_INT,Type::IfcInteger); current->add("ControlPointsList",false,IfcUtil::Argument_AGGREGATE_OF_AGGREGATE_OF_ENTITY_INSTANCE,Type::IfcCartesianPoint); current->add("SurfaceForm",false,IfcUtil::Argument_ENUMERATION,Type::IfcBSplineSurfaceForm); - current->add("UClosed",false,IfcUtil::Argument_BOOL,Type::UNDEFINED); - current->add("VClosed",false,IfcUtil::Argument_BOOL,Type::UNDEFINED); - current->add("SelfIntersect",false,IfcUtil::Argument_BOOL,Type::UNDEFINED); + current->add("UClosed",false,IfcUtil::Argument_BOOL,Type::IfcLogical); + current->add("VClosed",false,IfcUtil::Argument_BOOL,Type::IfcLogical); + current->add("SelfIntersect",false,IfcUtil::Argument_BOOL,Type::IfcLogical); current = entity_descriptor_map[Type::IfcBSplineSurfaceWithKnots] = new IfcEntityDescriptor(Type::IfcBSplineSurfaceWithKnots,entity_descriptor_map.find(Type::IfcBSplineSurface)->second); - current->add("UMultiplicities",false,IfcUtil::Argument_AGGREGATE_OF_INT,Type::UNDEFINED); - current->add("VMultiplicities",false,IfcUtil::Argument_AGGREGATE_OF_INT,Type::UNDEFINED); + current->add("UMultiplicities",false,IfcUtil::Argument_AGGREGATE_OF_INT,Type::IfcInteger); + current->add("VMultiplicities",false,IfcUtil::Argument_AGGREGATE_OF_INT,Type::IfcInteger); current->add("UKnots",false,IfcUtil::Argument_AGGREGATE_OF_DOUBLE,Type::IfcParameterValue); current->add("VKnots",false,IfcUtil::Argument_AGGREGATE_OF_DOUBLE,Type::IfcParameterValue); current->add("KnotSpec",false,IfcUtil::Argument_ENUMERATION,Type::IfcKnotType); @@ -1875,7 +1885,7 @@ void InitDescriptorMap() { current->add("HasPropertyTemplates",true,IfcUtil::Argument_AGGREGATE_OF_ENTITY_INSTANCE,Type::IfcPropertyTemplate); current = entity_descriptor_map[Type::IfcCompositeCurve] = new IfcEntityDescriptor(Type::IfcCompositeCurve,entity_descriptor_map.find(Type::IfcBoundedCurve)->second); current->add("Segments",false,IfcUtil::Argument_AGGREGATE_OF_ENTITY_INSTANCE,Type::IfcCompositeCurveSegment); - current->add("SelfIntersect",false,IfcUtil::Argument_BOOL,Type::UNDEFINED); + current->add("SelfIntersect",false,IfcUtil::Argument_BOOL,Type::IfcLogical); current = entity_descriptor_map[Type::IfcCompositeCurveOnSurface] = new IfcEntityDescriptor(Type::IfcCompositeCurveOnSurface,entity_descriptor_map.find(Type::IfcCompositeCurve)->second); current = entity_descriptor_map[Type::IfcConic] = new IfcEntityDescriptor(Type::IfcConic,entity_descriptor_map.find(Type::IfcCurve)->second); @@ -1936,7 +1946,7 @@ void InitDescriptorMap() { current = entity_descriptor_map[Type::IfcDoorType] = new IfcEntityDescriptor(Type::IfcDoorType,entity_descriptor_map.find(Type::IfcBuildingElementType)->second); current->add("PredefinedType",false,IfcUtil::Argument_ENUMERATION,Type::IfcDoorTypeEnum); current->add("OperationType",false,IfcUtil::Argument_ENUMERATION,Type::IfcDoorTypeOperationEnum); - current->add("ParameterTakesPrecedence",true,IfcUtil::Argument_BOOL,Type::UNDEFINED); + current->add("ParameterTakesPrecedence",true,IfcUtil::Argument_BOOL,Type::IfcBoolean); current->add("UserDefinedOperationType",true,IfcUtil::Argument_STRING,Type::IfcLabel); current = entity_descriptor_map[Type::IfcDraughtingPreDefinedColour] = new IfcEntityDescriptor(Type::IfcDraughtingPreDefinedColour,entity_descriptor_map.find(Type::IfcPreDefinedColour)->second); @@ -2020,6 +2030,10 @@ void InitDescriptorMap() { current->add("PredefinedType",false,IfcUtil::Argument_ENUMERATION,Type::IfcHeatExchangerTypeEnum); current = entity_descriptor_map[Type::IfcHumidifierType] = new IfcEntityDescriptor(Type::IfcHumidifierType,entity_descriptor_map.find(Type::IfcEnergyConversionDeviceType)->second); current->add("PredefinedType",false,IfcUtil::Argument_ENUMERATION,Type::IfcHumidifierTypeEnum); + current = entity_descriptor_map[Type::IfcIndexedPolyCurve] = new IfcEntityDescriptor(Type::IfcIndexedPolyCurve,entity_descriptor_map.find(Type::IfcBoundedCurve)->second); + current->add("Points",false,IfcUtil::Argument_ENTITY_INSTANCE,Type::IfcCartesianPointList); + current->add("Segments",true,IfcUtil::Argument_AGGREGATE_OF_ENTITY_INSTANCE,Type::IfcSegmentIndexSelect); + current->add("SelfIntersect",true,IfcUtil::Argument_BOOL,Type::IfcBoolean); current = entity_descriptor_map[Type::IfcInterceptorType] = new IfcEntityDescriptor(Type::IfcInterceptorType,entity_descriptor_map.find(Type::IfcFlowTreatmentDeviceType)->second); current->add("PredefinedType",false,IfcUtil::Argument_ENUMERATION,Type::IfcInterceptorTypeEnum); current = entity_descriptor_map[Type::IfcInventory] = new IfcEntityDescriptor(Type::IfcInventory,entity_descriptor_map.find(Type::IfcGroup)->second); @@ -2103,7 +2117,7 @@ void InitDescriptorMap() { current = entity_descriptor_map[Type::IfcRampType] = new IfcEntityDescriptor(Type::IfcRampType,entity_descriptor_map.find(Type::IfcBuildingElementType)->second); current->add("PredefinedType",false,IfcUtil::Argument_ENUMERATION,Type::IfcRampTypeEnum); current = entity_descriptor_map[Type::IfcRationalBSplineSurfaceWithKnots] = new IfcEntityDescriptor(Type::IfcRationalBSplineSurfaceWithKnots,entity_descriptor_map.find(Type::IfcBSplineSurfaceWithKnots)->second); - current->add("WeightsData",false,IfcUtil::Argument_AGGREGATE_OF_AGGREGATE_OF_DOUBLE,Type::UNDEFINED); + current->add("WeightsData",false,IfcUtil::Argument_AGGREGATE_OF_AGGREGATE_OF_DOUBLE,Type::IfcReal); current = entity_descriptor_map[Type::IfcReinforcingElement] = new IfcEntityDescriptor(Type::IfcReinforcingElement,entity_descriptor_map.find(Type::IfcElementComponent)->second); current->add("SteelGrade",true,IfcUtil::Argument_STRING,Type::IfcLabel); current = entity_descriptor_map[Type::IfcReinforcingElementType] = new IfcEntityDescriptor(Type::IfcReinforcingElementType,entity_descriptor_map.find(Type::IfcElementComponentType)->second); @@ -2164,7 +2178,7 @@ void InitDescriptorMap() { current = entity_descriptor_map[Type::IfcStairType] = new IfcEntityDescriptor(Type::IfcStairType,entity_descriptor_map.find(Type::IfcBuildingElementType)->second); current->add("PredefinedType",false,IfcUtil::Argument_ENUMERATION,Type::IfcStairTypeEnum); current = entity_descriptor_map[Type::IfcStructuralAction] = new IfcEntityDescriptor(Type::IfcStructuralAction,entity_descriptor_map.find(Type::IfcStructuralActivity)->second); - current->add("DestabilizingLoad",true,IfcUtil::Argument_BOOL,Type::UNDEFINED); + current->add("DestabilizingLoad",true,IfcUtil::Argument_BOOL,Type::IfcBoolean); current = entity_descriptor_map[Type::IfcStructuralConnection] = new IfcEntityDescriptor(Type::IfcStructuralConnection,entity_descriptor_map.find(Type::IfcStructuralItem)->second); current->add("AppliedCondition",true,IfcUtil::Argument_ENTITY_INSTANCE,Type::IfcBoundaryCondition); current = entity_descriptor_map[Type::IfcStructuralCurveAction] = new IfcEntityDescriptor(Type::IfcStructuralCurveAction,entity_descriptor_map.find(Type::IfcStructuralAction)->second); @@ -2196,7 +2210,7 @@ void InitDescriptorMap() { current = entity_descriptor_map[Type::IfcStructuralResultGroup] = new IfcEntityDescriptor(Type::IfcStructuralResultGroup,entity_descriptor_map.find(Type::IfcGroup)->second); current->add("TheoryType",false,IfcUtil::Argument_ENUMERATION,Type::IfcAnalysisTheoryTypeEnum); current->add("ResultForLoadGroup",true,IfcUtil::Argument_ENTITY_INSTANCE,Type::IfcStructuralLoadGroup); - current->add("IsLinear",false,IfcUtil::Argument_BOOL,Type::UNDEFINED); + current->add("IsLinear",false,IfcUtil::Argument_BOOL,Type::IfcBoolean); current = entity_descriptor_map[Type::IfcStructuralSurfaceAction] = new IfcEntityDescriptor(Type::IfcStructuralSurfaceAction,entity_descriptor_map.find(Type::IfcStructuralAction)->second); current->add("ProjectedOrTrue",true,IfcUtil::Argument_ENUMERATION,Type::IfcProjectedOrTrueLengthEnum); current->add("PredefinedType",false,IfcUtil::Argument_ENUMERATION,Type::IfcStructuralSurfaceActivityTypeEnum); @@ -2240,7 +2254,7 @@ void InitDescriptorMap() { current->add("BasisCurve",false,IfcUtil::Argument_ENTITY_INSTANCE,Type::IfcCurve); current->add("Trim1",false,IfcUtil::Argument_AGGREGATE_OF_ENTITY_INSTANCE,Type::IfcTrimmingSelect); current->add("Trim2",false,IfcUtil::Argument_AGGREGATE_OF_ENTITY_INSTANCE,Type::IfcTrimmingSelect); - current->add("SenseAgreement",false,IfcUtil::Argument_BOOL,Type::UNDEFINED); + current->add("SenseAgreement",false,IfcUtil::Argument_BOOL,Type::IfcBoolean); current->add("MasterRepresentation",false,IfcUtil::Argument_ENUMERATION,Type::IfcTrimmingPreference); current = entity_descriptor_map[Type::IfcTubeBundleType] = new IfcEntityDescriptor(Type::IfcTubeBundleType,entity_descriptor_map.find(Type::IfcEnergyConversionDeviceType)->second); current->add("PredefinedType",false,IfcUtil::Argument_ENUMERATION,Type::IfcTubeBundleTypeEnum); @@ -2263,7 +2277,7 @@ void InitDescriptorMap() { current = entity_descriptor_map[Type::IfcWindowType] = new IfcEntityDescriptor(Type::IfcWindowType,entity_descriptor_map.find(Type::IfcBuildingElementType)->second); current->add("PredefinedType",false,IfcUtil::Argument_ENUMERATION,Type::IfcWindowTypeEnum); current->add("PartitioningType",false,IfcUtil::Argument_ENUMERATION,Type::IfcWindowTypePartitioningEnum); - current->add("ParameterTakesPrecedence",true,IfcUtil::Argument_BOOL,Type::UNDEFINED); + current->add("ParameterTakesPrecedence",true,IfcUtil::Argument_BOOL,Type::IfcBoolean); current->add("UserDefinedPartitioningType",true,IfcUtil::Argument_STRING,Type::IfcLabel); current = entity_descriptor_map[Type::IfcWorkCalendar] = new IfcEntityDescriptor(Type::IfcWorkCalendar,entity_descriptor_map.find(Type::IfcControl)->second); current->add("WorkingTimes",true,IfcUtil::Argument_AGGREGATE_OF_ENTITY_INSTANCE,Type::IfcWorkTime); @@ -2306,13 +2320,13 @@ void InitDescriptorMap() { current = entity_descriptor_map[Type::IfcAudioVisualApplianceType] = new IfcEntityDescriptor(Type::IfcAudioVisualApplianceType,entity_descriptor_map.find(Type::IfcFlowTerminalType)->second); current->add("PredefinedType",false,IfcUtil::Argument_ENUMERATION,Type::IfcAudioVisualApplianceTypeEnum); current = entity_descriptor_map[Type::IfcBSplineCurve] = new IfcEntityDescriptor(Type::IfcBSplineCurve,entity_descriptor_map.find(Type::IfcBoundedCurve)->second); - current->add("Degree",false,IfcUtil::Argument_INT,Type::UNDEFINED); + current->add("Degree",false,IfcUtil::Argument_INT,Type::IfcInteger); current->add("ControlPointsList",false,IfcUtil::Argument_AGGREGATE_OF_ENTITY_INSTANCE,Type::IfcCartesianPoint); current->add("CurveForm",false,IfcUtil::Argument_ENUMERATION,Type::IfcBSplineCurveForm); - current->add("ClosedCurve",false,IfcUtil::Argument_BOOL,Type::UNDEFINED); - current->add("SelfIntersect",false,IfcUtil::Argument_BOOL,Type::UNDEFINED); + current->add("ClosedCurve",false,IfcUtil::Argument_BOOL,Type::IfcLogical); + current->add("SelfIntersect",false,IfcUtil::Argument_BOOL,Type::IfcLogical); current = entity_descriptor_map[Type::IfcBSplineCurveWithKnots] = new IfcEntityDescriptor(Type::IfcBSplineCurveWithKnots,entity_descriptor_map.find(Type::IfcBSplineCurve)->second); - current->add("KnotMultiplicities",false,IfcUtil::Argument_AGGREGATE_OF_INT,Type::UNDEFINED); + current->add("KnotMultiplicities",false,IfcUtil::Argument_AGGREGATE_OF_INT,Type::IfcInteger); current->add("Knots",false,IfcUtil::Argument_AGGREGATE_OF_DOUBLE,Type::IfcParameterValue); current->add("KnotSpec",false,IfcUtil::Argument_ENUMERATION,Type::IfcKnotType); current = entity_descriptor_map[Type::IfcBeamType] = new IfcEntityDescriptor(Type::IfcBeamType,entity_descriptor_map.find(Type::IfcBuildingElementType)->second); @@ -2333,6 +2347,7 @@ void InitDescriptorMap() { current->add("PredefinedType",false,IfcUtil::Argument_ENUMERATION,Type::IfcBuildingElementProxyTypeEnum); current = entity_descriptor_map[Type::IfcBuildingSystem] = new IfcEntityDescriptor(Type::IfcBuildingSystem,entity_descriptor_map.find(Type::IfcSystem)->second); current->add("PredefinedType",true,IfcUtil::Argument_ENUMERATION,Type::IfcBuildingSystemTypeEnum); + current->add("LongName",true,IfcUtil::Argument_STRING,Type::IfcLabel); current = entity_descriptor_map[Type::IfcBurnerType] = new IfcEntityDescriptor(Type::IfcBurnerType,entity_descriptor_map.find(Type::IfcEnergyConversionDeviceType)->second); current->add("PredefinedType",false,IfcUtil::Argument_ENUMERATION,Type::IfcBurnerTypeEnum); current = entity_descriptor_map[Type::IfcCableCarrierFittingType] = new IfcEntityDescriptor(Type::IfcCableCarrierFittingType,entity_descriptor_map.find(Type::IfcFlowFittingType)->second); @@ -2508,7 +2523,7 @@ void InitDescriptorMap() { current = entity_descriptor_map[Type::IfcRampFlight] = new IfcEntityDescriptor(Type::IfcRampFlight,entity_descriptor_map.find(Type::IfcBuildingElement)->second); current->add("PredefinedType",true,IfcUtil::Argument_ENUMERATION,Type::IfcRampFlightTypeEnum); current = entity_descriptor_map[Type::IfcRationalBSplineCurveWithKnots] = new IfcEntityDescriptor(Type::IfcRationalBSplineCurveWithKnots,entity_descriptor_map.find(Type::IfcBSplineCurveWithKnots)->second); - current->add("WeightsData",false,IfcUtil::Argument_AGGREGATE_OF_DOUBLE,Type::UNDEFINED); + current->add("WeightsData",false,IfcUtil::Argument_AGGREGATE_OF_DOUBLE,Type::IfcReal); current = entity_descriptor_map[Type::IfcReinforcingBar] = new IfcEntityDescriptor(Type::IfcReinforcingBar,entity_descriptor_map.find(Type::IfcReinforcingElement)->second); current->add("NominalDiameter",true,IfcUtil::Argument_DOUBLE,Type::IfcPositiveLengthMeasure); current->add("CrossSectionArea",true,IfcUtil::Argument_DOUBLE,Type::IfcAreaMeasure); @@ -2546,8 +2561,8 @@ void InitDescriptorMap() { current = entity_descriptor_map[Type::IfcStair] = new IfcEntityDescriptor(Type::IfcStair,entity_descriptor_map.find(Type::IfcBuildingElement)->second); current->add("PredefinedType",true,IfcUtil::Argument_ENUMERATION,Type::IfcStairTypeEnum); current = entity_descriptor_map[Type::IfcStairFlight] = new IfcEntityDescriptor(Type::IfcStairFlight,entity_descriptor_map.find(Type::IfcBuildingElement)->second); - current->add("NumberOfRiser",true,IfcUtil::Argument_INT,Type::UNDEFINED); - current->add("NumberOfTreads",true,IfcUtil::Argument_INT,Type::UNDEFINED); + current->add("NumberOfRisers",true,IfcUtil::Argument_INT,Type::IfcInteger); + current->add("NumberOfTreads",true,IfcUtil::Argument_INT,Type::IfcInteger); current->add("RiserHeight",true,IfcUtil::Argument_DOUBLE,Type::IfcPositiveLengthMeasure); current->add("TreadLength",true,IfcUtil::Argument_DOUBLE,Type::IfcPositiveLengthMeasure); current->add("PredefinedType",true,IfcUtil::Argument_ENUMERATION,Type::IfcStairFlightTypeEnum); @@ -4212,13 +4227,16 @@ void InitDescriptorMap() { values.push_back("TAPERED"); current_enum = enumeration_descriptor_map[Type::IfcSectionTypeEnum] = new IfcEnumerationDescriptor(Type::IfcSectionTypeEnum, values); values.clear(); values.reserve(128); + values.push_back("CO2SENSOR"); values.push_back("CONDUCTANCESENSOR"); values.push_back("CONTACTSENSOR"); values.push_back("FIRESENSOR"); values.push_back("FLOWSENSOR"); + values.push_back("FROSTSENSOR"); values.push_back("GASSENSOR"); values.push_back("HEATSENSOR"); values.push_back("HUMIDITYSENSOR"); + values.push_back("IDENTIFIERSENSOR"); values.push_back("IONCONCENTRATIONSENSOR"); values.push_back("LEVELSENSOR"); values.push_back("LIGHTSENSOR"); @@ -4738,7 +4756,6 @@ void InitInverseMap() { inverse_map[Type::IfcApproval].insert(std::make_pair("ApprovedResources", std::make_pair(Type::IfcResourceApprovalRelationship, 3))); inverse_map[Type::IfcApproval].insert(std::make_pair("IsRelatedWith", std::make_pair(Type::IfcApprovalRelationship, 3))); inverse_map[Type::IfcApproval].insert(std::make_pair("Relates", std::make_pair(Type::IfcApprovalRelationship, 2))); - inverse_map[Type::IfcBuildingElement].insert(std::make_pair("HasCoverings", std::make_pair(Type::IfcRelCoversBldgElements, 4))); inverse_map[Type::IfcClassification].insert(std::make_pair("ClassificationForObjects", std::make_pair(Type::IfcRelAssociatesClassification, 5))); inverse_map[Type::IfcClassification].insert(std::make_pair("HasReferences", std::make_pair(Type::IfcClassificationReference, 3))); inverse_map[Type::IfcClassificationReference].insert(std::make_pair("ClassificationRefForObjects", std::make_pair(Type::IfcRelAssociatesClassification, 5))); @@ -4751,6 +4768,7 @@ void InitInverseMap() { inverse_map[Type::IfcContextDependentUnit].insert(std::make_pair("HasExternalReference", std::make_pair(Type::IfcExternalReferenceRelationship, 3))); inverse_map[Type::IfcControl].insert(std::make_pair("Controls", std::make_pair(Type::IfcRelAssignsToControl, 6))); inverse_map[Type::IfcConversionBasedUnit].insert(std::make_pair("HasExternalReference", std::make_pair(Type::IfcExternalReferenceRelationship, 3))); + inverse_map[Type::IfcCoordinateReferenceSystem].insert(std::make_pair("HasCoordinateOperation", std::make_pair(Type::IfcCoordinateOperation, 0))); inverse_map[Type::IfcCovering].insert(std::make_pair("CoversSpaces", std::make_pair(Type::IfcRelCoversSpaces, 5))); inverse_map[Type::IfcCovering].insert(std::make_pair("CoversElements", std::make_pair(Type::IfcRelCoversBldgElements, 5))); inverse_map[Type::IfcDistributionControlElement].insert(std::make_pair("AssignedToFlowElement", std::make_pair(Type::IfcRelFlowControlElements, 4))); @@ -4772,12 +4790,14 @@ void InitInverseMap() { inverse_map[Type::IfcElement].insert(std::make_pair("ProvidesBoundaries", std::make_pair(Type::IfcRelSpaceBoundary, 5))); inverse_map[Type::IfcElement].insert(std::make_pair("ConnectedFrom", std::make_pair(Type::IfcRelConnectsElements, 6))); inverse_map[Type::IfcElement].insert(std::make_pair("ContainedInStructure", std::make_pair(Type::IfcRelContainedInSpatialStructure, 4))); + inverse_map[Type::IfcElement].insert(std::make_pair("HasCoverings", std::make_pair(Type::IfcRelCoversBldgElements, 4))); inverse_map[Type::IfcExternalReference].insert(std::make_pair("ExternalReferenceForResources", std::make_pair(Type::IfcExternalReferenceRelationship, 2))); inverse_map[Type::IfcExternalSpatialElement].insert(std::make_pair("BoundedBy", std::make_pair(Type::IfcRelSpaceBoundary, 4))); inverse_map[Type::IfcFace].insert(std::make_pair("HasTextureMaps", std::make_pair(Type::IfcTextureMap, 2))); inverse_map[Type::IfcFeatureElementAddition].insert(std::make_pair("ProjectsElements", std::make_pair(Type::IfcRelProjectsElement, 5))); inverse_map[Type::IfcFeatureElementSubtraction].insert(std::make_pair("VoidsElements", std::make_pair(Type::IfcRelVoidsElement, 5))); inverse_map[Type::IfcGeometricRepresentationContext].insert(std::make_pair("HasSubContexts", std::make_pair(Type::IfcGeometricRepresentationSubContext, 6))); + inverse_map[Type::IfcGeometricRepresentationContext].insert(std::make_pair("HasCoordinateOperation", std::make_pair(Type::IfcCoordinateOperation, 0))); inverse_map[Type::IfcGrid].insert(std::make_pair("ContainedInStructure", std::make_pair(Type::IfcRelContainedInSpatialStructure, 4))); inverse_map[Type::IfcGridAxis].insert(std::make_pair("PartOfW", std::make_pair(Type::IfcGrid, 9))); inverse_map[Type::IfcGridAxis].insert(std::make_pair("PartOfV", std::make_pair(Type::IfcGrid, 8))); @@ -4832,6 +4852,8 @@ void InitInverseMap() { inverse_map[Type::IfcProperty].insert(std::make_pair("PropertyForDependance", std::make_pair(Type::IfcPropertyDependencyRelationship, 2))); inverse_map[Type::IfcProperty].insert(std::make_pair("PropertyDependsOn", std::make_pair(Type::IfcPropertyDependencyRelationship, 3))); inverse_map[Type::IfcProperty].insert(std::make_pair("PartOfComplex", std::make_pair(Type::IfcComplexProperty, 3))); + inverse_map[Type::IfcProperty].insert(std::make_pair("HasConstraints", std::make_pair(Type::IfcResourceConstraintRelationship, 3))); + inverse_map[Type::IfcProperty].insert(std::make_pair("HasApprovals", std::make_pair(Type::IfcResourceApprovalRelationship, 2))); inverse_map[Type::IfcPropertyAbstraction].insert(std::make_pair("HasExternalReferences", std::make_pair(Type::IfcExternalReferenceRelationship, 3))); inverse_map[Type::IfcPropertyDefinition].insert(std::make_pair("HasContext", std::make_pair(Type::IfcRelDeclares, 5))); inverse_map[Type::IfcPropertyDefinition].insert(std::make_pair("HasAssociations", std::make_pair(Type::IfcRelAssociates, 4))); @@ -4868,7 +4890,6 @@ void InitInverseMap() { inverse_map[Type::IfcSurfaceTexture].insert(std::make_pair("IsMappedBy", std::make_pair(Type::IfcTextureCoordinate, 0))); inverse_map[Type::IfcSurfaceTexture].insert(std::make_pair("UsedInStyles", std::make_pair(Type::IfcSurfaceStyleWithTextures, 0))); inverse_map[Type::IfcSystem].insert(std::make_pair("ServicesBuildings", std::make_pair(Type::IfcRelServicesBuildings, 4))); - inverse_map[Type::IfcTableRow].insert(std::make_pair("OfTable", std::make_pair(Type::IfcTable, 1))); inverse_map[Type::IfcTessellatedFaceSet].insert(std::make_pair("HasColours", std::make_pair(Type::IfcIndexedColourMap, 0))); inverse_map[Type::IfcTessellatedFaceSet].insert(std::make_pair("HasTextures", std::make_pair(Type::IfcIndexedTextureMap, 1))); inverse_map[Type::IfcTimeSeries].insert(std::make_pair("HasExternalReference", std::make_pair(Type::IfcExternalReferenceRelationship, 3))); @@ -4941,48 +4962,60 @@ std::pair Type::GetEnumerationIndex(Enum t, const std::string& } std::pair Type::GetInverseAttribute(Enum t, const std::string& a) { - if (inverse_map.empty()) ::InitInverseMap(); - inverse_map_t::const_iterator it; - inverse_map_t::mapped_type::const_iterator jt; - while (true) { + if (inverse_map.empty()) ::InitInverseMap(); + inverse_map_t::const_iterator it; + inverse_map_t::mapped_type::const_iterator jt; + for(;;) { it = inverse_map.find(t); if (it != inverse_map.end()) { - jt = it->second.find(a); - if (jt != it->second.end()) { - return jt->second; - } - } - if ((t = Parent(t)) == -1) break; + jt = it->second.find(a); + if (jt != it->second.end()) { + return jt->second; + } + } + boost::optional pt = Parent(t); + if (pt) { + t = *pt; + } + else { + break; + } } throw IfcException("Attribute not found"); } std::set Type::GetInverseAttributeNames(Enum t) { - if (inverse_map.empty()) ::InitInverseMap(); - inverse_map_t::const_iterator it; - inverse_map_t::mapped_type::const_iterator jt; + if (inverse_map.empty()) ::InitInverseMap(); + inverse_map_t::const_iterator it; + inverse_map_t::mapped_type::const_iterator jt; - std::set return_value; + std::set return_value; - while (true) { + for (;;) { it = inverse_map.find(t); if (it != inverse_map.end()) { - for (jt = it->second.begin(); jt != it->second.end(); ++jt) { - return_value.insert(jt->first); - } - } - if ((t = Parent(t)) == -1) break; + for (jt = it->second.begin(); jt != it->second.end(); ++jt) { + return_value.insert(jt->first); + } + } + boost::optional pt = Parent(t); + if (pt) { + t = *pt; + } + else { + break; + } } - - return return_value; + + return return_value; } void Type::PopulateDerivedFields(IfcWrite::IfcWritableEntity* e) { std::map >::const_iterator i = derived_map.find(e->type()); - if (i != derived_map.end()) { - for (std::set::const_iterator it = i->second.begin(); it != i->second.end(); ++it) { - e->setArgumentDerived(*it); - } - } + if (i != derived_map.end()) { + for (std::set::const_iterator it = i->second.begin(); it != i->second.end(); ++it) { + e->setArgumentDerived(*it); + } + } } #endif diff --git a/src/ifcparse/Ifc4.cpp b/src/ifcparse/Ifc4.cpp index d599ac25b8..9ca65f4987 100644 --- a/src/ifcparse/Ifc4.cpp +++ b/src/ifcparse/Ifc4.cpp @@ -31,6 +31,8 @@ #include "../ifcparse/IfcWrite.h" #include "../ifcparse/IfcWritableEntity.h" +#include + using namespace Ifc4; using namespace IfcParse; using namespace IfcWrite; @@ -41,8 +43,10 @@ IfcUtil::IfcBaseClass* Ifc4::SchemaEntity(IfcAbstractEntity* e) { case Type::IfcAccelerationMeasure: return new IfcAccelerationMeasure(e); break; case Type::IfcAmountOfSubstanceMeasure: return new IfcAmountOfSubstanceMeasure(e); break; case Type::IfcAngularVelocityMeasure: return new IfcAngularVelocityMeasure(e); break; + case Type::IfcArcIndex: return new IfcArcIndex(e); break; case Type::IfcAreaDensityMeasure: return new IfcAreaDensityMeasure(e); break; case Type::IfcAreaMeasure: return new IfcAreaMeasure(e); break; + case Type::IfcBinary: return new IfcBinary(e); break; case Type::IfcBoolean: return new IfcBoolean(e); break; case Type::IfcBoxAlignment: return new IfcBoxAlignment(e); break; case Type::IfcCardinalPointReference: return new IfcCardinalPointReference(e); break; @@ -86,6 +90,7 @@ IfcUtil::IfcBaseClass* Ifc4::SchemaEntity(IfcAbstractEntity* e) { case Type::IfcLabel: return new IfcLabel(e); break; case Type::IfcLanguageId: return new IfcLanguageId(e); break; case Type::IfcLengthMeasure: return new IfcLengthMeasure(e); break; + case Type::IfcLineIndex: return new IfcLineIndex(e); break; case Type::IfcLinearForceMeasure: return new IfcLinearForceMeasure(e); break; case Type::IfcLinearMomentMeasure: return new IfcLinearMomentMeasure(e); break; case Type::IfcLinearStiffnessMeasure: return new IfcLinearStiffnessMeasure(e); break; @@ -116,6 +121,7 @@ IfcUtil::IfcBaseClass* Ifc4::SchemaEntity(IfcAbstractEntity* e) { case Type::IfcParameterValue: return new IfcParameterValue(e); break; case Type::IfcPlanarForceMeasure: return new IfcPlanarForceMeasure(e); break; case Type::IfcPlaneAngleMeasure: return new IfcPlaneAngleMeasure(e); break; + case Type::IfcPositiveInteger: return new IfcPositiveInteger(e); break; case Type::IfcPositiveLengthMeasure: return new IfcPositiveLengthMeasure(e); break; case Type::IfcPositivePlaneAngleMeasure: return new IfcPositivePlaneAngleMeasure(e); break; case Type::IfcPositiveRatioMeasure: return new IfcPositiveRatioMeasure(e); break; @@ -241,6 +247,7 @@ IfcUtil::IfcBaseClass* Ifc4::SchemaEntity(IfcAbstractEntity* e) { case Type::IfcCableSegmentType: return new IfcCableSegmentType(e); break; case Type::IfcCartesianPoint: return new IfcCartesianPoint(e); break; case Type::IfcCartesianPointList: return new IfcCartesianPointList(e); break; + case Type::IfcCartesianPointList2D: return new IfcCartesianPointList2D(e); break; case Type::IfcCartesianPointList3D: return new IfcCartesianPointList3D(e); break; case Type::IfcCartesianTransformationOperator: return new IfcCartesianTransformationOperator(e); break; case Type::IfcCartesianTransformationOperator2D: return new IfcCartesianTransformationOperator2D(e); break; @@ -480,6 +487,7 @@ IfcUtil::IfcBaseClass* Ifc4::SchemaEntity(IfcAbstractEntity* e) { case Type::IfcIShapeProfileDef: return new IfcIShapeProfileDef(e); break; case Type::IfcImageTexture: return new IfcImageTexture(e); break; case Type::IfcIndexedColourMap: return new IfcIndexedColourMap(e); break; + case Type::IfcIndexedPolyCurve: return new IfcIndexedPolyCurve(e); break; case Type::IfcIndexedTextureMap: return new IfcIndexedTextureMap(e); break; case Type::IfcIndexedTriangleTextureMap: return new IfcIndexedTriangleTextureMap(e); break; case Type::IfcInterceptor: return new IfcInterceptor(e); break; @@ -934,8 +942,8 @@ IfcUtil::IfcBaseClass* Ifc4::SchemaEntity(IfcAbstractEntity* e) { } std::string Type::ToString(Enum v) { - if (v < 0 || v >= 1157) throw IfcException("Unable to find find keyword in schema"); - const char* names[] = { "IfcAbsorbedDoseMeasure", "IfcAccelerationMeasure", "IfcActionRequest", "IfcActionRequestTypeEnum", "IfcActionSourceTypeEnum", "IfcActionTypeEnum", "IfcActor", "IfcActorRole", "IfcActorSelect", "IfcActuator", "IfcActuatorType", "IfcActuatorTypeEnum", "IfcAddress", "IfcAddressTypeEnum", "IfcAdvancedBrep", "IfcAdvancedBrepWithVoids", "IfcAdvancedFace", "IfcAirTerminal", "IfcAirTerminalBox", "IfcAirTerminalBoxType", "IfcAirTerminalBoxTypeEnum", "IfcAirTerminalType", "IfcAirTerminalTypeEnum", "IfcAirToAirHeatRecovery", "IfcAirToAirHeatRecoveryType", "IfcAirToAirHeatRecoveryTypeEnum", "IfcAlarm", "IfcAlarmType", "IfcAlarmTypeEnum", "IfcAmountOfSubstanceMeasure", "IfcAnalysisModelTypeEnum", "IfcAnalysisTheoryTypeEnum", "IfcAngularVelocityMeasure", "IfcAnnotation", "IfcAnnotationFillArea", "IfcApplication", "IfcAppliedValue", "IfcAppliedValueSelect", "IfcApproval", "IfcApprovalRelationship", "IfcArbitraryClosedProfileDef", "IfcArbitraryOpenProfileDef", "IfcArbitraryProfileDefWithVoids", "IfcAreaDensityMeasure", "IfcAreaMeasure", "IfcArithmeticOperatorEnum", "IfcAssemblyPlaceEnum", "IfcAsset", "IfcAsymmetricIShapeProfileDef", "IfcAudioVisualAppliance", "IfcAudioVisualApplianceType", "IfcAudioVisualApplianceTypeEnum", "IfcAxis1Placement", "IfcAxis2Placement", "IfcAxis2Placement2D", "IfcAxis2Placement3D", "IfcBSplineCurve", "IfcBSplineCurveForm", "IfcBSplineCurveWithKnots", "IfcBSplineSurface", "IfcBSplineSurfaceForm", "IfcBSplineSurfaceWithKnots", "IfcBeam", "IfcBeamStandardCase", "IfcBeamType", "IfcBeamTypeEnum", "IfcBenchmarkEnum", "IfcBendingParameterSelect", "IfcBlobTexture", "IfcBlock", "IfcBoiler", "IfcBoilerType", "IfcBoilerTypeEnum", "IfcBoolean", "IfcBooleanClippingResult", "IfcBooleanOperand", "IfcBooleanOperator", "IfcBooleanResult", "IfcBoundaryCondition", "IfcBoundaryCurve", "IfcBoundaryEdgeCondition", "IfcBoundaryFaceCondition", "IfcBoundaryNodeCondition", "IfcBoundaryNodeConditionWarping", "IfcBoundedCurve", "IfcBoundedSurface", "IfcBoundingBox", "IfcBoxAlignment", "IfcBoxedHalfSpace", "IfcBuilding", "IfcBuildingElement", "IfcBuildingElementPart", "IfcBuildingElementPartType", "IfcBuildingElementPartTypeEnum", "IfcBuildingElementProxy", "IfcBuildingElementProxyType", "IfcBuildingElementProxyTypeEnum", "IfcBuildingElementType", "IfcBuildingStorey", "IfcBuildingSystem", "IfcBuildingSystemTypeEnum", "IfcBurner", "IfcBurnerType", "IfcBurnerTypeEnum", "IfcCShapeProfileDef", "IfcCableCarrierFitting", "IfcCableCarrierFittingType", "IfcCableCarrierFittingTypeEnum", "IfcCableCarrierSegment", "IfcCableCarrierSegmentType", "IfcCableCarrierSegmentTypeEnum", "IfcCableFitting", "IfcCableFittingType", "IfcCableFittingTypeEnum", "IfcCableSegment", "IfcCableSegmentType", "IfcCableSegmentTypeEnum", "IfcCardinalPointReference", "IfcCartesianPoint", "IfcCartesianPointList", "IfcCartesianPointList3D", "IfcCartesianTransformationOperator", "IfcCartesianTransformationOperator2D", "IfcCartesianTransformationOperator2DnonUniform", "IfcCartesianTransformationOperator3D", "IfcCartesianTransformationOperator3DnonUniform", "IfcCenterLineProfileDef", "IfcChangeActionEnum", "IfcChiller", "IfcChillerType", "IfcChillerTypeEnum", "IfcChimney", "IfcChimneyType", "IfcChimneyTypeEnum", "IfcCircle", "IfcCircleHollowProfileDef", "IfcCircleProfileDef", "IfcCivilElement", "IfcCivilElementType", "IfcClassification", "IfcClassificationReference", "IfcClassificationReferenceSelect", "IfcClassificationSelect", "IfcClosedShell", "IfcCoil", "IfcCoilType", "IfcCoilTypeEnum", "IfcColour", "IfcColourOrFactor", "IfcColourRgb", "IfcColourRgbList", "IfcColourSpecification", "IfcColumn", "IfcColumnStandardCase", "IfcColumnType", "IfcColumnTypeEnum", "IfcCommunicationsAppliance", "IfcCommunicationsApplianceType", "IfcCommunicationsApplianceTypeEnum", "IfcComplexNumber", "IfcComplexProperty", "IfcComplexPropertyTemplate", "IfcComplexPropertyTemplateTypeEnum", "IfcCompositeCurve", "IfcCompositeCurveOnSurface", "IfcCompositeCurveSegment", "IfcCompositeProfileDef", "IfcCompoundPlaneAngleMeasure", "IfcCompressor", "IfcCompressorType", "IfcCompressorTypeEnum", "IfcCondenser", "IfcCondenserType", "IfcCondenserTypeEnum", "IfcConic", "IfcConnectedFaceSet", "IfcConnectionCurveGeometry", "IfcConnectionGeometry", "IfcConnectionPointEccentricity", "IfcConnectionPointGeometry", "IfcConnectionSurfaceGeometry", "IfcConnectionTypeEnum", "IfcConnectionVolumeGeometry", "IfcConstraint", "IfcConstraintEnum", "IfcConstructionEquipmentResource", "IfcConstructionEquipmentResourceType", "IfcConstructionEquipmentResourceTypeEnum", "IfcConstructionMaterialResource", "IfcConstructionMaterialResourceType", "IfcConstructionMaterialResourceTypeEnum", "IfcConstructionProductResource", "IfcConstructionProductResourceType", "IfcConstructionProductResourceTypeEnum", "IfcConstructionResource", "IfcConstructionResourceType", "IfcContext", "IfcContextDependentMeasure", "IfcContextDependentUnit", "IfcControl", "IfcController", "IfcControllerType", "IfcControllerTypeEnum", "IfcConversionBasedUnit", "IfcConversionBasedUnitWithOffset", "IfcCooledBeam", "IfcCooledBeamType", "IfcCooledBeamTypeEnum", "IfcCoolingTower", "IfcCoolingTowerType", "IfcCoolingTowerTypeEnum", "IfcCoordinateOperation", "IfcCoordinateReferenceSystem", "IfcCoordinateReferenceSystemSelect", "IfcCostItem", "IfcCostItemTypeEnum", "IfcCostSchedule", "IfcCostScheduleTypeEnum", "IfcCostValue", "IfcCountMeasure", "IfcCovering", "IfcCoveringType", "IfcCoveringTypeEnum", "IfcCrewResource", "IfcCrewResourceType", "IfcCrewResourceTypeEnum", "IfcCsgPrimitive3D", "IfcCsgSelect", "IfcCsgSolid", "IfcCurrencyRelationship", "IfcCurtainWall", "IfcCurtainWallType", "IfcCurtainWallTypeEnum", "IfcCurvatureMeasure", "IfcCurve", "IfcCurveBoundedPlane", "IfcCurveBoundedSurface", "IfcCurveFontOrScaledCurveFontSelect", "IfcCurveInterpolationEnum", "IfcCurveOnSurface", "IfcCurveOrEdgeCurve", "IfcCurveStyle", "IfcCurveStyleFont", "IfcCurveStyleFontAndScaling", "IfcCurveStyleFontPattern", "IfcCurveStyleFontSelect", "IfcCylindricalSurface", "IfcDamper", "IfcDamperType", "IfcDamperTypeEnum", "IfcDataOriginEnum", "IfcDate", "IfcDateTime", "IfcDayInMonthNumber", "IfcDayInWeekNumber", "IfcDefinitionSelect", "IfcDerivedMeasureValue", "IfcDerivedProfileDef", "IfcDerivedUnit", "IfcDerivedUnitElement", "IfcDerivedUnitEnum", "IfcDescriptiveMeasure", "IfcDimensionCount", "IfcDimensionalExponents", "IfcDirection", "IfcDirectionSenseEnum", "IfcDiscreteAccessory", "IfcDiscreteAccessoryType", "IfcDiscreteAccessoryTypeEnum", "IfcDistributionChamberElement", "IfcDistributionChamberElementType", "IfcDistributionChamberElementTypeEnum", "IfcDistributionCircuit", "IfcDistributionControlElement", "IfcDistributionControlElementType", "IfcDistributionElement", "IfcDistributionElementType", "IfcDistributionFlowElement", "IfcDistributionFlowElementType", "IfcDistributionPort", "IfcDistributionPortTypeEnum", "IfcDistributionSystem", "IfcDistributionSystemEnum", "IfcDocumentConfidentialityEnum", "IfcDocumentInformation", "IfcDocumentInformationRelationship", "IfcDocumentReference", "IfcDocumentSelect", "IfcDocumentStatusEnum", "IfcDoor", "IfcDoorLiningProperties", "IfcDoorPanelOperationEnum", "IfcDoorPanelPositionEnum", "IfcDoorPanelProperties", "IfcDoorStandardCase", "IfcDoorStyle", "IfcDoorStyleConstructionEnum", "IfcDoorStyleOperationEnum", "IfcDoorType", "IfcDoorTypeEnum", "IfcDoorTypeOperationEnum", "IfcDoseEquivalentMeasure", "IfcDraughtingPreDefinedColour", "IfcDraughtingPreDefinedCurveFont", "IfcDuctFitting", "IfcDuctFittingType", "IfcDuctFittingTypeEnum", "IfcDuctSegment", "IfcDuctSegmentType", "IfcDuctSegmentTypeEnum", "IfcDuctSilencer", "IfcDuctSilencerType", "IfcDuctSilencerTypeEnum", "IfcDuration", "IfcDynamicViscosityMeasure", "IfcEdge", "IfcEdgeCurve", "IfcEdgeLoop", "IfcElectricAppliance", "IfcElectricApplianceType", "IfcElectricApplianceTypeEnum", "IfcElectricCapacitanceMeasure", "IfcElectricChargeMeasure", "IfcElectricConductanceMeasure", "IfcElectricCurrentMeasure", "IfcElectricDistributionBoard", "IfcElectricDistributionBoardType", "IfcElectricDistributionBoardTypeEnum", "IfcElectricFlowStorageDevice", "IfcElectricFlowStorageDeviceType", "IfcElectricFlowStorageDeviceTypeEnum", "IfcElectricGenerator", "IfcElectricGeneratorType", "IfcElectricGeneratorTypeEnum", "IfcElectricMotor", "IfcElectricMotorType", "IfcElectricMotorTypeEnum", "IfcElectricResistanceMeasure", "IfcElectricTimeControl", "IfcElectricTimeControlType", "IfcElectricTimeControlTypeEnum", "IfcElectricVoltageMeasure", "IfcElement", "IfcElementAssembly", "IfcElementAssemblyType", "IfcElementAssemblyTypeEnum", "IfcElementComponent", "IfcElementComponentType", "IfcElementCompositionEnum", "IfcElementQuantity", "IfcElementType", "IfcElementarySurface", "IfcEllipse", "IfcEllipseProfileDef", "IfcEnergyConversionDevice", "IfcEnergyConversionDeviceType", "IfcEnergyMeasure", "IfcEngine", "IfcEngineType", "IfcEngineTypeEnum", "IfcEvaporativeCooler", "IfcEvaporativeCoolerType", "IfcEvaporativeCoolerTypeEnum", "IfcEvaporator", "IfcEvaporatorType", "IfcEvaporatorTypeEnum", "IfcEvent", "IfcEventTime", "IfcEventTriggerTypeEnum", "IfcEventType", "IfcEventTypeEnum", "IfcExtendedProperties", "IfcExternalInformation", "IfcExternalReference", "IfcExternalReferenceRelationship", "IfcExternalSpatialElement", "IfcExternalSpatialElementTypeEnum", "IfcExternalSpatialStructureElement", "IfcExternallyDefinedHatchStyle", "IfcExternallyDefinedSurfaceStyle", "IfcExternallyDefinedTextFont", "IfcExtrudedAreaSolid", "IfcExtrudedAreaSolidTapered", "IfcFace", "IfcFaceBasedSurfaceModel", "IfcFaceBound", "IfcFaceOuterBound", "IfcFaceSurface", "IfcFacetedBrep", "IfcFacetedBrepWithVoids", "IfcFailureConnectionCondition", "IfcFan", "IfcFanType", "IfcFanTypeEnum", "IfcFastener", "IfcFastenerType", "IfcFastenerTypeEnum", "IfcFeatureElement", "IfcFeatureElementAddition", "IfcFeatureElementSubtraction", "IfcFillAreaStyle", "IfcFillAreaStyleHatching", "IfcFillAreaStyleTiles", "IfcFillStyleSelect", "IfcFilter", "IfcFilterType", "IfcFilterTypeEnum", "IfcFireSuppressionTerminal", "IfcFireSuppressionTerminalType", "IfcFireSuppressionTerminalTypeEnum", "IfcFixedReferenceSweptAreaSolid", "IfcFlowController", "IfcFlowControllerType", "IfcFlowDirectionEnum", "IfcFlowFitting", "IfcFlowFittingType", "IfcFlowInstrument", "IfcFlowInstrumentType", "IfcFlowInstrumentTypeEnum", "IfcFlowMeter", "IfcFlowMeterType", "IfcFlowMeterTypeEnum", "IfcFlowMovingDevice", "IfcFlowMovingDeviceType", "IfcFlowSegment", "IfcFlowSegmentType", "IfcFlowStorageDevice", "IfcFlowStorageDeviceType", "IfcFlowTerminal", "IfcFlowTerminalType", "IfcFlowTreatmentDevice", "IfcFlowTreatmentDeviceType", "IfcFontStyle", "IfcFontVariant", "IfcFontWeight", "IfcFooting", "IfcFootingType", "IfcFootingTypeEnum", "IfcForceMeasure", "IfcFrequencyMeasure", "IfcFurnishingElement", "IfcFurnishingElementType", "IfcFurniture", "IfcFurnitureType", "IfcFurnitureTypeEnum", "IfcGeographicElement", "IfcGeographicElementType", "IfcGeographicElementTypeEnum", "IfcGeometricCurveSet", "IfcGeometricProjectionEnum", "IfcGeometricRepresentationContext", "IfcGeometricRepresentationItem", "IfcGeometricRepresentationSubContext", "IfcGeometricSet", "IfcGeometricSetSelect", "IfcGlobalOrLocalEnum", "IfcGloballyUniqueId", "IfcGrid", "IfcGridAxis", "IfcGridPlacement", "IfcGridPlacementDirectionSelect", "IfcGridTypeEnum", "IfcGroup", "IfcHalfSpaceSolid", "IfcHatchLineDistanceSelect", "IfcHeatExchanger", "IfcHeatExchangerType", "IfcHeatExchangerTypeEnum", "IfcHeatFluxDensityMeasure", "IfcHeatingValueMeasure", "IfcHumidifier", "IfcHumidifierType", "IfcHumidifierTypeEnum", "IfcIShapeProfileDef", "IfcIdentifier", "IfcIlluminanceMeasure", "IfcImageTexture", "IfcIndexedColourMap", "IfcIndexedTextureMap", "IfcIndexedTriangleTextureMap", "IfcInductanceMeasure", "IfcInteger", "IfcIntegerCountRateMeasure", "IfcInterceptor", "IfcInterceptorType", "IfcInterceptorTypeEnum", "IfcInternalOrExternalEnum", "IfcInventory", "IfcInventoryTypeEnum", "IfcIonConcentrationMeasure", "IfcIrregularTimeSeries", "IfcIrregularTimeSeriesValue", "IfcIsothermalMoistureCapacityMeasure", "IfcJunctionBox", "IfcJunctionBoxType", "IfcJunctionBoxTypeEnum", "IfcKinematicViscosityMeasure", "IfcKnotType", "IfcLShapeProfileDef", "IfcLabel", "IfcLaborResource", "IfcLaborResourceType", "IfcLaborResourceTypeEnum", "IfcLagTime", "IfcLamp", "IfcLampType", "IfcLampTypeEnum", "IfcLanguageId", "IfcLayerSetDirectionEnum", "IfcLayeredItem", "IfcLengthMeasure", "IfcLibraryInformation", "IfcLibraryReference", "IfcLibrarySelect", "IfcLightDistributionCurveEnum", "IfcLightDistributionData", "IfcLightDistributionDataSourceSelect", "IfcLightEmissionSourceEnum", "IfcLightFixture", "IfcLightFixtureType", "IfcLightFixtureTypeEnum", "IfcLightIntensityDistribution", "IfcLightSource", "IfcLightSourceAmbient", "IfcLightSourceDirectional", "IfcLightSourceGoniometric", "IfcLightSourcePositional", "IfcLightSourceSpot", "IfcLine", "IfcLinearForceMeasure", "IfcLinearMomentMeasure", "IfcLinearStiffnessMeasure", "IfcLinearVelocityMeasure", "IfcLoadGroupTypeEnum", "IfcLocalPlacement", "IfcLogical", "IfcLogicalOperatorEnum", "IfcLoop", "IfcLuminousFluxMeasure", "IfcLuminousIntensityDistributionMeasure", "IfcLuminousIntensityMeasure", "IfcMagneticFluxDensityMeasure", "IfcMagneticFluxMeasure", "IfcManifoldSolidBrep", "IfcMapConversion", "IfcMappedItem", "IfcMassDensityMeasure", "IfcMassFlowRateMeasure", "IfcMassMeasure", "IfcMassPerLengthMeasure", "IfcMaterial", "IfcMaterialClassificationRelationship", "IfcMaterialConstituent", "IfcMaterialConstituentSet", "IfcMaterialDefinition", "IfcMaterialDefinitionRepresentation", "IfcMaterialLayer", "IfcMaterialLayerSet", "IfcMaterialLayerSetUsage", "IfcMaterialLayerWithOffsets", "IfcMaterialList", "IfcMaterialProfile", "IfcMaterialProfileSet", "IfcMaterialProfileSetUsage", "IfcMaterialProfileSetUsageTapering", "IfcMaterialProfileWithOffsets", "IfcMaterialProperties", "IfcMaterialRelationship", "IfcMaterialSelect", "IfcMaterialUsageDefinition", "IfcMeasureValue", "IfcMeasureWithUnit", "IfcMechanicalFastener", "IfcMechanicalFastenerType", "IfcMechanicalFastenerTypeEnum", "IfcMedicalDevice", "IfcMedicalDeviceType", "IfcMedicalDeviceTypeEnum", "IfcMember", "IfcMemberStandardCase", "IfcMemberType", "IfcMemberTypeEnum", "IfcMetric", "IfcMetricValueSelect", "IfcMirroredProfileDef", "IfcModulusOfElasticityMeasure", "IfcModulusOfLinearSubgradeReactionMeasure", "IfcModulusOfRotationalSubgradeReactionMeasure", "IfcModulusOfRotationalSubgradeReactionSelect", "IfcModulusOfSubgradeReactionMeasure", "IfcModulusOfSubgradeReactionSelect", "IfcModulusOfTranslationalSubgradeReactionSelect", "IfcMoistureDiffusivityMeasure", "IfcMolecularWeightMeasure", "IfcMomentOfInertiaMeasure", "IfcMonetaryMeasure", "IfcMonetaryUnit", "IfcMonthInYearNumber", "IfcMotorConnection", "IfcMotorConnectionType", "IfcMotorConnectionTypeEnum", "IfcNamedUnit", "IfcNonNegativeLengthMeasure", "IfcNormalisedRatioMeasure", "IfcNullStyle", "IfcNumericMeasure", "IfcObject", "IfcObjectDefinition", "IfcObjectPlacement", "IfcObjectReferenceSelect", "IfcObjectTypeEnum", "IfcObjective", "IfcObjectiveEnum", "IfcOccupant", "IfcOccupantTypeEnum", "IfcOffsetCurve2D", "IfcOffsetCurve3D", "IfcOpenShell", "IfcOpeningElement", "IfcOpeningElementTypeEnum", "IfcOpeningStandardCase", "IfcOrganization", "IfcOrganizationRelationship", "IfcOrientedEdge", "IfcOuterBoundaryCurve", "IfcOutlet", "IfcOutletType", "IfcOutletTypeEnum", "IfcOwnerHistory", "IfcPHMeasure", "IfcParameterValue", "IfcParameterizedProfileDef", "IfcPath", "IfcPcurve", "IfcPerformanceHistory", "IfcPerformanceHistoryTypeEnum", "IfcPermeableCoveringOperationEnum", "IfcPermeableCoveringProperties", "IfcPermit", "IfcPermitTypeEnum", "IfcPerson", "IfcPersonAndOrganization", "IfcPhysicalComplexQuantity", "IfcPhysicalOrVirtualEnum", "IfcPhysicalQuantity", "IfcPhysicalSimpleQuantity", "IfcPile", "IfcPileConstructionEnum", "IfcPileType", "IfcPileTypeEnum", "IfcPipeFitting", "IfcPipeFittingType", "IfcPipeFittingTypeEnum", "IfcPipeSegment", "IfcPipeSegmentType", "IfcPipeSegmentTypeEnum", "IfcPixelTexture", "IfcPlacement", "IfcPlanarBox", "IfcPlanarExtent", "IfcPlanarForceMeasure", "IfcPlane", "IfcPlaneAngleMeasure", "IfcPlate", "IfcPlateStandardCase", "IfcPlateType", "IfcPlateTypeEnum", "IfcPoint", "IfcPointOnCurve", "IfcPointOnSurface", "IfcPointOrVertexPoint", "IfcPolyLoop", "IfcPolygonalBoundedHalfSpace", "IfcPolyline", "IfcPort", "IfcPositiveLengthMeasure", "IfcPositivePlaneAngleMeasure", "IfcPositiveRatioMeasure", "IfcPostalAddress", "IfcPowerMeasure", "IfcPreDefinedColour", "IfcPreDefinedCurveFont", "IfcPreDefinedItem", "IfcPreDefinedProperties", "IfcPreDefinedPropertySet", "IfcPreDefinedTextFont", "IfcPresentableText", "IfcPresentationItem", "IfcPresentationLayerAssignment", "IfcPresentationLayerWithStyle", "IfcPresentationStyle", "IfcPresentationStyleAssignment", "IfcPresentationStyleSelect", "IfcPressureMeasure", "IfcProcedure", "IfcProcedureType", "IfcProcedureTypeEnum", "IfcProcess", "IfcProcessSelect", "IfcProduct", "IfcProductDefinitionShape", "IfcProductRepresentation", "IfcProductRepresentationSelect", "IfcProductSelect", "IfcProfileDef", "IfcProfileProperties", "IfcProfileTypeEnum", "IfcProject", "IfcProjectLibrary", "IfcProjectOrder", "IfcProjectOrderTypeEnum", "IfcProjectedCRS", "IfcProjectedOrTrueLengthEnum", "IfcProjectionElement", "IfcProjectionElementTypeEnum", "IfcProperty", "IfcPropertyAbstraction", "IfcPropertyBoundedValue", "IfcPropertyDefinition", "IfcPropertyDependencyRelationship", "IfcPropertyEnumeratedValue", "IfcPropertyEnumeration", "IfcPropertyListValue", "IfcPropertyReferenceValue", "IfcPropertySet", "IfcPropertySetDefinition", "IfcPropertySetDefinitionSelect", "IfcPropertySetDefinitionSet", "IfcPropertySetTemplate", "IfcPropertySetTemplateTypeEnum", "IfcPropertySingleValue", "IfcPropertyTableValue", "IfcPropertyTemplate", "IfcPropertyTemplateDefinition", "IfcProtectiveDevice", "IfcProtectiveDeviceTrippingUnit", "IfcProtectiveDeviceTrippingUnitType", "IfcProtectiveDeviceTrippingUnitTypeEnum", "IfcProtectiveDeviceType", "IfcProtectiveDeviceTypeEnum", "IfcProxy", "IfcPump", "IfcPumpType", "IfcPumpTypeEnum", "IfcQuantityArea", "IfcQuantityCount", "IfcQuantityLength", "IfcQuantitySet", "IfcQuantityTime", "IfcQuantityVolume", "IfcQuantityWeight", "IfcRadioActivityMeasure", "IfcRailing", "IfcRailingType", "IfcRailingTypeEnum", "IfcRamp", "IfcRampFlight", "IfcRampFlightType", "IfcRampFlightTypeEnum", "IfcRampType", "IfcRampTypeEnum", "IfcRatioMeasure", "IfcRationalBSplineCurveWithKnots", "IfcRationalBSplineSurfaceWithKnots", "IfcReal", "IfcRectangleHollowProfileDef", "IfcRectangleProfileDef", "IfcRectangularPyramid", "IfcRectangularTrimmedSurface", "IfcRecurrencePattern", "IfcRecurrenceTypeEnum", "IfcReference", "IfcReflectanceMethodEnum", "IfcRegularTimeSeries", "IfcReinforcementBarProperties", "IfcReinforcementDefinitionProperties", "IfcReinforcingBar", "IfcReinforcingBarRoleEnum", "IfcReinforcingBarSurfaceEnum", "IfcReinforcingBarType", "IfcReinforcingBarTypeEnum", "IfcReinforcingElement", "IfcReinforcingElementType", "IfcReinforcingMesh", "IfcReinforcingMeshType", "IfcReinforcingMeshTypeEnum", "IfcRelAggregates", "IfcRelAssigns", "IfcRelAssignsToActor", "IfcRelAssignsToControl", "IfcRelAssignsToGroup", "IfcRelAssignsToGroupByFactor", "IfcRelAssignsToProcess", "IfcRelAssignsToProduct", "IfcRelAssignsToResource", "IfcRelAssociates", "IfcRelAssociatesApproval", "IfcRelAssociatesClassification", "IfcRelAssociatesConstraint", "IfcRelAssociatesDocument", "IfcRelAssociatesLibrary", "IfcRelAssociatesMaterial", "IfcRelConnects", "IfcRelConnectsElements", "IfcRelConnectsPathElements", "IfcRelConnectsPortToElement", "IfcRelConnectsPorts", "IfcRelConnectsStructuralActivity", "IfcRelConnectsStructuralMember", "IfcRelConnectsWithEccentricity", "IfcRelConnectsWithRealizingElements", "IfcRelContainedInSpatialStructure", "IfcRelCoversBldgElements", "IfcRelCoversSpaces", "IfcRelDeclares", "IfcRelDecomposes", "IfcRelDefines", "IfcRelDefinesByObject", "IfcRelDefinesByProperties", "IfcRelDefinesByTemplate", "IfcRelDefinesByType", "IfcRelFillsElement", "IfcRelFlowControlElements", "IfcRelInterferesElements", "IfcRelNests", "IfcRelProjectsElement", "IfcRelReferencedInSpatialStructure", "IfcRelSequence", "IfcRelServicesBuildings", "IfcRelSpaceBoundary", "IfcRelSpaceBoundary1stLevel", "IfcRelSpaceBoundary2ndLevel", "IfcRelVoidsElement", "IfcRelationship", "IfcReparametrisedCompositeCurveSegment", "IfcRepresentation", "IfcRepresentationContext", "IfcRepresentationItem", "IfcRepresentationMap", "IfcResource", "IfcResourceApprovalRelationship", "IfcResourceConstraintRelationship", "IfcResourceLevelRelationship", "IfcResourceObjectSelect", "IfcResourceSelect", "IfcResourceTime", "IfcRevolvedAreaSolid", "IfcRevolvedAreaSolidTapered", "IfcRightCircularCone", "IfcRightCircularCylinder", "IfcRoleEnum", "IfcRoof", "IfcRoofType", "IfcRoofTypeEnum", "IfcRoot", "IfcRotationalFrequencyMeasure", "IfcRotationalMassMeasure", "IfcRotationalStiffnessMeasure", "IfcRotationalStiffnessSelect", "IfcRoundedRectangleProfileDef", "IfcSIPrefix", "IfcSIUnit", "IfcSIUnitName", "IfcSanitaryTerminal", "IfcSanitaryTerminalType", "IfcSanitaryTerminalTypeEnum", "IfcSchedulingTime", "IfcSectionModulusMeasure", "IfcSectionProperties", "IfcSectionReinforcementProperties", "IfcSectionTypeEnum", "IfcSectionalAreaIntegralMeasure", "IfcSectionedSpine", "IfcSensor", "IfcSensorType", "IfcSensorTypeEnum", "IfcSequenceEnum", "IfcShadingDevice", "IfcShadingDeviceType", "IfcShadingDeviceTypeEnum", "IfcShapeAspect", "IfcShapeModel", "IfcShapeRepresentation", "IfcShearModulusMeasure", "IfcShell", "IfcShellBasedSurfaceModel", "IfcSimpleProperty", "IfcSimplePropertyTemplate", "IfcSimplePropertyTemplateTypeEnum", "IfcSimpleValue", "IfcSite", "IfcSizeSelect", "IfcSlab", "IfcSlabElementedCase", "IfcSlabStandardCase", "IfcSlabType", "IfcSlabTypeEnum", "IfcSlippageConnectionCondition", "IfcSolarDevice", "IfcSolarDeviceType", "IfcSolarDeviceTypeEnum", "IfcSolidAngleMeasure", "IfcSolidModel", "IfcSolidOrShell", "IfcSoundPowerLevelMeasure", "IfcSoundPowerMeasure", "IfcSoundPressureLevelMeasure", "IfcSoundPressureMeasure", "IfcSpace", "IfcSpaceBoundarySelect", "IfcSpaceHeater", "IfcSpaceHeaterType", "IfcSpaceHeaterTypeEnum", "IfcSpaceType", "IfcSpaceTypeEnum", "IfcSpatialElement", "IfcSpatialElementType", "IfcSpatialStructureElement", "IfcSpatialStructureElementType", "IfcSpatialZone", "IfcSpatialZoneType", "IfcSpatialZoneTypeEnum", "IfcSpecificHeatCapacityMeasure", "IfcSpecularExponent", "IfcSpecularHighlightSelect", "IfcSpecularRoughness", "IfcSphere", "IfcStackTerminal", "IfcStackTerminalType", "IfcStackTerminalTypeEnum", "IfcStair", "IfcStairFlight", "IfcStairFlightType", "IfcStairFlightTypeEnum", "IfcStairType", "IfcStairTypeEnum", "IfcStateEnum", "IfcStructuralAction", "IfcStructuralActivity", "IfcStructuralActivityAssignmentSelect", "IfcStructuralAnalysisModel", "IfcStructuralConnection", "IfcStructuralConnectionCondition", "IfcStructuralCurveAction", "IfcStructuralCurveActivityTypeEnum", "IfcStructuralCurveConnection", "IfcStructuralCurveMember", "IfcStructuralCurveMemberTypeEnum", "IfcStructuralCurveMemberVarying", "IfcStructuralCurveReaction", "IfcStructuralItem", "IfcStructuralLinearAction", "IfcStructuralLoad", "IfcStructuralLoadCase", "IfcStructuralLoadConfiguration", "IfcStructuralLoadGroup", "IfcStructuralLoadLinearForce", "IfcStructuralLoadOrResult", "IfcStructuralLoadPlanarForce", "IfcStructuralLoadSingleDisplacement", "IfcStructuralLoadSingleDisplacementDistortion", "IfcStructuralLoadSingleForce", "IfcStructuralLoadSingleForceWarping", "IfcStructuralLoadStatic", "IfcStructuralLoadTemperature", "IfcStructuralMember", "IfcStructuralPlanarAction", "IfcStructuralPointAction", "IfcStructuralPointConnection", "IfcStructuralPointReaction", "IfcStructuralReaction", "IfcStructuralResultGroup", "IfcStructuralSurfaceAction", "IfcStructuralSurfaceActivityTypeEnum", "IfcStructuralSurfaceConnection", "IfcStructuralSurfaceMember", "IfcStructuralSurfaceMemberTypeEnum", "IfcStructuralSurfaceMemberVarying", "IfcStructuralSurfaceReaction", "IfcStyleAssignmentSelect", "IfcStyleModel", "IfcStyledItem", "IfcStyledRepresentation", "IfcSubContractResource", "IfcSubContractResourceType", "IfcSubContractResourceTypeEnum", "IfcSubedge", "IfcSurface", "IfcSurfaceCurveSweptAreaSolid", "IfcSurfaceFeature", "IfcSurfaceFeatureTypeEnum", "IfcSurfaceOfLinearExtrusion", "IfcSurfaceOfRevolution", "IfcSurfaceOrFaceSurface", "IfcSurfaceReinforcementArea", "IfcSurfaceSide", "IfcSurfaceStyle", "IfcSurfaceStyleElementSelect", "IfcSurfaceStyleLighting", "IfcSurfaceStyleRefraction", "IfcSurfaceStyleRendering", "IfcSurfaceStyleShading", "IfcSurfaceStyleWithTextures", "IfcSurfaceTexture", "IfcSweptAreaSolid", "IfcSweptDiskSolid", "IfcSweptDiskSolidPolygonal", "IfcSweptSurface", "IfcSwitchingDevice", "IfcSwitchingDeviceType", "IfcSwitchingDeviceTypeEnum", "IfcSystem", "IfcSystemFurnitureElement", "IfcSystemFurnitureElementType", "IfcSystemFurnitureElementTypeEnum", "IfcTShapeProfileDef", "IfcTable", "IfcTableColumn", "IfcTableRow", "IfcTank", "IfcTankType", "IfcTankTypeEnum", "IfcTask", "IfcTaskDurationEnum", "IfcTaskTime", "IfcTaskTimeRecurring", "IfcTaskType", "IfcTaskTypeEnum", "IfcTelecomAddress", "IfcTemperatureGradientMeasure", "IfcTemperatureRateOfChangeMeasure", "IfcTendon", "IfcTendonAnchor", "IfcTendonAnchorType", "IfcTendonAnchorTypeEnum", "IfcTendonType", "IfcTendonTypeEnum", "IfcTessellatedFaceSet", "IfcTessellatedItem", "IfcText", "IfcTextAlignment", "IfcTextDecoration", "IfcTextFontName", "IfcTextFontSelect", "IfcTextLiteral", "IfcTextLiteralWithExtent", "IfcTextPath", "IfcTextStyle", "IfcTextStyleFontModel", "IfcTextStyleForDefinedFont", "IfcTextStyleTextModel", "IfcTextTransformation", "IfcTextureCoordinate", "IfcTextureCoordinateGenerator", "IfcTextureMap", "IfcTextureVertex", "IfcTextureVertexList", "IfcThermalAdmittanceMeasure", "IfcThermalConductivityMeasure", "IfcThermalExpansionCoefficientMeasure", "IfcThermalResistanceMeasure", "IfcThermalTransmittanceMeasure", "IfcThermodynamicTemperatureMeasure", "IfcTime", "IfcTimeMeasure", "IfcTimeOrRatioSelect", "IfcTimePeriod", "IfcTimeSeries", "IfcTimeSeriesDataTypeEnum", "IfcTimeSeriesValue", "IfcTimeStamp", "IfcTopologicalRepresentationItem", "IfcTopologyRepresentation", "IfcTorqueMeasure", "IfcTransformer", "IfcTransformerType", "IfcTransformerTypeEnum", "IfcTransitionCode", "IfcTranslationalStiffnessSelect", "IfcTransportElement", "IfcTransportElementType", "IfcTransportElementTypeEnum", "IfcTrapeziumProfileDef", "IfcTriangulatedFaceSet", "IfcTrimmedCurve", "IfcTrimmingPreference", "IfcTrimmingSelect", "IfcTubeBundle", "IfcTubeBundleType", "IfcTubeBundleTypeEnum", "IfcTypeObject", "IfcTypeProcess", "IfcTypeProduct", "IfcTypeResource", "IfcURIReference", "IfcUShapeProfileDef", "IfcUnit", "IfcUnitAssignment", "IfcUnitEnum", "IfcUnitaryControlElement", "IfcUnitaryControlElementType", "IfcUnitaryControlElementTypeEnum", "IfcUnitaryEquipment", "IfcUnitaryEquipmentType", "IfcUnitaryEquipmentTypeEnum", "IfcValue", "IfcValve", "IfcValveType", "IfcValveTypeEnum", "IfcVaporPermeabilityMeasure", "IfcVector", "IfcVectorOrDirection", "IfcVertex", "IfcVertexLoop", "IfcVertexPoint", "IfcVibrationIsolator", "IfcVibrationIsolatorType", "IfcVibrationIsolatorTypeEnum", "IfcVirtualElement", "IfcVirtualGridIntersection", "IfcVoidingFeature", "IfcVoidingFeatureTypeEnum", "IfcVolumeMeasure", "IfcVolumetricFlowRateMeasure", "IfcWall", "IfcWallElementedCase", "IfcWallStandardCase", "IfcWallType", "IfcWallTypeEnum", "IfcWarpingConstantMeasure", "IfcWarpingMomentMeasure", "IfcWarpingStiffnessSelect", "IfcWasteTerminal", "IfcWasteTerminalType", "IfcWasteTerminalTypeEnum", "IfcWindow", "IfcWindowLiningProperties", "IfcWindowPanelOperationEnum", "IfcWindowPanelPositionEnum", "IfcWindowPanelProperties", "IfcWindowStandardCase", "IfcWindowStyle", "IfcWindowStyleConstructionEnum", "IfcWindowStyleOperationEnum", "IfcWindowType", "IfcWindowTypeEnum", "IfcWindowTypePartitioningEnum", "IfcWorkCalendar", "IfcWorkCalendarTypeEnum", "IfcWorkControl", "IfcWorkPlan", "IfcWorkPlanTypeEnum", "IfcWorkSchedule", "IfcWorkScheduleTypeEnum", "IfcWorkTime", "IfcZShapeProfileDef", "IfcZone" }; + if (v < 0 || v >= 1164) throw IfcException("Unable to find find keyword in schema"); + const char* names[] = { "IfcAbsorbedDoseMeasure", "IfcAccelerationMeasure", "IfcActionRequest", "IfcActionRequestTypeEnum", "IfcActionSourceTypeEnum", "IfcActionTypeEnum", "IfcActor", "IfcActorRole", "IfcActorSelect", "IfcActuator", "IfcActuatorType", "IfcActuatorTypeEnum", "IfcAddress", "IfcAddressTypeEnum", "IfcAdvancedBrep", "IfcAdvancedBrepWithVoids", "IfcAdvancedFace", "IfcAirTerminal", "IfcAirTerminalBox", "IfcAirTerminalBoxType", "IfcAirTerminalBoxTypeEnum", "IfcAirTerminalType", "IfcAirTerminalTypeEnum", "IfcAirToAirHeatRecovery", "IfcAirToAirHeatRecoveryType", "IfcAirToAirHeatRecoveryTypeEnum", "IfcAlarm", "IfcAlarmType", "IfcAlarmTypeEnum", "IfcAmountOfSubstanceMeasure", "IfcAnalysisModelTypeEnum", "IfcAnalysisTheoryTypeEnum", "IfcAngularVelocityMeasure", "IfcAnnotation", "IfcAnnotationFillArea", "IfcApplication", "IfcAppliedValue", "IfcAppliedValueSelect", "IfcApproval", "IfcApprovalRelationship", "IfcArbitraryClosedProfileDef", "IfcArbitraryOpenProfileDef", "IfcArbitraryProfileDefWithVoids", "IfcArcIndex", "IfcAreaDensityMeasure", "IfcAreaMeasure", "IfcArithmeticOperatorEnum", "IfcAssemblyPlaceEnum", "IfcAsset", "IfcAsymmetricIShapeProfileDef", "IfcAudioVisualAppliance", "IfcAudioVisualApplianceType", "IfcAudioVisualApplianceTypeEnum", "IfcAxis1Placement", "IfcAxis2Placement", "IfcAxis2Placement2D", "IfcAxis2Placement3D", "IfcBSplineCurve", "IfcBSplineCurveForm", "IfcBSplineCurveWithKnots", "IfcBSplineSurface", "IfcBSplineSurfaceForm", "IfcBSplineSurfaceWithKnots", "IfcBeam", "IfcBeamStandardCase", "IfcBeamType", "IfcBeamTypeEnum", "IfcBenchmarkEnum", "IfcBendingParameterSelect", "IfcBinary", "IfcBlobTexture", "IfcBlock", "IfcBoiler", "IfcBoilerType", "IfcBoilerTypeEnum", "IfcBoolean", "IfcBooleanClippingResult", "IfcBooleanOperand", "IfcBooleanOperator", "IfcBooleanResult", "IfcBoundaryCondition", "IfcBoundaryCurve", "IfcBoundaryEdgeCondition", "IfcBoundaryFaceCondition", "IfcBoundaryNodeCondition", "IfcBoundaryNodeConditionWarping", "IfcBoundedCurve", "IfcBoundedSurface", "IfcBoundingBox", "IfcBoxAlignment", "IfcBoxedHalfSpace", "IfcBuilding", "IfcBuildingElement", "IfcBuildingElementPart", "IfcBuildingElementPartType", "IfcBuildingElementPartTypeEnum", "IfcBuildingElementProxy", "IfcBuildingElementProxyType", "IfcBuildingElementProxyTypeEnum", "IfcBuildingElementType", "IfcBuildingStorey", "IfcBuildingSystem", "IfcBuildingSystemTypeEnum", "IfcBurner", "IfcBurnerType", "IfcBurnerTypeEnum", "IfcCShapeProfileDef", "IfcCableCarrierFitting", "IfcCableCarrierFittingType", "IfcCableCarrierFittingTypeEnum", "IfcCableCarrierSegment", "IfcCableCarrierSegmentType", "IfcCableCarrierSegmentTypeEnum", "IfcCableFitting", "IfcCableFittingType", "IfcCableFittingTypeEnum", "IfcCableSegment", "IfcCableSegmentType", "IfcCableSegmentTypeEnum", "IfcCardinalPointReference", "IfcCartesianPoint", "IfcCartesianPointList", "IfcCartesianPointList2D", "IfcCartesianPointList3D", "IfcCartesianTransformationOperator", "IfcCartesianTransformationOperator2D", "IfcCartesianTransformationOperator2DnonUniform", "IfcCartesianTransformationOperator3D", "IfcCartesianTransformationOperator3DnonUniform", "IfcCenterLineProfileDef", "IfcChangeActionEnum", "IfcChiller", "IfcChillerType", "IfcChillerTypeEnum", "IfcChimney", "IfcChimneyType", "IfcChimneyTypeEnum", "IfcCircle", "IfcCircleHollowProfileDef", "IfcCircleProfileDef", "IfcCivilElement", "IfcCivilElementType", "IfcClassification", "IfcClassificationReference", "IfcClassificationReferenceSelect", "IfcClassificationSelect", "IfcClosedShell", "IfcCoil", "IfcCoilType", "IfcCoilTypeEnum", "IfcColour", "IfcColourOrFactor", "IfcColourRgb", "IfcColourRgbList", "IfcColourSpecification", "IfcColumn", "IfcColumnStandardCase", "IfcColumnType", "IfcColumnTypeEnum", "IfcCommunicationsAppliance", "IfcCommunicationsApplianceType", "IfcCommunicationsApplianceTypeEnum", "IfcComplexNumber", "IfcComplexProperty", "IfcComplexPropertyTemplate", "IfcComplexPropertyTemplateTypeEnum", "IfcCompositeCurve", "IfcCompositeCurveOnSurface", "IfcCompositeCurveSegment", "IfcCompositeProfileDef", "IfcCompoundPlaneAngleMeasure", "IfcCompressor", "IfcCompressorType", "IfcCompressorTypeEnum", "IfcCondenser", "IfcCondenserType", "IfcCondenserTypeEnum", "IfcConic", "IfcConnectedFaceSet", "IfcConnectionCurveGeometry", "IfcConnectionGeometry", "IfcConnectionPointEccentricity", "IfcConnectionPointGeometry", "IfcConnectionSurfaceGeometry", "IfcConnectionTypeEnum", "IfcConnectionVolumeGeometry", "IfcConstraint", "IfcConstraintEnum", "IfcConstructionEquipmentResource", "IfcConstructionEquipmentResourceType", "IfcConstructionEquipmentResourceTypeEnum", "IfcConstructionMaterialResource", "IfcConstructionMaterialResourceType", "IfcConstructionMaterialResourceTypeEnum", "IfcConstructionProductResource", "IfcConstructionProductResourceType", "IfcConstructionProductResourceTypeEnum", "IfcConstructionResource", "IfcConstructionResourceType", "IfcContext", "IfcContextDependentMeasure", "IfcContextDependentUnit", "IfcControl", "IfcController", "IfcControllerType", "IfcControllerTypeEnum", "IfcConversionBasedUnit", "IfcConversionBasedUnitWithOffset", "IfcCooledBeam", "IfcCooledBeamType", "IfcCooledBeamTypeEnum", "IfcCoolingTower", "IfcCoolingTowerType", "IfcCoolingTowerTypeEnum", "IfcCoordinateOperation", "IfcCoordinateReferenceSystem", "IfcCoordinateReferenceSystemSelect", "IfcCostItem", "IfcCostItemTypeEnum", "IfcCostSchedule", "IfcCostScheduleTypeEnum", "IfcCostValue", "IfcCountMeasure", "IfcCovering", "IfcCoveringType", "IfcCoveringTypeEnum", "IfcCrewResource", "IfcCrewResourceType", "IfcCrewResourceTypeEnum", "IfcCsgPrimitive3D", "IfcCsgSelect", "IfcCsgSolid", "IfcCurrencyRelationship", "IfcCurtainWall", "IfcCurtainWallType", "IfcCurtainWallTypeEnum", "IfcCurvatureMeasure", "IfcCurve", "IfcCurveBoundedPlane", "IfcCurveBoundedSurface", "IfcCurveFontOrScaledCurveFontSelect", "IfcCurveInterpolationEnum", "IfcCurveOnSurface", "IfcCurveOrEdgeCurve", "IfcCurveStyle", "IfcCurveStyleFont", "IfcCurveStyleFontAndScaling", "IfcCurveStyleFontPattern", "IfcCurveStyleFontSelect", "IfcCylindricalSurface", "IfcDamper", "IfcDamperType", "IfcDamperTypeEnum", "IfcDataOriginEnum", "IfcDate", "IfcDateTime", "IfcDayInMonthNumber", "IfcDayInWeekNumber", "IfcDefinitionSelect", "IfcDerivedMeasureValue", "IfcDerivedProfileDef", "IfcDerivedUnit", "IfcDerivedUnitElement", "IfcDerivedUnitEnum", "IfcDescriptiveMeasure", "IfcDimensionCount", "IfcDimensionalExponents", "IfcDirection", "IfcDirectionSenseEnum", "IfcDiscreteAccessory", "IfcDiscreteAccessoryType", "IfcDiscreteAccessoryTypeEnum", "IfcDistributionChamberElement", "IfcDistributionChamberElementType", "IfcDistributionChamberElementTypeEnum", "IfcDistributionCircuit", "IfcDistributionControlElement", "IfcDistributionControlElementType", "IfcDistributionElement", "IfcDistributionElementType", "IfcDistributionFlowElement", "IfcDistributionFlowElementType", "IfcDistributionPort", "IfcDistributionPortTypeEnum", "IfcDistributionSystem", "IfcDistributionSystemEnum", "IfcDocumentConfidentialityEnum", "IfcDocumentInformation", "IfcDocumentInformationRelationship", "IfcDocumentReference", "IfcDocumentSelect", "IfcDocumentStatusEnum", "IfcDoor", "IfcDoorLiningProperties", "IfcDoorPanelOperationEnum", "IfcDoorPanelPositionEnum", "IfcDoorPanelProperties", "IfcDoorStandardCase", "IfcDoorStyle", "IfcDoorStyleConstructionEnum", "IfcDoorStyleOperationEnum", "IfcDoorType", "IfcDoorTypeEnum", "IfcDoorTypeOperationEnum", "IfcDoseEquivalentMeasure", "IfcDraughtingPreDefinedColour", "IfcDraughtingPreDefinedCurveFont", "IfcDuctFitting", "IfcDuctFittingType", "IfcDuctFittingTypeEnum", "IfcDuctSegment", "IfcDuctSegmentType", "IfcDuctSegmentTypeEnum", "IfcDuctSilencer", "IfcDuctSilencerType", "IfcDuctSilencerTypeEnum", "IfcDuration", "IfcDynamicViscosityMeasure", "IfcEdge", "IfcEdgeCurve", "IfcEdgeLoop", "IfcElectricAppliance", "IfcElectricApplianceType", "IfcElectricApplianceTypeEnum", "IfcElectricCapacitanceMeasure", "IfcElectricChargeMeasure", "IfcElectricConductanceMeasure", "IfcElectricCurrentMeasure", "IfcElectricDistributionBoard", "IfcElectricDistributionBoardType", "IfcElectricDistributionBoardTypeEnum", "IfcElectricFlowStorageDevice", "IfcElectricFlowStorageDeviceType", "IfcElectricFlowStorageDeviceTypeEnum", "IfcElectricGenerator", "IfcElectricGeneratorType", "IfcElectricGeneratorTypeEnum", "IfcElectricMotor", "IfcElectricMotorType", "IfcElectricMotorTypeEnum", "IfcElectricResistanceMeasure", "IfcElectricTimeControl", "IfcElectricTimeControlType", "IfcElectricTimeControlTypeEnum", "IfcElectricVoltageMeasure", "IfcElement", "IfcElementAssembly", "IfcElementAssemblyType", "IfcElementAssemblyTypeEnum", "IfcElementComponent", "IfcElementComponentType", "IfcElementCompositionEnum", "IfcElementQuantity", "IfcElementType", "IfcElementarySurface", "IfcEllipse", "IfcEllipseProfileDef", "IfcEnergyConversionDevice", "IfcEnergyConversionDeviceType", "IfcEnergyMeasure", "IfcEngine", "IfcEngineType", "IfcEngineTypeEnum", "IfcEvaporativeCooler", "IfcEvaporativeCoolerType", "IfcEvaporativeCoolerTypeEnum", "IfcEvaporator", "IfcEvaporatorType", "IfcEvaporatorTypeEnum", "IfcEvent", "IfcEventTime", "IfcEventTriggerTypeEnum", "IfcEventType", "IfcEventTypeEnum", "IfcExtendedProperties", "IfcExternalInformation", "IfcExternalReference", "IfcExternalReferenceRelationship", "IfcExternalSpatialElement", "IfcExternalSpatialElementTypeEnum", "IfcExternalSpatialStructureElement", "IfcExternallyDefinedHatchStyle", "IfcExternallyDefinedSurfaceStyle", "IfcExternallyDefinedTextFont", "IfcExtrudedAreaSolid", "IfcExtrudedAreaSolidTapered", "IfcFace", "IfcFaceBasedSurfaceModel", "IfcFaceBound", "IfcFaceOuterBound", "IfcFaceSurface", "IfcFacetedBrep", "IfcFacetedBrepWithVoids", "IfcFailureConnectionCondition", "IfcFan", "IfcFanType", "IfcFanTypeEnum", "IfcFastener", "IfcFastenerType", "IfcFastenerTypeEnum", "IfcFeatureElement", "IfcFeatureElementAddition", "IfcFeatureElementSubtraction", "IfcFillAreaStyle", "IfcFillAreaStyleHatching", "IfcFillAreaStyleTiles", "IfcFillStyleSelect", "IfcFilter", "IfcFilterType", "IfcFilterTypeEnum", "IfcFireSuppressionTerminal", "IfcFireSuppressionTerminalType", "IfcFireSuppressionTerminalTypeEnum", "IfcFixedReferenceSweptAreaSolid", "IfcFlowController", "IfcFlowControllerType", "IfcFlowDirectionEnum", "IfcFlowFitting", "IfcFlowFittingType", "IfcFlowInstrument", "IfcFlowInstrumentType", "IfcFlowInstrumentTypeEnum", "IfcFlowMeter", "IfcFlowMeterType", "IfcFlowMeterTypeEnum", "IfcFlowMovingDevice", "IfcFlowMovingDeviceType", "IfcFlowSegment", "IfcFlowSegmentType", "IfcFlowStorageDevice", "IfcFlowStorageDeviceType", "IfcFlowTerminal", "IfcFlowTerminalType", "IfcFlowTreatmentDevice", "IfcFlowTreatmentDeviceType", "IfcFontStyle", "IfcFontVariant", "IfcFontWeight", "IfcFooting", "IfcFootingType", "IfcFootingTypeEnum", "IfcForceMeasure", "IfcFrequencyMeasure", "IfcFurnishingElement", "IfcFurnishingElementType", "IfcFurniture", "IfcFurnitureType", "IfcFurnitureTypeEnum", "IfcGeographicElement", "IfcGeographicElementType", "IfcGeographicElementTypeEnum", "IfcGeometricCurveSet", "IfcGeometricProjectionEnum", "IfcGeometricRepresentationContext", "IfcGeometricRepresentationItem", "IfcGeometricRepresentationSubContext", "IfcGeometricSet", "IfcGeometricSetSelect", "IfcGlobalOrLocalEnum", "IfcGloballyUniqueId", "IfcGrid", "IfcGridAxis", "IfcGridPlacement", "IfcGridPlacementDirectionSelect", "IfcGridTypeEnum", "IfcGroup", "IfcHalfSpaceSolid", "IfcHatchLineDistanceSelect", "IfcHeatExchanger", "IfcHeatExchangerType", "IfcHeatExchangerTypeEnum", "IfcHeatFluxDensityMeasure", "IfcHeatingValueMeasure", "IfcHumidifier", "IfcHumidifierType", "IfcHumidifierTypeEnum", "IfcIShapeProfileDef", "IfcIdentifier", "IfcIlluminanceMeasure", "IfcImageTexture", "IfcIndexedColourMap", "IfcIndexedPolyCurve", "IfcIndexedTextureMap", "IfcIndexedTriangleTextureMap", "IfcInductanceMeasure", "IfcInteger", "IfcIntegerCountRateMeasure", "IfcInterceptor", "IfcInterceptorType", "IfcInterceptorTypeEnum", "IfcInternalOrExternalEnum", "IfcInventory", "IfcInventoryTypeEnum", "IfcIonConcentrationMeasure", "IfcIrregularTimeSeries", "IfcIrregularTimeSeriesValue", "IfcIsothermalMoistureCapacityMeasure", "IfcJunctionBox", "IfcJunctionBoxType", "IfcJunctionBoxTypeEnum", "IfcKinematicViscosityMeasure", "IfcKnotType", "IfcLShapeProfileDef", "IfcLabel", "IfcLaborResource", "IfcLaborResourceType", "IfcLaborResourceTypeEnum", "IfcLagTime", "IfcLamp", "IfcLampType", "IfcLampTypeEnum", "IfcLanguageId", "IfcLayerSetDirectionEnum", "IfcLayeredItem", "IfcLengthMeasure", "IfcLibraryInformation", "IfcLibraryReference", "IfcLibrarySelect", "IfcLightDistributionCurveEnum", "IfcLightDistributionData", "IfcLightDistributionDataSourceSelect", "IfcLightEmissionSourceEnum", "IfcLightFixture", "IfcLightFixtureType", "IfcLightFixtureTypeEnum", "IfcLightIntensityDistribution", "IfcLightSource", "IfcLightSourceAmbient", "IfcLightSourceDirectional", "IfcLightSourceGoniometric", "IfcLightSourcePositional", "IfcLightSourceSpot", "IfcLine", "IfcLineIndex", "IfcLinearForceMeasure", "IfcLinearMomentMeasure", "IfcLinearStiffnessMeasure", "IfcLinearVelocityMeasure", "IfcLoadGroupTypeEnum", "IfcLocalPlacement", "IfcLogical", "IfcLogicalOperatorEnum", "IfcLoop", "IfcLuminousFluxMeasure", "IfcLuminousIntensityDistributionMeasure", "IfcLuminousIntensityMeasure", "IfcMagneticFluxDensityMeasure", "IfcMagneticFluxMeasure", "IfcManifoldSolidBrep", "IfcMapConversion", "IfcMappedItem", "IfcMassDensityMeasure", "IfcMassFlowRateMeasure", "IfcMassMeasure", "IfcMassPerLengthMeasure", "IfcMaterial", "IfcMaterialClassificationRelationship", "IfcMaterialConstituent", "IfcMaterialConstituentSet", "IfcMaterialDefinition", "IfcMaterialDefinitionRepresentation", "IfcMaterialLayer", "IfcMaterialLayerSet", "IfcMaterialLayerSetUsage", "IfcMaterialLayerWithOffsets", "IfcMaterialList", "IfcMaterialProfile", "IfcMaterialProfileSet", "IfcMaterialProfileSetUsage", "IfcMaterialProfileSetUsageTapering", "IfcMaterialProfileWithOffsets", "IfcMaterialProperties", "IfcMaterialRelationship", "IfcMaterialSelect", "IfcMaterialUsageDefinition", "IfcMeasureValue", "IfcMeasureWithUnit", "IfcMechanicalFastener", "IfcMechanicalFastenerType", "IfcMechanicalFastenerTypeEnum", "IfcMedicalDevice", "IfcMedicalDeviceType", "IfcMedicalDeviceTypeEnum", "IfcMember", "IfcMemberStandardCase", "IfcMemberType", "IfcMemberTypeEnum", "IfcMetric", "IfcMetricValueSelect", "IfcMirroredProfileDef", "IfcModulusOfElasticityMeasure", "IfcModulusOfLinearSubgradeReactionMeasure", "IfcModulusOfRotationalSubgradeReactionMeasure", "IfcModulusOfRotationalSubgradeReactionSelect", "IfcModulusOfSubgradeReactionMeasure", "IfcModulusOfSubgradeReactionSelect", "IfcModulusOfTranslationalSubgradeReactionSelect", "IfcMoistureDiffusivityMeasure", "IfcMolecularWeightMeasure", "IfcMomentOfInertiaMeasure", "IfcMonetaryMeasure", "IfcMonetaryUnit", "IfcMonthInYearNumber", "IfcMotorConnection", "IfcMotorConnectionType", "IfcMotorConnectionTypeEnum", "IfcNamedUnit", "IfcNonNegativeLengthMeasure", "IfcNormalisedRatioMeasure", "IfcNullStyle", "IfcNumericMeasure", "IfcObject", "IfcObjectDefinition", "IfcObjectPlacement", "IfcObjectReferenceSelect", "IfcObjectTypeEnum", "IfcObjective", "IfcObjectiveEnum", "IfcOccupant", "IfcOccupantTypeEnum", "IfcOffsetCurve2D", "IfcOffsetCurve3D", "IfcOpenShell", "IfcOpeningElement", "IfcOpeningElementTypeEnum", "IfcOpeningStandardCase", "IfcOrganization", "IfcOrganizationRelationship", "IfcOrientedEdge", "IfcOuterBoundaryCurve", "IfcOutlet", "IfcOutletType", "IfcOutletTypeEnum", "IfcOwnerHistory", "IfcPHMeasure", "IfcParameterValue", "IfcParameterizedProfileDef", "IfcPath", "IfcPcurve", "IfcPerformanceHistory", "IfcPerformanceHistoryTypeEnum", "IfcPermeableCoveringOperationEnum", "IfcPermeableCoveringProperties", "IfcPermit", "IfcPermitTypeEnum", "IfcPerson", "IfcPersonAndOrganization", "IfcPhysicalComplexQuantity", "IfcPhysicalOrVirtualEnum", "IfcPhysicalQuantity", "IfcPhysicalSimpleQuantity", "IfcPile", "IfcPileConstructionEnum", "IfcPileType", "IfcPileTypeEnum", "IfcPipeFitting", "IfcPipeFittingType", "IfcPipeFittingTypeEnum", "IfcPipeSegment", "IfcPipeSegmentType", "IfcPipeSegmentTypeEnum", "IfcPixelTexture", "IfcPlacement", "IfcPlanarBox", "IfcPlanarExtent", "IfcPlanarForceMeasure", "IfcPlane", "IfcPlaneAngleMeasure", "IfcPlate", "IfcPlateStandardCase", "IfcPlateType", "IfcPlateTypeEnum", "IfcPoint", "IfcPointOnCurve", "IfcPointOnSurface", "IfcPointOrVertexPoint", "IfcPolyLoop", "IfcPolygonalBoundedHalfSpace", "IfcPolyline", "IfcPort", "IfcPositiveInteger", "IfcPositiveLengthMeasure", "IfcPositivePlaneAngleMeasure", "IfcPositiveRatioMeasure", "IfcPostalAddress", "IfcPowerMeasure", "IfcPreDefinedColour", "IfcPreDefinedCurveFont", "IfcPreDefinedItem", "IfcPreDefinedProperties", "IfcPreDefinedPropertySet", "IfcPreDefinedTextFont", "IfcPresentableText", "IfcPresentationItem", "IfcPresentationLayerAssignment", "IfcPresentationLayerWithStyle", "IfcPresentationStyle", "IfcPresentationStyleAssignment", "IfcPresentationStyleSelect", "IfcPressureMeasure", "IfcProcedure", "IfcProcedureType", "IfcProcedureTypeEnum", "IfcProcess", "IfcProcessSelect", "IfcProduct", "IfcProductDefinitionShape", "IfcProductRepresentation", "IfcProductRepresentationSelect", "IfcProductSelect", "IfcProfileDef", "IfcProfileProperties", "IfcProfileTypeEnum", "IfcProject", "IfcProjectLibrary", "IfcProjectOrder", "IfcProjectOrderTypeEnum", "IfcProjectedCRS", "IfcProjectedOrTrueLengthEnum", "IfcProjectionElement", "IfcProjectionElementTypeEnum", "IfcProperty", "IfcPropertyAbstraction", "IfcPropertyBoundedValue", "IfcPropertyDefinition", "IfcPropertyDependencyRelationship", "IfcPropertyEnumeratedValue", "IfcPropertyEnumeration", "IfcPropertyListValue", "IfcPropertyReferenceValue", "IfcPropertySet", "IfcPropertySetDefinition", "IfcPropertySetDefinitionSelect", "IfcPropertySetDefinitionSet", "IfcPropertySetTemplate", "IfcPropertySetTemplateTypeEnum", "IfcPropertySingleValue", "IfcPropertyTableValue", "IfcPropertyTemplate", "IfcPropertyTemplateDefinition", "IfcProtectiveDevice", "IfcProtectiveDeviceTrippingUnit", "IfcProtectiveDeviceTrippingUnitType", "IfcProtectiveDeviceTrippingUnitTypeEnum", "IfcProtectiveDeviceType", "IfcProtectiveDeviceTypeEnum", "IfcProxy", "IfcPump", "IfcPumpType", "IfcPumpTypeEnum", "IfcQuantityArea", "IfcQuantityCount", "IfcQuantityLength", "IfcQuantitySet", "IfcQuantityTime", "IfcQuantityVolume", "IfcQuantityWeight", "IfcRadioActivityMeasure", "IfcRailing", "IfcRailingType", "IfcRailingTypeEnum", "IfcRamp", "IfcRampFlight", "IfcRampFlightType", "IfcRampFlightTypeEnum", "IfcRampType", "IfcRampTypeEnum", "IfcRatioMeasure", "IfcRationalBSplineCurveWithKnots", "IfcRationalBSplineSurfaceWithKnots", "IfcReal", "IfcRectangleHollowProfileDef", "IfcRectangleProfileDef", "IfcRectangularPyramid", "IfcRectangularTrimmedSurface", "IfcRecurrencePattern", "IfcRecurrenceTypeEnum", "IfcReference", "IfcReflectanceMethodEnum", "IfcRegularTimeSeries", "IfcReinforcementBarProperties", "IfcReinforcementDefinitionProperties", "IfcReinforcingBar", "IfcReinforcingBarRoleEnum", "IfcReinforcingBarSurfaceEnum", "IfcReinforcingBarType", "IfcReinforcingBarTypeEnum", "IfcReinforcingElement", "IfcReinforcingElementType", "IfcReinforcingMesh", "IfcReinforcingMeshType", "IfcReinforcingMeshTypeEnum", "IfcRelAggregates", "IfcRelAssigns", "IfcRelAssignsToActor", "IfcRelAssignsToControl", "IfcRelAssignsToGroup", "IfcRelAssignsToGroupByFactor", "IfcRelAssignsToProcess", "IfcRelAssignsToProduct", "IfcRelAssignsToResource", "IfcRelAssociates", "IfcRelAssociatesApproval", "IfcRelAssociatesClassification", "IfcRelAssociatesConstraint", "IfcRelAssociatesDocument", "IfcRelAssociatesLibrary", "IfcRelAssociatesMaterial", "IfcRelConnects", "IfcRelConnectsElements", "IfcRelConnectsPathElements", "IfcRelConnectsPortToElement", "IfcRelConnectsPorts", "IfcRelConnectsStructuralActivity", "IfcRelConnectsStructuralMember", "IfcRelConnectsWithEccentricity", "IfcRelConnectsWithRealizingElements", "IfcRelContainedInSpatialStructure", "IfcRelCoversBldgElements", "IfcRelCoversSpaces", "IfcRelDeclares", "IfcRelDecomposes", "IfcRelDefines", "IfcRelDefinesByObject", "IfcRelDefinesByProperties", "IfcRelDefinesByTemplate", "IfcRelDefinesByType", "IfcRelFillsElement", "IfcRelFlowControlElements", "IfcRelInterferesElements", "IfcRelNests", "IfcRelProjectsElement", "IfcRelReferencedInSpatialStructure", "IfcRelSequence", "IfcRelServicesBuildings", "IfcRelSpaceBoundary", "IfcRelSpaceBoundary1stLevel", "IfcRelSpaceBoundary2ndLevel", "IfcRelVoidsElement", "IfcRelationship", "IfcReparametrisedCompositeCurveSegment", "IfcRepresentation", "IfcRepresentationContext", "IfcRepresentationItem", "IfcRepresentationMap", "IfcResource", "IfcResourceApprovalRelationship", "IfcResourceConstraintRelationship", "IfcResourceLevelRelationship", "IfcResourceObjectSelect", "IfcResourceSelect", "IfcResourceTime", "IfcRevolvedAreaSolid", "IfcRevolvedAreaSolidTapered", "IfcRightCircularCone", "IfcRightCircularCylinder", "IfcRoleEnum", "IfcRoof", "IfcRoofType", "IfcRoofTypeEnum", "IfcRoot", "IfcRotationalFrequencyMeasure", "IfcRotationalMassMeasure", "IfcRotationalStiffnessMeasure", "IfcRotationalStiffnessSelect", "IfcRoundedRectangleProfileDef", "IfcSIPrefix", "IfcSIUnit", "IfcSIUnitName", "IfcSanitaryTerminal", "IfcSanitaryTerminalType", "IfcSanitaryTerminalTypeEnum", "IfcSchedulingTime", "IfcSectionModulusMeasure", "IfcSectionProperties", "IfcSectionReinforcementProperties", "IfcSectionTypeEnum", "IfcSectionalAreaIntegralMeasure", "IfcSectionedSpine", "IfcSegmentIndexSelect", "IfcSensor", "IfcSensorType", "IfcSensorTypeEnum", "IfcSequenceEnum", "IfcShadingDevice", "IfcShadingDeviceType", "IfcShadingDeviceTypeEnum", "IfcShapeAspect", "IfcShapeModel", "IfcShapeRepresentation", "IfcShearModulusMeasure", "IfcShell", "IfcShellBasedSurfaceModel", "IfcSimpleProperty", "IfcSimplePropertyTemplate", "IfcSimplePropertyTemplateTypeEnum", "IfcSimpleValue", "IfcSite", "IfcSizeSelect", "IfcSlab", "IfcSlabElementedCase", "IfcSlabStandardCase", "IfcSlabType", "IfcSlabTypeEnum", "IfcSlippageConnectionCondition", "IfcSolarDevice", "IfcSolarDeviceType", "IfcSolarDeviceTypeEnum", "IfcSolidAngleMeasure", "IfcSolidModel", "IfcSolidOrShell", "IfcSoundPowerLevelMeasure", "IfcSoundPowerMeasure", "IfcSoundPressureLevelMeasure", "IfcSoundPressureMeasure", "IfcSpace", "IfcSpaceBoundarySelect", "IfcSpaceHeater", "IfcSpaceHeaterType", "IfcSpaceHeaterTypeEnum", "IfcSpaceType", "IfcSpaceTypeEnum", "IfcSpatialElement", "IfcSpatialElementType", "IfcSpatialStructureElement", "IfcSpatialStructureElementType", "IfcSpatialZone", "IfcSpatialZoneType", "IfcSpatialZoneTypeEnum", "IfcSpecificHeatCapacityMeasure", "IfcSpecularExponent", "IfcSpecularHighlightSelect", "IfcSpecularRoughness", "IfcSphere", "IfcStackTerminal", "IfcStackTerminalType", "IfcStackTerminalTypeEnum", "IfcStair", "IfcStairFlight", "IfcStairFlightType", "IfcStairFlightTypeEnum", "IfcStairType", "IfcStairTypeEnum", "IfcStateEnum", "IfcStructuralAction", "IfcStructuralActivity", "IfcStructuralActivityAssignmentSelect", "IfcStructuralAnalysisModel", "IfcStructuralConnection", "IfcStructuralConnectionCondition", "IfcStructuralCurveAction", "IfcStructuralCurveActivityTypeEnum", "IfcStructuralCurveConnection", "IfcStructuralCurveMember", "IfcStructuralCurveMemberTypeEnum", "IfcStructuralCurveMemberVarying", "IfcStructuralCurveReaction", "IfcStructuralItem", "IfcStructuralLinearAction", "IfcStructuralLoad", "IfcStructuralLoadCase", "IfcStructuralLoadConfiguration", "IfcStructuralLoadGroup", "IfcStructuralLoadLinearForce", "IfcStructuralLoadOrResult", "IfcStructuralLoadPlanarForce", "IfcStructuralLoadSingleDisplacement", "IfcStructuralLoadSingleDisplacementDistortion", "IfcStructuralLoadSingleForce", "IfcStructuralLoadSingleForceWarping", "IfcStructuralLoadStatic", "IfcStructuralLoadTemperature", "IfcStructuralMember", "IfcStructuralPlanarAction", "IfcStructuralPointAction", "IfcStructuralPointConnection", "IfcStructuralPointReaction", "IfcStructuralReaction", "IfcStructuralResultGroup", "IfcStructuralSurfaceAction", "IfcStructuralSurfaceActivityTypeEnum", "IfcStructuralSurfaceConnection", "IfcStructuralSurfaceMember", "IfcStructuralSurfaceMemberTypeEnum", "IfcStructuralSurfaceMemberVarying", "IfcStructuralSurfaceReaction", "IfcStyleAssignmentSelect", "IfcStyleModel", "IfcStyledItem", "IfcStyledRepresentation", "IfcSubContractResource", "IfcSubContractResourceType", "IfcSubContractResourceTypeEnum", "IfcSubedge", "IfcSurface", "IfcSurfaceCurveSweptAreaSolid", "IfcSurfaceFeature", "IfcSurfaceFeatureTypeEnum", "IfcSurfaceOfLinearExtrusion", "IfcSurfaceOfRevolution", "IfcSurfaceOrFaceSurface", "IfcSurfaceReinforcementArea", "IfcSurfaceSide", "IfcSurfaceStyle", "IfcSurfaceStyleElementSelect", "IfcSurfaceStyleLighting", "IfcSurfaceStyleRefraction", "IfcSurfaceStyleRendering", "IfcSurfaceStyleShading", "IfcSurfaceStyleWithTextures", "IfcSurfaceTexture", "IfcSweptAreaSolid", "IfcSweptDiskSolid", "IfcSweptDiskSolidPolygonal", "IfcSweptSurface", "IfcSwitchingDevice", "IfcSwitchingDeviceType", "IfcSwitchingDeviceTypeEnum", "IfcSystem", "IfcSystemFurnitureElement", "IfcSystemFurnitureElementType", "IfcSystemFurnitureElementTypeEnum", "IfcTShapeProfileDef", "IfcTable", "IfcTableColumn", "IfcTableRow", "IfcTank", "IfcTankType", "IfcTankTypeEnum", "IfcTask", "IfcTaskDurationEnum", "IfcTaskTime", "IfcTaskTimeRecurring", "IfcTaskType", "IfcTaskTypeEnum", "IfcTelecomAddress", "IfcTemperatureGradientMeasure", "IfcTemperatureRateOfChangeMeasure", "IfcTendon", "IfcTendonAnchor", "IfcTendonAnchorType", "IfcTendonAnchorTypeEnum", "IfcTendonType", "IfcTendonTypeEnum", "IfcTessellatedFaceSet", "IfcTessellatedItem", "IfcText", "IfcTextAlignment", "IfcTextDecoration", "IfcTextFontName", "IfcTextFontSelect", "IfcTextLiteral", "IfcTextLiteralWithExtent", "IfcTextPath", "IfcTextStyle", "IfcTextStyleFontModel", "IfcTextStyleForDefinedFont", "IfcTextStyleTextModel", "IfcTextTransformation", "IfcTextureCoordinate", "IfcTextureCoordinateGenerator", "IfcTextureMap", "IfcTextureVertex", "IfcTextureVertexList", "IfcThermalAdmittanceMeasure", "IfcThermalConductivityMeasure", "IfcThermalExpansionCoefficientMeasure", "IfcThermalResistanceMeasure", "IfcThermalTransmittanceMeasure", "IfcThermodynamicTemperatureMeasure", "IfcTime", "IfcTimeMeasure", "IfcTimeOrRatioSelect", "IfcTimePeriod", "IfcTimeSeries", "IfcTimeSeriesDataTypeEnum", "IfcTimeSeriesValue", "IfcTimeStamp", "IfcTopologicalRepresentationItem", "IfcTopologyRepresentation", "IfcTorqueMeasure", "IfcTransformer", "IfcTransformerType", "IfcTransformerTypeEnum", "IfcTransitionCode", "IfcTranslationalStiffnessSelect", "IfcTransportElement", "IfcTransportElementType", "IfcTransportElementTypeEnum", "IfcTrapeziumProfileDef", "IfcTriangulatedFaceSet", "IfcTrimmedCurve", "IfcTrimmingPreference", "IfcTrimmingSelect", "IfcTubeBundle", "IfcTubeBundleType", "IfcTubeBundleTypeEnum", "IfcTypeObject", "IfcTypeProcess", "IfcTypeProduct", "IfcTypeResource", "IfcURIReference", "IfcUShapeProfileDef", "IfcUnit", "IfcUnitAssignment", "IfcUnitEnum", "IfcUnitaryControlElement", "IfcUnitaryControlElementType", "IfcUnitaryControlElementTypeEnum", "IfcUnitaryEquipment", "IfcUnitaryEquipmentType", "IfcUnitaryEquipmentTypeEnum", "IfcValue", "IfcValve", "IfcValveType", "IfcValveTypeEnum", "IfcVaporPermeabilityMeasure", "IfcVector", "IfcVectorOrDirection", "IfcVertex", "IfcVertexLoop", "IfcVertexPoint", "IfcVibrationIsolator", "IfcVibrationIsolatorType", "IfcVibrationIsolatorTypeEnum", "IfcVirtualElement", "IfcVirtualGridIntersection", "IfcVoidingFeature", "IfcVoidingFeatureTypeEnum", "IfcVolumeMeasure", "IfcVolumetricFlowRateMeasure", "IfcWall", "IfcWallElementedCase", "IfcWallStandardCase", "IfcWallType", "IfcWallTypeEnum", "IfcWarpingConstantMeasure", "IfcWarpingMomentMeasure", "IfcWarpingStiffnessSelect", "IfcWasteTerminal", "IfcWasteTerminalType", "IfcWasteTerminalTypeEnum", "IfcWindow", "IfcWindowLiningProperties", "IfcWindowPanelOperationEnum", "IfcWindowPanelPositionEnum", "IfcWindowPanelProperties", "IfcWindowStandardCase", "IfcWindowStyle", "IfcWindowStyleConstructionEnum", "IfcWindowStyleOperationEnum", "IfcWindowType", "IfcWindowTypeEnum", "IfcWindowTypePartitioningEnum", "IfcWorkCalendar", "IfcWorkCalendarTypeEnum", "IfcWorkControl", "IfcWorkPlan", "IfcWorkPlanTypeEnum", "IfcWorkSchedule", "IfcWorkScheduleTypeEnum", "IfcWorkTime", "IfcZShapeProfileDef", "IfcZone" }; return names[v]; } @@ -984,6 +992,7 @@ void Ifc4::InitStringMap() { string_map["IFCARBITRARYCLOSEDPROFILEDEF" ] = Type::IfcArbitraryClosedProfileDef; string_map["IFCARBITRARYOPENPROFILEDEF" ] = Type::IfcArbitraryOpenProfileDef; string_map["IFCARBITRARYPROFILEDEFWITHVOIDS" ] = Type::IfcArbitraryProfileDefWithVoids; + string_map["IFCARCINDEX" ] = Type::IfcArcIndex; string_map["IFCAREADENSITYMEASURE" ] = Type::IfcAreaDensityMeasure; string_map["IFCAREAMEASURE" ] = Type::IfcAreaMeasure; string_map["IFCARITHMETICOPERATORENUM" ] = Type::IfcArithmeticOperatorEnum; @@ -1009,6 +1018,7 @@ void Ifc4::InitStringMap() { string_map["IFCBEAMTYPEENUM" ] = Type::IfcBeamTypeEnum; string_map["IFCBENCHMARKENUM" ] = Type::IfcBenchmarkEnum; string_map["IFCBENDINGPARAMETERSELECT" ] = Type::IfcBendingParameterSelect; + string_map["IFCBINARY" ] = Type::IfcBinary; string_map["IFCBLOBTEXTURE" ] = Type::IfcBlobTexture; string_map["IFCBLOCK" ] = Type::IfcBlock; string_map["IFCBOILER" ] = Type::IfcBoiler; @@ -1061,6 +1071,7 @@ void Ifc4::InitStringMap() { string_map["IFCCARDINALPOINTREFERENCE" ] = Type::IfcCardinalPointReference; string_map["IFCCARTESIANPOINT" ] = Type::IfcCartesianPoint; string_map["IFCCARTESIANPOINTLIST" ] = Type::IfcCartesianPointList; + string_map["IFCCARTESIANPOINTLIST2D" ] = Type::IfcCartesianPointList2D; string_map["IFCCARTESIANPOINTLIST3D" ] = Type::IfcCartesianPointList3D; string_map["IFCCARTESIANTRANSFORMATIONOPERATOR" ] = Type::IfcCartesianTransformationOperator; string_map["IFCCARTESIANTRANSFORMATIONOPERATOR2D" ] = Type::IfcCartesianTransformationOperator2D; @@ -1419,6 +1430,7 @@ void Ifc4::InitStringMap() { string_map["IFCILLUMINANCEMEASURE" ] = Type::IfcIlluminanceMeasure; string_map["IFCIMAGETEXTURE" ] = Type::IfcImageTexture; string_map["IFCINDEXEDCOLOURMAP" ] = Type::IfcIndexedColourMap; + string_map["IFCINDEXEDPOLYCURVE" ] = Type::IfcIndexedPolyCurve; string_map["IFCINDEXEDTEXTUREMAP" ] = Type::IfcIndexedTextureMap; string_map["IFCINDEXEDTRIANGLETEXTUREMAP" ] = Type::IfcIndexedTriangleTextureMap; string_map["IFCINDUCTANCEMEASURE" ] = Type::IfcInductanceMeasure; @@ -1470,6 +1482,7 @@ void Ifc4::InitStringMap() { string_map["IFCLIGHTSOURCEPOSITIONAL" ] = Type::IfcLightSourcePositional; string_map["IFCLIGHTSOURCESPOT" ] = Type::IfcLightSourceSpot; string_map["IFCLINE" ] = Type::IfcLine; + string_map["IFCLINEINDEX" ] = Type::IfcLineIndex; string_map["IFCLINEARFORCEMEASURE" ] = Type::IfcLinearForceMeasure; string_map["IFCLINEARMOMENTMEASURE" ] = Type::IfcLinearMomentMeasure; string_map["IFCLINEARSTIFFNESSMEASURE" ] = Type::IfcLinearStiffnessMeasure; @@ -1616,6 +1629,7 @@ void Ifc4::InitStringMap() { string_map["IFCPOLYGONALBOUNDEDHALFSPACE" ] = Type::IfcPolygonalBoundedHalfSpace; string_map["IFCPOLYLINE" ] = Type::IfcPolyline; string_map["IFCPORT" ] = Type::IfcPort; + string_map["IFCPOSITIVEINTEGER" ] = Type::IfcPositiveInteger; string_map["IFCPOSITIVELENGTHMEASURE" ] = Type::IfcPositiveLengthMeasure; string_map["IFCPOSITIVEPLANEANGLEMEASURE" ] = Type::IfcPositivePlaneAngleMeasure; string_map["IFCPOSITIVERATIOMEASURE" ] = Type::IfcPositiveRatioMeasure; @@ -1814,6 +1828,7 @@ void Ifc4::InitStringMap() { string_map["IFCSECTIONTYPEENUM" ] = Type::IfcSectionTypeEnum; string_map["IFCSECTIONALAREAINTEGRALMEASURE" ] = Type::IfcSectionalAreaIntegralMeasure; string_map["IFCSECTIONEDSPINE" ] = Type::IfcSectionedSpine; + string_map["IFCSEGMENTINDEXSELECT" ] = Type::IfcSegmentIndexSelect; string_map["IFCSENSOR" ] = Type::IfcSensor; string_map["IFCSENSORTYPE" ] = Type::IfcSensorType; string_map["IFCSENSORTYPEENUM" ] = Type::IfcSensorTypeEnum; @@ -2107,720 +2122,18 @@ Type::Enum Type::FromString(const std::string& s) { else return it->second; } -Type::Enum Type::Parent(Enum v){ - if (v < 0 || v >= 1157) return (Enum)-1; - if(v==IfcActionRequest ) { return IfcControl; } - if(v==IfcActor ) { return IfcObject; } - if(v==IfcActuator ) { return IfcDistributionControlElement; } - if(v==IfcActuatorType ) { return IfcDistributionControlElementType; } - if(v==IfcAdvancedBrep ) { return IfcManifoldSolidBrep; } - if(v==IfcAdvancedBrepWithVoids ) { return IfcAdvancedBrep; } - if(v==IfcAdvancedFace ) { return IfcFaceSurface; } - if(v==IfcAirTerminal ) { return IfcFlowTerminal; } - if(v==IfcAirTerminalBox ) { return IfcFlowController; } - if(v==IfcAirTerminalBoxType ) { return IfcFlowControllerType; } - if(v==IfcAirTerminalType ) { return IfcFlowTerminalType; } - if(v==IfcAirToAirHeatRecovery ) { return IfcEnergyConversionDevice; } - if(v==IfcAirToAirHeatRecoveryType ) { return IfcEnergyConversionDeviceType; } - if(v==IfcAlarm ) { return IfcDistributionControlElement; } - if(v==IfcAlarmType ) { return IfcDistributionControlElementType; } - if(v==IfcAnnotation ) { return IfcProduct; } - if(v==IfcAnnotationFillArea ) { return IfcGeometricRepresentationItem; } - if(v==IfcApprovalRelationship ) { return IfcResourceLevelRelationship; } - if(v==IfcArbitraryClosedProfileDef ) { return IfcProfileDef; } - if(v==IfcArbitraryOpenProfileDef ) { return IfcProfileDef; } - if(v==IfcArbitraryProfileDefWithVoids ) { return IfcArbitraryClosedProfileDef; } - if(v==IfcAsset ) { return IfcGroup; } - if(v==IfcAsymmetricIShapeProfileDef ) { return IfcParameterizedProfileDef; } - if(v==IfcAudioVisualAppliance ) { return IfcFlowTerminal; } - if(v==IfcAudioVisualApplianceType ) { return IfcFlowTerminalType; } - if(v==IfcAxis1Placement ) { return IfcPlacement; } - if(v==IfcAxis2Placement2D ) { return IfcPlacement; } - if(v==IfcAxis2Placement3D ) { return IfcPlacement; } - if(v==IfcBSplineCurve ) { return IfcBoundedCurve; } - if(v==IfcBSplineCurveWithKnots ) { return IfcBSplineCurve; } - if(v==IfcBSplineSurface ) { return IfcBoundedSurface; } - if(v==IfcBSplineSurfaceWithKnots ) { return IfcBSplineSurface; } - if(v==IfcBeam ) { return IfcBuildingElement; } - if(v==IfcBeamStandardCase ) { return IfcBeam; } - if(v==IfcBeamType ) { return IfcBuildingElementType; } - if(v==IfcBlobTexture ) { return IfcSurfaceTexture; } - if(v==IfcBlock ) { return IfcCsgPrimitive3D; } - if(v==IfcBoiler ) { return IfcEnergyConversionDevice; } - if(v==IfcBoilerType ) { return IfcEnergyConversionDeviceType; } - if(v==IfcBooleanClippingResult ) { return IfcBooleanResult; } - if(v==IfcBooleanResult ) { return IfcGeometricRepresentationItem; } - if(v==IfcBoundaryCurve ) { return IfcCompositeCurveOnSurface; } - if(v==IfcBoundaryEdgeCondition ) { return IfcBoundaryCondition; } - if(v==IfcBoundaryFaceCondition ) { return IfcBoundaryCondition; } - if(v==IfcBoundaryNodeCondition ) { return IfcBoundaryCondition; } - if(v==IfcBoundaryNodeConditionWarping ) { return IfcBoundaryNodeCondition; } - if(v==IfcBoundedCurve ) { return IfcCurve; } - if(v==IfcBoundedSurface ) { return IfcSurface; } - if(v==IfcBoundingBox ) { return IfcGeometricRepresentationItem; } - if(v==IfcBoxedHalfSpace ) { return IfcHalfSpaceSolid; } - if(v==IfcBuilding ) { return IfcSpatialStructureElement; } - if(v==IfcBuildingElement ) { return IfcElement; } - if(v==IfcBuildingElementPart ) { return IfcElementComponent; } - if(v==IfcBuildingElementPartType ) { return IfcElementComponentType; } - if(v==IfcBuildingElementProxy ) { return IfcBuildingElement; } - if(v==IfcBuildingElementProxyType ) { return IfcBuildingElementType; } - if(v==IfcBuildingElementType ) { return IfcElementType; } - if(v==IfcBuildingStorey ) { return IfcSpatialStructureElement; } - if(v==IfcBuildingSystem ) { return IfcSystem; } - if(v==IfcBurner ) { return IfcEnergyConversionDevice; } - if(v==IfcBurnerType ) { return IfcEnergyConversionDeviceType; } - if(v==IfcCShapeProfileDef ) { return IfcParameterizedProfileDef; } - if(v==IfcCableCarrierFitting ) { return IfcFlowFitting; } - if(v==IfcCableCarrierFittingType ) { return IfcFlowFittingType; } - if(v==IfcCableCarrierSegment ) { return IfcFlowSegment; } - if(v==IfcCableCarrierSegmentType ) { return IfcFlowSegmentType; } - if(v==IfcCableFitting ) { return IfcFlowFitting; } - if(v==IfcCableFittingType ) { return IfcFlowFittingType; } - if(v==IfcCableSegment ) { return IfcFlowSegment; } - if(v==IfcCableSegmentType ) { return IfcFlowSegmentType; } - if(v==IfcCartesianPoint ) { return IfcPoint; } - if(v==IfcCartesianPointList ) { return IfcGeometricRepresentationItem; } - if(v==IfcCartesianPointList3D ) { return IfcCartesianPointList; } - if(v==IfcCartesianTransformationOperator ) { return IfcGeometricRepresentationItem; } - if(v==IfcCartesianTransformationOperator2D ) { return IfcCartesianTransformationOperator; } - if(v==IfcCartesianTransformationOperator2DnonUniform ) { return IfcCartesianTransformationOperator2D; } - if(v==IfcCartesianTransformationOperator3D ) { return IfcCartesianTransformationOperator; } - if(v==IfcCartesianTransformationOperator3DnonUniform ) { return IfcCartesianTransformationOperator3D; } - if(v==IfcCenterLineProfileDef ) { return IfcArbitraryOpenProfileDef; } - if(v==IfcChiller ) { return IfcEnergyConversionDevice; } - if(v==IfcChillerType ) { return IfcEnergyConversionDeviceType; } - if(v==IfcChimney ) { return IfcBuildingElement; } - if(v==IfcChimneyType ) { return IfcBuildingElementType; } - if(v==IfcCircle ) { return IfcConic; } - if(v==IfcCircleHollowProfileDef ) { return IfcCircleProfileDef; } - if(v==IfcCircleProfileDef ) { return IfcParameterizedProfileDef; } - if(v==IfcCivilElement ) { return IfcElement; } - if(v==IfcCivilElementType ) { return IfcElementType; } - if(v==IfcClassification ) { return IfcExternalInformation; } - if(v==IfcClassificationReference ) { return IfcExternalReference; } - if(v==IfcClosedShell ) { return IfcConnectedFaceSet; } - if(v==IfcCoil ) { return IfcEnergyConversionDevice; } - if(v==IfcCoilType ) { return IfcEnergyConversionDeviceType; } - if(v==IfcColourRgb ) { return IfcColourSpecification; } - if(v==IfcColourRgbList ) { return IfcPresentationItem; } - if(v==IfcColourSpecification ) { return IfcPresentationItem; } - if(v==IfcColumn ) { return IfcBuildingElement; } - if(v==IfcColumnStandardCase ) { return IfcColumn; } - if(v==IfcColumnType ) { return IfcBuildingElementType; } - if(v==IfcCommunicationsAppliance ) { return IfcFlowTerminal; } - if(v==IfcCommunicationsApplianceType ) { return IfcFlowTerminalType; } - if(v==IfcComplexProperty ) { return IfcProperty; } - if(v==IfcComplexPropertyTemplate ) { return IfcPropertyTemplate; } - if(v==IfcCompositeCurve ) { return IfcBoundedCurve; } - if(v==IfcCompositeCurveOnSurface ) { return IfcCompositeCurve; } - if(v==IfcCompositeCurveSegment ) { return IfcGeometricRepresentationItem; } - if(v==IfcCompositeProfileDef ) { return IfcProfileDef; } - if(v==IfcCompressor ) { return IfcFlowMovingDevice; } - if(v==IfcCompressorType ) { return IfcFlowMovingDeviceType; } - if(v==IfcCondenser ) { return IfcEnergyConversionDevice; } - if(v==IfcCondenserType ) { return IfcEnergyConversionDeviceType; } - if(v==IfcConic ) { return IfcCurve; } - if(v==IfcConnectedFaceSet ) { return IfcTopologicalRepresentationItem; } - if(v==IfcConnectionCurveGeometry ) { return IfcConnectionGeometry; } - if(v==IfcConnectionPointEccentricity ) { return IfcConnectionPointGeometry; } - if(v==IfcConnectionPointGeometry ) { return IfcConnectionGeometry; } - if(v==IfcConnectionSurfaceGeometry ) { return IfcConnectionGeometry; } - if(v==IfcConnectionVolumeGeometry ) { return IfcConnectionGeometry; } - if(v==IfcConstructionEquipmentResource ) { return IfcConstructionResource; } - if(v==IfcConstructionEquipmentResourceType ) { return IfcConstructionResourceType; } - if(v==IfcConstructionMaterialResource ) { return IfcConstructionResource; } - if(v==IfcConstructionMaterialResourceType ) { return IfcConstructionResourceType; } - if(v==IfcConstructionProductResource ) { return IfcConstructionResource; } - if(v==IfcConstructionProductResourceType ) { return IfcConstructionResourceType; } - if(v==IfcConstructionResource ) { return IfcResource; } - if(v==IfcConstructionResourceType ) { return IfcTypeResource; } - if(v==IfcContext ) { return IfcObjectDefinition; } - if(v==IfcContextDependentUnit ) { return IfcNamedUnit; } - if(v==IfcControl ) { return IfcObject; } - if(v==IfcController ) { return IfcDistributionControlElement; } - if(v==IfcControllerType ) { return IfcDistributionControlElementType; } - if(v==IfcConversionBasedUnit ) { return IfcNamedUnit; } - if(v==IfcConversionBasedUnitWithOffset ) { return IfcConversionBasedUnit; } - if(v==IfcCooledBeam ) { return IfcEnergyConversionDevice; } - if(v==IfcCooledBeamType ) { return IfcEnergyConversionDeviceType; } - if(v==IfcCoolingTower ) { return IfcEnergyConversionDevice; } - if(v==IfcCoolingTowerType ) { return IfcEnergyConversionDeviceType; } - if(v==IfcCostItem ) { return IfcControl; } - if(v==IfcCostSchedule ) { return IfcControl; } - if(v==IfcCostValue ) { return IfcAppliedValue; } - if(v==IfcCovering ) { return IfcBuildingElement; } - if(v==IfcCoveringType ) { return IfcBuildingElementType; } - if(v==IfcCrewResource ) { return IfcConstructionResource; } - if(v==IfcCrewResourceType ) { return IfcConstructionResourceType; } - if(v==IfcCsgPrimitive3D ) { return IfcGeometricRepresentationItem; } - if(v==IfcCsgSolid ) { return IfcSolidModel; } - if(v==IfcCurrencyRelationship ) { return IfcResourceLevelRelationship; } - if(v==IfcCurtainWall ) { return IfcBuildingElement; } - if(v==IfcCurtainWallType ) { return IfcBuildingElementType; } - if(v==IfcCurve ) { return IfcGeometricRepresentationItem; } - if(v==IfcCurveBoundedPlane ) { return IfcBoundedSurface; } - if(v==IfcCurveBoundedSurface ) { return IfcBoundedSurface; } - if(v==IfcCurveStyle ) { return IfcPresentationStyle; } - if(v==IfcCurveStyleFont ) { return IfcPresentationItem; } - if(v==IfcCurveStyleFontAndScaling ) { return IfcPresentationItem; } - if(v==IfcCurveStyleFontPattern ) { return IfcPresentationItem; } - if(v==IfcCylindricalSurface ) { return IfcElementarySurface; } - if(v==IfcDamper ) { return IfcFlowController; } - if(v==IfcDamperType ) { return IfcFlowControllerType; } - if(v==IfcDerivedProfileDef ) { return IfcProfileDef; } - if(v==IfcDirection ) { return IfcGeometricRepresentationItem; } - if(v==IfcDiscreteAccessory ) { return IfcElementComponent; } - if(v==IfcDiscreteAccessoryType ) { return IfcElementComponentType; } - if(v==IfcDistributionChamberElement ) { return IfcDistributionFlowElement; } - if(v==IfcDistributionChamberElementType ) { return IfcDistributionFlowElementType; } - if(v==IfcDistributionCircuit ) { return IfcDistributionSystem; } - if(v==IfcDistributionControlElement ) { return IfcDistributionElement; } - if(v==IfcDistributionControlElementType ) { return IfcDistributionElementType; } - if(v==IfcDistributionElement ) { return IfcElement; } - if(v==IfcDistributionElementType ) { return IfcElementType; } - if(v==IfcDistributionFlowElement ) { return IfcDistributionElement; } - if(v==IfcDistributionFlowElementType ) { return IfcDistributionElementType; } - if(v==IfcDistributionPort ) { return IfcPort; } - if(v==IfcDistributionSystem ) { return IfcSystem; } - if(v==IfcDocumentInformation ) { return IfcExternalInformation; } - if(v==IfcDocumentInformationRelationship ) { return IfcResourceLevelRelationship; } - if(v==IfcDocumentReference ) { return IfcExternalReference; } - if(v==IfcDoor ) { return IfcBuildingElement; } - if(v==IfcDoorLiningProperties ) { return IfcPreDefinedPropertySet; } - if(v==IfcDoorPanelProperties ) { return IfcPreDefinedPropertySet; } - if(v==IfcDoorStandardCase ) { return IfcDoor; } - if(v==IfcDoorStyle ) { return IfcTypeProduct; } - if(v==IfcDoorType ) { return IfcBuildingElementType; } - if(v==IfcDraughtingPreDefinedColour ) { return IfcPreDefinedColour; } - if(v==IfcDraughtingPreDefinedCurveFont ) { return IfcPreDefinedCurveFont; } - if(v==IfcDuctFitting ) { return IfcFlowFitting; } - if(v==IfcDuctFittingType ) { return IfcFlowFittingType; } - if(v==IfcDuctSegment ) { return IfcFlowSegment; } - if(v==IfcDuctSegmentType ) { return IfcFlowSegmentType; } - if(v==IfcDuctSilencer ) { return IfcFlowTreatmentDevice; } - if(v==IfcDuctSilencerType ) { return IfcFlowTreatmentDeviceType; } - if(v==IfcEdge ) { return IfcTopologicalRepresentationItem; } - if(v==IfcEdgeCurve ) { return IfcEdge; } - if(v==IfcEdgeLoop ) { return IfcLoop; } - if(v==IfcElectricAppliance ) { return IfcFlowTerminal; } - if(v==IfcElectricApplianceType ) { return IfcFlowTerminalType; } - if(v==IfcElectricDistributionBoard ) { return IfcFlowController; } - if(v==IfcElectricDistributionBoardType ) { return IfcFlowControllerType; } - if(v==IfcElectricFlowStorageDevice ) { return IfcFlowStorageDevice; } - if(v==IfcElectricFlowStorageDeviceType ) { return IfcFlowStorageDeviceType; } - if(v==IfcElectricGenerator ) { return IfcEnergyConversionDevice; } - if(v==IfcElectricGeneratorType ) { return IfcEnergyConversionDeviceType; } - if(v==IfcElectricMotor ) { return IfcEnergyConversionDevice; } - if(v==IfcElectricMotorType ) { return IfcEnergyConversionDeviceType; } - if(v==IfcElectricTimeControl ) { return IfcFlowController; } - if(v==IfcElectricTimeControlType ) { return IfcFlowControllerType; } - if(v==IfcElement ) { return IfcProduct; } - if(v==IfcElementAssembly ) { return IfcElement; } - if(v==IfcElementAssemblyType ) { return IfcElementType; } - if(v==IfcElementComponent ) { return IfcElement; } - if(v==IfcElementComponentType ) { return IfcElementType; } - if(v==IfcElementQuantity ) { return IfcQuantitySet; } - if(v==IfcElementType ) { return IfcTypeProduct; } - if(v==IfcElementarySurface ) { return IfcSurface; } - if(v==IfcEllipse ) { return IfcConic; } - if(v==IfcEllipseProfileDef ) { return IfcParameterizedProfileDef; } - if(v==IfcEnergyConversionDevice ) { return IfcDistributionFlowElement; } - if(v==IfcEnergyConversionDeviceType ) { return IfcDistributionFlowElementType; } - if(v==IfcEngine ) { return IfcEnergyConversionDevice; } - if(v==IfcEngineType ) { return IfcEnergyConversionDeviceType; } - if(v==IfcEvaporativeCooler ) { return IfcEnergyConversionDevice; } - if(v==IfcEvaporativeCoolerType ) { return IfcEnergyConversionDeviceType; } - if(v==IfcEvaporator ) { return IfcEnergyConversionDevice; } - if(v==IfcEvaporatorType ) { return IfcEnergyConversionDeviceType; } - if(v==IfcEvent ) { return IfcProcess; } - if(v==IfcEventTime ) { return IfcSchedulingTime; } - if(v==IfcEventType ) { return IfcTypeProcess; } - if(v==IfcExtendedProperties ) { return IfcPropertyAbstraction; } - if(v==IfcExternalReferenceRelationship ) { return IfcResourceLevelRelationship; } - if(v==IfcExternalSpatialElement ) { return IfcExternalSpatialStructureElement; } - if(v==IfcExternalSpatialStructureElement ) { return IfcSpatialElement; } - if(v==IfcExternallyDefinedHatchStyle ) { return IfcExternalReference; } - if(v==IfcExternallyDefinedSurfaceStyle ) { return IfcExternalReference; } - if(v==IfcExternallyDefinedTextFont ) { return IfcExternalReference; } - if(v==IfcExtrudedAreaSolid ) { return IfcSweptAreaSolid; } - if(v==IfcExtrudedAreaSolidTapered ) { return IfcExtrudedAreaSolid; } - if(v==IfcFace ) { return IfcTopologicalRepresentationItem; } - if(v==IfcFaceBasedSurfaceModel ) { return IfcGeometricRepresentationItem; } - if(v==IfcFaceBound ) { return IfcTopologicalRepresentationItem; } - if(v==IfcFaceOuterBound ) { return IfcFaceBound; } - if(v==IfcFaceSurface ) { return IfcFace; } - if(v==IfcFacetedBrep ) { return IfcManifoldSolidBrep; } - if(v==IfcFacetedBrepWithVoids ) { return IfcFacetedBrep; } - if(v==IfcFailureConnectionCondition ) { return IfcStructuralConnectionCondition; } - if(v==IfcFan ) { return IfcFlowMovingDevice; } - if(v==IfcFanType ) { return IfcFlowMovingDeviceType; } - if(v==IfcFastener ) { return IfcElementComponent; } - if(v==IfcFastenerType ) { return IfcElementComponentType; } - if(v==IfcFeatureElement ) { return IfcElement; } - if(v==IfcFeatureElementAddition ) { return IfcFeatureElement; } - if(v==IfcFeatureElementSubtraction ) { return IfcFeatureElement; } - if(v==IfcFillAreaStyle ) { return IfcPresentationStyle; } - if(v==IfcFillAreaStyleHatching ) { return IfcGeometricRepresentationItem; } - if(v==IfcFillAreaStyleTiles ) { return IfcGeometricRepresentationItem; } - if(v==IfcFilter ) { return IfcFlowTreatmentDevice; } - if(v==IfcFilterType ) { return IfcFlowTreatmentDeviceType; } - if(v==IfcFireSuppressionTerminal ) { return IfcFlowTerminal; } - if(v==IfcFireSuppressionTerminalType ) { return IfcFlowTerminalType; } - if(v==IfcFixedReferenceSweptAreaSolid ) { return IfcSweptAreaSolid; } - if(v==IfcFlowController ) { return IfcDistributionFlowElement; } - if(v==IfcFlowControllerType ) { return IfcDistributionFlowElementType; } - if(v==IfcFlowFitting ) { return IfcDistributionFlowElement; } - if(v==IfcFlowFittingType ) { return IfcDistributionFlowElementType; } - if(v==IfcFlowInstrument ) { return IfcDistributionControlElement; } - if(v==IfcFlowInstrumentType ) { return IfcDistributionControlElementType; } - if(v==IfcFlowMeter ) { return IfcFlowController; } - if(v==IfcFlowMeterType ) { return IfcFlowControllerType; } - if(v==IfcFlowMovingDevice ) { return IfcDistributionFlowElement; } - if(v==IfcFlowMovingDeviceType ) { return IfcDistributionFlowElementType; } - if(v==IfcFlowSegment ) { return IfcDistributionFlowElement; } - if(v==IfcFlowSegmentType ) { return IfcDistributionFlowElementType; } - if(v==IfcFlowStorageDevice ) { return IfcDistributionFlowElement; } - if(v==IfcFlowStorageDeviceType ) { return IfcDistributionFlowElementType; } - if(v==IfcFlowTerminal ) { return IfcDistributionFlowElement; } - if(v==IfcFlowTerminalType ) { return IfcDistributionFlowElementType; } - if(v==IfcFlowTreatmentDevice ) { return IfcDistributionFlowElement; } - if(v==IfcFlowTreatmentDeviceType ) { return IfcDistributionFlowElementType; } - if(v==IfcFooting ) { return IfcBuildingElement; } - if(v==IfcFootingType ) { return IfcBuildingElementType; } - if(v==IfcFurnishingElement ) { return IfcElement; } - if(v==IfcFurnishingElementType ) { return IfcElementType; } - if(v==IfcFurniture ) { return IfcFurnishingElement; } - if(v==IfcFurnitureType ) { return IfcFurnishingElementType; } - if(v==IfcGeographicElement ) { return IfcElement; } - if(v==IfcGeographicElementType ) { return IfcElementType; } - if(v==IfcGeometricCurveSet ) { return IfcGeometricSet; } - if(v==IfcGeometricRepresentationContext ) { return IfcRepresentationContext; } - if(v==IfcGeometricRepresentationItem ) { return IfcRepresentationItem; } - if(v==IfcGeometricRepresentationSubContext ) { return IfcGeometricRepresentationContext; } - if(v==IfcGeometricSet ) { return IfcGeometricRepresentationItem; } - if(v==IfcGrid ) { return IfcProduct; } - if(v==IfcGridPlacement ) { return IfcObjectPlacement; } - if(v==IfcGroup ) { return IfcObject; } - if(v==IfcHalfSpaceSolid ) { return IfcGeometricRepresentationItem; } - if(v==IfcHeatExchanger ) { return IfcEnergyConversionDevice; } - if(v==IfcHeatExchangerType ) { return IfcEnergyConversionDeviceType; } - if(v==IfcHumidifier ) { return IfcEnergyConversionDevice; } - if(v==IfcHumidifierType ) { return IfcEnergyConversionDeviceType; } - if(v==IfcIShapeProfileDef ) { return IfcParameterizedProfileDef; } - if(v==IfcImageTexture ) { return IfcSurfaceTexture; } - if(v==IfcIndexedColourMap ) { return IfcPresentationItem; } - if(v==IfcIndexedTextureMap ) { return IfcTextureCoordinate; } - if(v==IfcIndexedTriangleTextureMap ) { return IfcIndexedTextureMap; } - if(v==IfcInterceptor ) { return IfcFlowTreatmentDevice; } - if(v==IfcInterceptorType ) { return IfcFlowTreatmentDeviceType; } - if(v==IfcInventory ) { return IfcGroup; } - if(v==IfcIrregularTimeSeries ) { return IfcTimeSeries; } - if(v==IfcJunctionBox ) { return IfcFlowFitting; } - if(v==IfcJunctionBoxType ) { return IfcFlowFittingType; } - if(v==IfcLShapeProfileDef ) { return IfcParameterizedProfileDef; } - if(v==IfcLaborResource ) { return IfcConstructionResource; } - if(v==IfcLaborResourceType ) { return IfcConstructionResourceType; } - if(v==IfcLagTime ) { return IfcSchedulingTime; } - if(v==IfcLamp ) { return IfcFlowTerminal; } - if(v==IfcLampType ) { return IfcFlowTerminalType; } - if(v==IfcLibraryInformation ) { return IfcExternalInformation; } - if(v==IfcLibraryReference ) { return IfcExternalReference; } - if(v==IfcLightFixture ) { return IfcFlowTerminal; } - if(v==IfcLightFixtureType ) { return IfcFlowTerminalType; } - if(v==IfcLightSource ) { return IfcGeometricRepresentationItem; } - if(v==IfcLightSourceAmbient ) { return IfcLightSource; } - if(v==IfcLightSourceDirectional ) { return IfcLightSource; } - if(v==IfcLightSourceGoniometric ) { return IfcLightSource; } - if(v==IfcLightSourcePositional ) { return IfcLightSource; } - if(v==IfcLightSourceSpot ) { return IfcLightSourcePositional; } - if(v==IfcLine ) { return IfcCurve; } - if(v==IfcLocalPlacement ) { return IfcObjectPlacement; } - if(v==IfcLoop ) { return IfcTopologicalRepresentationItem; } - if(v==IfcManifoldSolidBrep ) { return IfcSolidModel; } - if(v==IfcMapConversion ) { return IfcCoordinateOperation; } - if(v==IfcMappedItem ) { return IfcRepresentationItem; } - if(v==IfcMaterial ) { return IfcMaterialDefinition; } - if(v==IfcMaterialConstituent ) { return IfcMaterialDefinition; } - if(v==IfcMaterialConstituentSet ) { return IfcMaterialDefinition; } - if(v==IfcMaterialDefinitionRepresentation ) { return IfcProductRepresentation; } - if(v==IfcMaterialLayer ) { return IfcMaterialDefinition; } - if(v==IfcMaterialLayerSet ) { return IfcMaterialDefinition; } - if(v==IfcMaterialLayerSetUsage ) { return IfcMaterialUsageDefinition; } - if(v==IfcMaterialLayerWithOffsets ) { return IfcMaterialLayer; } - if(v==IfcMaterialProfile ) { return IfcMaterialDefinition; } - if(v==IfcMaterialProfileSet ) { return IfcMaterialDefinition; } - if(v==IfcMaterialProfileSetUsage ) { return IfcMaterialUsageDefinition; } - if(v==IfcMaterialProfileSetUsageTapering ) { return IfcMaterialProfileSetUsage; } - if(v==IfcMaterialProfileWithOffsets ) { return IfcMaterialProfile; } - if(v==IfcMaterialProperties ) { return IfcExtendedProperties; } - if(v==IfcMaterialRelationship ) { return IfcResourceLevelRelationship; } - if(v==IfcMechanicalFastener ) { return IfcElementComponent; } - if(v==IfcMechanicalFastenerType ) { return IfcElementComponentType; } - if(v==IfcMedicalDevice ) { return IfcFlowTerminal; } - if(v==IfcMedicalDeviceType ) { return IfcFlowTerminalType; } - if(v==IfcMember ) { return IfcBuildingElement; } - if(v==IfcMemberStandardCase ) { return IfcMember; } - if(v==IfcMemberType ) { return IfcBuildingElementType; } - if(v==IfcMetric ) { return IfcConstraint; } - if(v==IfcMirroredProfileDef ) { return IfcDerivedProfileDef; } - if(v==IfcMotorConnection ) { return IfcEnergyConversionDevice; } - if(v==IfcMotorConnectionType ) { return IfcEnergyConversionDeviceType; } - if(v==IfcObject ) { return IfcObjectDefinition; } - if(v==IfcObjectDefinition ) { return IfcRoot; } - if(v==IfcObjective ) { return IfcConstraint; } - if(v==IfcOccupant ) { return IfcActor; } - if(v==IfcOffsetCurve2D ) { return IfcCurve; } - if(v==IfcOffsetCurve3D ) { return IfcCurve; } - if(v==IfcOpenShell ) { return IfcConnectedFaceSet; } - if(v==IfcOpeningElement ) { return IfcFeatureElementSubtraction; } - if(v==IfcOpeningStandardCase ) { return IfcOpeningElement; } - if(v==IfcOrganizationRelationship ) { return IfcResourceLevelRelationship; } - if(v==IfcOrientedEdge ) { return IfcEdge; } - if(v==IfcOuterBoundaryCurve ) { return IfcBoundaryCurve; } - if(v==IfcOutlet ) { return IfcFlowTerminal; } - if(v==IfcOutletType ) { return IfcFlowTerminalType; } - if(v==IfcParameterizedProfileDef ) { return IfcProfileDef; } - if(v==IfcPath ) { return IfcTopologicalRepresentationItem; } - if(v==IfcPcurve ) { return IfcCurve; } - if(v==IfcPerformanceHistory ) { return IfcControl; } - if(v==IfcPermeableCoveringProperties ) { return IfcPreDefinedPropertySet; } - if(v==IfcPermit ) { return IfcControl; } - if(v==IfcPhysicalComplexQuantity ) { return IfcPhysicalQuantity; } - if(v==IfcPhysicalSimpleQuantity ) { return IfcPhysicalQuantity; } - if(v==IfcPile ) { return IfcBuildingElement; } - if(v==IfcPileType ) { return IfcBuildingElementType; } - if(v==IfcPipeFitting ) { return IfcFlowFitting; } - if(v==IfcPipeFittingType ) { return IfcFlowFittingType; } - if(v==IfcPipeSegment ) { return IfcFlowSegment; } - if(v==IfcPipeSegmentType ) { return IfcFlowSegmentType; } - if(v==IfcPixelTexture ) { return IfcSurfaceTexture; } - if(v==IfcPlacement ) { return IfcGeometricRepresentationItem; } - if(v==IfcPlanarBox ) { return IfcPlanarExtent; } - if(v==IfcPlanarExtent ) { return IfcGeometricRepresentationItem; } - if(v==IfcPlane ) { return IfcElementarySurface; } - if(v==IfcPlate ) { return IfcBuildingElement; } - if(v==IfcPlateStandardCase ) { return IfcPlate; } - if(v==IfcPlateType ) { return IfcBuildingElementType; } - if(v==IfcPoint ) { return IfcGeometricRepresentationItem; } - if(v==IfcPointOnCurve ) { return IfcPoint; } - if(v==IfcPointOnSurface ) { return IfcPoint; } - if(v==IfcPolyLoop ) { return IfcLoop; } - if(v==IfcPolygonalBoundedHalfSpace ) { return IfcHalfSpaceSolid; } - if(v==IfcPolyline ) { return IfcBoundedCurve; } - if(v==IfcPort ) { return IfcProduct; } - if(v==IfcPostalAddress ) { return IfcAddress; } - if(v==IfcPreDefinedColour ) { return IfcPreDefinedItem; } - if(v==IfcPreDefinedCurveFont ) { return IfcPreDefinedItem; } - if(v==IfcPreDefinedItem ) { return IfcPresentationItem; } - if(v==IfcPreDefinedProperties ) { return IfcPropertyAbstraction; } - if(v==IfcPreDefinedPropertySet ) { return IfcPropertySetDefinition; } - if(v==IfcPreDefinedTextFont ) { return IfcPreDefinedItem; } - if(v==IfcPresentationLayerWithStyle ) { return IfcPresentationLayerAssignment; } - if(v==IfcProcedure ) { return IfcProcess; } - if(v==IfcProcedureType ) { return IfcTypeProcess; } - if(v==IfcProcess ) { return IfcObject; } - if(v==IfcProduct ) { return IfcObject; } - if(v==IfcProductDefinitionShape ) { return IfcProductRepresentation; } - if(v==IfcProfileProperties ) { return IfcExtendedProperties; } - if(v==IfcProject ) { return IfcContext; } - if(v==IfcProjectLibrary ) { return IfcContext; } - if(v==IfcProjectOrder ) { return IfcControl; } - if(v==IfcProjectedCRS ) { return IfcCoordinateReferenceSystem; } - if(v==IfcProjectionElement ) { return IfcFeatureElementAddition; } - if(v==IfcProperty ) { return IfcPropertyAbstraction; } - if(v==IfcPropertyBoundedValue ) { return IfcSimpleProperty; } - if(v==IfcPropertyDefinition ) { return IfcRoot; } - if(v==IfcPropertyDependencyRelationship ) { return IfcResourceLevelRelationship; } - if(v==IfcPropertyEnumeratedValue ) { return IfcSimpleProperty; } - if(v==IfcPropertyEnumeration ) { return IfcPropertyAbstraction; } - if(v==IfcPropertyListValue ) { return IfcSimpleProperty; } - if(v==IfcPropertyReferenceValue ) { return IfcSimpleProperty; } - if(v==IfcPropertySet ) { return IfcPropertySetDefinition; } - if(v==IfcPropertySetDefinition ) { return IfcPropertyDefinition; } - if(v==IfcPropertySetTemplate ) { return IfcPropertyTemplateDefinition; } - if(v==IfcPropertySingleValue ) { return IfcSimpleProperty; } - if(v==IfcPropertyTableValue ) { return IfcSimpleProperty; } - if(v==IfcPropertyTemplate ) { return IfcPropertyTemplateDefinition; } - if(v==IfcPropertyTemplateDefinition ) { return IfcPropertyDefinition; } - if(v==IfcProtectiveDevice ) { return IfcFlowController; } - if(v==IfcProtectiveDeviceTrippingUnit ) { return IfcDistributionControlElement; } - if(v==IfcProtectiveDeviceTrippingUnitType ) { return IfcDistributionControlElementType; } - if(v==IfcProtectiveDeviceType ) { return IfcFlowControllerType; } - if(v==IfcProxy ) { return IfcProduct; } - if(v==IfcPump ) { return IfcFlowMovingDevice; } - if(v==IfcPumpType ) { return IfcFlowMovingDeviceType; } - if(v==IfcQuantityArea ) { return IfcPhysicalSimpleQuantity; } - if(v==IfcQuantityCount ) { return IfcPhysicalSimpleQuantity; } - if(v==IfcQuantityLength ) { return IfcPhysicalSimpleQuantity; } - if(v==IfcQuantitySet ) { return IfcPropertySetDefinition; } - if(v==IfcQuantityTime ) { return IfcPhysicalSimpleQuantity; } - if(v==IfcQuantityVolume ) { return IfcPhysicalSimpleQuantity; } - if(v==IfcQuantityWeight ) { return IfcPhysicalSimpleQuantity; } - if(v==IfcRailing ) { return IfcBuildingElement; } - if(v==IfcRailingType ) { return IfcBuildingElementType; } - if(v==IfcRamp ) { return IfcBuildingElement; } - if(v==IfcRampFlight ) { return IfcBuildingElement; } - if(v==IfcRampFlightType ) { return IfcBuildingElementType; } - if(v==IfcRampType ) { return IfcBuildingElementType; } - if(v==IfcRationalBSplineCurveWithKnots ) { return IfcBSplineCurveWithKnots; } - if(v==IfcRationalBSplineSurfaceWithKnots ) { return IfcBSplineSurfaceWithKnots; } - if(v==IfcRectangleHollowProfileDef ) { return IfcRectangleProfileDef; } - if(v==IfcRectangleProfileDef ) { return IfcParameterizedProfileDef; } - if(v==IfcRectangularPyramid ) { return IfcCsgPrimitive3D; } - if(v==IfcRectangularTrimmedSurface ) { return IfcBoundedSurface; } - if(v==IfcRegularTimeSeries ) { return IfcTimeSeries; } - if(v==IfcReinforcementBarProperties ) { return IfcPreDefinedProperties; } - if(v==IfcReinforcementDefinitionProperties ) { return IfcPreDefinedPropertySet; } - if(v==IfcReinforcingBar ) { return IfcReinforcingElement; } - if(v==IfcReinforcingBarType ) { return IfcReinforcingElementType; } - if(v==IfcReinforcingElement ) { return IfcElementComponent; } - if(v==IfcReinforcingElementType ) { return IfcElementComponentType; } - if(v==IfcReinforcingMesh ) { return IfcReinforcingElement; } - if(v==IfcReinforcingMeshType ) { return IfcReinforcingElementType; } - if(v==IfcRelAggregates ) { return IfcRelDecomposes; } - if(v==IfcRelAssigns ) { return IfcRelationship; } - if(v==IfcRelAssignsToActor ) { return IfcRelAssigns; } - if(v==IfcRelAssignsToControl ) { return IfcRelAssigns; } - if(v==IfcRelAssignsToGroup ) { return IfcRelAssigns; } - if(v==IfcRelAssignsToGroupByFactor ) { return IfcRelAssignsToGroup; } - if(v==IfcRelAssignsToProcess ) { return IfcRelAssigns; } - if(v==IfcRelAssignsToProduct ) { return IfcRelAssigns; } - if(v==IfcRelAssignsToResource ) { return IfcRelAssigns; } - if(v==IfcRelAssociates ) { return IfcRelationship; } - if(v==IfcRelAssociatesApproval ) { return IfcRelAssociates; } - if(v==IfcRelAssociatesClassification ) { return IfcRelAssociates; } - if(v==IfcRelAssociatesConstraint ) { return IfcRelAssociates; } - if(v==IfcRelAssociatesDocument ) { return IfcRelAssociates; } - if(v==IfcRelAssociatesLibrary ) { return IfcRelAssociates; } - if(v==IfcRelAssociatesMaterial ) { return IfcRelAssociates; } - if(v==IfcRelConnects ) { return IfcRelationship; } - if(v==IfcRelConnectsElements ) { return IfcRelConnects; } - if(v==IfcRelConnectsPathElements ) { return IfcRelConnectsElements; } - if(v==IfcRelConnectsPortToElement ) { return IfcRelConnects; } - if(v==IfcRelConnectsPorts ) { return IfcRelConnects; } - if(v==IfcRelConnectsStructuralActivity ) { return IfcRelConnects; } - if(v==IfcRelConnectsStructuralMember ) { return IfcRelConnects; } - if(v==IfcRelConnectsWithEccentricity ) { return IfcRelConnectsStructuralMember; } - if(v==IfcRelConnectsWithRealizingElements ) { return IfcRelConnectsElements; } - if(v==IfcRelContainedInSpatialStructure ) { return IfcRelConnects; } - if(v==IfcRelCoversBldgElements ) { return IfcRelConnects; } - if(v==IfcRelCoversSpaces ) { return IfcRelConnects; } - if(v==IfcRelDeclares ) { return IfcRelationship; } - if(v==IfcRelDecomposes ) { return IfcRelationship; } - if(v==IfcRelDefines ) { return IfcRelationship; } - if(v==IfcRelDefinesByObject ) { return IfcRelDefines; } - if(v==IfcRelDefinesByProperties ) { return IfcRelDefines; } - if(v==IfcRelDefinesByTemplate ) { return IfcRelDefines; } - if(v==IfcRelDefinesByType ) { return IfcRelDefines; } - if(v==IfcRelFillsElement ) { return IfcRelConnects; } - if(v==IfcRelFlowControlElements ) { return IfcRelConnects; } - if(v==IfcRelInterferesElements ) { return IfcRelConnects; } - if(v==IfcRelNests ) { return IfcRelDecomposes; } - if(v==IfcRelProjectsElement ) { return IfcRelDecomposes; } - if(v==IfcRelReferencedInSpatialStructure ) { return IfcRelConnects; } - if(v==IfcRelSequence ) { return IfcRelConnects; } - if(v==IfcRelServicesBuildings ) { return IfcRelConnects; } - if(v==IfcRelSpaceBoundary ) { return IfcRelConnects; } - if(v==IfcRelSpaceBoundary1stLevel ) { return IfcRelSpaceBoundary; } - if(v==IfcRelSpaceBoundary2ndLevel ) { return IfcRelSpaceBoundary1stLevel; } - if(v==IfcRelVoidsElement ) { return IfcRelDecomposes; } - if(v==IfcRelationship ) { return IfcRoot; } - if(v==IfcReparametrisedCompositeCurveSegment ) { return IfcCompositeCurveSegment; } - if(v==IfcResource ) { return IfcObject; } - if(v==IfcResourceApprovalRelationship ) { return IfcResourceLevelRelationship; } - if(v==IfcResourceConstraintRelationship ) { return IfcResourceLevelRelationship; } - if(v==IfcResourceTime ) { return IfcSchedulingTime; } - if(v==IfcRevolvedAreaSolid ) { return IfcSweptAreaSolid; } - if(v==IfcRevolvedAreaSolidTapered ) { return IfcRevolvedAreaSolid; } - if(v==IfcRightCircularCone ) { return IfcCsgPrimitive3D; } - if(v==IfcRightCircularCylinder ) { return IfcCsgPrimitive3D; } - if(v==IfcRoof ) { return IfcBuildingElement; } - if(v==IfcRoofType ) { return IfcBuildingElementType; } - if(v==IfcRoundedRectangleProfileDef ) { return IfcRectangleProfileDef; } - if(v==IfcSIUnit ) { return IfcNamedUnit; } - if(v==IfcSanitaryTerminal ) { return IfcFlowTerminal; } - if(v==IfcSanitaryTerminalType ) { return IfcFlowTerminalType; } - if(v==IfcSectionProperties ) { return IfcPreDefinedProperties; } - if(v==IfcSectionReinforcementProperties ) { return IfcPreDefinedProperties; } - if(v==IfcSectionedSpine ) { return IfcGeometricRepresentationItem; } - if(v==IfcSensor ) { return IfcDistributionControlElement; } - if(v==IfcSensorType ) { return IfcDistributionControlElementType; } - if(v==IfcShadingDevice ) { return IfcBuildingElement; } - if(v==IfcShadingDeviceType ) { return IfcBuildingElementType; } - if(v==IfcShapeModel ) { return IfcRepresentation; } - if(v==IfcShapeRepresentation ) { return IfcShapeModel; } - if(v==IfcShellBasedSurfaceModel ) { return IfcGeometricRepresentationItem; } - if(v==IfcSimpleProperty ) { return IfcProperty; } - if(v==IfcSimplePropertyTemplate ) { return IfcPropertyTemplate; } - if(v==IfcSite ) { return IfcSpatialStructureElement; } - if(v==IfcSlab ) { return IfcBuildingElement; } - if(v==IfcSlabElementedCase ) { return IfcSlab; } - if(v==IfcSlabStandardCase ) { return IfcSlab; } - if(v==IfcSlabType ) { return IfcBuildingElementType; } - if(v==IfcSlippageConnectionCondition ) { return IfcStructuralConnectionCondition; } - if(v==IfcSolarDevice ) { return IfcEnergyConversionDevice; } - if(v==IfcSolarDeviceType ) { return IfcEnergyConversionDeviceType; } - if(v==IfcSolidModel ) { return IfcGeometricRepresentationItem; } - if(v==IfcSpace ) { return IfcSpatialStructureElement; } - if(v==IfcSpaceHeater ) { return IfcFlowTerminal; } - if(v==IfcSpaceHeaterType ) { return IfcFlowTerminalType; } - if(v==IfcSpaceType ) { return IfcSpatialStructureElementType; } - if(v==IfcSpatialElement ) { return IfcProduct; } - if(v==IfcSpatialElementType ) { return IfcTypeProduct; } - if(v==IfcSpatialStructureElement ) { return IfcSpatialElement; } - if(v==IfcSpatialStructureElementType ) { return IfcSpatialElementType; } - if(v==IfcSpatialZone ) { return IfcSpatialElement; } - if(v==IfcSpatialZoneType ) { return IfcSpatialElementType; } - if(v==IfcSphere ) { return IfcCsgPrimitive3D; } - if(v==IfcStackTerminal ) { return IfcFlowTerminal; } - if(v==IfcStackTerminalType ) { return IfcFlowTerminalType; } - if(v==IfcStair ) { return IfcBuildingElement; } - if(v==IfcStairFlight ) { return IfcBuildingElement; } - if(v==IfcStairFlightType ) { return IfcBuildingElementType; } - if(v==IfcStairType ) { return IfcBuildingElementType; } - if(v==IfcStructuralAction ) { return IfcStructuralActivity; } - if(v==IfcStructuralActivity ) { return IfcProduct; } - if(v==IfcStructuralAnalysisModel ) { return IfcSystem; } - if(v==IfcStructuralConnection ) { return IfcStructuralItem; } - if(v==IfcStructuralCurveAction ) { return IfcStructuralAction; } - if(v==IfcStructuralCurveConnection ) { return IfcStructuralConnection; } - if(v==IfcStructuralCurveMember ) { return IfcStructuralMember; } - if(v==IfcStructuralCurveMemberVarying ) { return IfcStructuralCurveMember; } - if(v==IfcStructuralCurveReaction ) { return IfcStructuralReaction; } - if(v==IfcStructuralItem ) { return IfcProduct; } - if(v==IfcStructuralLinearAction ) { return IfcStructuralCurveAction; } - if(v==IfcStructuralLoadCase ) { return IfcStructuralLoadGroup; } - if(v==IfcStructuralLoadConfiguration ) { return IfcStructuralLoad; } - if(v==IfcStructuralLoadGroup ) { return IfcGroup; } - if(v==IfcStructuralLoadLinearForce ) { return IfcStructuralLoadStatic; } - if(v==IfcStructuralLoadOrResult ) { return IfcStructuralLoad; } - if(v==IfcStructuralLoadPlanarForce ) { return IfcStructuralLoadStatic; } - if(v==IfcStructuralLoadSingleDisplacement ) { return IfcStructuralLoadStatic; } - if(v==IfcStructuralLoadSingleDisplacementDistortion ) { return IfcStructuralLoadSingleDisplacement; } - if(v==IfcStructuralLoadSingleForce ) { return IfcStructuralLoadStatic; } - if(v==IfcStructuralLoadSingleForceWarping ) { return IfcStructuralLoadSingleForce; } - if(v==IfcStructuralLoadStatic ) { return IfcStructuralLoadOrResult; } - if(v==IfcStructuralLoadTemperature ) { return IfcStructuralLoadStatic; } - if(v==IfcStructuralMember ) { return IfcStructuralItem; } - if(v==IfcStructuralPlanarAction ) { return IfcStructuralSurfaceAction; } - if(v==IfcStructuralPointAction ) { return IfcStructuralAction; } - if(v==IfcStructuralPointConnection ) { return IfcStructuralConnection; } - if(v==IfcStructuralPointReaction ) { return IfcStructuralReaction; } - if(v==IfcStructuralReaction ) { return IfcStructuralActivity; } - if(v==IfcStructuralResultGroup ) { return IfcGroup; } - if(v==IfcStructuralSurfaceAction ) { return IfcStructuralAction; } - if(v==IfcStructuralSurfaceConnection ) { return IfcStructuralConnection; } - if(v==IfcStructuralSurfaceMember ) { return IfcStructuralMember; } - if(v==IfcStructuralSurfaceMemberVarying ) { return IfcStructuralSurfaceMember; } - if(v==IfcStructuralSurfaceReaction ) { return IfcStructuralReaction; } - if(v==IfcStyleModel ) { return IfcRepresentation; } - if(v==IfcStyledItem ) { return IfcRepresentationItem; } - if(v==IfcStyledRepresentation ) { return IfcStyleModel; } - if(v==IfcSubContractResource ) { return IfcConstructionResource; } - if(v==IfcSubContractResourceType ) { return IfcConstructionResourceType; } - if(v==IfcSubedge ) { return IfcEdge; } - if(v==IfcSurface ) { return IfcGeometricRepresentationItem; } - if(v==IfcSurfaceCurveSweptAreaSolid ) { return IfcSweptAreaSolid; } - if(v==IfcSurfaceFeature ) { return IfcFeatureElement; } - if(v==IfcSurfaceOfLinearExtrusion ) { return IfcSweptSurface; } - if(v==IfcSurfaceOfRevolution ) { return IfcSweptSurface; } - if(v==IfcSurfaceReinforcementArea ) { return IfcStructuralLoadOrResult; } - if(v==IfcSurfaceStyle ) { return IfcPresentationStyle; } - if(v==IfcSurfaceStyleLighting ) { return IfcPresentationItem; } - if(v==IfcSurfaceStyleRefraction ) { return IfcPresentationItem; } - if(v==IfcSurfaceStyleRendering ) { return IfcSurfaceStyleShading; } - if(v==IfcSurfaceStyleShading ) { return IfcPresentationItem; } - if(v==IfcSurfaceStyleWithTextures ) { return IfcPresentationItem; } - if(v==IfcSurfaceTexture ) { return IfcPresentationItem; } - if(v==IfcSweptAreaSolid ) { return IfcSolidModel; } - if(v==IfcSweptDiskSolid ) { return IfcSolidModel; } - if(v==IfcSweptDiskSolidPolygonal ) { return IfcSweptDiskSolid; } - if(v==IfcSweptSurface ) { return IfcSurface; } - if(v==IfcSwitchingDevice ) { return IfcFlowController; } - if(v==IfcSwitchingDeviceType ) { return IfcFlowControllerType; } - if(v==IfcSystem ) { return IfcGroup; } - if(v==IfcSystemFurnitureElement ) { return IfcFurnishingElement; } - if(v==IfcSystemFurnitureElementType ) { return IfcFurnishingElementType; } - if(v==IfcTShapeProfileDef ) { return IfcParameterizedProfileDef; } - if(v==IfcTank ) { return IfcFlowStorageDevice; } - if(v==IfcTankType ) { return IfcFlowStorageDeviceType; } - if(v==IfcTask ) { return IfcProcess; } - if(v==IfcTaskTime ) { return IfcSchedulingTime; } - if(v==IfcTaskTimeRecurring ) { return IfcTaskTime; } - if(v==IfcTaskType ) { return IfcTypeProcess; } - if(v==IfcTelecomAddress ) { return IfcAddress; } - if(v==IfcTendon ) { return IfcReinforcingElement; } - if(v==IfcTendonAnchor ) { return IfcReinforcingElement; } - if(v==IfcTendonAnchorType ) { return IfcReinforcingElementType; } - if(v==IfcTendonType ) { return IfcReinforcingElementType; } - if(v==IfcTessellatedFaceSet ) { return IfcTessellatedItem; } - if(v==IfcTessellatedItem ) { return IfcGeometricRepresentationItem; } - if(v==IfcTextLiteral ) { return IfcGeometricRepresentationItem; } - if(v==IfcTextLiteralWithExtent ) { return IfcTextLiteral; } - if(v==IfcTextStyle ) { return IfcPresentationStyle; } - if(v==IfcTextStyleFontModel ) { return IfcPreDefinedTextFont; } - if(v==IfcTextStyleForDefinedFont ) { return IfcPresentationItem; } - if(v==IfcTextStyleTextModel ) { return IfcPresentationItem; } - if(v==IfcTextureCoordinate ) { return IfcPresentationItem; } - if(v==IfcTextureCoordinateGenerator ) { return IfcTextureCoordinate; } - if(v==IfcTextureMap ) { return IfcTextureCoordinate; } - if(v==IfcTextureVertex ) { return IfcPresentationItem; } - if(v==IfcTextureVertexList ) { return IfcPresentationItem; } - if(v==IfcTopologicalRepresentationItem ) { return IfcRepresentationItem; } - if(v==IfcTopologyRepresentation ) { return IfcShapeModel; } - if(v==IfcTransformer ) { return IfcEnergyConversionDevice; } - if(v==IfcTransformerType ) { return IfcEnergyConversionDeviceType; } - if(v==IfcTransportElement ) { return IfcElement; } - if(v==IfcTransportElementType ) { return IfcElementType; } - if(v==IfcTrapeziumProfileDef ) { return IfcParameterizedProfileDef; } - if(v==IfcTriangulatedFaceSet ) { return IfcTessellatedFaceSet; } - if(v==IfcTrimmedCurve ) { return IfcBoundedCurve; } - if(v==IfcTubeBundle ) { return IfcEnergyConversionDevice; } - if(v==IfcTubeBundleType ) { return IfcEnergyConversionDeviceType; } - if(v==IfcTypeObject ) { return IfcObjectDefinition; } - if(v==IfcTypeProcess ) { return IfcTypeObject; } - if(v==IfcTypeProduct ) { return IfcTypeObject; } - if(v==IfcTypeResource ) { return IfcTypeObject; } - if(v==IfcUShapeProfileDef ) { return IfcParameterizedProfileDef; } - if(v==IfcUnitaryControlElement ) { return IfcDistributionControlElement; } - if(v==IfcUnitaryControlElementType ) { return IfcDistributionControlElementType; } - if(v==IfcUnitaryEquipment ) { return IfcEnergyConversionDevice; } - if(v==IfcUnitaryEquipmentType ) { return IfcEnergyConversionDeviceType; } - if(v==IfcValve ) { return IfcFlowController; } - if(v==IfcValveType ) { return IfcFlowControllerType; } - if(v==IfcVector ) { return IfcGeometricRepresentationItem; } - if(v==IfcVertex ) { return IfcTopologicalRepresentationItem; } - if(v==IfcVertexLoop ) { return IfcLoop; } - if(v==IfcVertexPoint ) { return IfcVertex; } - if(v==IfcVibrationIsolator ) { return IfcElementComponent; } - if(v==IfcVibrationIsolatorType ) { return IfcElementComponentType; } - if(v==IfcVirtualElement ) { return IfcElement; } - if(v==IfcVoidingFeature ) { return IfcFeatureElementSubtraction; } - if(v==IfcWall ) { return IfcBuildingElement; } - if(v==IfcWallElementedCase ) { return IfcWall; } - if(v==IfcWallStandardCase ) { return IfcWall; } - if(v==IfcWallType ) { return IfcBuildingElementType; } - if(v==IfcWasteTerminal ) { return IfcFlowTerminal; } - if(v==IfcWasteTerminalType ) { return IfcFlowTerminalType; } - if(v==IfcWindow ) { return IfcBuildingElement; } - if(v==IfcWindowLiningProperties ) { return IfcPreDefinedPropertySet; } - if(v==IfcWindowPanelProperties ) { return IfcPreDefinedPropertySet; } - if(v==IfcWindowStandardCase ) { return IfcWindow; } - if(v==IfcWindowStyle ) { return IfcTypeProduct; } - if(v==IfcWindowType ) { return IfcBuildingElementType; } - if(v==IfcWorkCalendar ) { return IfcControl; } - if(v==IfcWorkControl ) { return IfcControl; } - if(v==IfcWorkPlan ) { return IfcWorkControl; } - if(v==IfcWorkSchedule ) { return IfcWorkControl; } - if(v==IfcWorkTime ) { return IfcSchedulingTime; } - if(v==IfcZShapeProfileDef ) { return IfcParameterizedProfileDef; } - if(v==IfcZone ) { return IfcSystem; } - return (Enum)-1; +static int parent_map[] = {-1,-1,202,-1,-1,-1,611,-1,-1,276,277,-1,-1,-1,548,14,390,431,414,415,-1,432,-1,357,358,-1,276,277,-1,-1,-1,-1,-1,705,454,-1,-1,-1,-1,848,710,710,40,-1,-1,-1,-1,-1,465,636,431,432,-1,662,-1,662,662,86,-1,57,87,-1,60,92,63,99,-1,-1,-1,-1,1010,229,357,358,-1,-1,79,-1,-1,454,-1,167,80,80,80,84,237,994,454,-1,466,924,345,349,350,-1,92,99,-1,353,924,1018,-1,357,358,-1,636,417,418,-1,427,428,-1,417,418,-1,427,428,-1,-1,672,454,121,121,454,124,125,124,127,41,-1,357,358,-1,92,99,-1,177,139,636,345,353,375,376,-1,-1,178,357,358,-1,-1,-1,154,693,693,92,155,99,-1,431,432,-1,-1,721,738,-1,86,166,454,710,-1,425,426,-1,357,358,-1,237,1078,180,-1,182,180,180,-1,180,-1,-1,197,198,-1,197,198,-1,197,198,-1,845,1100,612,-1,606,611,276,277,-1,606,206,357,358,-1,357,358,-1,-1,-1,-1,202,-1,202,-1,36,-1,92,99,-1,197,198,-1,454,-1,909,848,92,99,-1,-1,454,87,87,-1,-1,-1,-1,696,693,693,693,-1,354,414,415,-1,-1,-1,-1,-1,-1,-1,-1,710,-1,-1,-1,-1,-1,-1,454,-1,349,350,-1,280,281,-1,284,278,279,345,353,278,279,679,-1,1018,-1,-1,375,848,376,-1,-1,92,690,-1,-1,690,292,1099,-1,-1,99,-1,-1,-1,686,687,417,418,-1,427,428,-1,433,434,-1,-1,-1,1078,318,542,431,432,-1,-1,-1,-1,-1,414,415,-1,429,430,-1,357,358,-1,357,358,-1,-1,414,415,-1,-1,705,345,353,-1,345,353,-1,753,1099,994,177,636,280,281,-1,357,358,-1,357,358,-1,357,358,-1,703,872,-1,1098,-1,722,-1,-1,848,380,-1,922,376,376,376,1011,384,1078,454,1078,388,386,548,391,949,425,426,-1,349,350,-1,345,400,400,696,454,454,-1,433,434,-1,431,432,-1,1011,280,281,-1,280,281,276,277,-1,414,415,-1,280,281,280,281,280,281,280,281,280,281,-1,-1,-1,92,99,-1,-1,-1,345,353,443,444,-1,345,353,-1,456,-1,842,843,453,454,-1,-1,-1,705,-1,613,-1,-1,611,454,-1,357,358,-1,-1,-1,357,358,-1,636,-1,-1,1010,693,86,1059,482,-1,-1,-1,433,434,-1,-1,465,-1,-1,1074,-1,-1,417,418,-1,-1,-1,636,-1,197,198,-1,872,431,432,-1,-1,-1,-1,-1,375,376,-1,-1,-1,-1,-1,431,432,-1,-1,454,526,526,526,526,530,237,-1,-1,-1,-1,-1,-1,613,-1,-1,1078,-1,-1,-1,-1,-1,909,214,843,-1,-1,-1,-1,559,-1,559,559,-1,707,559,559,574,561,-1,559,559,574,568,566,374,848,-1,-1,-1,-1,349,350,-1,431,432,-1,92,583,99,-1,186,-1,260,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,357,358,-1,-1,-1,-1,-1,-1,612,860,-1,-1,-1,186,-1,6,-1,237,237,178,402,-1,623,-1,848,318,81,431,432,-1,-1,-1,-1,710,1078,237,202,-1,-1,690,202,-1,-1,-1,649,-1,-1,649,92,-1,99,-1,417,418,-1,427,428,-1,1010,454,664,454,-1,354,-1,92,668,99,-1,454,672,672,-1,542,466,86,705,-1,-1,-1,-1,12,-1,688,688,693,722,731,688,-1,-1,-1,694,-1,-1,-1,-1,703,1098,-1,611,-1,611,707,-1,-1,-1,-1,374,-1,199,199,202,-1,215,-1,401,-1,722,-1,893,860,848,893,722,893,893,731,724,-1,-1,739,-1,893,893,739,724,414,276,277,-1,415,-1,705,425,426,-1,650,650,650,731,650,650,650,-1,92,99,-1,92,92,99,-1,99,-1,-1,59,62,-1,772,636,229,87,-1,-1,-1,-1,1074,689,690,787,-1,-1,788,-1,349,350,787,788,-1,821,839,793,793,793,796,793,793,793,839,801,801,801,801,801,801,839,808,809,808,808,808,808,814,809,808,808,808,839,839,839,822,822,822,822,808,808,808,821,821,808,808,808,808,835,836,821,860,168,-1,-1,-1,-1,611,848,848,-1,-1,-1,872,1011,852,229,229,-1,92,99,-1,-1,-1,-1,-1,-1,772,-1,606,-1,431,432,-1,-1,-1,689,689,-1,-1,454,-1,276,277,-1,-1,92,99,-1,-1,841,888,-1,-1,454,721,738,-1,-1,924,-1,92,899,899,99,-1,949,357,358,-1,-1,454,-1,-1,-1,-1,-1,924,-1,431,432,-1,925,-1,705,1099,922,923,922,923,-1,-1,-1,-1,-1,229,431,432,-1,92,92,99,-1,99,-1,-1,945,705,-1,1018,957,-1,944,-1,948,972,-1,953,977,705,950,-1,962,959,465,970,959,970,970,966,970,968,964,970,957,979,944,948,977,945,465,944,-1,948,972,-1,982,977,-1,841,843,987,197,198,-1,318,454,1011,400,-1,1014,1014,-1,964,-1,696,-1,693,693,1008,693,693,693,909,909,1012,994,414,415,-1,465,443,444,-1,636,-1,-1,-1,429,430,-1,703,-1,872,1031,1098,-1,12,-1,-1,787,787,788,-1,788,-1,1045,454,-1,-1,-1,-1,-1,454,1051,-1,696,691,693,693,-1,693,1059,1059,693,693,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,843,888,-1,357,358,-1,-1,-1,345,353,-1,636,1044,86,-1,-1,357,358,-1,612,1097,1097,1097,-1,636,-1,-1,-1,276,277,-1,357,358,-1,-1,414,415,-1,-1,454,-1,1078,542,1119,349,350,-1,345,-1,402,-1,-1,-1,92,1131,1131,99,-1,-1,-1,-1,431,432,-1,92,690,-1,-1,690,1142,1099,-1,-1,99,-1,-1,202,-1,202,1156,-1,1156,-1,872,636,1018}; +boost::optional Type::Parent(Enum v){ + const int p = parent_map[static_cast(v)]; + if (p >= 0) { + return static_cast(p); + } else { + return boost::none; + } } bool Type::IsSimple(Enum v) { - return v == Type::IfcAbsorbedDoseMeasure || v == Type::IfcAccelerationMeasure || v == Type::IfcAmountOfSubstanceMeasure || v == Type::IfcAngularVelocityMeasure || v == Type::IfcAreaDensityMeasure || v == Type::IfcAreaMeasure || v == Type::IfcBoolean || v == Type::IfcColour || v == Type::IfcComplexNumber || v == Type::IfcCompoundPlaneAngleMeasure || v == Type::IfcContextDependentMeasure || v == Type::IfcCountMeasure || v == Type::IfcCurvatureMeasure || v == Type::IfcCurveStyleFontSelect || v == Type::IfcDate || v == Type::IfcDateTime || v == Type::IfcDerivedMeasureValue || v == Type::IfcDescriptiveMeasure || v == Type::IfcDoseEquivalentMeasure || v == Type::IfcDuration || v == Type::IfcDynamicViscosityMeasure || v == Type::IfcElectricCapacitanceMeasure || v == Type::IfcElectricChargeMeasure || v == Type::IfcElectricConductanceMeasure || v == Type::IfcElectricCurrentMeasure || v == Type::IfcElectricResistanceMeasure || v == Type::IfcElectricVoltageMeasure || v == Type::IfcEnergyMeasure || v == Type::IfcForceMeasure || v == Type::IfcFrequencyMeasure || v == Type::IfcHeatFluxDensityMeasure || v == Type::IfcHeatingValueMeasure || v == Type::IfcIdentifier || v == Type::IfcIlluminanceMeasure || v == Type::IfcInductanceMeasure || v == Type::IfcInteger || v == Type::IfcIntegerCountRateMeasure || v == Type::IfcIonConcentrationMeasure || v == Type::IfcIsothermalMoistureCapacityMeasure || v == Type::IfcKinematicViscosityMeasure || v == Type::IfcLabel || v == Type::IfcLengthMeasure || v == Type::IfcLinearForceMeasure || v == Type::IfcLinearMomentMeasure || v == Type::IfcLinearStiffnessMeasure || v == Type::IfcLinearVelocityMeasure || v == Type::IfcLogical || v == Type::IfcLuminousFluxMeasure || v == Type::IfcLuminousIntensityDistributionMeasure || v == Type::IfcLuminousIntensityMeasure || v == Type::IfcMagneticFluxDensityMeasure || v == Type::IfcMagneticFluxMeasure || v == Type::IfcMassDensityMeasure || v == Type::IfcMassFlowRateMeasure || v == Type::IfcMassMeasure || v == Type::IfcMassPerLengthMeasure || v == Type::IfcMeasureValue || v == Type::IfcModulusOfElasticityMeasure || v == Type::IfcModulusOfLinearSubgradeReactionMeasure || v == Type::IfcModulusOfRotationalSubgradeReactionMeasure || v == Type::IfcModulusOfSubgradeReactionMeasure || v == Type::IfcMoistureDiffusivityMeasure || v == Type::IfcMolecularWeightMeasure || v == Type::IfcMomentOfInertiaMeasure || v == Type::IfcMonetaryMeasure || v == Type::IfcNonNegativeLengthMeasure || v == Type::IfcNormalisedRatioMeasure || v == Type::IfcNullStyle || v == Type::IfcNumericMeasure || v == Type::IfcPHMeasure || v == Type::IfcParameterValue || v == Type::IfcPlanarForceMeasure || v == Type::IfcPlaneAngleMeasure || v == Type::IfcPositiveLengthMeasure || v == Type::IfcPositivePlaneAngleMeasure || v == Type::IfcPositiveRatioMeasure || v == Type::IfcPowerMeasure || v == Type::IfcPressureMeasure || v == Type::IfcPropertySetDefinitionSet || v == Type::IfcRadioActivityMeasure || v == Type::IfcRatioMeasure || v == Type::IfcReal || v == Type::IfcRotationalFrequencyMeasure || v == Type::IfcRotationalMassMeasure || v == Type::IfcRotationalStiffnessMeasure || v == Type::IfcSectionModulusMeasure || v == Type::IfcSectionalAreaIntegralMeasure || v == Type::IfcShearModulusMeasure || v == Type::IfcSimpleValue || v == Type::IfcSolidAngleMeasure || v == Type::IfcSoundPowerLevelMeasure || v == Type::IfcSoundPowerMeasure || v == Type::IfcSoundPressureLevelMeasure || v == Type::IfcSoundPressureMeasure || v == Type::IfcSpecificHeatCapacityMeasure || v == Type::IfcSpecularExponent || v == Type::IfcSpecularRoughness || v == Type::IfcTemperatureGradientMeasure || v == Type::IfcTemperatureRateOfChangeMeasure || v == Type::IfcText || v == Type::IfcThermalAdmittanceMeasure || v == Type::IfcThermalConductivityMeasure || v == Type::IfcThermalExpansionCoefficientMeasure || v == Type::IfcThermalResistanceMeasure || v == Type::IfcThermalTransmittanceMeasure || v == Type::IfcThermodynamicTemperatureMeasure || v == Type::IfcTime || v == Type::IfcTimeMeasure || v == Type::IfcTimeStamp || v == Type::IfcTorqueMeasure || v == Type::IfcValue || v == Type::IfcVaporPermeabilityMeasure || v == Type::IfcVolumeMeasure || v == Type::IfcVolumetricFlowRateMeasure || v == Type::IfcWarpingConstantMeasure || v == Type::IfcWarpingMomentMeasure; + return v == Type::IfcAbsorbedDoseMeasure || v == Type::IfcAccelerationMeasure || v == Type::IfcAmountOfSubstanceMeasure || v == Type::IfcAngularVelocityMeasure || v == Type::IfcArcIndex || v == Type::IfcAreaDensityMeasure || v == Type::IfcAreaMeasure || v == Type::IfcBoolean || v == Type::IfcColour || v == Type::IfcComplexNumber || v == Type::IfcCompoundPlaneAngleMeasure || v == Type::IfcContextDependentMeasure || v == Type::IfcCountMeasure || v == Type::IfcCurvatureMeasure || v == Type::IfcCurveStyleFontSelect || v == Type::IfcDate || v == Type::IfcDateTime || v == Type::IfcDerivedMeasureValue || v == Type::IfcDescriptiveMeasure || v == Type::IfcDoseEquivalentMeasure || v == Type::IfcDuration || v == Type::IfcDynamicViscosityMeasure || v == Type::IfcElectricCapacitanceMeasure || v == Type::IfcElectricChargeMeasure || v == Type::IfcElectricConductanceMeasure || v == Type::IfcElectricCurrentMeasure || v == Type::IfcElectricResistanceMeasure || v == Type::IfcElectricVoltageMeasure || v == Type::IfcEnergyMeasure || v == Type::IfcForceMeasure || v == Type::IfcFrequencyMeasure || v == Type::IfcHeatFluxDensityMeasure || v == Type::IfcHeatingValueMeasure || v == Type::IfcIdentifier || v == Type::IfcIlluminanceMeasure || v == Type::IfcInductanceMeasure || v == Type::IfcInteger || v == Type::IfcIntegerCountRateMeasure || v == Type::IfcIonConcentrationMeasure || v == Type::IfcIsothermalMoistureCapacityMeasure || v == Type::IfcKinematicViscosityMeasure || v == Type::IfcLabel || v == Type::IfcLengthMeasure || v == Type::IfcLineIndex || v == Type::IfcLinearForceMeasure || v == Type::IfcLinearMomentMeasure || v == Type::IfcLinearStiffnessMeasure || v == Type::IfcLinearVelocityMeasure || v == Type::IfcLogical || v == Type::IfcLuminousFluxMeasure || v == Type::IfcLuminousIntensityDistributionMeasure || v == Type::IfcLuminousIntensityMeasure || v == Type::IfcMagneticFluxDensityMeasure || v == Type::IfcMagneticFluxMeasure || v == Type::IfcMassDensityMeasure || v == Type::IfcMassFlowRateMeasure || v == Type::IfcMassMeasure || v == Type::IfcMassPerLengthMeasure || v == Type::IfcMeasureValue || v == Type::IfcModulusOfElasticityMeasure || v == Type::IfcModulusOfLinearSubgradeReactionMeasure || v == Type::IfcModulusOfRotationalSubgradeReactionMeasure || v == Type::IfcModulusOfSubgradeReactionMeasure || v == Type::IfcMoistureDiffusivityMeasure || v == Type::IfcMolecularWeightMeasure || v == Type::IfcMomentOfInertiaMeasure || v == Type::IfcMonetaryMeasure || v == Type::IfcNonNegativeLengthMeasure || v == Type::IfcNormalisedRatioMeasure || v == Type::IfcNullStyle || v == Type::IfcNumericMeasure || v == Type::IfcPHMeasure || v == Type::IfcParameterValue || v == Type::IfcPlanarForceMeasure || v == Type::IfcPlaneAngleMeasure || v == Type::IfcPositiveInteger || v == Type::IfcPositiveLengthMeasure || v == Type::IfcPositivePlaneAngleMeasure || v == Type::IfcPositiveRatioMeasure || v == Type::IfcPowerMeasure || v == Type::IfcPressureMeasure || v == Type::IfcPropertySetDefinitionSet || v == Type::IfcRadioActivityMeasure || v == Type::IfcRatioMeasure || v == Type::IfcReal || v == Type::IfcRotationalFrequencyMeasure || v == Type::IfcRotationalMassMeasure || v == Type::IfcRotationalStiffnessMeasure || v == Type::IfcSectionModulusMeasure || v == Type::IfcSectionalAreaIntegralMeasure || v == Type::IfcShearModulusMeasure || v == Type::IfcSimpleValue || v == Type::IfcSolidAngleMeasure || v == Type::IfcSoundPowerLevelMeasure || v == Type::IfcSoundPowerMeasure || v == Type::IfcSoundPressureLevelMeasure || v == Type::IfcSoundPressureMeasure || v == Type::IfcSpecificHeatCapacityMeasure || v == Type::IfcSpecularExponent || v == Type::IfcSpecularRoughness || v == Type::IfcTemperatureGradientMeasure || v == Type::IfcTemperatureRateOfChangeMeasure || v == Type::IfcText || v == Type::IfcThermalAdmittanceMeasure || v == Type::IfcThermalConductivityMeasure || v == Type::IfcThermalExpansionCoefficientMeasure || v == Type::IfcThermalResistanceMeasure || v == Type::IfcThermalTransmittanceMeasure || v == Type::IfcThermodynamicTemperatureMeasure || v == Type::IfcTime || v == Type::IfcTimeMeasure || v == Type::IfcTimeStamp || v == Type::IfcTorqueMeasure || v == Type::IfcValue || v == Type::IfcVaporPermeabilityMeasure || v == Type::IfcVolumeMeasure || v == Type::IfcVolumetricFlowRateMeasure || v == Type::IfcWarpingConstantMeasure || v == Type::IfcWarpingMomentMeasure; } @@ -5592,19 +4905,22 @@ IfcSectionTypeEnum::IfcSectionTypeEnum IfcSectionTypeEnum::FromString(const std: } const char* IfcSensorTypeEnum::ToString(IfcSensorTypeEnum v) { - if ( v < 0 || v >= 22 ) throw IfcException("Unable to find find keyword in schema"); - const char* names[] = { "CONDUCTANCESENSOR", "CONTACTSENSOR", "FIRESENSOR", "FLOWSENSOR", "GASSENSOR", "HEATSENSOR", "HUMIDITYSENSOR", "IONCONCENTRATIONSENSOR", "LEVELSENSOR", "LIGHTSENSOR", "MOISTURESENSOR", "MOVEMENTSENSOR", "PHSENSOR", "PRESSURESENSOR", "RADIATIONSENSOR", "RADIOACTIVITYSENSOR", "SMOKESENSOR", "SOUNDSENSOR", "TEMPERATURESENSOR", "WINDSENSOR", "USERDEFINED", "NOTDEFINED" }; + if ( v < 0 || v >= 25 ) throw IfcException("Unable to find find keyword in schema"); + const char* names[] = { "CO2SENSOR", "CONDUCTANCESENSOR", "CONTACTSENSOR", "FIRESENSOR", "FLOWSENSOR", "FROSTSENSOR", "GASSENSOR", "HEATSENSOR", "HUMIDITYSENSOR", "IDENTIFIERSENSOR", "IONCONCENTRATIONSENSOR", "LEVELSENSOR", "LIGHTSENSOR", "MOISTURESENSOR", "MOVEMENTSENSOR", "PHSENSOR", "PRESSURESENSOR", "RADIATIONSENSOR", "RADIOACTIVITYSENSOR", "SMOKESENSOR", "SOUNDSENSOR", "TEMPERATURESENSOR", "WINDSENSOR", "USERDEFINED", "NOTDEFINED" }; return names[v]; } IfcSensorTypeEnum::IfcSensorTypeEnum IfcSensorTypeEnum::FromString(const std::string& s) { + if (s == "CO2SENSOR") return ::Ifc4::IfcSensorTypeEnum::IfcSensorType_CO2SENSOR; if (s == "CONDUCTANCESENSOR") return ::Ifc4::IfcSensorTypeEnum::IfcSensorType_CONDUCTANCESENSOR; if (s == "CONTACTSENSOR") return ::Ifc4::IfcSensorTypeEnum::IfcSensorType_CONTACTSENSOR; if (s == "FIRESENSOR") return ::Ifc4::IfcSensorTypeEnum::IfcSensorType_FIRESENSOR; if (s == "FLOWSENSOR") return ::Ifc4::IfcSensorTypeEnum::IfcSensorType_FLOWSENSOR; + if (s == "FROSTSENSOR") return ::Ifc4::IfcSensorTypeEnum::IfcSensorType_FROSTSENSOR; if (s == "GASSENSOR") return ::Ifc4::IfcSensorTypeEnum::IfcSensorType_GASSENSOR; if (s == "HEATSENSOR") return ::Ifc4::IfcSensorTypeEnum::IfcSensorType_HEATSENSOR; if (s == "HUMIDITYSENSOR") return ::Ifc4::IfcSensorTypeEnum::IfcSensorType_HUMIDITYSENSOR; + if (s == "IDENTIFIERSENSOR") return ::Ifc4::IfcSensorTypeEnum::IfcSensorType_IDENTIFIERSENSOR; if (s == "IONCONCENTRATIONSENSOR") return ::Ifc4::IfcSensorTypeEnum::IfcSensorType_IONCONCENTRATIONSENSOR; if (s == "LEVELSENSOR") return ::Ifc4::IfcSensorTypeEnum::IfcSensorType_LEVELSENSOR; if (s == "LIGHTSENSOR") return ::Ifc4::IfcSensorTypeEnum::IfcSensorType_LIGHTSENSOR; @@ -6549,6 +5865,16 @@ IfcAngularVelocityMeasure::IfcAngularVelocityMeasure(IfcAbstractEntity* e) { ent IfcAngularVelocityMeasure::IfcAngularVelocityMeasure(double v) { IfcWritableEntity* e = new IfcWritableEntity(Type::IfcAngularVelocityMeasure); e->setArgument(0, v); entity = e; } IfcAngularVelocityMeasure::operator double() const { return *entity->getArgument(0); } +// Function implementations for IfcArcIndex +IfcUtil::ArgumentType IfcArcIndex::getArgumentType(unsigned int i) const { if (i == 0) { return IfcUtil::Argument_INT; } else { throw IfcParse::IfcAttributeOutOfRangeException("Argument index out of range"); } } +Argument* IfcArcIndex::getArgument(unsigned int i) const { return entity->getArgument(i); } +bool IfcArcIndex::is(Type::Enum v) const { return v == IfcArcIndex::Class(); } +Type::Enum IfcArcIndex::type() const { return Type::IfcArcIndex; } +Type::Enum IfcArcIndex::Class() { return Type::IfcArcIndex; } +IfcArcIndex::IfcArcIndex(IfcAbstractEntity* e) { entity = e; } +IfcArcIndex::IfcArcIndex(std::vector< int > /*[3:3]*/ v) { IfcWritableEntity* e = new IfcWritableEntity(Type::IfcArcIndex); e->setArgument(0, v); entity = e; } +IfcArcIndex::operator std::vector< int > /*[3:3]*/() const { return *entity->getArgument(0); } + // Function implementations for IfcAreaDensityMeasure IfcUtil::ArgumentType IfcAreaDensityMeasure::getArgumentType(unsigned int i) const { if (i == 0) { return IfcUtil::Argument_DOUBLE; } else { throw IfcParse::IfcAttributeOutOfRangeException("Argument index out of range"); } } Argument* IfcAreaDensityMeasure::getArgument(unsigned int i) const { return entity->getArgument(i); } @@ -6569,6 +5895,16 @@ IfcAreaMeasure::IfcAreaMeasure(IfcAbstractEntity* e) { entity = e; } IfcAreaMeasure::IfcAreaMeasure(double v) { IfcWritableEntity* e = new IfcWritableEntity(Type::IfcAreaMeasure); e->setArgument(0, v); entity = e; } IfcAreaMeasure::operator double() const { return *entity->getArgument(0); } +// Function implementations for IfcBinary +IfcUtil::ArgumentType IfcBinary::getArgumentType(unsigned int i) const { if (i == 0) { return IfcUtil::Argument_BINARY; } else { throw IfcParse::IfcAttributeOutOfRangeException("Argument index out of range"); } } +Argument* IfcBinary::getArgument(unsigned int i) const { return entity->getArgument(i); } +bool IfcBinary::is(Type::Enum v) const { return v == IfcBinary::Class(); } +Type::Enum IfcBinary::type() const { return Type::IfcBinary; } +Type::Enum IfcBinary::Class() { return Type::IfcBinary; } +IfcBinary::IfcBinary(IfcAbstractEntity* e) { entity = e; } +IfcBinary::IfcBinary(boost::dynamic_bitset<> v) { IfcWritableEntity* e = new IfcWritableEntity(Type::IfcBinary); e->setArgument(0, v); entity = e; } +IfcBinary::operator boost::dynamic_bitset<>() const { return *entity->getArgument(0); } + // Function implementations for IfcBoolean IfcUtil::ArgumentType IfcBoolean::getArgumentType(unsigned int i) const { if (i == 0) { return IfcUtil::Argument_BOOL; } else { throw IfcParse::IfcAttributeOutOfRangeException("Argument index out of range"); } } Argument* IfcBoolean::getArgument(unsigned int i) const { return entity->getArgument(i); } @@ -6999,6 +6335,16 @@ IfcLengthMeasure::IfcLengthMeasure(IfcAbstractEntity* e) { entity = e; } IfcLengthMeasure::IfcLengthMeasure(double v) { IfcWritableEntity* e = new IfcWritableEntity(Type::IfcLengthMeasure); e->setArgument(0, v); entity = e; } IfcLengthMeasure::operator double() const { return *entity->getArgument(0); } +// Function implementations for IfcLineIndex +IfcUtil::ArgumentType IfcLineIndex::getArgumentType(unsigned int i) const { if (i == 0) { return IfcUtil::Argument_INT; } else { throw IfcParse::IfcAttributeOutOfRangeException("Argument index out of range"); } } +Argument* IfcLineIndex::getArgument(unsigned int i) const { return entity->getArgument(i); } +bool IfcLineIndex::is(Type::Enum v) const { return v == IfcLineIndex::Class(); } +Type::Enum IfcLineIndex::type() const { return Type::IfcLineIndex; } +Type::Enum IfcLineIndex::Class() { return Type::IfcLineIndex; } +IfcLineIndex::IfcLineIndex(IfcAbstractEntity* e) { entity = e; } +IfcLineIndex::IfcLineIndex(std::vector< int > /*[2:?]*/ v) { IfcWritableEntity* e = new IfcWritableEntity(Type::IfcLineIndex); e->setArgument(0, v); entity = e; } +IfcLineIndex::operator std::vector< int > /*[2:?]*/() const { return *entity->getArgument(0); } + // Function implementations for IfcLinearForceMeasure IfcUtil::ArgumentType IfcLinearForceMeasure::getArgumentType(unsigned int i) const { if (i == 0) { return IfcUtil::Argument_DOUBLE; } else { throw IfcParse::IfcAttributeOutOfRangeException("Argument index out of range"); } } Argument* IfcLinearForceMeasure::getArgument(unsigned int i) const { return entity->getArgument(i); } @@ -7299,6 +6645,16 @@ IfcPlaneAngleMeasure::IfcPlaneAngleMeasure(IfcAbstractEntity* e) { entity = e; } IfcPlaneAngleMeasure::IfcPlaneAngleMeasure(double v) { IfcWritableEntity* e = new IfcWritableEntity(Type::IfcPlaneAngleMeasure); e->setArgument(0, v); entity = e; } IfcPlaneAngleMeasure::operator double() const { return *entity->getArgument(0); } +// Function implementations for IfcPositiveInteger +IfcUtil::ArgumentType IfcPositiveInteger::getArgumentType(unsigned int i) const { if (i == 0) { return IfcUtil::Argument_INT; } else { throw IfcParse::IfcAttributeOutOfRangeException("Argument index out of range"); } } +Argument* IfcPositiveInteger::getArgument(unsigned int i) const { return entity->getArgument(i); } +bool IfcPositiveInteger::is(Type::Enum v) const { return v == Type::IfcPositiveInteger || IfcInteger::is(v); } +Type::Enum IfcPositiveInteger::type() const { return Type::IfcPositiveInteger; } +Type::Enum IfcPositiveInteger::Class() { return Type::IfcPositiveInteger; } +IfcPositiveInteger::IfcPositiveInteger(IfcAbstractEntity* e) : IfcInteger((IfcAbstractEntity*)0) { entity = e; } +IfcPositiveInteger::IfcPositiveInteger(int v) : IfcInteger((IfcAbstractEntity*)0) { IfcWritableEntity* e = new IfcWritableEntity(Type::IfcPositiveInteger); e->setArgument(0, v); entity = e; } +IfcPositiveInteger::operator int() const { return *entity->getArgument(0); } + // Function implementations for IfcPositiveLengthMeasure IfcUtil::ArgumentType IfcPositiveLengthMeasure::getArgumentType(unsigned int i) const { if (i == 0) { return IfcUtil::Argument_DOUBLE; } else { throw IfcParse::IfcAttributeOutOfRangeException("Argument index out of range"); } } Argument* IfcPositiveLengthMeasure::getArgument(unsigned int i) const { return entity->getArgument(i); } @@ -8527,7 +7883,6 @@ IfcBuilding::IfcBuilding(IfcAbstractEntity* e) : IfcSpatialStructureElement((Ifc IfcBuilding::IfcBuilding(std::string v1_GlobalId, IfcOwnerHistory* v2_OwnerHistory, boost::optional< std::string > v3_Name, boost::optional< std::string > v4_Description, boost::optional< std::string > v5_ObjectType, IfcObjectPlacement* v6_ObjectPlacement, IfcProductRepresentation* v7_Representation, boost::optional< std::string > v8_LongName, boost::optional< IfcElementCompositionEnum::IfcElementCompositionEnum > v9_CompositionType, boost::optional< double > v10_ElevationOfRefHeight, boost::optional< double > v11_ElevationOfTerrain, IfcPostalAddress* v12_BuildingAddress) : IfcSpatialStructureElement((IfcAbstractEntity*)0) { IfcWritableEntity* e = new IfcWritableEntity(Class()); e->setArgument(0,(v1_GlobalId)); e->setArgument(1,(v2_OwnerHistory)); if (v3_Name) { e->setArgument(2,(*v3_Name)); } else { e->setArgument(2); } if (v4_Description) { e->setArgument(3,(*v4_Description)); } else { e->setArgument(3); } if (v5_ObjectType) { e->setArgument(4,(*v5_ObjectType)); } else { e->setArgument(4); } e->setArgument(5,(v6_ObjectPlacement)); e->setArgument(6,(v7_Representation)); if (v8_LongName) { e->setArgument(7,(*v8_LongName)); } else { e->setArgument(7); } if (v9_CompositionType) { e->setArgument(8,*v9_CompositionType,IfcElementCompositionEnum::ToString(*v9_CompositionType)); } else { e->setArgument(8); } if (v10_ElevationOfRefHeight) { e->setArgument(9,(*v10_ElevationOfRefHeight)); } else { e->setArgument(9); } if (v11_ElevationOfTerrain) { e->setArgument(10,(*v11_ElevationOfTerrain)); } else { e->setArgument(10); } e->setArgument(11,(v12_BuildingAddress)); entity = e; EntityBuffer::Add(this); } // Function implementations for IfcBuildingElement -IfcRelCoversBldgElements::list::ptr IfcBuildingElement::HasCoverings() const { return entity->getInverse(Type::IfcRelCoversBldgElements, 4)->as(); } bool IfcBuildingElement::is(Type::Enum v) const { return v == Type::IfcBuildingElement || IfcElement::is(v); } Type::Enum IfcBuildingElement::type() const { return Type::IfcBuildingElement; } Type::Enum IfcBuildingElement::Class() { return Type::IfcBuildingElement; } @@ -8593,11 +7948,14 @@ IfcBuildingStorey::IfcBuildingStorey(std::string v1_GlobalId, IfcOwnerHistory* v bool IfcBuildingSystem::hasPredefinedType() const { return !entity->getArgument(5)->isNull(); } IfcBuildingSystemTypeEnum::IfcBuildingSystemTypeEnum IfcBuildingSystem::PredefinedType() const { return IfcBuildingSystemTypeEnum::FromString(*entity->getArgument(5)); } void IfcBuildingSystem::setPredefinedType(IfcBuildingSystemTypeEnum::IfcBuildingSystemTypeEnum v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(5,v,IfcBuildingSystemTypeEnum::ToString(v)); } +bool IfcBuildingSystem::hasLongName() const { return !entity->getArgument(6)->isNull(); } +std::string IfcBuildingSystem::LongName() const { return *entity->getArgument(6); } +void IfcBuildingSystem::setLongName(std::string v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(6,v); } bool IfcBuildingSystem::is(Type::Enum v) const { return v == Type::IfcBuildingSystem || IfcSystem::is(v); } Type::Enum IfcBuildingSystem::type() const { return Type::IfcBuildingSystem; } Type::Enum IfcBuildingSystem::Class() { return Type::IfcBuildingSystem; } IfcBuildingSystem::IfcBuildingSystem(IfcAbstractEntity* e) : IfcSystem((IfcAbstractEntity*)0) { if (!e) return; if (!e->is(Type::IfcBuildingSystem)) throw IfcException("Unable to find find keyword in schema"); entity = e; } -IfcBuildingSystem::IfcBuildingSystem(std::string v1_GlobalId, IfcOwnerHistory* v2_OwnerHistory, boost::optional< std::string > v3_Name, boost::optional< std::string > v4_Description, boost::optional< std::string > v5_ObjectType, boost::optional< IfcBuildingSystemTypeEnum::IfcBuildingSystemTypeEnum > v6_PredefinedType) : IfcSystem((IfcAbstractEntity*)0) { IfcWritableEntity* e = new IfcWritableEntity(Class()); e->setArgument(0,(v1_GlobalId)); e->setArgument(1,(v2_OwnerHistory)); if (v3_Name) { e->setArgument(2,(*v3_Name)); } else { e->setArgument(2); } if (v4_Description) { e->setArgument(3,(*v4_Description)); } else { e->setArgument(3); } if (v5_ObjectType) { e->setArgument(4,(*v5_ObjectType)); } else { e->setArgument(4); } if (v6_PredefinedType) { e->setArgument(5,*v6_PredefinedType,IfcBuildingSystemTypeEnum::ToString(*v6_PredefinedType)); } else { e->setArgument(5); } entity = e; EntityBuffer::Add(this); } +IfcBuildingSystem::IfcBuildingSystem(std::string v1_GlobalId, IfcOwnerHistory* v2_OwnerHistory, boost::optional< std::string > v3_Name, boost::optional< std::string > v4_Description, boost::optional< std::string > v5_ObjectType, boost::optional< IfcBuildingSystemTypeEnum::IfcBuildingSystemTypeEnum > v6_PredefinedType, boost::optional< std::string > v7_LongName) : IfcSystem((IfcAbstractEntity*)0) { IfcWritableEntity* e = new IfcWritableEntity(Class()); e->setArgument(0,(v1_GlobalId)); e->setArgument(1,(v2_OwnerHistory)); if (v3_Name) { e->setArgument(2,(*v3_Name)); } else { e->setArgument(2); } if (v4_Description) { e->setArgument(3,(*v4_Description)); } else { e->setArgument(3); } if (v5_ObjectType) { e->setArgument(4,(*v5_ObjectType)); } else { e->setArgument(4); } if (v6_PredefinedType) { e->setArgument(5,*v6_PredefinedType,IfcBuildingSystemTypeEnum::ToString(*v6_PredefinedType)); } else { e->setArgument(5); } if (v7_LongName) { e->setArgument(6,(*v7_LongName)); } else { e->setArgument(6); } entity = e; EntityBuffer::Add(this); } // Function implementations for IfcBurner bool IfcBurner::hasPredefinedType() const { return !entity->getArgument(8)->isNull(); } @@ -8728,6 +8086,15 @@ Type::Enum IfcCartesianPointList::Class() { return Type::IfcCartesianPointList; IfcCartesianPointList::IfcCartesianPointList(IfcAbstractEntity* e) : IfcGeometricRepresentationItem((IfcAbstractEntity*)0) { if (!e) return; if (!e->is(Type::IfcCartesianPointList)) throw IfcException("Unable to find find keyword in schema"); entity = e; } IfcCartesianPointList::IfcCartesianPointList() : IfcGeometricRepresentationItem((IfcAbstractEntity*)0) { IfcWritableEntity* e = new IfcWritableEntity(Class()); entity = e; EntityBuffer::Add(this); } +// Function implementations for IfcCartesianPointList2D +std::vector< std::vector< double > > IfcCartesianPointList2D::CoordList() const { return *entity->getArgument(0); } +void IfcCartesianPointList2D::setCoordList(std::vector< std::vector< double > > v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(0,v); } +bool IfcCartesianPointList2D::is(Type::Enum v) const { return v == Type::IfcCartesianPointList2D || IfcCartesianPointList::is(v); } +Type::Enum IfcCartesianPointList2D::type() const { return Type::IfcCartesianPointList2D; } +Type::Enum IfcCartesianPointList2D::Class() { return Type::IfcCartesianPointList2D; } +IfcCartesianPointList2D::IfcCartesianPointList2D(IfcAbstractEntity* e) : IfcCartesianPointList((IfcAbstractEntity*)0) { if (!e) return; if (!e->is(Type::IfcCartesianPointList2D)) throw IfcException("Unable to find find keyword in schema"); entity = e; } +IfcCartesianPointList2D::IfcCartesianPointList2D(std::vector< std::vector< double > > v1_CoordList) : IfcCartesianPointList((IfcAbstractEntity*)0) { IfcWritableEntity* e = new IfcWritableEntity(Class()); e->setArgument(0,(v1_CoordList)); entity = e; EntityBuffer::Add(this); } + // Function implementations for IfcCartesianPointList3D std::vector< std::vector< double > > IfcCartesianPointList3D::CoordList() const { return *entity->getArgument(0); } void IfcCartesianPointList3D::setCoordList(std::vector< std::vector< double > > v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(0,v); } @@ -9480,22 +8847,23 @@ IfcCoordinateOperation::IfcCoordinateOperation(IfcAbstractEntity* e) : IfcUtil:: IfcCoordinateOperation::IfcCoordinateOperation(IfcCoordinateReferenceSystemSelect* v1_SourceCRS, IfcCoordinateReferenceSystem* v2_TargetCRS) : IfcUtil::IfcBaseEntity() { IfcWritableEntity* e = new IfcWritableEntity(Class()); e->setArgument(0,(v1_SourceCRS)); e->setArgument(1,(v2_TargetCRS)); entity = e; EntityBuffer::Add(this); } // Function implementations for IfcCoordinateReferenceSystem -bool IfcCoordinateReferenceSystem::hasName() const { return !entity->getArgument(0)->isNull(); } std::string IfcCoordinateReferenceSystem::Name() const { return *entity->getArgument(0); } void IfcCoordinateReferenceSystem::setName(std::string v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(0,v); } bool IfcCoordinateReferenceSystem::hasDescription() const { return !entity->getArgument(1)->isNull(); } std::string IfcCoordinateReferenceSystem::Description() const { return *entity->getArgument(1); } void IfcCoordinateReferenceSystem::setDescription(std::string v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(1,v); } +bool IfcCoordinateReferenceSystem::hasGeodeticDatum() const { return !entity->getArgument(2)->isNull(); } std::string IfcCoordinateReferenceSystem::GeodeticDatum() const { return *entity->getArgument(2); } void IfcCoordinateReferenceSystem::setGeodeticDatum(std::string v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(2,v); } bool IfcCoordinateReferenceSystem::hasVerticalDatum() const { return !entity->getArgument(3)->isNull(); } std::string IfcCoordinateReferenceSystem::VerticalDatum() const { return *entity->getArgument(3); } void IfcCoordinateReferenceSystem::setVerticalDatum(std::string v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(3,v); } +IfcCoordinateOperation::list::ptr IfcCoordinateReferenceSystem::HasCoordinateOperation() const { return entity->getInverse(Type::IfcCoordinateOperation, 0)->as(); } bool IfcCoordinateReferenceSystem::is(Type::Enum v) const { return v == Type::IfcCoordinateReferenceSystem; } Type::Enum IfcCoordinateReferenceSystem::type() const { return Type::IfcCoordinateReferenceSystem; } Type::Enum IfcCoordinateReferenceSystem::Class() { return Type::IfcCoordinateReferenceSystem; } IfcCoordinateReferenceSystem::IfcCoordinateReferenceSystem(IfcAbstractEntity* e) : IfcUtil::IfcBaseEntity() { if (!e) return; if (!e->is(Type::IfcCoordinateReferenceSystem)) throw IfcException("Unable to find find keyword in schema"); entity = e; } -IfcCoordinateReferenceSystem::IfcCoordinateReferenceSystem(boost::optional< std::string > v1_Name, boost::optional< std::string > v2_Description, std::string v3_GeodeticDatum, boost::optional< std::string > v4_VerticalDatum) : IfcUtil::IfcBaseEntity() { IfcWritableEntity* e = new IfcWritableEntity(Class()); if (v1_Name) { e->setArgument(0,(*v1_Name)); } else { e->setArgument(0); } if (v2_Description) { e->setArgument(1,(*v2_Description)); } else { e->setArgument(1); } e->setArgument(2,(v3_GeodeticDatum)); if (v4_VerticalDatum) { e->setArgument(3,(*v4_VerticalDatum)); } else { e->setArgument(3); } entity = e; EntityBuffer::Add(this); } +IfcCoordinateReferenceSystem::IfcCoordinateReferenceSystem(std::string v1_Name, boost::optional< std::string > v2_Description, boost::optional< std::string > v3_GeodeticDatum, boost::optional< std::string > v4_VerticalDatum) : IfcUtil::IfcBaseEntity() { IfcWritableEntity* e = new IfcWritableEntity(Class()); e->setArgument(0,(v1_Name)); if (v2_Description) { e->setArgument(1,(*v2_Description)); } else { e->setArgument(1); } if (v3_GeodeticDatum) { e->setArgument(2,(*v3_GeodeticDatum)); } else { e->setArgument(2); } if (v4_VerticalDatum) { e->setArgument(3,(*v4_VerticalDatum)); } else { e->setArgument(3); } entity = e; EntityBuffer::Add(this); } // Function implementations for IfcCostItem bool IfcCostItem::hasPredefinedType() const { return !entity->getArgument(6)->isNull(); } @@ -10386,6 +9754,7 @@ IfcRelConnectsWithRealizingElements::list::ptr IfcElement::IsConnectionRealizati IfcRelSpaceBoundary::list::ptr IfcElement::ProvidesBoundaries() const { return entity->getInverse(Type::IfcRelSpaceBoundary, 5)->as(); } IfcRelConnectsElements::list::ptr IfcElement::ConnectedFrom() const { return entity->getInverse(Type::IfcRelConnectsElements, 6)->as(); } IfcRelContainedInSpatialStructure::list::ptr IfcElement::ContainedInStructure() const { return entity->getInverse(Type::IfcRelContainedInSpatialStructure, 4)->as(); } +IfcRelCoversBldgElements::list::ptr IfcElement::HasCoverings() const { return entity->getInverse(Type::IfcRelCoversBldgElements, 4)->as(); } bool IfcElement::is(Type::Enum v) const { return v == Type::IfcElement || IfcProduct::is(v); } Type::Enum IfcElement::type() const { return Type::IfcElement; } Type::Enum IfcElement::Class() { return Type::IfcElement; } @@ -11191,6 +10560,7 @@ bool IfcGeometricRepresentationContext::hasTrueNorth() const { return !entity->g IfcDirection* IfcGeometricRepresentationContext::TrueNorth() const { return (IfcDirection*)((IfcUtil::IfcBaseClass*)(*entity->getArgument(5))); } void IfcGeometricRepresentationContext::setTrueNorth(IfcDirection* v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(5,v); } IfcGeometricRepresentationSubContext::list::ptr IfcGeometricRepresentationContext::HasSubContexts() const { return entity->getInverse(Type::IfcGeometricRepresentationSubContext, 6)->as(); } +IfcCoordinateOperation::list::ptr IfcGeometricRepresentationContext::HasCoordinateOperation() const { return entity->getInverse(Type::IfcCoordinateOperation, 0)->as(); } bool IfcGeometricRepresentationContext::is(Type::Enum v) const { return v == Type::IfcGeometricRepresentationContext || IfcRepresentationContext::is(v); } Type::Enum IfcGeometricRepresentationContext::type() const { return Type::IfcGeometricRepresentationContext; } Type::Enum IfcGeometricRepresentationContext::Class() { return Type::IfcGeometricRepresentationContext; } @@ -11384,6 +10754,21 @@ Type::Enum IfcIndexedColourMap::Class() { return Type::IfcIndexedColourMap; } IfcIndexedColourMap::IfcIndexedColourMap(IfcAbstractEntity* e) : IfcPresentationItem((IfcAbstractEntity*)0) { if (!e) return; if (!e->is(Type::IfcIndexedColourMap)) throw IfcException("Unable to find find keyword in schema"); entity = e; } IfcIndexedColourMap::IfcIndexedColourMap(IfcTessellatedFaceSet* v1_MappedTo, IfcSurfaceStyleShading* v2_Overrides, IfcColourRgbList* v3_Colours, std::vector< int > /*[1:?]*/ v4_ColourIndex) : IfcPresentationItem((IfcAbstractEntity*)0) { IfcWritableEntity* e = new IfcWritableEntity(Class()); e->setArgument(0,(v1_MappedTo)); e->setArgument(1,(v2_Overrides)); e->setArgument(2,(v3_Colours)); e->setArgument(3,(v4_ColourIndex)); entity = e; EntityBuffer::Add(this); } +// Function implementations for IfcIndexedPolyCurve +IfcCartesianPointList* IfcIndexedPolyCurve::Points() const { return (IfcCartesianPointList*)((IfcUtil::IfcBaseClass*)(*entity->getArgument(0))); } +void IfcIndexedPolyCurve::setPoints(IfcCartesianPointList* v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(0,v); } +bool IfcIndexedPolyCurve::hasSegments() const { return !entity->getArgument(1)->isNull(); } +IfcEntityList::ptr IfcIndexedPolyCurve::Segments() const { return *entity->getArgument(1); } +void IfcIndexedPolyCurve::setSegments(IfcEntityList::ptr v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(1,v); } +bool IfcIndexedPolyCurve::hasSelfIntersect() const { return !entity->getArgument(2)->isNull(); } +bool IfcIndexedPolyCurve::SelfIntersect() const { return *entity->getArgument(2); } +void IfcIndexedPolyCurve::setSelfIntersect(bool v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(2,v); } +bool IfcIndexedPolyCurve::is(Type::Enum v) const { return v == Type::IfcIndexedPolyCurve || IfcBoundedCurve::is(v); } +Type::Enum IfcIndexedPolyCurve::type() const { return Type::IfcIndexedPolyCurve; } +Type::Enum IfcIndexedPolyCurve::Class() { return Type::IfcIndexedPolyCurve; } +IfcIndexedPolyCurve::IfcIndexedPolyCurve(IfcAbstractEntity* e) : IfcBoundedCurve((IfcAbstractEntity*)0) { if (!e) return; if (!e->is(Type::IfcIndexedPolyCurve)) throw IfcException("Unable to find find keyword in schema"); entity = e; } +IfcIndexedPolyCurve::IfcIndexedPolyCurve(IfcCartesianPointList* v1_Points, boost::optional< IfcEntityList::ptr > v2_Segments, boost::optional< bool > v3_SelfIntersect) : IfcBoundedCurve((IfcAbstractEntity*)0) { IfcWritableEntity* e = new IfcWritableEntity(Class()); e->setArgument(0,(v1_Points)); if (v2_Segments) { e->setArgument(1,(*v2_Segments)); } else { e->setArgument(1); } if (v3_SelfIntersect) { e->setArgument(2,(*v3_SelfIntersect)); } else { e->setArgument(2); } entity = e; EntityBuffer::Add(this); } + // Function implementations for IfcIndexedTextureMap IfcTessellatedFaceSet* IfcIndexedTextureMap::MappedTo() const { return (IfcTessellatedFaceSet*)((IfcUtil::IfcBaseClass*)(*entity->getArgument(1))); } void IfcIndexedTextureMap::setMappedTo(IfcTessellatedFaceSet* v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(1,v); } @@ -12175,6 +11560,7 @@ void IfcMetric::setBenchmark(IfcBenchmarkEnum::IfcBenchmarkEnum v) { if ( ! enti bool IfcMetric::hasValueSource() const { return !entity->getArgument(8)->isNull(); } std::string IfcMetric::ValueSource() const { return *entity->getArgument(8); } void IfcMetric::setValueSource(std::string v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(8,v); } +bool IfcMetric::hasDataValue() const { return !entity->getArgument(9)->isNull(); } IfcMetricValueSelect* IfcMetric::DataValue() const { return (IfcMetricValueSelect*)((IfcUtil::IfcBaseClass*)(*entity->getArgument(9))); } void IfcMetric::setDataValue(IfcMetricValueSelect* v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(9,v); } bool IfcMetric::hasReferencePath() const { return !entity->getArgument(10)->isNull(); } @@ -13092,7 +12478,7 @@ bool IfcProjectedCRS::is(Type::Enum v) const { return v == Type::IfcProjectedCRS Type::Enum IfcProjectedCRS::type() const { return Type::IfcProjectedCRS; } Type::Enum IfcProjectedCRS::Class() { return Type::IfcProjectedCRS; } IfcProjectedCRS::IfcProjectedCRS(IfcAbstractEntity* e) : IfcCoordinateReferenceSystem((IfcAbstractEntity*)0) { if (!e) return; if (!e->is(Type::IfcProjectedCRS)) throw IfcException("Unable to find find keyword in schema"); entity = e; } -IfcProjectedCRS::IfcProjectedCRS(boost::optional< std::string > v1_Name, boost::optional< std::string > v2_Description, std::string v3_GeodeticDatum, boost::optional< std::string > v4_VerticalDatum, boost::optional< std::string > v5_MapProjection, boost::optional< std::string > v6_MapZone, IfcNamedUnit* v7_MapUnit) : IfcCoordinateReferenceSystem((IfcAbstractEntity*)0) { IfcWritableEntity* e = new IfcWritableEntity(Class()); if (v1_Name) { e->setArgument(0,(*v1_Name)); } else { e->setArgument(0); } if (v2_Description) { e->setArgument(1,(*v2_Description)); } else { e->setArgument(1); } e->setArgument(2,(v3_GeodeticDatum)); if (v4_VerticalDatum) { e->setArgument(3,(*v4_VerticalDatum)); } else { e->setArgument(3); } if (v5_MapProjection) { e->setArgument(4,(*v5_MapProjection)); } else { e->setArgument(4); } if (v6_MapZone) { e->setArgument(5,(*v6_MapZone)); } else { e->setArgument(5); } e->setArgument(6,(v7_MapUnit)); entity = e; EntityBuffer::Add(this); } +IfcProjectedCRS::IfcProjectedCRS(std::string v1_Name, boost::optional< std::string > v2_Description, boost::optional< std::string > v3_GeodeticDatum, boost::optional< std::string > v4_VerticalDatum, boost::optional< std::string > v5_MapProjection, boost::optional< std::string > v6_MapZone, IfcNamedUnit* v7_MapUnit) : IfcCoordinateReferenceSystem((IfcAbstractEntity*)0) { IfcWritableEntity* e = new IfcWritableEntity(Class()); e->setArgument(0,(v1_Name)); if (v2_Description) { e->setArgument(1,(*v2_Description)); } else { e->setArgument(1); } if (v3_GeodeticDatum) { e->setArgument(2,(*v3_GeodeticDatum)); } else { e->setArgument(2); } if (v4_VerticalDatum) { e->setArgument(3,(*v4_VerticalDatum)); } else { e->setArgument(3); } if (v5_MapProjection) { e->setArgument(4,(*v5_MapProjection)); } else { e->setArgument(4); } if (v6_MapZone) { e->setArgument(5,(*v6_MapZone)); } else { e->setArgument(5); } e->setArgument(6,(v7_MapUnit)); entity = e; EntityBuffer::Add(this); } // Function implementations for IfcProjectionElement bool IfcProjectionElement::hasPredefinedType() const { return !entity->getArgument(8)->isNull(); } @@ -13114,6 +12500,8 @@ IfcPropertySet::list::ptr IfcProperty::PartOfPset() const { return entity->getIn IfcPropertyDependencyRelationship::list::ptr IfcProperty::PropertyForDependance() const { return entity->getInverse(Type::IfcPropertyDependencyRelationship, 2)->as(); } IfcPropertyDependencyRelationship::list::ptr IfcProperty::PropertyDependsOn() const { return entity->getInverse(Type::IfcPropertyDependencyRelationship, 3)->as(); } IfcComplexProperty::list::ptr IfcProperty::PartOfComplex() const { return entity->getInverse(Type::IfcComplexProperty, 3)->as(); } +IfcResourceConstraintRelationship::list::ptr IfcProperty::HasConstraints() const { return entity->getInverse(Type::IfcResourceConstraintRelationship, 3)->as(); } +IfcResourceApprovalRelationship::list::ptr IfcProperty::HasApprovals() const { return entity->getInverse(Type::IfcResourceApprovalRelationship, 2)->as(); } bool IfcProperty::is(Type::Enum v) const { return v == Type::IfcProperty || IfcPropertyAbstraction::is(v); } Type::Enum IfcProperty::type() const { return Type::IfcProperty; } Type::Enum IfcProperty::Class() { return Type::IfcProperty; } @@ -14012,10 +13400,10 @@ IfcRelConnectsElements::IfcRelConnectsElements(IfcAbstractEntity* e) : IfcRelCon IfcRelConnectsElements::IfcRelConnectsElements(std::string v1_GlobalId, IfcOwnerHistory* v2_OwnerHistory, boost::optional< std::string > v3_Name, boost::optional< std::string > v4_Description, IfcConnectionGeometry* v5_ConnectionGeometry, IfcElement* v6_RelatingElement, IfcElement* v7_RelatedElement) : IfcRelConnects((IfcAbstractEntity*)0) { IfcWritableEntity* e = new IfcWritableEntity(Class()); e->setArgument(0,(v1_GlobalId)); e->setArgument(1,(v2_OwnerHistory)); if (v3_Name) { e->setArgument(2,(*v3_Name)); } else { e->setArgument(2); } if (v4_Description) { e->setArgument(3,(*v4_Description)); } else { e->setArgument(3); } e->setArgument(4,(v5_ConnectionGeometry)); e->setArgument(5,(v6_RelatingElement)); e->setArgument(6,(v7_RelatedElement)); entity = e; EntityBuffer::Add(this); } // Function implementations for IfcRelConnectsPathElements -std::vector< double > /*[0:?]*/ IfcRelConnectsPathElements::RelatingPriorities() const { return *entity->getArgument(7); } -void IfcRelConnectsPathElements::setRelatingPriorities(std::vector< double > /*[0:?]*/ v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(7,v); } -std::vector< double > /*[0:?]*/ IfcRelConnectsPathElements::RelatedPriorities() const { return *entity->getArgument(8); } -void IfcRelConnectsPathElements::setRelatedPriorities(std::vector< double > /*[0:?]*/ v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(8,v); } +std::vector< int > /*[0:?]*/ IfcRelConnectsPathElements::RelatingPriorities() const { return *entity->getArgument(7); } +void IfcRelConnectsPathElements::setRelatingPriorities(std::vector< int > /*[0:?]*/ v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(7,v); } +std::vector< int > /*[0:?]*/ IfcRelConnectsPathElements::RelatedPriorities() const { return *entity->getArgument(8); } +void IfcRelConnectsPathElements::setRelatedPriorities(std::vector< int > /*[0:?]*/ v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(8,v); } IfcConnectionTypeEnum::IfcConnectionTypeEnum IfcRelConnectsPathElements::RelatedConnectionType() const { return IfcConnectionTypeEnum::FromString(*entity->getArgument(9)); } void IfcRelConnectsPathElements::setRelatedConnectionType(IfcConnectionTypeEnum::IfcConnectionTypeEnum v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(9,v,IfcConnectionTypeEnum::ToString(v)); } IfcConnectionTypeEnum::IfcConnectionTypeEnum IfcRelConnectsPathElements::RelatingConnectionType() const { return IfcConnectionTypeEnum::FromString(*entity->getArgument(10)); } @@ -14024,7 +13412,7 @@ bool IfcRelConnectsPathElements::is(Type::Enum v) const { return v == Type::IfcR Type::Enum IfcRelConnectsPathElements::type() const { return Type::IfcRelConnectsPathElements; } Type::Enum IfcRelConnectsPathElements::Class() { return Type::IfcRelConnectsPathElements; } IfcRelConnectsPathElements::IfcRelConnectsPathElements(IfcAbstractEntity* e) : IfcRelConnectsElements((IfcAbstractEntity*)0) { if (!e) return; if (!e->is(Type::IfcRelConnectsPathElements)) throw IfcException("Unable to find find keyword in schema"); entity = e; } -IfcRelConnectsPathElements::IfcRelConnectsPathElements(std::string v1_GlobalId, IfcOwnerHistory* v2_OwnerHistory, boost::optional< std::string > v3_Name, boost::optional< std::string > v4_Description, IfcConnectionGeometry* v5_ConnectionGeometry, IfcElement* v6_RelatingElement, IfcElement* v7_RelatedElement, std::vector< double > /*[0:?]*/ v8_RelatingPriorities, std::vector< double > /*[0:?]*/ v9_RelatedPriorities, IfcConnectionTypeEnum::IfcConnectionTypeEnum v10_RelatedConnectionType, IfcConnectionTypeEnum::IfcConnectionTypeEnum v11_RelatingConnectionType) : IfcRelConnectsElements((IfcAbstractEntity*)0) { IfcWritableEntity* e = new IfcWritableEntity(Class()); e->setArgument(0,(v1_GlobalId)); e->setArgument(1,(v2_OwnerHistory)); if (v3_Name) { e->setArgument(2,(*v3_Name)); } else { e->setArgument(2); } if (v4_Description) { e->setArgument(3,(*v4_Description)); } else { e->setArgument(3); } e->setArgument(4,(v5_ConnectionGeometry)); e->setArgument(5,(v6_RelatingElement)); e->setArgument(6,(v7_RelatedElement)); e->setArgument(7,(v8_RelatingPriorities)); e->setArgument(8,(v9_RelatedPriorities)); e->setArgument(9,v10_RelatedConnectionType,IfcConnectionTypeEnum::ToString(v10_RelatedConnectionType)); e->setArgument(10,v11_RelatingConnectionType,IfcConnectionTypeEnum::ToString(v11_RelatingConnectionType)); entity = e; EntityBuffer::Add(this); } +IfcRelConnectsPathElements::IfcRelConnectsPathElements(std::string v1_GlobalId, IfcOwnerHistory* v2_OwnerHistory, boost::optional< std::string > v3_Name, boost::optional< std::string > v4_Description, IfcConnectionGeometry* v5_ConnectionGeometry, IfcElement* v6_RelatingElement, IfcElement* v7_RelatedElement, std::vector< int > /*[0:?]*/ v8_RelatingPriorities, std::vector< int > /*[0:?]*/ v9_RelatedPriorities, IfcConnectionTypeEnum::IfcConnectionTypeEnum v10_RelatedConnectionType, IfcConnectionTypeEnum::IfcConnectionTypeEnum v11_RelatingConnectionType) : IfcRelConnectsElements((IfcAbstractEntity*)0) { IfcWritableEntity* e = new IfcWritableEntity(Class()); e->setArgument(0,(v1_GlobalId)); e->setArgument(1,(v2_OwnerHistory)); if (v3_Name) { e->setArgument(2,(*v3_Name)); } else { e->setArgument(2); } if (v4_Description) { e->setArgument(3,(*v4_Description)); } else { e->setArgument(3); } e->setArgument(4,(v5_ConnectionGeometry)); e->setArgument(5,(v6_RelatingElement)); e->setArgument(6,(v7_RelatedElement)); e->setArgument(7,(v8_RelatingPriorities)); e->setArgument(8,(v9_RelatedPriorities)); e->setArgument(9,v10_RelatedConnectionType,IfcConnectionTypeEnum::ToString(v10_RelatedConnectionType)); e->setArgument(10,v11_RelatingConnectionType,IfcConnectionTypeEnum::ToString(v11_RelatingConnectionType)); entity = e; EntityBuffer::Add(this); } // Function implementations for IfcRelConnectsPortToElement IfcPort* IfcRelConnectsPortToElement::RelatingPort() const { return (IfcPort*)((IfcUtil::IfcBaseClass*)(*entity->getArgument(4))); } @@ -15083,9 +14471,9 @@ IfcStair::IfcStair(IfcAbstractEntity* e) : IfcBuildingElement((IfcAbstractEntity IfcStair::IfcStair(std::string v1_GlobalId, IfcOwnerHistory* v2_OwnerHistory, boost::optional< std::string > v3_Name, boost::optional< std::string > v4_Description, boost::optional< std::string > v5_ObjectType, IfcObjectPlacement* v6_ObjectPlacement, IfcProductRepresentation* v7_Representation, boost::optional< std::string > v8_Tag, boost::optional< IfcStairTypeEnum::IfcStairTypeEnum > v9_PredefinedType) : IfcBuildingElement((IfcAbstractEntity*)0) { IfcWritableEntity* e = new IfcWritableEntity(Class()); e->setArgument(0,(v1_GlobalId)); e->setArgument(1,(v2_OwnerHistory)); if (v3_Name) { e->setArgument(2,(*v3_Name)); } else { e->setArgument(2); } if (v4_Description) { e->setArgument(3,(*v4_Description)); } else { e->setArgument(3); } if (v5_ObjectType) { e->setArgument(4,(*v5_ObjectType)); } else { e->setArgument(4); } e->setArgument(5,(v6_ObjectPlacement)); e->setArgument(6,(v7_Representation)); if (v8_Tag) { e->setArgument(7,(*v8_Tag)); } else { e->setArgument(7); } if (v9_PredefinedType) { e->setArgument(8,*v9_PredefinedType,IfcStairTypeEnum::ToString(*v9_PredefinedType)); } else { e->setArgument(8); } entity = e; EntityBuffer::Add(this); } // Function implementations for IfcStairFlight -bool IfcStairFlight::hasNumberOfRiser() const { return !entity->getArgument(8)->isNull(); } -int IfcStairFlight::NumberOfRiser() const { return *entity->getArgument(8); } -void IfcStairFlight::setNumberOfRiser(int v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(8,v); } +bool IfcStairFlight::hasNumberOfRisers() const { return !entity->getArgument(8)->isNull(); } +int IfcStairFlight::NumberOfRisers() const { return *entity->getArgument(8); } +void IfcStairFlight::setNumberOfRisers(int v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(8,v); } bool IfcStairFlight::hasNumberOfTreads() const { return !entity->getArgument(9)->isNull(); } int IfcStairFlight::NumberOfTreads() const { return *entity->getArgument(9); } void IfcStairFlight::setNumberOfTreads(int v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(9,v); } @@ -15102,7 +14490,7 @@ bool IfcStairFlight::is(Type::Enum v) const { return v == Type::IfcStairFlight | Type::Enum IfcStairFlight::type() const { return Type::IfcStairFlight; } Type::Enum IfcStairFlight::Class() { return Type::IfcStairFlight; } IfcStairFlight::IfcStairFlight(IfcAbstractEntity* e) : IfcBuildingElement((IfcAbstractEntity*)0) { if (!e) return; if (!e->is(Type::IfcStairFlight)) throw IfcException("Unable to find find keyword in schema"); entity = e; } -IfcStairFlight::IfcStairFlight(std::string v1_GlobalId, IfcOwnerHistory* v2_OwnerHistory, boost::optional< std::string > v3_Name, boost::optional< std::string > v4_Description, boost::optional< std::string > v5_ObjectType, IfcObjectPlacement* v6_ObjectPlacement, IfcProductRepresentation* v7_Representation, boost::optional< std::string > v8_Tag, boost::optional< int > v9_NumberOfRiser, boost::optional< int > v10_NumberOfTreads, boost::optional< double > v11_RiserHeight, boost::optional< double > v12_TreadLength, boost::optional< IfcStairFlightTypeEnum::IfcStairFlightTypeEnum > v13_PredefinedType) : IfcBuildingElement((IfcAbstractEntity*)0) { IfcWritableEntity* e = new IfcWritableEntity(Class()); e->setArgument(0,(v1_GlobalId)); e->setArgument(1,(v2_OwnerHistory)); if (v3_Name) { e->setArgument(2,(*v3_Name)); } else { e->setArgument(2); } if (v4_Description) { e->setArgument(3,(*v4_Description)); } else { e->setArgument(3); } if (v5_ObjectType) { e->setArgument(4,(*v5_ObjectType)); } else { e->setArgument(4); } e->setArgument(5,(v6_ObjectPlacement)); e->setArgument(6,(v7_Representation)); if (v8_Tag) { e->setArgument(7,(*v8_Tag)); } else { e->setArgument(7); } if (v9_NumberOfRiser) { e->setArgument(8,(*v9_NumberOfRiser)); } else { e->setArgument(8); } if (v10_NumberOfTreads) { e->setArgument(9,(*v10_NumberOfTreads)); } else { e->setArgument(9); } if (v11_RiserHeight) { e->setArgument(10,(*v11_RiserHeight)); } else { e->setArgument(10); } if (v12_TreadLength) { e->setArgument(11,(*v12_TreadLength)); } else { e->setArgument(11); } if (v13_PredefinedType) { e->setArgument(12,*v13_PredefinedType,IfcStairFlightTypeEnum::ToString(*v13_PredefinedType)); } else { e->setArgument(12); } entity = e; EntityBuffer::Add(this); } +IfcStairFlight::IfcStairFlight(std::string v1_GlobalId, IfcOwnerHistory* v2_OwnerHistory, boost::optional< std::string > v3_Name, boost::optional< std::string > v4_Description, boost::optional< std::string > v5_ObjectType, IfcObjectPlacement* v6_ObjectPlacement, IfcProductRepresentation* v7_Representation, boost::optional< std::string > v8_Tag, boost::optional< int > v9_NumberOfRisers, boost::optional< int > v10_NumberOfTreads, boost::optional< double > v11_RiserHeight, boost::optional< double > v12_TreadLength, boost::optional< IfcStairFlightTypeEnum::IfcStairFlightTypeEnum > v13_PredefinedType) : IfcBuildingElement((IfcAbstractEntity*)0) { IfcWritableEntity* e = new IfcWritableEntity(Class()); e->setArgument(0,(v1_GlobalId)); e->setArgument(1,(v2_OwnerHistory)); if (v3_Name) { e->setArgument(2,(*v3_Name)); } else { e->setArgument(2); } if (v4_Description) { e->setArgument(3,(*v4_Description)); } else { e->setArgument(3); } if (v5_ObjectType) { e->setArgument(4,(*v5_ObjectType)); } else { e->setArgument(4); } e->setArgument(5,(v6_ObjectPlacement)); e->setArgument(6,(v7_Representation)); if (v8_Tag) { e->setArgument(7,(*v8_Tag)); } else { e->setArgument(7); } if (v9_NumberOfRisers) { e->setArgument(8,(*v9_NumberOfRisers)); } else { e->setArgument(8); } if (v10_NumberOfTreads) { e->setArgument(9,(*v10_NumberOfTreads)); } else { e->setArgument(9); } if (v11_RiserHeight) { e->setArgument(10,(*v11_RiserHeight)); } else { e->setArgument(10); } if (v12_TreadLength) { e->setArgument(11,(*v12_TreadLength)); } else { e->setArgument(11); } if (v13_PredefinedType) { e->setArgument(12,*v13_PredefinedType,IfcStairFlightTypeEnum::ToString(*v13_PredefinedType)); } else { e->setArgument(12); } entity = e; EntityBuffer::Add(this); } // Function implementations for IfcStairFlightType IfcStairFlightTypeEnum::IfcStairFlightTypeEnum IfcStairFlightType::PredefinedType() const { return IfcStairFlightTypeEnum::FromString(*entity->getArgument(9)); } @@ -15963,7 +15351,6 @@ void IfcTableRow::setRowCells(IfcEntityList::ptr v) { if ( ! entity->isWritable( bool IfcTableRow::hasIsHeading() const { return !entity->getArgument(1)->isNull(); } bool IfcTableRow::IsHeading() const { return *entity->getArgument(1); } void IfcTableRow::setIsHeading(bool v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(1,v); } -IfcTable::list::ptr IfcTableRow::OfTable() const { return entity->getInverse(Type::IfcTable, 1)->as(); } bool IfcTableRow::is(Type::Enum v) const { return v == Type::IfcTableRow; } Type::Enum IfcTableRow::type() const { return Type::IfcTableRow; } Type::Enum IfcTableRow::Class() { return Type::IfcTableRow; } @@ -16072,13 +15459,13 @@ IfcTaskTime::IfcTaskTime(IfcAbstractEntity* e) : IfcSchedulingTime((IfcAbstractE IfcTaskTime::IfcTaskTime(boost::optional< std::string > v1_Name, boost::optional< IfcDataOriginEnum::IfcDataOriginEnum > v2_DataOrigin, boost::optional< std::string > v3_UserDefinedDataOrigin, boost::optional< IfcTaskDurationEnum::IfcTaskDurationEnum > v4_DurationType, boost::optional< std::string > v5_ScheduleDuration, boost::optional< std::string > v6_ScheduleStart, boost::optional< std::string > v7_ScheduleFinish, boost::optional< std::string > v8_EarlyStart, boost::optional< std::string > v9_EarlyFinish, boost::optional< std::string > v10_LateStart, boost::optional< std::string > v11_LateFinish, boost::optional< std::string > v12_FreeFloat, boost::optional< std::string > v13_TotalFloat, boost::optional< bool > v14_IsCritical, boost::optional< std::string > v15_StatusTime, boost::optional< std::string > v16_ActualDuration, boost::optional< std::string > v17_ActualStart, boost::optional< std::string > v18_ActualFinish, boost::optional< std::string > v19_RemainingTime, boost::optional< double > v20_Completion) : IfcSchedulingTime((IfcAbstractEntity*)0) { IfcWritableEntity* e = new IfcWritableEntity(Class()); if (v1_Name) { e->setArgument(0,(*v1_Name)); } else { e->setArgument(0); } if (v2_DataOrigin) { e->setArgument(1,*v2_DataOrigin,IfcDataOriginEnum::ToString(*v2_DataOrigin)); } else { e->setArgument(1); } if (v3_UserDefinedDataOrigin) { e->setArgument(2,(*v3_UserDefinedDataOrigin)); } else { e->setArgument(2); } if (v4_DurationType) { e->setArgument(3,*v4_DurationType,IfcTaskDurationEnum::ToString(*v4_DurationType)); } else { e->setArgument(3); } if (v5_ScheduleDuration) { e->setArgument(4,(*v5_ScheduleDuration)); } else { e->setArgument(4); } if (v6_ScheduleStart) { e->setArgument(5,(*v6_ScheduleStart)); } else { e->setArgument(5); } if (v7_ScheduleFinish) { e->setArgument(6,(*v7_ScheduleFinish)); } else { e->setArgument(6); } if (v8_EarlyStart) { e->setArgument(7,(*v8_EarlyStart)); } else { e->setArgument(7); } if (v9_EarlyFinish) { e->setArgument(8,(*v9_EarlyFinish)); } else { e->setArgument(8); } if (v10_LateStart) { e->setArgument(9,(*v10_LateStart)); } else { e->setArgument(9); } if (v11_LateFinish) { e->setArgument(10,(*v11_LateFinish)); } else { e->setArgument(10); } if (v12_FreeFloat) { e->setArgument(11,(*v12_FreeFloat)); } else { e->setArgument(11); } if (v13_TotalFloat) { e->setArgument(12,(*v13_TotalFloat)); } else { e->setArgument(12); } if (v14_IsCritical) { e->setArgument(13,(*v14_IsCritical)); } else { e->setArgument(13); } if (v15_StatusTime) { e->setArgument(14,(*v15_StatusTime)); } else { e->setArgument(14); } if (v16_ActualDuration) { e->setArgument(15,(*v16_ActualDuration)); } else { e->setArgument(15); } if (v17_ActualStart) { e->setArgument(16,(*v17_ActualStart)); } else { e->setArgument(16); } if (v18_ActualFinish) { e->setArgument(17,(*v18_ActualFinish)); } else { e->setArgument(17); } if (v19_RemainingTime) { e->setArgument(18,(*v19_RemainingTime)); } else { e->setArgument(18); } if (v20_Completion) { e->setArgument(19,(*v20_Completion)); } else { e->setArgument(19); } entity = e; EntityBuffer::Add(this); } // Function implementations for IfcTaskTimeRecurring -IfcRecurrencePattern* IfcTaskTimeRecurring::Recurrance() const { return (IfcRecurrencePattern*)((IfcUtil::IfcBaseClass*)(*entity->getArgument(20))); } -void IfcTaskTimeRecurring::setRecurrance(IfcRecurrencePattern* v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(20,v); } +IfcRecurrencePattern* IfcTaskTimeRecurring::Recurrence() const { return (IfcRecurrencePattern*)((IfcUtil::IfcBaseClass*)(*entity->getArgument(20))); } +void IfcTaskTimeRecurring::setRecurrence(IfcRecurrencePattern* v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(20,v); } bool IfcTaskTimeRecurring::is(Type::Enum v) const { return v == Type::IfcTaskTimeRecurring || IfcTaskTime::is(v); } Type::Enum IfcTaskTimeRecurring::type() const { return Type::IfcTaskTimeRecurring; } Type::Enum IfcTaskTimeRecurring::Class() { return Type::IfcTaskTimeRecurring; } IfcTaskTimeRecurring::IfcTaskTimeRecurring(IfcAbstractEntity* e) : IfcTaskTime((IfcAbstractEntity*)0) { if (!e) return; if (!e->is(Type::IfcTaskTimeRecurring)) throw IfcException("Unable to find find keyword in schema"); entity = e; } -IfcTaskTimeRecurring::IfcTaskTimeRecurring(boost::optional< std::string > v1_Name, boost::optional< IfcDataOriginEnum::IfcDataOriginEnum > v2_DataOrigin, boost::optional< std::string > v3_UserDefinedDataOrigin, boost::optional< IfcTaskDurationEnum::IfcTaskDurationEnum > v4_DurationType, boost::optional< std::string > v5_ScheduleDuration, boost::optional< std::string > v6_ScheduleStart, boost::optional< std::string > v7_ScheduleFinish, boost::optional< std::string > v8_EarlyStart, boost::optional< std::string > v9_EarlyFinish, boost::optional< std::string > v10_LateStart, boost::optional< std::string > v11_LateFinish, boost::optional< std::string > v12_FreeFloat, boost::optional< std::string > v13_TotalFloat, boost::optional< bool > v14_IsCritical, boost::optional< std::string > v15_StatusTime, boost::optional< std::string > v16_ActualDuration, boost::optional< std::string > v17_ActualStart, boost::optional< std::string > v18_ActualFinish, boost::optional< std::string > v19_RemainingTime, boost::optional< double > v20_Completion, IfcRecurrencePattern* v21_Recurrance) : IfcTaskTime((IfcAbstractEntity*)0) { IfcWritableEntity* e = new IfcWritableEntity(Class()); if (v1_Name) { e->setArgument(0,(*v1_Name)); } else { e->setArgument(0); } if (v2_DataOrigin) { e->setArgument(1,*v2_DataOrigin,IfcDataOriginEnum::ToString(*v2_DataOrigin)); } else { e->setArgument(1); } if (v3_UserDefinedDataOrigin) { e->setArgument(2,(*v3_UserDefinedDataOrigin)); } else { e->setArgument(2); } if (v4_DurationType) { e->setArgument(3,*v4_DurationType,IfcTaskDurationEnum::ToString(*v4_DurationType)); } else { e->setArgument(3); } if (v5_ScheduleDuration) { e->setArgument(4,(*v5_ScheduleDuration)); } else { e->setArgument(4); } if (v6_ScheduleStart) { e->setArgument(5,(*v6_ScheduleStart)); } else { e->setArgument(5); } if (v7_ScheduleFinish) { e->setArgument(6,(*v7_ScheduleFinish)); } else { e->setArgument(6); } if (v8_EarlyStart) { e->setArgument(7,(*v8_EarlyStart)); } else { e->setArgument(7); } if (v9_EarlyFinish) { e->setArgument(8,(*v9_EarlyFinish)); } else { e->setArgument(8); } if (v10_LateStart) { e->setArgument(9,(*v10_LateStart)); } else { e->setArgument(9); } if (v11_LateFinish) { e->setArgument(10,(*v11_LateFinish)); } else { e->setArgument(10); } if (v12_FreeFloat) { e->setArgument(11,(*v12_FreeFloat)); } else { e->setArgument(11); } if (v13_TotalFloat) { e->setArgument(12,(*v13_TotalFloat)); } else { e->setArgument(12); } if (v14_IsCritical) { e->setArgument(13,(*v14_IsCritical)); } else { e->setArgument(13); } if (v15_StatusTime) { e->setArgument(14,(*v15_StatusTime)); } else { e->setArgument(14); } if (v16_ActualDuration) { e->setArgument(15,(*v16_ActualDuration)); } else { e->setArgument(15); } if (v17_ActualStart) { e->setArgument(16,(*v17_ActualStart)); } else { e->setArgument(16); } if (v18_ActualFinish) { e->setArgument(17,(*v18_ActualFinish)); } else { e->setArgument(17); } if (v19_RemainingTime) { e->setArgument(18,(*v19_RemainingTime)); } else { e->setArgument(18); } if (v20_Completion) { e->setArgument(19,(*v20_Completion)); } else { e->setArgument(19); } e->setArgument(20,(v21_Recurrance)); entity = e; EntityBuffer::Add(this); } +IfcTaskTimeRecurring::IfcTaskTimeRecurring(boost::optional< std::string > v1_Name, boost::optional< IfcDataOriginEnum::IfcDataOriginEnum > v2_DataOrigin, boost::optional< std::string > v3_UserDefinedDataOrigin, boost::optional< IfcTaskDurationEnum::IfcTaskDurationEnum > v4_DurationType, boost::optional< std::string > v5_ScheduleDuration, boost::optional< std::string > v6_ScheduleStart, boost::optional< std::string > v7_ScheduleFinish, boost::optional< std::string > v8_EarlyStart, boost::optional< std::string > v9_EarlyFinish, boost::optional< std::string > v10_LateStart, boost::optional< std::string > v11_LateFinish, boost::optional< std::string > v12_FreeFloat, boost::optional< std::string > v13_TotalFloat, boost::optional< bool > v14_IsCritical, boost::optional< std::string > v15_StatusTime, boost::optional< std::string > v16_ActualDuration, boost::optional< std::string > v17_ActualStart, boost::optional< std::string > v18_ActualFinish, boost::optional< std::string > v19_RemainingTime, boost::optional< double > v20_Completion, IfcRecurrencePattern* v21_Recurrence) : IfcTaskTime((IfcAbstractEntity*)0) { IfcWritableEntity* e = new IfcWritableEntity(Class()); if (v1_Name) { e->setArgument(0,(*v1_Name)); } else { e->setArgument(0); } if (v2_DataOrigin) { e->setArgument(1,*v2_DataOrigin,IfcDataOriginEnum::ToString(*v2_DataOrigin)); } else { e->setArgument(1); } if (v3_UserDefinedDataOrigin) { e->setArgument(2,(*v3_UserDefinedDataOrigin)); } else { e->setArgument(2); } if (v4_DurationType) { e->setArgument(3,*v4_DurationType,IfcTaskDurationEnum::ToString(*v4_DurationType)); } else { e->setArgument(3); } if (v5_ScheduleDuration) { e->setArgument(4,(*v5_ScheduleDuration)); } else { e->setArgument(4); } if (v6_ScheduleStart) { e->setArgument(5,(*v6_ScheduleStart)); } else { e->setArgument(5); } if (v7_ScheduleFinish) { e->setArgument(6,(*v7_ScheduleFinish)); } else { e->setArgument(6); } if (v8_EarlyStart) { e->setArgument(7,(*v8_EarlyStart)); } else { e->setArgument(7); } if (v9_EarlyFinish) { e->setArgument(8,(*v9_EarlyFinish)); } else { e->setArgument(8); } if (v10_LateStart) { e->setArgument(9,(*v10_LateStart)); } else { e->setArgument(9); } if (v11_LateFinish) { e->setArgument(10,(*v11_LateFinish)); } else { e->setArgument(10); } if (v12_FreeFloat) { e->setArgument(11,(*v12_FreeFloat)); } else { e->setArgument(11); } if (v13_TotalFloat) { e->setArgument(12,(*v13_TotalFloat)); } else { e->setArgument(12); } if (v14_IsCritical) { e->setArgument(13,(*v14_IsCritical)); } else { e->setArgument(13); } if (v15_StatusTime) { e->setArgument(14,(*v15_StatusTime)); } else { e->setArgument(14); } if (v16_ActualDuration) { e->setArgument(15,(*v16_ActualDuration)); } else { e->setArgument(15); } if (v17_ActualStart) { e->setArgument(16,(*v17_ActualStart)); } else { e->setArgument(16); } if (v18_ActualFinish) { e->setArgument(17,(*v18_ActualFinish)); } else { e->setArgument(17); } if (v19_RemainingTime) { e->setArgument(18,(*v19_RemainingTime)); } else { e->setArgument(18); } if (v20_Completion) { e->setArgument(19,(*v20_Completion)); } else { e->setArgument(19); } e->setArgument(20,(v21_Recurrence)); entity = e; EntityBuffer::Add(this); } // Function implementations for IfcTaskType IfcTaskTypeEnum::IfcTaskTypeEnum IfcTaskType::PredefinedType() const { return IfcTaskTypeEnum::FromString(*entity->getArgument(9)); } diff --git a/src/ifcparse/Ifc4.h b/src/ifcparse/Ifc4.h index 4f01c4f55c..fde2c32895 100644 --- a/src/ifcparse/Ifc4.h +++ b/src/ifcparse/Ifc4.h @@ -29,7 +29,6 @@ #include #include -#include #include @@ -37,6 +36,11 @@ #include "../ifcparse/IfcException.h" #include "../ifcparse/Ifc4enum.h" +#ifdef _MSC_VER +#pragma warning(push) +#pragma warning(disable : 4100) +#endif + #define IfcSchema Ifc4 namespace Ifc4 { @@ -44,7 +48,7 @@ namespace Ifc4 { const char* const Identifier = "IFC4"; // Forward definitions -class IfcActionRequest; class IfcActor; class IfcActorRole; class IfcActuator; class IfcActuatorType; class IfcAddress; class IfcAdvancedBrep; class IfcAdvancedBrepWithVoids; class IfcAdvancedFace; class IfcAirTerminal; class IfcAirTerminalBox; class IfcAirTerminalBoxType; class IfcAirTerminalType; class IfcAirToAirHeatRecovery; class IfcAirToAirHeatRecoveryType; class IfcAlarm; class IfcAlarmType; class IfcAnnotation; class IfcAnnotationFillArea; class IfcApplication; class IfcAppliedValue; class IfcApproval; class IfcApprovalRelationship; class IfcArbitraryClosedProfileDef; class IfcArbitraryOpenProfileDef; class IfcArbitraryProfileDefWithVoids; class IfcAsset; class IfcAsymmetricIShapeProfileDef; class IfcAudioVisualAppliance; class IfcAudioVisualApplianceType; class IfcAxis1Placement; class IfcAxis2Placement2D; class IfcAxis2Placement3D; class IfcBSplineCurve; class IfcBSplineCurveWithKnots; class IfcBSplineSurface; class IfcBSplineSurfaceWithKnots; class IfcBeam; class IfcBeamStandardCase; class IfcBeamType; class IfcBlobTexture; class IfcBlock; class IfcBoiler; class IfcBoilerType; class IfcBooleanClippingResult; class IfcBooleanResult; class IfcBoundaryCondition; class IfcBoundaryCurve; class IfcBoundaryEdgeCondition; class IfcBoundaryFaceCondition; class IfcBoundaryNodeCondition; class IfcBoundaryNodeConditionWarping; class IfcBoundedCurve; class IfcBoundedSurface; class IfcBoundingBox; class IfcBoxedHalfSpace; class IfcBuilding; class IfcBuildingElement; class IfcBuildingElementPart; class IfcBuildingElementPartType; class IfcBuildingElementProxy; class IfcBuildingElementProxyType; class IfcBuildingElementType; class IfcBuildingStorey; class IfcBuildingSystem; class IfcBurner; class IfcBurnerType; class IfcCShapeProfileDef; class IfcCableCarrierFitting; class IfcCableCarrierFittingType; class IfcCableCarrierSegment; class IfcCableCarrierSegmentType; class IfcCableFitting; class IfcCableFittingType; class IfcCableSegment; class IfcCableSegmentType; class IfcCartesianPoint; class IfcCartesianPointList; class IfcCartesianPointList3D; class IfcCartesianTransformationOperator; class IfcCartesianTransformationOperator2D; class IfcCartesianTransformationOperator2DnonUniform; class IfcCartesianTransformationOperator3D; class IfcCartesianTransformationOperator3DnonUniform; class IfcCenterLineProfileDef; class IfcChiller; class IfcChillerType; class IfcChimney; class IfcChimneyType; class IfcCircle; class IfcCircleHollowProfileDef; class IfcCircleProfileDef; class IfcCivilElement; class IfcCivilElementType; class IfcClassification; class IfcClassificationReference; class IfcClosedShell; class IfcCoil; class IfcCoilType; class IfcColourRgb; class IfcColourRgbList; class IfcColourSpecification; class IfcColumn; class IfcColumnStandardCase; class IfcColumnType; class IfcCommunicationsAppliance; class IfcCommunicationsApplianceType; class IfcComplexProperty; class IfcComplexPropertyTemplate; class IfcCompositeCurve; class IfcCompositeCurveOnSurface; class IfcCompositeCurveSegment; class IfcCompositeProfileDef; class IfcCompressor; class IfcCompressorType; class IfcCondenser; class IfcCondenserType; class IfcConic; class IfcConnectedFaceSet; class IfcConnectionCurveGeometry; class IfcConnectionGeometry; class IfcConnectionPointEccentricity; class IfcConnectionPointGeometry; class IfcConnectionSurfaceGeometry; class IfcConnectionVolumeGeometry; class IfcConstraint; class IfcConstructionEquipmentResource; class IfcConstructionEquipmentResourceType; class IfcConstructionMaterialResource; class IfcConstructionMaterialResourceType; class IfcConstructionProductResource; class IfcConstructionProductResourceType; class IfcConstructionResource; class IfcConstructionResourceType; class IfcContext; class IfcContextDependentUnit; class IfcControl; class IfcController; class IfcControllerType; class IfcConversionBasedUnit; class IfcConversionBasedUnitWithOffset; class IfcCooledBeam; class IfcCooledBeamType; class IfcCoolingTower; class IfcCoolingTowerType; class IfcCoordinateOperation; class IfcCoordinateReferenceSystem; class IfcCostItem; class IfcCostSchedule; class IfcCostValue; class IfcCovering; class IfcCoveringType; class IfcCrewResource; class IfcCrewResourceType; class IfcCsgPrimitive3D; class IfcCsgSolid; class IfcCurrencyRelationship; class IfcCurtainWall; class IfcCurtainWallType; class IfcCurve; class IfcCurveBoundedPlane; class IfcCurveBoundedSurface; class IfcCurveStyle; class IfcCurveStyleFont; class IfcCurveStyleFontAndScaling; class IfcCurveStyleFontPattern; class IfcCylindricalSurface; class IfcDamper; class IfcDamperType; class IfcDerivedProfileDef; class IfcDerivedUnit; class IfcDerivedUnitElement; class IfcDimensionalExponents; class IfcDirection; class IfcDiscreteAccessory; class IfcDiscreteAccessoryType; class IfcDistributionChamberElement; class IfcDistributionChamberElementType; class IfcDistributionCircuit; class IfcDistributionControlElement; class IfcDistributionControlElementType; class IfcDistributionElement; class IfcDistributionElementType; class IfcDistributionFlowElement; class IfcDistributionFlowElementType; class IfcDistributionPort; class IfcDistributionSystem; class IfcDocumentInformation; class IfcDocumentInformationRelationship; class IfcDocumentReference; class IfcDoor; class IfcDoorLiningProperties; class IfcDoorPanelProperties; class IfcDoorStandardCase; class IfcDoorStyle; class IfcDoorType; class IfcDraughtingPreDefinedColour; class IfcDraughtingPreDefinedCurveFont; class IfcDuctFitting; class IfcDuctFittingType; class IfcDuctSegment; class IfcDuctSegmentType; class IfcDuctSilencer; class IfcDuctSilencerType; class IfcEdge; class IfcEdgeCurve; class IfcEdgeLoop; class IfcElectricAppliance; class IfcElectricApplianceType; class IfcElectricDistributionBoard; class IfcElectricDistributionBoardType; class IfcElectricFlowStorageDevice; class IfcElectricFlowStorageDeviceType; class IfcElectricGenerator; class IfcElectricGeneratorType; class IfcElectricMotor; class IfcElectricMotorType; class IfcElectricTimeControl; class IfcElectricTimeControlType; class IfcElement; class IfcElementAssembly; class IfcElementAssemblyType; class IfcElementComponent; class IfcElementComponentType; class IfcElementQuantity; class IfcElementType; class IfcElementarySurface; class IfcEllipse; class IfcEllipseProfileDef; class IfcEnergyConversionDevice; class IfcEnergyConversionDeviceType; class IfcEngine; class IfcEngineType; class IfcEvaporativeCooler; class IfcEvaporativeCoolerType; class IfcEvaporator; class IfcEvaporatorType; class IfcEvent; class IfcEventTime; class IfcEventType; class IfcExtendedProperties; class IfcExternalInformation; class IfcExternalReference; class IfcExternalReferenceRelationship; class IfcExternalSpatialElement; class IfcExternalSpatialStructureElement; class IfcExternallyDefinedHatchStyle; class IfcExternallyDefinedSurfaceStyle; class IfcExternallyDefinedTextFont; class IfcExtrudedAreaSolid; class IfcExtrudedAreaSolidTapered; class IfcFace; class IfcFaceBasedSurfaceModel; class IfcFaceBound; class IfcFaceOuterBound; class IfcFaceSurface; class IfcFacetedBrep; class IfcFacetedBrepWithVoids; class IfcFailureConnectionCondition; class IfcFan; class IfcFanType; class IfcFastener; class IfcFastenerType; class IfcFeatureElement; class IfcFeatureElementAddition; class IfcFeatureElementSubtraction; class IfcFillAreaStyle; class IfcFillAreaStyleHatching; class IfcFillAreaStyleTiles; class IfcFilter; class IfcFilterType; class IfcFireSuppressionTerminal; class IfcFireSuppressionTerminalType; class IfcFixedReferenceSweptAreaSolid; class IfcFlowController; class IfcFlowControllerType; class IfcFlowFitting; class IfcFlowFittingType; class IfcFlowInstrument; class IfcFlowInstrumentType; class IfcFlowMeter; class IfcFlowMeterType; class IfcFlowMovingDevice; class IfcFlowMovingDeviceType; class IfcFlowSegment; class IfcFlowSegmentType; class IfcFlowStorageDevice; class IfcFlowStorageDeviceType; class IfcFlowTerminal; class IfcFlowTerminalType; class IfcFlowTreatmentDevice; class IfcFlowTreatmentDeviceType; class IfcFooting; class IfcFootingType; class IfcFurnishingElement; class IfcFurnishingElementType; class IfcFurniture; class IfcFurnitureType; class IfcGeographicElement; class IfcGeographicElementType; class IfcGeometricCurveSet; class IfcGeometricRepresentationContext; class IfcGeometricRepresentationItem; class IfcGeometricRepresentationSubContext; class IfcGeometricSet; class IfcGrid; class IfcGridAxis; class IfcGridPlacement; class IfcGroup; class IfcHalfSpaceSolid; class IfcHeatExchanger; class IfcHeatExchangerType; class IfcHumidifier; class IfcHumidifierType; class IfcIShapeProfileDef; class IfcImageTexture; class IfcIndexedColourMap; class IfcIndexedTextureMap; class IfcIndexedTriangleTextureMap; class IfcInterceptor; class IfcInterceptorType; class IfcInventory; class IfcIrregularTimeSeries; class IfcIrregularTimeSeriesValue; class IfcJunctionBox; class IfcJunctionBoxType; class IfcLShapeProfileDef; class IfcLaborResource; class IfcLaborResourceType; class IfcLagTime; class IfcLamp; class IfcLampType; class IfcLibraryInformation; class IfcLibraryReference; class IfcLightDistributionData; class IfcLightFixture; class IfcLightFixtureType; class IfcLightIntensityDistribution; class IfcLightSource; class IfcLightSourceAmbient; class IfcLightSourceDirectional; class IfcLightSourceGoniometric; class IfcLightSourcePositional; class IfcLightSourceSpot; class IfcLine; class IfcLocalPlacement; class IfcLoop; class IfcManifoldSolidBrep; class IfcMapConversion; class IfcMappedItem; class IfcMaterial; class IfcMaterialClassificationRelationship; class IfcMaterialConstituent; class IfcMaterialConstituentSet; class IfcMaterialDefinition; class IfcMaterialDefinitionRepresentation; class IfcMaterialLayer; class IfcMaterialLayerSet; class IfcMaterialLayerSetUsage; class IfcMaterialLayerWithOffsets; class IfcMaterialList; class IfcMaterialProfile; class IfcMaterialProfileSet; class IfcMaterialProfileSetUsage; class IfcMaterialProfileSetUsageTapering; class IfcMaterialProfileWithOffsets; class IfcMaterialProperties; class IfcMaterialRelationship; class IfcMaterialUsageDefinition; class IfcMeasureWithUnit; class IfcMechanicalFastener; class IfcMechanicalFastenerType; class IfcMedicalDevice; class IfcMedicalDeviceType; class IfcMember; class IfcMemberStandardCase; class IfcMemberType; class IfcMetric; class IfcMirroredProfileDef; class IfcMonetaryUnit; class IfcMotorConnection; class IfcMotorConnectionType; class IfcNamedUnit; class IfcObject; class IfcObjectDefinition; class IfcObjectPlacement; class IfcObjective; class IfcOccupant; class IfcOffsetCurve2D; class IfcOffsetCurve3D; class IfcOpenShell; class IfcOpeningElement; class IfcOpeningStandardCase; class IfcOrganization; class IfcOrganizationRelationship; class IfcOrientedEdge; class IfcOuterBoundaryCurve; class IfcOutlet; class IfcOutletType; class IfcOwnerHistory; class IfcParameterizedProfileDef; class IfcPath; class IfcPcurve; class IfcPerformanceHistory; class IfcPermeableCoveringProperties; class IfcPermit; class IfcPerson; class IfcPersonAndOrganization; class IfcPhysicalComplexQuantity; class IfcPhysicalQuantity; class IfcPhysicalSimpleQuantity; class IfcPile; class IfcPileType; class IfcPipeFitting; class IfcPipeFittingType; class IfcPipeSegment; class IfcPipeSegmentType; class IfcPixelTexture; class IfcPlacement; class IfcPlanarBox; class IfcPlanarExtent; class IfcPlane; class IfcPlate; class IfcPlateStandardCase; class IfcPlateType; class IfcPoint; class IfcPointOnCurve; class IfcPointOnSurface; class IfcPolyLoop; class IfcPolygonalBoundedHalfSpace; class IfcPolyline; class IfcPort; class IfcPostalAddress; class IfcPreDefinedColour; class IfcPreDefinedCurveFont; class IfcPreDefinedItem; class IfcPreDefinedProperties; class IfcPreDefinedPropertySet; class IfcPreDefinedTextFont; class IfcPresentationItem; class IfcPresentationLayerAssignment; class IfcPresentationLayerWithStyle; class IfcPresentationStyle; class IfcPresentationStyleAssignment; class IfcProcedure; class IfcProcedureType; class IfcProcess; class IfcProduct; class IfcProductDefinitionShape; class IfcProductRepresentation; class IfcProfileDef; class IfcProfileProperties; class IfcProject; class IfcProjectLibrary; class IfcProjectOrder; class IfcProjectedCRS; class IfcProjectionElement; class IfcProperty; class IfcPropertyAbstraction; class IfcPropertyBoundedValue; class IfcPropertyDefinition; class IfcPropertyDependencyRelationship; class IfcPropertyEnumeratedValue; class IfcPropertyEnumeration; class IfcPropertyListValue; class IfcPropertyReferenceValue; class IfcPropertySet; class IfcPropertySetDefinition; class IfcPropertySetTemplate; class IfcPropertySingleValue; class IfcPropertyTableValue; class IfcPropertyTemplate; class IfcPropertyTemplateDefinition; class IfcProtectiveDevice; class IfcProtectiveDeviceTrippingUnit; class IfcProtectiveDeviceTrippingUnitType; class IfcProtectiveDeviceType; class IfcProxy; class IfcPump; class IfcPumpType; class IfcQuantityArea; class IfcQuantityCount; class IfcQuantityLength; class IfcQuantitySet; class IfcQuantityTime; class IfcQuantityVolume; class IfcQuantityWeight; class IfcRailing; class IfcRailingType; class IfcRamp; class IfcRampFlight; class IfcRampFlightType; class IfcRampType; class IfcRationalBSplineCurveWithKnots; class IfcRationalBSplineSurfaceWithKnots; class IfcRectangleHollowProfileDef; class IfcRectangleProfileDef; class IfcRectangularPyramid; class IfcRectangularTrimmedSurface; class IfcRecurrencePattern; class IfcReference; class IfcRegularTimeSeries; class IfcReinforcementBarProperties; class IfcReinforcementDefinitionProperties; class IfcReinforcingBar; class IfcReinforcingBarType; class IfcReinforcingElement; class IfcReinforcingElementType; class IfcReinforcingMesh; class IfcReinforcingMeshType; class IfcRelAggregates; class IfcRelAssigns; class IfcRelAssignsToActor; class IfcRelAssignsToControl; class IfcRelAssignsToGroup; class IfcRelAssignsToGroupByFactor; class IfcRelAssignsToProcess; class IfcRelAssignsToProduct; class IfcRelAssignsToResource; class IfcRelAssociates; class IfcRelAssociatesApproval; class IfcRelAssociatesClassification; class IfcRelAssociatesConstraint; class IfcRelAssociatesDocument; class IfcRelAssociatesLibrary; class IfcRelAssociatesMaterial; class IfcRelConnects; class IfcRelConnectsElements; class IfcRelConnectsPathElements; class IfcRelConnectsPortToElement; class IfcRelConnectsPorts; class IfcRelConnectsStructuralActivity; class IfcRelConnectsStructuralMember; class IfcRelConnectsWithEccentricity; class IfcRelConnectsWithRealizingElements; class IfcRelContainedInSpatialStructure; class IfcRelCoversBldgElements; class IfcRelCoversSpaces; class IfcRelDeclares; class IfcRelDecomposes; class IfcRelDefines; class IfcRelDefinesByObject; class IfcRelDefinesByProperties; class IfcRelDefinesByTemplate; class IfcRelDefinesByType; class IfcRelFillsElement; class IfcRelFlowControlElements; class IfcRelInterferesElements; class IfcRelNests; class IfcRelProjectsElement; class IfcRelReferencedInSpatialStructure; class IfcRelSequence; class IfcRelServicesBuildings; class IfcRelSpaceBoundary; class IfcRelSpaceBoundary1stLevel; class IfcRelSpaceBoundary2ndLevel; class IfcRelVoidsElement; class IfcRelationship; class IfcReparametrisedCompositeCurveSegment; class IfcRepresentation; class IfcRepresentationContext; class IfcRepresentationItem; class IfcRepresentationMap; class IfcResource; class IfcResourceApprovalRelationship; class IfcResourceConstraintRelationship; class IfcResourceLevelRelationship; class IfcResourceTime; class IfcRevolvedAreaSolid; class IfcRevolvedAreaSolidTapered; class IfcRightCircularCone; class IfcRightCircularCylinder; class IfcRoof; class IfcRoofType; class IfcRoot; class IfcRoundedRectangleProfileDef; class IfcSIUnit; class IfcSanitaryTerminal; class IfcSanitaryTerminalType; class IfcSchedulingTime; class IfcSectionProperties; class IfcSectionReinforcementProperties; class IfcSectionedSpine; class IfcSensor; class IfcSensorType; class IfcShadingDevice; class IfcShadingDeviceType; class IfcShapeAspect; class IfcShapeModel; class IfcShapeRepresentation; class IfcShellBasedSurfaceModel; class IfcSimpleProperty; class IfcSimplePropertyTemplate; class IfcSite; class IfcSlab; class IfcSlabElementedCase; class IfcSlabStandardCase; class IfcSlabType; class IfcSlippageConnectionCondition; class IfcSolarDevice; class IfcSolarDeviceType; class IfcSolidModel; class IfcSpace; class IfcSpaceHeater; class IfcSpaceHeaterType; class IfcSpaceType; class IfcSpatialElement; class IfcSpatialElementType; class IfcSpatialStructureElement; class IfcSpatialStructureElementType; class IfcSpatialZone; class IfcSpatialZoneType; class IfcSphere; class IfcStackTerminal; class IfcStackTerminalType; class IfcStair; class IfcStairFlight; class IfcStairFlightType; class IfcStairType; class IfcStructuralAction; class IfcStructuralActivity; class IfcStructuralAnalysisModel; class IfcStructuralConnection; class IfcStructuralConnectionCondition; class IfcStructuralCurveAction; class IfcStructuralCurveConnection; class IfcStructuralCurveMember; class IfcStructuralCurveMemberVarying; class IfcStructuralCurveReaction; class IfcStructuralItem; class IfcStructuralLinearAction; class IfcStructuralLoad; class IfcStructuralLoadCase; class IfcStructuralLoadConfiguration; class IfcStructuralLoadGroup; class IfcStructuralLoadLinearForce; class IfcStructuralLoadOrResult; class IfcStructuralLoadPlanarForce; class IfcStructuralLoadSingleDisplacement; class IfcStructuralLoadSingleDisplacementDistortion; class IfcStructuralLoadSingleForce; class IfcStructuralLoadSingleForceWarping; class IfcStructuralLoadStatic; class IfcStructuralLoadTemperature; class IfcStructuralMember; class IfcStructuralPlanarAction; class IfcStructuralPointAction; class IfcStructuralPointConnection; class IfcStructuralPointReaction; class IfcStructuralReaction; class IfcStructuralResultGroup; class IfcStructuralSurfaceAction; class IfcStructuralSurfaceConnection; class IfcStructuralSurfaceMember; class IfcStructuralSurfaceMemberVarying; class IfcStructuralSurfaceReaction; class IfcStyleModel; class IfcStyledItem; class IfcStyledRepresentation; class IfcSubContractResource; class IfcSubContractResourceType; class IfcSubedge; class IfcSurface; class IfcSurfaceCurveSweptAreaSolid; class IfcSurfaceFeature; class IfcSurfaceOfLinearExtrusion; class IfcSurfaceOfRevolution; class IfcSurfaceReinforcementArea; class IfcSurfaceStyle; class IfcSurfaceStyleLighting; class IfcSurfaceStyleRefraction; class IfcSurfaceStyleRendering; class IfcSurfaceStyleShading; class IfcSurfaceStyleWithTextures; class IfcSurfaceTexture; class IfcSweptAreaSolid; class IfcSweptDiskSolid; class IfcSweptDiskSolidPolygonal; class IfcSweptSurface; class IfcSwitchingDevice; class IfcSwitchingDeviceType; class IfcSystem; class IfcSystemFurnitureElement; class IfcSystemFurnitureElementType; class IfcTShapeProfileDef; class IfcTable; class IfcTableColumn; class IfcTableRow; class IfcTank; class IfcTankType; class IfcTask; class IfcTaskTime; class IfcTaskTimeRecurring; class IfcTaskType; class IfcTelecomAddress; class IfcTendon; class IfcTendonAnchor; class IfcTendonAnchorType; class IfcTendonType; class IfcTessellatedFaceSet; class IfcTessellatedItem; class IfcTextLiteral; class IfcTextLiteralWithExtent; class IfcTextStyle; class IfcTextStyleFontModel; class IfcTextStyleForDefinedFont; class IfcTextStyleTextModel; class IfcTextureCoordinate; class IfcTextureCoordinateGenerator; class IfcTextureMap; class IfcTextureVertex; class IfcTextureVertexList; class IfcTimePeriod; class IfcTimeSeries; class IfcTimeSeriesValue; class IfcTopologicalRepresentationItem; class IfcTopologyRepresentation; class IfcTransformer; class IfcTransformerType; class IfcTransportElement; class IfcTransportElementType; class IfcTrapeziumProfileDef; class IfcTriangulatedFaceSet; class IfcTrimmedCurve; class IfcTubeBundle; class IfcTubeBundleType; class IfcTypeObject; class IfcTypeProcess; class IfcTypeProduct; class IfcTypeResource; class IfcUShapeProfileDef; class IfcUnitAssignment; class IfcUnitaryControlElement; class IfcUnitaryControlElementType; class IfcUnitaryEquipment; class IfcUnitaryEquipmentType; class IfcValve; class IfcValveType; class IfcVector; class IfcVertex; class IfcVertexLoop; class IfcVertexPoint; class IfcVibrationIsolator; class IfcVibrationIsolatorType; class IfcVirtualElement; class IfcVirtualGridIntersection; class IfcVoidingFeature; class IfcWall; class IfcWallElementedCase; class IfcWallStandardCase; class IfcWallType; class IfcWasteTerminal; class IfcWasteTerminalType; class IfcWindow; class IfcWindowLiningProperties; class IfcWindowPanelProperties; class IfcWindowStandardCase; class IfcWindowStyle; class IfcWindowType; class IfcWorkCalendar; class IfcWorkControl; class IfcWorkPlan; class IfcWorkSchedule; class IfcWorkTime; class IfcZShapeProfileDef; class IfcZone; class IfcAbsorbedDoseMeasure; class IfcAccelerationMeasure; class IfcAmountOfSubstanceMeasure; class IfcAngularVelocityMeasure; class IfcAreaDensityMeasure; class IfcAreaMeasure; class IfcBoolean; class IfcBoxAlignment; class IfcCardinalPointReference; class IfcComplexNumber; class IfcCompoundPlaneAngleMeasure; class IfcContextDependentMeasure; class IfcCountMeasure; class IfcCurvatureMeasure; class IfcDate; class IfcDateTime; class IfcDayInMonthNumber; class IfcDayInWeekNumber; class IfcDescriptiveMeasure; class IfcDimensionCount; class IfcDoseEquivalentMeasure; class IfcDuration; class IfcDynamicViscosityMeasure; class IfcElectricCapacitanceMeasure; class IfcElectricChargeMeasure; class IfcElectricConductanceMeasure; class IfcElectricCurrentMeasure; class IfcElectricResistanceMeasure; class IfcElectricVoltageMeasure; class IfcEnergyMeasure; class IfcFontStyle; class IfcFontVariant; class IfcFontWeight; class IfcForceMeasure; class IfcFrequencyMeasure; class IfcGloballyUniqueId; class IfcHeatFluxDensityMeasure; class IfcHeatingValueMeasure; class IfcIdentifier; class IfcIlluminanceMeasure; class IfcInductanceMeasure; class IfcInteger; class IfcIntegerCountRateMeasure; class IfcIonConcentrationMeasure; class IfcIsothermalMoistureCapacityMeasure; class IfcKinematicViscosityMeasure; class IfcLabel; class IfcLanguageId; class IfcLengthMeasure; class IfcLinearForceMeasure; class IfcLinearMomentMeasure; class IfcLinearStiffnessMeasure; class IfcLinearVelocityMeasure; class IfcLogical; class IfcLuminousFluxMeasure; class IfcLuminousIntensityDistributionMeasure; class IfcLuminousIntensityMeasure; class IfcMagneticFluxDensityMeasure; class IfcMagneticFluxMeasure; class IfcMassDensityMeasure; class IfcMassFlowRateMeasure; class IfcMassMeasure; class IfcMassPerLengthMeasure; class IfcModulusOfElasticityMeasure; class IfcModulusOfLinearSubgradeReactionMeasure; class IfcModulusOfRotationalSubgradeReactionMeasure; class IfcModulusOfSubgradeReactionMeasure; class IfcMoistureDiffusivityMeasure; class IfcMolecularWeightMeasure; class IfcMomentOfInertiaMeasure; class IfcMonetaryMeasure; class IfcMonthInYearNumber; class IfcNonNegativeLengthMeasure; class IfcNormalisedRatioMeasure; class IfcNumericMeasure; class IfcPHMeasure; class IfcParameterValue; class IfcPlanarForceMeasure; class IfcPlaneAngleMeasure; class IfcPositiveLengthMeasure; class IfcPositivePlaneAngleMeasure; class IfcPositiveRatioMeasure; class IfcPowerMeasure; class IfcPresentableText; class IfcPressureMeasure; class IfcPropertySetDefinitionSet; class IfcRadioActivityMeasure; class IfcRatioMeasure; class IfcReal; class IfcRotationalFrequencyMeasure; class IfcRotationalMassMeasure; class IfcRotationalStiffnessMeasure; class IfcSectionModulusMeasure; class IfcSectionalAreaIntegralMeasure; class IfcShearModulusMeasure; class IfcSolidAngleMeasure; class IfcSoundPowerLevelMeasure; class IfcSoundPowerMeasure; class IfcSoundPressureLevelMeasure; class IfcSoundPressureMeasure; class IfcSpecificHeatCapacityMeasure; class IfcSpecularExponent; class IfcSpecularRoughness; class IfcTemperatureGradientMeasure; class IfcTemperatureRateOfChangeMeasure; class IfcText; class IfcTextAlignment; class IfcTextDecoration; class IfcTextFontName; class IfcTextTransformation; class IfcThermalAdmittanceMeasure; class IfcThermalConductivityMeasure; class IfcThermalExpansionCoefficientMeasure; class IfcThermalResistanceMeasure; class IfcThermalTransmittanceMeasure; class IfcThermodynamicTemperatureMeasure; class IfcTime; class IfcTimeMeasure; class IfcTimeStamp; class IfcTorqueMeasure; class IfcURIReference; class IfcVaporPermeabilityMeasure; class IfcVolumeMeasure; class IfcVolumetricFlowRateMeasure; class IfcWarpingConstantMeasure; class IfcWarpingMomentMeasure; +class IfcActionRequest; class IfcActor; class IfcActorRole; class IfcActuator; class IfcActuatorType; class IfcAddress; class IfcAdvancedBrep; class IfcAdvancedBrepWithVoids; class IfcAdvancedFace; class IfcAirTerminal; class IfcAirTerminalBox; class IfcAirTerminalBoxType; class IfcAirTerminalType; class IfcAirToAirHeatRecovery; class IfcAirToAirHeatRecoveryType; class IfcAlarm; class IfcAlarmType; class IfcAnnotation; class IfcAnnotationFillArea; class IfcApplication; class IfcAppliedValue; class IfcApproval; class IfcApprovalRelationship; class IfcArbitraryClosedProfileDef; class IfcArbitraryOpenProfileDef; class IfcArbitraryProfileDefWithVoids; class IfcAsset; class IfcAsymmetricIShapeProfileDef; class IfcAudioVisualAppliance; class IfcAudioVisualApplianceType; class IfcAxis1Placement; class IfcAxis2Placement2D; class IfcAxis2Placement3D; class IfcBSplineCurve; class IfcBSplineCurveWithKnots; class IfcBSplineSurface; class IfcBSplineSurfaceWithKnots; class IfcBeam; class IfcBeamStandardCase; class IfcBeamType; class IfcBlobTexture; class IfcBlock; class IfcBoiler; class IfcBoilerType; class IfcBooleanClippingResult; class IfcBooleanResult; class IfcBoundaryCondition; class IfcBoundaryCurve; class IfcBoundaryEdgeCondition; class IfcBoundaryFaceCondition; class IfcBoundaryNodeCondition; class IfcBoundaryNodeConditionWarping; class IfcBoundedCurve; class IfcBoundedSurface; class IfcBoundingBox; class IfcBoxedHalfSpace; class IfcBuilding; class IfcBuildingElement; class IfcBuildingElementPart; class IfcBuildingElementPartType; class IfcBuildingElementProxy; class IfcBuildingElementProxyType; class IfcBuildingElementType; class IfcBuildingStorey; class IfcBuildingSystem; class IfcBurner; class IfcBurnerType; class IfcCShapeProfileDef; class IfcCableCarrierFitting; class IfcCableCarrierFittingType; class IfcCableCarrierSegment; class IfcCableCarrierSegmentType; class IfcCableFitting; class IfcCableFittingType; class IfcCableSegment; class IfcCableSegmentType; class IfcCartesianPoint; class IfcCartesianPointList; class IfcCartesianPointList2D; class IfcCartesianPointList3D; class IfcCartesianTransformationOperator; class IfcCartesianTransformationOperator2D; class IfcCartesianTransformationOperator2DnonUniform; class IfcCartesianTransformationOperator3D; class IfcCartesianTransformationOperator3DnonUniform; class IfcCenterLineProfileDef; class IfcChiller; class IfcChillerType; class IfcChimney; class IfcChimneyType; class IfcCircle; class IfcCircleHollowProfileDef; class IfcCircleProfileDef; class IfcCivilElement; class IfcCivilElementType; class IfcClassification; class IfcClassificationReference; class IfcClosedShell; class IfcCoil; class IfcCoilType; class IfcColourRgb; class IfcColourRgbList; class IfcColourSpecification; class IfcColumn; class IfcColumnStandardCase; class IfcColumnType; class IfcCommunicationsAppliance; class IfcCommunicationsApplianceType; class IfcComplexProperty; class IfcComplexPropertyTemplate; class IfcCompositeCurve; class IfcCompositeCurveOnSurface; class IfcCompositeCurveSegment; class IfcCompositeProfileDef; class IfcCompressor; class IfcCompressorType; class IfcCondenser; class IfcCondenserType; class IfcConic; class IfcConnectedFaceSet; class IfcConnectionCurveGeometry; class IfcConnectionGeometry; class IfcConnectionPointEccentricity; class IfcConnectionPointGeometry; class IfcConnectionSurfaceGeometry; class IfcConnectionVolumeGeometry; class IfcConstraint; class IfcConstructionEquipmentResource; class IfcConstructionEquipmentResourceType; class IfcConstructionMaterialResource; class IfcConstructionMaterialResourceType; class IfcConstructionProductResource; class IfcConstructionProductResourceType; class IfcConstructionResource; class IfcConstructionResourceType; class IfcContext; class IfcContextDependentUnit; class IfcControl; class IfcController; class IfcControllerType; class IfcConversionBasedUnit; class IfcConversionBasedUnitWithOffset; class IfcCooledBeam; class IfcCooledBeamType; class IfcCoolingTower; class IfcCoolingTowerType; class IfcCoordinateOperation; class IfcCoordinateReferenceSystem; class IfcCostItem; class IfcCostSchedule; class IfcCostValue; class IfcCovering; class IfcCoveringType; class IfcCrewResource; class IfcCrewResourceType; class IfcCsgPrimitive3D; class IfcCsgSolid; class IfcCurrencyRelationship; class IfcCurtainWall; class IfcCurtainWallType; class IfcCurve; class IfcCurveBoundedPlane; class IfcCurveBoundedSurface; class IfcCurveStyle; class IfcCurveStyleFont; class IfcCurveStyleFontAndScaling; class IfcCurveStyleFontPattern; class IfcCylindricalSurface; class IfcDamper; class IfcDamperType; class IfcDerivedProfileDef; class IfcDerivedUnit; class IfcDerivedUnitElement; class IfcDimensionalExponents; class IfcDirection; class IfcDiscreteAccessory; class IfcDiscreteAccessoryType; class IfcDistributionChamberElement; class IfcDistributionChamberElementType; class IfcDistributionCircuit; class IfcDistributionControlElement; class IfcDistributionControlElementType; class IfcDistributionElement; class IfcDistributionElementType; class IfcDistributionFlowElement; class IfcDistributionFlowElementType; class IfcDistributionPort; class IfcDistributionSystem; class IfcDocumentInformation; class IfcDocumentInformationRelationship; class IfcDocumentReference; class IfcDoor; class IfcDoorLiningProperties; class IfcDoorPanelProperties; class IfcDoorStandardCase; class IfcDoorStyle; class IfcDoorType; class IfcDraughtingPreDefinedColour; class IfcDraughtingPreDefinedCurveFont; class IfcDuctFitting; class IfcDuctFittingType; class IfcDuctSegment; class IfcDuctSegmentType; class IfcDuctSilencer; class IfcDuctSilencerType; class IfcEdge; class IfcEdgeCurve; class IfcEdgeLoop; class IfcElectricAppliance; class IfcElectricApplianceType; class IfcElectricDistributionBoard; class IfcElectricDistributionBoardType; class IfcElectricFlowStorageDevice; class IfcElectricFlowStorageDeviceType; class IfcElectricGenerator; class IfcElectricGeneratorType; class IfcElectricMotor; class IfcElectricMotorType; class IfcElectricTimeControl; class IfcElectricTimeControlType; class IfcElement; class IfcElementAssembly; class IfcElementAssemblyType; class IfcElementComponent; class IfcElementComponentType; class IfcElementQuantity; class IfcElementType; class IfcElementarySurface; class IfcEllipse; class IfcEllipseProfileDef; class IfcEnergyConversionDevice; class IfcEnergyConversionDeviceType; class IfcEngine; class IfcEngineType; class IfcEvaporativeCooler; class IfcEvaporativeCoolerType; class IfcEvaporator; class IfcEvaporatorType; class IfcEvent; class IfcEventTime; class IfcEventType; class IfcExtendedProperties; class IfcExternalInformation; class IfcExternalReference; class IfcExternalReferenceRelationship; class IfcExternalSpatialElement; class IfcExternalSpatialStructureElement; class IfcExternallyDefinedHatchStyle; class IfcExternallyDefinedSurfaceStyle; class IfcExternallyDefinedTextFont; class IfcExtrudedAreaSolid; class IfcExtrudedAreaSolidTapered; class IfcFace; class IfcFaceBasedSurfaceModel; class IfcFaceBound; class IfcFaceOuterBound; class IfcFaceSurface; class IfcFacetedBrep; class IfcFacetedBrepWithVoids; class IfcFailureConnectionCondition; class IfcFan; class IfcFanType; class IfcFastener; class IfcFastenerType; class IfcFeatureElement; class IfcFeatureElementAddition; class IfcFeatureElementSubtraction; class IfcFillAreaStyle; class IfcFillAreaStyleHatching; class IfcFillAreaStyleTiles; class IfcFilter; class IfcFilterType; class IfcFireSuppressionTerminal; class IfcFireSuppressionTerminalType; class IfcFixedReferenceSweptAreaSolid; class IfcFlowController; class IfcFlowControllerType; class IfcFlowFitting; class IfcFlowFittingType; class IfcFlowInstrument; class IfcFlowInstrumentType; class IfcFlowMeter; class IfcFlowMeterType; class IfcFlowMovingDevice; class IfcFlowMovingDeviceType; class IfcFlowSegment; class IfcFlowSegmentType; class IfcFlowStorageDevice; class IfcFlowStorageDeviceType; class IfcFlowTerminal; class IfcFlowTerminalType; class IfcFlowTreatmentDevice; class IfcFlowTreatmentDeviceType; class IfcFooting; class IfcFootingType; class IfcFurnishingElement; class IfcFurnishingElementType; class IfcFurniture; class IfcFurnitureType; class IfcGeographicElement; class IfcGeographicElementType; class IfcGeometricCurveSet; class IfcGeometricRepresentationContext; class IfcGeometricRepresentationItem; class IfcGeometricRepresentationSubContext; class IfcGeometricSet; class IfcGrid; class IfcGridAxis; class IfcGridPlacement; class IfcGroup; class IfcHalfSpaceSolid; class IfcHeatExchanger; class IfcHeatExchangerType; class IfcHumidifier; class IfcHumidifierType; class IfcIShapeProfileDef; class IfcImageTexture; class IfcIndexedColourMap; class IfcIndexedPolyCurve; class IfcIndexedTextureMap; class IfcIndexedTriangleTextureMap; class IfcInterceptor; class IfcInterceptorType; class IfcInventory; class IfcIrregularTimeSeries; class IfcIrregularTimeSeriesValue; class IfcJunctionBox; class IfcJunctionBoxType; class IfcLShapeProfileDef; class IfcLaborResource; class IfcLaborResourceType; class IfcLagTime; class IfcLamp; class IfcLampType; class IfcLibraryInformation; class IfcLibraryReference; class IfcLightDistributionData; class IfcLightFixture; class IfcLightFixtureType; class IfcLightIntensityDistribution; class IfcLightSource; class IfcLightSourceAmbient; class IfcLightSourceDirectional; class IfcLightSourceGoniometric; class IfcLightSourcePositional; class IfcLightSourceSpot; class IfcLine; class IfcLocalPlacement; class IfcLoop; class IfcManifoldSolidBrep; class IfcMapConversion; class IfcMappedItem; class IfcMaterial; class IfcMaterialClassificationRelationship; class IfcMaterialConstituent; class IfcMaterialConstituentSet; class IfcMaterialDefinition; class IfcMaterialDefinitionRepresentation; class IfcMaterialLayer; class IfcMaterialLayerSet; class IfcMaterialLayerSetUsage; class IfcMaterialLayerWithOffsets; class IfcMaterialList; class IfcMaterialProfile; class IfcMaterialProfileSet; class IfcMaterialProfileSetUsage; class IfcMaterialProfileSetUsageTapering; class IfcMaterialProfileWithOffsets; class IfcMaterialProperties; class IfcMaterialRelationship; class IfcMaterialUsageDefinition; class IfcMeasureWithUnit; class IfcMechanicalFastener; class IfcMechanicalFastenerType; class IfcMedicalDevice; class IfcMedicalDeviceType; class IfcMember; class IfcMemberStandardCase; class IfcMemberType; class IfcMetric; class IfcMirroredProfileDef; class IfcMonetaryUnit; class IfcMotorConnection; class IfcMotorConnectionType; class IfcNamedUnit; class IfcObject; class IfcObjectDefinition; class IfcObjectPlacement; class IfcObjective; class IfcOccupant; class IfcOffsetCurve2D; class IfcOffsetCurve3D; class IfcOpenShell; class IfcOpeningElement; class IfcOpeningStandardCase; class IfcOrganization; class IfcOrganizationRelationship; class IfcOrientedEdge; class IfcOuterBoundaryCurve; class IfcOutlet; class IfcOutletType; class IfcOwnerHistory; class IfcParameterizedProfileDef; class IfcPath; class IfcPcurve; class IfcPerformanceHistory; class IfcPermeableCoveringProperties; class IfcPermit; class IfcPerson; class IfcPersonAndOrganization; class IfcPhysicalComplexQuantity; class IfcPhysicalQuantity; class IfcPhysicalSimpleQuantity; class IfcPile; class IfcPileType; class IfcPipeFitting; class IfcPipeFittingType; class IfcPipeSegment; class IfcPipeSegmentType; class IfcPixelTexture; class IfcPlacement; class IfcPlanarBox; class IfcPlanarExtent; class IfcPlane; class IfcPlate; class IfcPlateStandardCase; class IfcPlateType; class IfcPoint; class IfcPointOnCurve; class IfcPointOnSurface; class IfcPolyLoop; class IfcPolygonalBoundedHalfSpace; class IfcPolyline; class IfcPort; class IfcPostalAddress; class IfcPreDefinedColour; class IfcPreDefinedCurveFont; class IfcPreDefinedItem; class IfcPreDefinedProperties; class IfcPreDefinedPropertySet; class IfcPreDefinedTextFont; class IfcPresentationItem; class IfcPresentationLayerAssignment; class IfcPresentationLayerWithStyle; class IfcPresentationStyle; class IfcPresentationStyleAssignment; class IfcProcedure; class IfcProcedureType; class IfcProcess; class IfcProduct; class IfcProductDefinitionShape; class IfcProductRepresentation; class IfcProfileDef; class IfcProfileProperties; class IfcProject; class IfcProjectLibrary; class IfcProjectOrder; class IfcProjectedCRS; class IfcProjectionElement; class IfcProperty; class IfcPropertyAbstraction; class IfcPropertyBoundedValue; class IfcPropertyDefinition; class IfcPropertyDependencyRelationship; class IfcPropertyEnumeratedValue; class IfcPropertyEnumeration; class IfcPropertyListValue; class IfcPropertyReferenceValue; class IfcPropertySet; class IfcPropertySetDefinition; class IfcPropertySetTemplate; class IfcPropertySingleValue; class IfcPropertyTableValue; class IfcPropertyTemplate; class IfcPropertyTemplateDefinition; class IfcProtectiveDevice; class IfcProtectiveDeviceTrippingUnit; class IfcProtectiveDeviceTrippingUnitType; class IfcProtectiveDeviceType; class IfcProxy; class IfcPump; class IfcPumpType; class IfcQuantityArea; class IfcQuantityCount; class IfcQuantityLength; class IfcQuantitySet; class IfcQuantityTime; class IfcQuantityVolume; class IfcQuantityWeight; class IfcRailing; class IfcRailingType; class IfcRamp; class IfcRampFlight; class IfcRampFlightType; class IfcRampType; class IfcRationalBSplineCurveWithKnots; class IfcRationalBSplineSurfaceWithKnots; class IfcRectangleHollowProfileDef; class IfcRectangleProfileDef; class IfcRectangularPyramid; class IfcRectangularTrimmedSurface; class IfcRecurrencePattern; class IfcReference; class IfcRegularTimeSeries; class IfcReinforcementBarProperties; class IfcReinforcementDefinitionProperties; class IfcReinforcingBar; class IfcReinforcingBarType; class IfcReinforcingElement; class IfcReinforcingElementType; class IfcReinforcingMesh; class IfcReinforcingMeshType; class IfcRelAggregates; class IfcRelAssigns; class IfcRelAssignsToActor; class IfcRelAssignsToControl; class IfcRelAssignsToGroup; class IfcRelAssignsToGroupByFactor; class IfcRelAssignsToProcess; class IfcRelAssignsToProduct; class IfcRelAssignsToResource; class IfcRelAssociates; class IfcRelAssociatesApproval; class IfcRelAssociatesClassification; class IfcRelAssociatesConstraint; class IfcRelAssociatesDocument; class IfcRelAssociatesLibrary; class IfcRelAssociatesMaterial; class IfcRelConnects; class IfcRelConnectsElements; class IfcRelConnectsPathElements; class IfcRelConnectsPortToElement; class IfcRelConnectsPorts; class IfcRelConnectsStructuralActivity; class IfcRelConnectsStructuralMember; class IfcRelConnectsWithEccentricity; class IfcRelConnectsWithRealizingElements; class IfcRelContainedInSpatialStructure; class IfcRelCoversBldgElements; class IfcRelCoversSpaces; class IfcRelDeclares; class IfcRelDecomposes; class IfcRelDefines; class IfcRelDefinesByObject; class IfcRelDefinesByProperties; class IfcRelDefinesByTemplate; class IfcRelDefinesByType; class IfcRelFillsElement; class IfcRelFlowControlElements; class IfcRelInterferesElements; class IfcRelNests; class IfcRelProjectsElement; class IfcRelReferencedInSpatialStructure; class IfcRelSequence; class IfcRelServicesBuildings; class IfcRelSpaceBoundary; class IfcRelSpaceBoundary1stLevel; class IfcRelSpaceBoundary2ndLevel; class IfcRelVoidsElement; class IfcRelationship; class IfcReparametrisedCompositeCurveSegment; class IfcRepresentation; class IfcRepresentationContext; class IfcRepresentationItem; class IfcRepresentationMap; class IfcResource; class IfcResourceApprovalRelationship; class IfcResourceConstraintRelationship; class IfcResourceLevelRelationship; class IfcResourceTime; class IfcRevolvedAreaSolid; class IfcRevolvedAreaSolidTapered; class IfcRightCircularCone; class IfcRightCircularCylinder; class IfcRoof; class IfcRoofType; class IfcRoot; class IfcRoundedRectangleProfileDef; class IfcSIUnit; class IfcSanitaryTerminal; class IfcSanitaryTerminalType; class IfcSchedulingTime; class IfcSectionProperties; class IfcSectionReinforcementProperties; class IfcSectionedSpine; class IfcSensor; class IfcSensorType; class IfcShadingDevice; class IfcShadingDeviceType; class IfcShapeAspect; class IfcShapeModel; class IfcShapeRepresentation; class IfcShellBasedSurfaceModel; class IfcSimpleProperty; class IfcSimplePropertyTemplate; class IfcSite; class IfcSlab; class IfcSlabElementedCase; class IfcSlabStandardCase; class IfcSlabType; class IfcSlippageConnectionCondition; class IfcSolarDevice; class IfcSolarDeviceType; class IfcSolidModel; class IfcSpace; class IfcSpaceHeater; class IfcSpaceHeaterType; class IfcSpaceType; class IfcSpatialElement; class IfcSpatialElementType; class IfcSpatialStructureElement; class IfcSpatialStructureElementType; class IfcSpatialZone; class IfcSpatialZoneType; class IfcSphere; class IfcStackTerminal; class IfcStackTerminalType; class IfcStair; class IfcStairFlight; class IfcStairFlightType; class IfcStairType; class IfcStructuralAction; class IfcStructuralActivity; class IfcStructuralAnalysisModel; class IfcStructuralConnection; class IfcStructuralConnectionCondition; class IfcStructuralCurveAction; class IfcStructuralCurveConnection; class IfcStructuralCurveMember; class IfcStructuralCurveMemberVarying; class IfcStructuralCurveReaction; class IfcStructuralItem; class IfcStructuralLinearAction; class IfcStructuralLoad; class IfcStructuralLoadCase; class IfcStructuralLoadConfiguration; class IfcStructuralLoadGroup; class IfcStructuralLoadLinearForce; class IfcStructuralLoadOrResult; class IfcStructuralLoadPlanarForce; class IfcStructuralLoadSingleDisplacement; class IfcStructuralLoadSingleDisplacementDistortion; class IfcStructuralLoadSingleForce; class IfcStructuralLoadSingleForceWarping; class IfcStructuralLoadStatic; class IfcStructuralLoadTemperature; class IfcStructuralMember; class IfcStructuralPlanarAction; class IfcStructuralPointAction; class IfcStructuralPointConnection; class IfcStructuralPointReaction; class IfcStructuralReaction; class IfcStructuralResultGroup; class IfcStructuralSurfaceAction; class IfcStructuralSurfaceConnection; class IfcStructuralSurfaceMember; class IfcStructuralSurfaceMemberVarying; class IfcStructuralSurfaceReaction; class IfcStyleModel; class IfcStyledItem; class IfcStyledRepresentation; class IfcSubContractResource; class IfcSubContractResourceType; class IfcSubedge; class IfcSurface; class IfcSurfaceCurveSweptAreaSolid; class IfcSurfaceFeature; class IfcSurfaceOfLinearExtrusion; class IfcSurfaceOfRevolution; class IfcSurfaceReinforcementArea; class IfcSurfaceStyle; class IfcSurfaceStyleLighting; class IfcSurfaceStyleRefraction; class IfcSurfaceStyleRendering; class IfcSurfaceStyleShading; class IfcSurfaceStyleWithTextures; class IfcSurfaceTexture; class IfcSweptAreaSolid; class IfcSweptDiskSolid; class IfcSweptDiskSolidPolygonal; class IfcSweptSurface; class IfcSwitchingDevice; class IfcSwitchingDeviceType; class IfcSystem; class IfcSystemFurnitureElement; class IfcSystemFurnitureElementType; class IfcTShapeProfileDef; class IfcTable; class IfcTableColumn; class IfcTableRow; class IfcTank; class IfcTankType; class IfcTask; class IfcTaskTime; class IfcTaskTimeRecurring; class IfcTaskType; class IfcTelecomAddress; class IfcTendon; class IfcTendonAnchor; class IfcTendonAnchorType; class IfcTendonType; class IfcTessellatedFaceSet; class IfcTessellatedItem; class IfcTextLiteral; class IfcTextLiteralWithExtent; class IfcTextStyle; class IfcTextStyleFontModel; class IfcTextStyleForDefinedFont; class IfcTextStyleTextModel; class IfcTextureCoordinate; class IfcTextureCoordinateGenerator; class IfcTextureMap; class IfcTextureVertex; class IfcTextureVertexList; class IfcTimePeriod; class IfcTimeSeries; class IfcTimeSeriesValue; class IfcTopologicalRepresentationItem; class IfcTopologyRepresentation; class IfcTransformer; class IfcTransformerType; class IfcTransportElement; class IfcTransportElementType; class IfcTrapeziumProfileDef; class IfcTriangulatedFaceSet; class IfcTrimmedCurve; class IfcTubeBundle; class IfcTubeBundleType; class IfcTypeObject; class IfcTypeProcess; class IfcTypeProduct; class IfcTypeResource; class IfcUShapeProfileDef; class IfcUnitAssignment; class IfcUnitaryControlElement; class IfcUnitaryControlElementType; class IfcUnitaryEquipment; class IfcUnitaryEquipmentType; class IfcValve; class IfcValveType; class IfcVector; class IfcVertex; class IfcVertexLoop; class IfcVertexPoint; class IfcVibrationIsolator; class IfcVibrationIsolatorType; class IfcVirtualElement; class IfcVirtualGridIntersection; class IfcVoidingFeature; class IfcWall; class IfcWallElementedCase; class IfcWallStandardCase; class IfcWallType; class IfcWasteTerminal; class IfcWasteTerminalType; class IfcWindow; class IfcWindowLiningProperties; class IfcWindowPanelProperties; class IfcWindowStandardCase; class IfcWindowStyle; class IfcWindowType; class IfcWorkCalendar; class IfcWorkControl; class IfcWorkPlan; class IfcWorkSchedule; class IfcWorkTime; class IfcZShapeProfileDef; class IfcZone; class IfcAbsorbedDoseMeasure; class IfcAccelerationMeasure; class IfcAmountOfSubstanceMeasure; class IfcAngularVelocityMeasure; class IfcArcIndex; class IfcAreaDensityMeasure; class IfcAreaMeasure; class IfcBinary; class IfcBoolean; class IfcBoxAlignment; class IfcCardinalPointReference; class IfcComplexNumber; class IfcCompoundPlaneAngleMeasure; class IfcContextDependentMeasure; class IfcCountMeasure; class IfcCurvatureMeasure; class IfcDate; class IfcDateTime; class IfcDayInMonthNumber; class IfcDayInWeekNumber; class IfcDescriptiveMeasure; class IfcDimensionCount; class IfcDoseEquivalentMeasure; class IfcDuration; class IfcDynamicViscosityMeasure; class IfcElectricCapacitanceMeasure; class IfcElectricChargeMeasure; class IfcElectricConductanceMeasure; class IfcElectricCurrentMeasure; class IfcElectricResistanceMeasure; class IfcElectricVoltageMeasure; class IfcEnergyMeasure; class IfcFontStyle; class IfcFontVariant; class IfcFontWeight; class IfcForceMeasure; class IfcFrequencyMeasure; class IfcGloballyUniqueId; class IfcHeatFluxDensityMeasure; class IfcHeatingValueMeasure; class IfcIdentifier; class IfcIlluminanceMeasure; class IfcInductanceMeasure; class IfcInteger; class IfcIntegerCountRateMeasure; class IfcIonConcentrationMeasure; class IfcIsothermalMoistureCapacityMeasure; class IfcKinematicViscosityMeasure; class IfcLabel; class IfcLanguageId; class IfcLengthMeasure; class IfcLineIndex; class IfcLinearForceMeasure; class IfcLinearMomentMeasure; class IfcLinearStiffnessMeasure; class IfcLinearVelocityMeasure; class IfcLogical; class IfcLuminousFluxMeasure; class IfcLuminousIntensityDistributionMeasure; class IfcLuminousIntensityMeasure; class IfcMagneticFluxDensityMeasure; class IfcMagneticFluxMeasure; class IfcMassDensityMeasure; class IfcMassFlowRateMeasure; class IfcMassMeasure; class IfcMassPerLengthMeasure; class IfcModulusOfElasticityMeasure; class IfcModulusOfLinearSubgradeReactionMeasure; class IfcModulusOfRotationalSubgradeReactionMeasure; class IfcModulusOfSubgradeReactionMeasure; class IfcMoistureDiffusivityMeasure; class IfcMolecularWeightMeasure; class IfcMomentOfInertiaMeasure; class IfcMonetaryMeasure; class IfcMonthInYearNumber; class IfcNonNegativeLengthMeasure; class IfcNormalisedRatioMeasure; class IfcNumericMeasure; class IfcPHMeasure; class IfcParameterValue; class IfcPlanarForceMeasure; class IfcPlaneAngleMeasure; class IfcPositiveInteger; class IfcPositiveLengthMeasure; class IfcPositivePlaneAngleMeasure; class IfcPositiveRatioMeasure; class IfcPowerMeasure; class IfcPresentableText; class IfcPressureMeasure; class IfcPropertySetDefinitionSet; class IfcRadioActivityMeasure; class IfcRatioMeasure; class IfcReal; class IfcRotationalFrequencyMeasure; class IfcRotationalMassMeasure; class IfcRotationalStiffnessMeasure; class IfcSectionModulusMeasure; class IfcSectionalAreaIntegralMeasure; class IfcShearModulusMeasure; class IfcSolidAngleMeasure; class IfcSoundPowerLevelMeasure; class IfcSoundPowerMeasure; class IfcSoundPressureLevelMeasure; class IfcSoundPressureMeasure; class IfcSpecificHeatCapacityMeasure; class IfcSpecularExponent; class IfcSpecularRoughness; class IfcTemperatureGradientMeasure; class IfcTemperatureRateOfChangeMeasure; class IfcText; class IfcTextAlignment; class IfcTextDecoration; class IfcTextFontName; class IfcTextTransformation; class IfcThermalAdmittanceMeasure; class IfcThermalConductivityMeasure; class IfcThermalExpansionCoefficientMeasure; class IfcThermalResistanceMeasure; class IfcThermalTransmittanceMeasure; class IfcThermodynamicTemperatureMeasure; class IfcTime; class IfcTimeMeasure; class IfcTimeStamp; class IfcTorqueMeasure; class IfcURIReference; class IfcVaporPermeabilityMeasure; class IfcVolumeMeasure; class IfcVolumetricFlowRateMeasure; class IfcWarpingConstantMeasure; class IfcWarpingMomentMeasure; /// The actor select type allows a person, or an organization, or a person associated with an organization to be referenced. /// @@ -453,6 +457,8 @@ typedef IfcUtil::IfcBaseClass IfcResourceSelect; /// /// HISTORY: New type in IFC 2x4. typedef IfcUtil::IfcBaseClass IfcRotationalStiffnessSelect; + +typedef IfcUtil::IfcBaseClass IfcSegmentIndexSelect; /// Definition from ISO/CD 10303-42:1992 This type collects together, for reference when constructing more complex models, the subtypes which have the characteristics of a shell. A shell is a connected object of fixed dimensionality d = 0; 1; or 2, typically used to bound a region. The domain of a shell, if present, includes its bounds and 0 £ X < ¥. /// /// A shell of dimensionality 0 is represented by a graph consisting of a single vertex. The vertex shall not have any associated edges. @@ -4419,7 +4425,7 @@ namespace IfcSensorTypeEnum { /// WINDSENSOR: A device that senses or detects airflow speed and direction. /// USERDEFINED: User-defined type. /// NOTDEFINED: Undefined type. -typedef enum {IfcSensorType_CONDUCTANCESENSOR, IfcSensorType_CONTACTSENSOR, IfcSensorType_FIRESENSOR, IfcSensorType_FLOWSENSOR, IfcSensorType_GASSENSOR, IfcSensorType_HEATSENSOR, IfcSensorType_HUMIDITYSENSOR, IfcSensorType_IONCONCENTRATIONSENSOR, IfcSensorType_LEVELSENSOR, IfcSensorType_LIGHTSENSOR, IfcSensorType_MOISTURESENSOR, IfcSensorType_MOVEMENTSENSOR, IfcSensorType_PHSENSOR, IfcSensorType_PRESSURESENSOR, IfcSensorType_RADIATIONSENSOR, IfcSensorType_RADIOACTIVITYSENSOR, IfcSensorType_SMOKESENSOR, IfcSensorType_SOUNDSENSOR, IfcSensorType_TEMPERATURESENSOR, IfcSensorType_WINDSENSOR, IfcSensorType_USERDEFINED, IfcSensorType_NOTDEFINED} IfcSensorTypeEnum; +typedef enum {IfcSensorType_CO2SENSOR, IfcSensorType_CONDUCTANCESENSOR, IfcSensorType_CONTACTSENSOR, IfcSensorType_FIRESENSOR, IfcSensorType_FLOWSENSOR, IfcSensorType_FROSTSENSOR, IfcSensorType_GASSENSOR, IfcSensorType_HEATSENSOR, IfcSensorType_HUMIDITYSENSOR, IfcSensorType_IDENTIFIERSENSOR, IfcSensorType_IONCONCENTRATIONSENSOR, IfcSensorType_LEVELSENSOR, IfcSensorType_LIGHTSENSOR, IfcSensorType_MOISTURESENSOR, IfcSensorType_MOVEMENTSENSOR, IfcSensorType_PHSENSOR, IfcSensorType_PRESSURESENSOR, IfcSensorType_RADIATIONSENSOR, IfcSensorType_RADIOACTIVITYSENSOR, IfcSensorType_SMOKESENSOR, IfcSensorType_SOUNDSENSOR, IfcSensorType_TEMPERATURESENSOR, IfcSensorType_WINDSENSOR, IfcSensorType_USERDEFINED, IfcSensorType_NOTDEFINED} IfcSensorTypeEnum; const char* ToString(IfcSensorTypeEnum v); IfcSensorTypeEnum FromString(const std::string& s); } @@ -5801,6 +5807,18 @@ public: operator double() const; }; +class IfcArcIndex : public IfcUtil::IfcBaseType { +public: + virtual IfcUtil::ArgumentType getArgumentType(unsigned int i) const; + virtual Argument* getArgument(unsigned int i) const; + bool is(Type::Enum v) const; + Type::Enum type() const; + static Type::Enum Class(); + explicit IfcArcIndex (IfcAbstractEntity* e); + IfcArcIndex (std::vector< int > /*[3:3]*/ v); + operator std::vector< int > /*[3:3]*/() const; +}; + class IfcAreaDensityMeasure : public IfcUtil::IfcBaseType { public: virtual IfcUtil::ArgumentType getArgumentType(unsigned int i) const; @@ -5830,6 +5848,18 @@ public: IfcAreaMeasure (double v); operator double() const; }; + +class IfcBinary : public IfcUtil::IfcBaseType { +public: + virtual IfcUtil::ArgumentType getArgumentType(unsigned int i) const; + virtual Argument* getArgument(unsigned int i) const; + bool is(Type::Enum v) const; + Type::Enum type() const; + static Type::Enum Class(); + explicit IfcBinary (IfcAbstractEntity* e); + IfcBinary (boost::dynamic_bitset<> v); + operator boost::dynamic_bitset<>() const; +}; /// IfcBoolean is a defined data type of simple data type Boolean. It is required since a select type (IfcSimpleValue) cannot directly include simple types in its select list. A boolean type can have value TRUE or FALSE. /// /// Type: BOOLEAN @@ -6718,6 +6748,18 @@ public: IfcLengthMeasure (double v); operator double() const; }; + +class IfcLineIndex : public IfcUtil::IfcBaseType { +public: + virtual IfcUtil::ArgumentType getArgumentType(unsigned int i) const; + virtual Argument* getArgument(unsigned int i) const; + bool is(Type::Enum v) const; + Type::Enum type() const; + static Type::Enum Class(); + explicit IfcLineIndex (IfcAbstractEntity* e); + IfcLineIndex (std::vector< int > /*[2:?]*/ v); + operator std::vector< int > /*[2:?]*/() const; +}; /// IfcLinearForceMeasure is a measure of linear force. /// Usually measured in N/m. /// Type: REAL @@ -7251,6 +7293,18 @@ public: IfcPlaneAngleMeasure (double v); operator double() const; }; + +class IfcPositiveInteger : public IfcInteger { +public: + virtual IfcUtil::ArgumentType getArgumentType(unsigned int i) const; + virtual Argument* getArgument(unsigned int i) const; + bool is(Type::Enum v) const; + Type::Enum type() const; + static Type::Enum Class(); + explicit IfcPositiveInteger (IfcAbstractEntity* e); + IfcPositiveInteger (int v); + operator int() const; +}; /// Definition from ISO/CD 10303-41:1992: A positive length measure is a length measure that is greater than zero. /// Type: IfcLengthMeasure /// @@ -8867,8 +8921,6 @@ public: /// HISTORY  New entity in IFC2x4. class IfcCoordinateReferenceSystem : public IfcUtil::IfcBaseEntity { public: - /// Whether the optional attribute Name is defined for this IfcCoordinateReferenceSystem - bool hasName() const; /// Name by which the coordinate reference system is identified. /// Note  The name shall be taken from the list recognized by the European Petroleum Survey Group EPSG. std::string Name() const; @@ -8878,6 +8930,8 @@ public: /// Informal description of this coordinate reference system. std::string Description() const; void setDescription(std::string v); + /// Whether the optional attribute GeodeticDatum is defined for this IfcCoordinateReferenceSystem + bool hasGeodeticDatum() const; /// Name by which this datum is identified. The geodetic datum is associated with the coordinate reference system and indicates the shape and size of the rotation ellipsoid and this ellipsoid's connection and orientation to the actual globe/earth. Examples for geodetic datums include: /// /// ED50 @@ -8898,11 +8952,12 @@ public: virtual Type::Enum getArgumentEntity(unsigned int i) const { switch (i) {case 0: return Type::IfcLabel; case 1: return Type::IfcText; case 2: return Type::IfcIdentifier; case 3: return Type::IfcIdentifier; } throw IfcParse::IfcAttributeOutOfRangeException("Argument index out of range"); } virtual const char* getArgumentName(unsigned int i) const { switch (i) {case 0: return "Name"; case 1: return "Description"; case 2: return "GeodeticDatum"; case 3: return "VerticalDatum"; } throw IfcParse::IfcAttributeOutOfRangeException("Argument index out of range"); } virtual Argument* getArgument(unsigned int i) const { return entity->getArgument(i); } + IfcTemplatedEntityList< IfcCoordinateOperation >::ptr HasCoordinateOperation() const; // INVERSE IfcCoordinateOperation::SourceCRS bool is(Type::Enum v) const; Type::Enum type() const; static Type::Enum Class(); IfcCoordinateReferenceSystem (IfcAbstractEntity* e); - IfcCoordinateReferenceSystem (boost::optional< std::string > v1_Name, boost::optional< std::string > v2_Description, std::string v3_GeodeticDatum, boost::optional< std::string > v4_VerticalDatum); + IfcCoordinateReferenceSystem (std::string v1_Name, boost::optional< std::string > v2_Description, boost::optional< std::string > v3_GeodeticDatum, boost::optional< std::string > v4_VerticalDatum); typedef IfcTemplatedEntityList< IfcCoordinateReferenceSystem > list; }; /// IfcCostValue is an amount of money or a value that affects an amount of money. @@ -10048,6 +10103,8 @@ public: /// Reference source for data values. std::string ValueSource() const; void setValueSource(std::string v); + /// Whether the optional attribute DataValue is defined for this IfcMetric + bool hasDataValue() const; /// The value with data type defined by the underlying type accesses via IfcMetricValueSelect. IfcMetricValueSelect* DataValue() const; void setDataValue(IfcMetricValueSelect* v); @@ -10596,7 +10653,7 @@ public: void setLayerStyles(IfcTemplatedEntityList< IfcPresentationStyle >::ptr v); virtual unsigned int getArgumentCount() const { return 8; } virtual IfcUtil::ArgumentType getArgumentType(unsigned int i) const { switch (i) {case 4: return IfcUtil::Argument_BOOL; case 5: return IfcUtil::Argument_BOOL; case 6: return IfcUtil::Argument_BOOL; case 7: return IfcUtil::Argument_AGGREGATE_OF_ENTITY_INSTANCE; } return IfcPresentationLayerAssignment::getArgumentType(i); } - virtual Type::Enum getArgumentEntity(unsigned int i) const { switch (i) {case 4: return Type::UNDEFINED; case 5: return Type::UNDEFINED; case 6: return Type::UNDEFINED; case 7: return Type::IfcPresentationStyle; } return IfcPresentationLayerAssignment::getArgumentEntity(i); } + virtual Type::Enum getArgumentEntity(unsigned int i) const { switch (i) {case 4: return Type::IfcLogical; case 5: return Type::IfcLogical; case 6: return Type::IfcLogical; case 7: return Type::IfcPresentationStyle; } return IfcPresentationLayerAssignment::getArgumentEntity(i); } virtual const char* getArgumentName(unsigned int i) const { switch (i) {case 4: return "LayerOn"; case 5: return "LayerFrozen"; case 6: return "LayerBlocked"; case 7: return "LayerStyles"; } return IfcPresentationLayerAssignment::getArgumentName(i); } virtual Argument* getArgument(unsigned int i) const { return entity->getArgument(i); } bool is(Type::Enum v) const; @@ -10946,7 +11003,7 @@ public: Type::Enum type() const; static Type::Enum Class(); IfcProjectedCRS (IfcAbstractEntity* e); - IfcProjectedCRS (boost::optional< std::string > v1_Name, boost::optional< std::string > v2_Description, std::string v3_GeodeticDatum, boost::optional< std::string > v4_VerticalDatum, boost::optional< std::string > v5_MapProjection, boost::optional< std::string > v6_MapZone, IfcNamedUnit* v7_MapUnit); + IfcProjectedCRS (std::string v1_Name, boost::optional< std::string > v2_Description, boost::optional< std::string > v3_GeodeticDatum, boost::optional< std::string > v4_VerticalDatum, boost::optional< std::string > v5_MapProjection, boost::optional< std::string > v6_MapZone, IfcNamedUnit* v7_MapUnit); typedef IfcTemplatedEntityList< IfcProjectedCRS > list; }; @@ -11306,7 +11363,7 @@ public: void setInnerReference(IfcReference* v); virtual unsigned int getArgumentCount() const { return 5; } virtual IfcUtil::ArgumentType getArgumentType(unsigned int i) const { switch (i) {case 0: return IfcUtil::Argument_STRING; case 1: return IfcUtil::Argument_STRING; case 2: return IfcUtil::Argument_STRING; case 3: return IfcUtil::Argument_AGGREGATE_OF_INT; case 4: return IfcUtil::Argument_ENTITY_INSTANCE; } throw IfcParse::IfcAttributeOutOfRangeException("Argument index out of range"); } - virtual Type::Enum getArgumentEntity(unsigned int i) const { switch (i) {case 0: return Type::IfcIdentifier; case 1: return Type::IfcIdentifier; case 2: return Type::IfcLabel; case 3: return Type::UNDEFINED; case 4: return Type::IfcReference; } throw IfcParse::IfcAttributeOutOfRangeException("Argument index out of range"); } + virtual Type::Enum getArgumentEntity(unsigned int i) const { switch (i) {case 0: return Type::IfcIdentifier; case 1: return Type::IfcIdentifier; case 2: return Type::IfcLabel; case 3: return Type::IfcInteger; case 4: return Type::IfcReference; } throw IfcParse::IfcAttributeOutOfRangeException("Argument index out of range"); } virtual const char* getArgumentName(unsigned int i) const { switch (i) {case 0: return "TypeIdentifier"; case 1: return "AttributeIdentifier"; case 2: return "InstanceName"; case 3: return "ListPositions"; case 4: return "InnerReference"; } throw IfcParse::IfcAttributeOutOfRangeException("Argument index out of range"); } virtual Argument* getArgument(unsigned int i) const { return entity->getArgument(i); } bool is(Type::Enum v) const; @@ -11715,7 +11772,7 @@ public: void setPartOfProductDefinitionShape(IfcProductRepresentationSelect* v); virtual unsigned int getArgumentCount() const { return 5; } virtual IfcUtil::ArgumentType getArgumentType(unsigned int i) const { switch (i) {case 0: return IfcUtil::Argument_AGGREGATE_OF_ENTITY_INSTANCE; case 1: return IfcUtil::Argument_STRING; case 2: return IfcUtil::Argument_STRING; case 3: return IfcUtil::Argument_BOOL; case 4: return IfcUtil::Argument_ENTITY_INSTANCE; } throw IfcParse::IfcAttributeOutOfRangeException("Argument index out of range"); } - virtual Type::Enum getArgumentEntity(unsigned int i) const { switch (i) {case 0: return Type::IfcShapeModel; case 1: return Type::IfcLabel; case 2: return Type::IfcText; case 3: return Type::UNDEFINED; case 4: return Type::IfcProductRepresentationSelect; } throw IfcParse::IfcAttributeOutOfRangeException("Argument index out of range"); } + virtual Type::Enum getArgumentEntity(unsigned int i) const { switch (i) {case 0: return Type::IfcShapeModel; case 1: return Type::IfcLabel; case 2: return Type::IfcText; case 3: return Type::IfcLogical; case 4: return Type::IfcProductRepresentationSelect; } throw IfcParse::IfcAttributeOutOfRangeException("Argument index out of range"); } virtual const char* getArgumentName(unsigned int i) const { switch (i) {case 0: return "ShapeRepresentations"; case 1: return "Name"; case 2: return "Description"; case 3: return "ProductDefinitional"; case 4: return "PartOfProductDefinitionShape"; } throw IfcParse::IfcAttributeOutOfRangeException("Argument index out of range"); } virtual Argument* getArgument(unsigned int i) const { return entity->getArgument(i); } bool is(Type::Enum v) const; @@ -12478,7 +12535,7 @@ public: void setParameter(std::vector< std::string > /*[1:?]*/ v); virtual unsigned int getArgumentCount() const { return 5; } virtual IfcUtil::ArgumentType getArgumentType(unsigned int i) const { switch (i) {case 0: return IfcUtil::Argument_BOOL; case 1: return IfcUtil::Argument_BOOL; case 2: return IfcUtil::Argument_STRING; case 3: return IfcUtil::Argument_ENTITY_INSTANCE; case 4: return IfcUtil::Argument_AGGREGATE_OF_STRING; } return IfcPresentationItem::getArgumentType(i); } - virtual Type::Enum getArgumentEntity(unsigned int i) const { switch (i) {case 0: return Type::UNDEFINED; case 1: return Type::UNDEFINED; case 2: return Type::IfcIdentifier; case 3: return Type::IfcCartesianTransformationOperator2D; case 4: return Type::IfcIdentifier; } return IfcPresentationItem::getArgumentEntity(i); } + virtual Type::Enum getArgumentEntity(unsigned int i) const { switch (i) {case 0: return Type::IfcBoolean; case 1: return Type::IfcBoolean; case 2: return Type::IfcIdentifier; case 3: return Type::IfcCartesianTransformationOperator2D; case 4: return Type::IfcIdentifier; } return IfcPresentationItem::getArgumentEntity(i); } virtual const char* getArgumentName(unsigned int i) const { switch (i) {case 0: return "RepeatS"; case 1: return "RepeatT"; case 2: return "Mode"; case 3: return "TextureTransform"; case 4: return "Parameter"; } return IfcPresentationItem::getArgumentName(i); } virtual Argument* getArgument(unsigned int i) const { return entity->getArgument(i); } IfcTemplatedEntityList< IfcTextureCoordinate >::ptr IsMappedBy() const; // INVERSE IfcTextureCoordinate::Maps @@ -12604,10 +12661,9 @@ public: void setIsHeading(bool v); virtual unsigned int getArgumentCount() const { return 2; } virtual IfcUtil::ArgumentType getArgumentType(unsigned int i) const { switch (i) {case 0: return IfcUtil::Argument_AGGREGATE_OF_ENTITY_INSTANCE; case 1: return IfcUtil::Argument_BOOL; } throw IfcParse::IfcAttributeOutOfRangeException("Argument index out of range"); } - virtual Type::Enum getArgumentEntity(unsigned int i) const { switch (i) {case 0: return Type::IfcValue; case 1: return Type::UNDEFINED; } throw IfcParse::IfcAttributeOutOfRangeException("Argument index out of range"); } + virtual Type::Enum getArgumentEntity(unsigned int i) const { switch (i) {case 0: return Type::IfcValue; case 1: return Type::IfcBoolean; } throw IfcParse::IfcAttributeOutOfRangeException("Argument index out of range"); } virtual const char* getArgumentName(unsigned int i) const { switch (i) {case 0: return "RowCells"; case 1: return "IsHeading"; } throw IfcParse::IfcAttributeOutOfRangeException("Argument index out of range"); } virtual Argument* getArgument(unsigned int i) const { return entity->getArgument(i); } - IfcTemplatedEntityList< IfcTable >::ptr OfTable() const; // INVERSE IfcTable::Rows bool is(Type::Enum v) const; Type::Enum type() const; static Type::Enum Class(); @@ -12766,7 +12822,7 @@ public: void setCompletion(double v); virtual unsigned int getArgumentCount() const { return 20; } virtual IfcUtil::ArgumentType getArgumentType(unsigned int i) const { switch (i) {case 3: return IfcUtil::Argument_ENUMERATION; case 4: return IfcUtil::Argument_STRING; case 5: return IfcUtil::Argument_STRING; case 6: return IfcUtil::Argument_STRING; case 7: return IfcUtil::Argument_STRING; case 8: return IfcUtil::Argument_STRING; case 9: return IfcUtil::Argument_STRING; case 10: return IfcUtil::Argument_STRING; case 11: return IfcUtil::Argument_STRING; case 12: return IfcUtil::Argument_STRING; case 13: return IfcUtil::Argument_BOOL; case 14: return IfcUtil::Argument_STRING; case 15: return IfcUtil::Argument_STRING; case 16: return IfcUtil::Argument_STRING; case 17: return IfcUtil::Argument_STRING; case 18: return IfcUtil::Argument_STRING; case 19: return IfcUtil::Argument_DOUBLE; } return IfcSchedulingTime::getArgumentType(i); } - virtual Type::Enum getArgumentEntity(unsigned int i) const { switch (i) {case 3: return Type::IfcTaskDurationEnum; case 4: return Type::IfcDuration; case 5: return Type::IfcDateTime; case 6: return Type::IfcDateTime; case 7: return Type::IfcDateTime; case 8: return Type::IfcDateTime; case 9: return Type::IfcDateTime; case 10: return Type::IfcDateTime; case 11: return Type::IfcDuration; case 12: return Type::IfcDuration; case 13: return Type::UNDEFINED; case 14: return Type::IfcDateTime; case 15: return Type::IfcDuration; case 16: return Type::IfcDateTime; case 17: return Type::IfcDateTime; case 18: return Type::IfcDuration; case 19: return Type::IfcPositiveRatioMeasure; } return IfcSchedulingTime::getArgumentEntity(i); } + virtual Type::Enum getArgumentEntity(unsigned int i) const { switch (i) {case 3: return Type::IfcTaskDurationEnum; case 4: return Type::IfcDuration; case 5: return Type::IfcDateTime; case 6: return Type::IfcDateTime; case 7: return Type::IfcDateTime; case 8: return Type::IfcDateTime; case 9: return Type::IfcDateTime; case 10: return Type::IfcDateTime; case 11: return Type::IfcDuration; case 12: return Type::IfcDuration; case 13: return Type::IfcBoolean; case 14: return Type::IfcDateTime; case 15: return Type::IfcDuration; case 16: return Type::IfcDateTime; case 17: return Type::IfcDateTime; case 18: return Type::IfcDuration; case 19: return Type::IfcPositiveRatioMeasure; } return IfcSchedulingTime::getArgumentEntity(i); } virtual const char* getArgumentName(unsigned int i) const { switch (i) {case 3: return "DurationType"; case 4: return "ScheduleDuration"; case 5: return "ScheduleStart"; case 6: return "ScheduleFinish"; case 7: return "EarlyStart"; case 8: return "EarlyFinish"; case 9: return "LateStart"; case 10: return "LateFinish"; case 11: return "FreeFloat"; case 12: return "TotalFloat"; case 13: return "IsCritical"; case 14: return "StatusTime"; case 15: return "ActualDuration"; case 16: return "ActualStart"; case 17: return "ActualFinish"; case 18: return "RemainingTime"; case 19: return "Completion"; } return IfcSchedulingTime::getArgumentName(i); } virtual Argument* getArgument(unsigned int i) const { return entity->getArgument(i); } bool is(Type::Enum v) const; @@ -12781,18 +12837,18 @@ public: /// HISTORY: New entity in IFC2x4. class IfcTaskTimeRecurring : public IfcTaskTime { public: - IfcRecurrencePattern* Recurrance() const; - void setRecurrance(IfcRecurrencePattern* v); + IfcRecurrencePattern* Recurrence() const; + void setRecurrence(IfcRecurrencePattern* v); virtual unsigned int getArgumentCount() const { return 21; } virtual IfcUtil::ArgumentType getArgumentType(unsigned int i) const { switch (i) {case 20: return IfcUtil::Argument_ENTITY_INSTANCE; } return IfcTaskTime::getArgumentType(i); } virtual Type::Enum getArgumentEntity(unsigned int i) const { switch (i) {case 20: return Type::IfcRecurrencePattern; } return IfcTaskTime::getArgumentEntity(i); } - virtual const char* getArgumentName(unsigned int i) const { switch (i) {case 20: return "Recurrance"; } return IfcTaskTime::getArgumentName(i); } + virtual const char* getArgumentName(unsigned int i) const { switch (i) {case 20: return "Recurrence"; } return IfcTaskTime::getArgumentName(i); } virtual Argument* getArgument(unsigned int i) const { return entity->getArgument(i); } bool is(Type::Enum v) const; Type::Enum type() const; static Type::Enum Class(); IfcTaskTimeRecurring (IfcAbstractEntity* e); - IfcTaskTimeRecurring (boost::optional< std::string > v1_Name, boost::optional< IfcDataOriginEnum::IfcDataOriginEnum > v2_DataOrigin, boost::optional< std::string > v3_UserDefinedDataOrigin, boost::optional< IfcTaskDurationEnum::IfcTaskDurationEnum > v4_DurationType, boost::optional< std::string > v5_ScheduleDuration, boost::optional< std::string > v6_ScheduleStart, boost::optional< std::string > v7_ScheduleFinish, boost::optional< std::string > v8_EarlyStart, boost::optional< std::string > v9_EarlyFinish, boost::optional< std::string > v10_LateStart, boost::optional< std::string > v11_LateFinish, boost::optional< std::string > v12_FreeFloat, boost::optional< std::string > v13_TotalFloat, boost::optional< bool > v14_IsCritical, boost::optional< std::string > v15_StatusTime, boost::optional< std::string > v16_ActualDuration, boost::optional< std::string > v17_ActualStart, boost::optional< std::string > v18_ActualFinish, boost::optional< std::string > v19_RemainingTime, boost::optional< double > v20_Completion, IfcRecurrencePattern* v21_Recurrance); + IfcTaskTimeRecurring (boost::optional< std::string > v1_Name, boost::optional< IfcDataOriginEnum::IfcDataOriginEnum > v2_DataOrigin, boost::optional< std::string > v3_UserDefinedDataOrigin, boost::optional< IfcTaskDurationEnum::IfcTaskDurationEnum > v4_DurationType, boost::optional< std::string > v5_ScheduleDuration, boost::optional< std::string > v6_ScheduleStart, boost::optional< std::string > v7_ScheduleFinish, boost::optional< std::string > v8_EarlyStart, boost::optional< std::string > v9_EarlyFinish, boost::optional< std::string > v10_LateStart, boost::optional< std::string > v11_LateFinish, boost::optional< std::string > v12_FreeFloat, boost::optional< std::string > v13_TotalFloat, boost::optional< bool > v14_IsCritical, boost::optional< std::string > v15_StatusTime, boost::optional< std::string > v16_ActualDuration, boost::optional< std::string > v17_ActualStart, boost::optional< std::string > v18_ActualFinish, boost::optional< std::string > v19_RemainingTime, boost::optional< double > v20_Completion, IfcRecurrencePattern* v21_Recurrence); typedef IfcTemplatedEntityList< IfcTaskTimeRecurring > list; }; /// Definition: Address to which telephone, electronic mail and other forms of telecommunications should be addressed. @@ -12903,7 +12959,7 @@ public: void setModelOrDraughting(bool v); virtual unsigned int getArgumentCount() const { return 5; } virtual IfcUtil::ArgumentType getArgumentType(unsigned int i) const { switch (i) {case 1: return IfcUtil::Argument_ENTITY_INSTANCE; case 2: return IfcUtil::Argument_ENTITY_INSTANCE; case 3: return IfcUtil::Argument_ENTITY_INSTANCE; case 4: return IfcUtil::Argument_BOOL; } return IfcPresentationStyle::getArgumentType(i); } - virtual Type::Enum getArgumentEntity(unsigned int i) const { switch (i) {case 1: return Type::IfcTextStyleForDefinedFont; case 2: return Type::IfcTextStyleTextModel; case 3: return Type::IfcTextFontSelect; case 4: return Type::UNDEFINED; } return IfcPresentationStyle::getArgumentEntity(i); } + virtual Type::Enum getArgumentEntity(unsigned int i) const { switch (i) {case 1: return Type::IfcTextStyleForDefinedFont; case 2: return Type::IfcTextStyleTextModel; case 3: return Type::IfcTextFontSelect; case 4: return Type::IfcBoolean; } return IfcPresentationStyle::getArgumentEntity(i); } virtual const char* getArgumentName(unsigned int i) const { switch (i) {case 1: return "TextCharacterAppearance"; case 2: return "TextStyle"; case 3: return "TextFontStyle"; case 4: return "ModelOrDraughting"; } return IfcPresentationStyle::getArgumentName(i); } virtual Argument* getArgument(unsigned int i) const { return entity->getArgument(i); } bool is(Type::Enum v) const; @@ -13737,7 +13793,7 @@ public: void setRasterCode(boost::dynamic_bitset<> v); virtual unsigned int getArgumentCount() const { return 7; } virtual IfcUtil::ArgumentType getArgumentType(unsigned int i) const { switch (i) {case 5: return IfcUtil::Argument_STRING; case 6: return IfcUtil::Argument_BINARY; } return IfcSurfaceTexture::getArgumentType(i); } - virtual Type::Enum getArgumentEntity(unsigned int i) const { switch (i) {case 5: return Type::IfcIdentifier; case 6: return Type::UNDEFINED; } return IfcSurfaceTexture::getArgumentEntity(i); } + virtual Type::Enum getArgumentEntity(unsigned int i) const { switch (i) {case 5: return Type::IfcIdentifier; case 6: return Type::IfcBinary; } return IfcSurfaceTexture::getArgumentEntity(i); } virtual const char* getArgumentName(unsigned int i) const { switch (i) {case 5: return "RasterFormat"; case 6: return "RasterCode"; } return IfcSurfaceTexture::getArgumentName(i); } virtual Argument* getArgument(unsigned int i) const { return entity->getArgument(i); } bool is(Type::Enum v) const; @@ -14362,7 +14418,7 @@ public: void setModelOrDraughting(bool v); virtual unsigned int getArgumentCount() const { return 5; } virtual IfcUtil::ArgumentType getArgumentType(unsigned int i) const { switch (i) {case 1: return IfcUtil::Argument_ENTITY_INSTANCE; case 2: return IfcUtil::Argument_ENTITY_INSTANCE; case 3: return IfcUtil::Argument_ENTITY_INSTANCE; case 4: return IfcUtil::Argument_BOOL; } return IfcPresentationStyle::getArgumentType(i); } - virtual Type::Enum getArgumentEntity(unsigned int i) const { switch (i) {case 1: return Type::IfcCurveFontOrScaledCurveFontSelect; case 2: return Type::IfcSizeSelect; case 3: return Type::IfcColour; case 4: return Type::UNDEFINED; } return IfcPresentationStyle::getArgumentEntity(i); } + virtual Type::Enum getArgumentEntity(unsigned int i) const { switch (i) {case 1: return Type::IfcCurveFontOrScaledCurveFontSelect; case 2: return Type::IfcSizeSelect; case 3: return Type::IfcColour; case 4: return Type::IfcBoolean; } return IfcPresentationStyle::getArgumentEntity(i); } virtual const char* getArgumentName(unsigned int i) const { switch (i) {case 1: return "CurveFont"; case 2: return "CurveWidth"; case 3: return "CurveColour"; case 4: return "ModelOrDraughting"; } return IfcPresentationStyle::getArgumentName(i); } virtual Argument* getArgument(unsigned int i) const { return entity->getArgument(i); } bool is(Type::Enum v) const; @@ -14871,7 +14927,7 @@ public: void setSameSense(bool v); virtual unsigned int getArgumentCount() const { return 4; } virtual IfcUtil::ArgumentType getArgumentType(unsigned int i) const { switch (i) {case 2: return IfcUtil::Argument_ENTITY_INSTANCE; case 3: return IfcUtil::Argument_BOOL; } return IfcEdge::getArgumentType(i); } - virtual Type::Enum getArgumentEntity(unsigned int i) const { switch (i) {case 2: return Type::IfcCurve; case 3: return Type::UNDEFINED; } return IfcEdge::getArgumentEntity(i); } + virtual Type::Enum getArgumentEntity(unsigned int i) const { switch (i) {case 2: return Type::IfcCurve; case 3: return Type::IfcBoolean; } return IfcEdge::getArgumentEntity(i); } virtual const char* getArgumentName(unsigned int i) const { switch (i) {case 2: return "EdgeGeometry"; case 3: return "SameSense"; } return IfcEdge::getArgumentName(i); } virtual Argument* getArgument(unsigned int i) const { return entity->getArgument(i); } bool is(Type::Enum v) const; @@ -15071,7 +15127,7 @@ public: void setOrientation(bool v); virtual unsigned int getArgumentCount() const { return 2; } virtual IfcUtil::ArgumentType getArgumentType(unsigned int i) const { switch (i) {case 0: return IfcUtil::Argument_ENTITY_INSTANCE; case 1: return IfcUtil::Argument_BOOL; } return IfcTopologicalRepresentationItem::getArgumentType(i); } - virtual Type::Enum getArgumentEntity(unsigned int i) const { switch (i) {case 0: return Type::IfcLoop; case 1: return Type::UNDEFINED; } return IfcTopologicalRepresentationItem::getArgumentEntity(i); } + virtual Type::Enum getArgumentEntity(unsigned int i) const { switch (i) {case 0: return Type::IfcLoop; case 1: return Type::IfcBoolean; } return IfcTopologicalRepresentationItem::getArgumentEntity(i); } virtual const char* getArgumentName(unsigned int i) const { switch (i) {case 0: return "Bound"; case 1: return "Orientation"; } return IfcTopologicalRepresentationItem::getArgumentName(i); } virtual Argument* getArgument(unsigned int i) const { return entity->getArgument(i); } bool is(Type::Enum v) const; @@ -15146,7 +15202,7 @@ public: void setSameSense(bool v); virtual unsigned int getArgumentCount() const { return 3; } virtual IfcUtil::ArgumentType getArgumentType(unsigned int i) const { switch (i) {case 1: return IfcUtil::Argument_ENTITY_INSTANCE; case 2: return IfcUtil::Argument_BOOL; } return IfcFace::getArgumentType(i); } - virtual Type::Enum getArgumentEntity(unsigned int i) const { switch (i) {case 1: return Type::IfcSurface; case 2: return Type::UNDEFINED; } return IfcFace::getArgumentEntity(i); } + virtual Type::Enum getArgumentEntity(unsigned int i) const { switch (i) {case 1: return Type::IfcSurface; case 2: return Type::IfcBoolean; } return IfcFace::getArgumentEntity(i); } virtual const char* getArgumentName(unsigned int i) const { switch (i) {case 1: return "FaceSurface"; case 2: return "SameSense"; } return IfcFace::getArgumentName(i); } virtual Argument* getArgument(unsigned int i) const { return entity->getArgument(i); } bool is(Type::Enum v) const; @@ -15252,7 +15308,7 @@ public: void setModelorDraughting(bool v); virtual unsigned int getArgumentCount() const { return 3; } virtual IfcUtil::ArgumentType getArgumentType(unsigned int i) const { switch (i) {case 1: return IfcUtil::Argument_AGGREGATE_OF_ENTITY_INSTANCE; case 2: return IfcUtil::Argument_BOOL; } return IfcPresentationStyle::getArgumentType(i); } - virtual Type::Enum getArgumentEntity(unsigned int i) const { switch (i) {case 1: return Type::IfcFillStyleSelect; case 2: return Type::UNDEFINED; } return IfcPresentationStyle::getArgumentEntity(i); } + virtual Type::Enum getArgumentEntity(unsigned int i) const { switch (i) {case 1: return Type::IfcFillStyleSelect; case 2: return Type::IfcBoolean; } return IfcPresentationStyle::getArgumentEntity(i); } virtual const char* getArgumentName(unsigned int i) const { switch (i) {case 1: return "FillStyles"; case 2: return "ModelorDraughting"; } return IfcPresentationStyle::getArgumentName(i); } virtual Argument* getArgument(unsigned int i) const { return entity->getArgument(i); } bool is(Type::Enum v) const; @@ -15331,10 +15387,11 @@ public: void setTrueNorth(IfcDirection* v); virtual unsigned int getArgumentCount() const { return 6; } virtual IfcUtil::ArgumentType getArgumentType(unsigned int i) const { switch (i) {case 2: return IfcUtil::Argument_INT; case 3: return IfcUtil::Argument_DOUBLE; case 4: return IfcUtil::Argument_ENTITY_INSTANCE; case 5: return IfcUtil::Argument_ENTITY_INSTANCE; } return IfcRepresentationContext::getArgumentType(i); } - virtual Type::Enum getArgumentEntity(unsigned int i) const { switch (i) {case 2: return Type::IfcDimensionCount; case 3: return Type::UNDEFINED; case 4: return Type::IfcAxis2Placement; case 5: return Type::IfcDirection; } return IfcRepresentationContext::getArgumentEntity(i); } + virtual Type::Enum getArgumentEntity(unsigned int i) const { switch (i) {case 2: return Type::IfcDimensionCount; case 3: return Type::IfcReal; case 4: return Type::IfcAxis2Placement; case 5: return Type::IfcDirection; } return IfcRepresentationContext::getArgumentEntity(i); } virtual const char* getArgumentName(unsigned int i) const { switch (i) {case 2: return "CoordinateSpaceDimension"; case 3: return "Precision"; case 4: return "WorldCoordinateSystem"; case 5: return "TrueNorth"; } return IfcRepresentationContext::getArgumentName(i); } virtual Argument* getArgument(unsigned int i) const { return entity->getArgument(i); } IfcTemplatedEntityList< IfcGeometricRepresentationSubContext >::ptr HasSubContexts() const; // INVERSE IfcGeometricRepresentationSubContext::ParentContext + IfcTemplatedEntityList< IfcCoordinateOperation >::ptr HasCoordinateOperation() const; // INVERSE IfcCoordinateOperation::SourceCRS bool is(Type::Enum v) const; Type::Enum type() const; static Type::Enum Class(); @@ -15546,7 +15603,7 @@ public: void setAgreementFlag(bool v); virtual unsigned int getArgumentCount() const { return 2; } virtual IfcUtil::ArgumentType getArgumentType(unsigned int i) const { switch (i) {case 0: return IfcUtil::Argument_ENTITY_INSTANCE; case 1: return IfcUtil::Argument_BOOL; } return IfcGeometricRepresentationItem::getArgumentType(i); } - virtual Type::Enum getArgumentEntity(unsigned int i) const { switch (i) {case 0: return Type::IfcSurface; case 1: return Type::UNDEFINED; } return IfcGeometricRepresentationItem::getArgumentEntity(i); } + virtual Type::Enum getArgumentEntity(unsigned int i) const { switch (i) {case 0: return Type::IfcSurface; case 1: return Type::IfcBoolean; } return IfcGeometricRepresentationItem::getArgumentEntity(i); } virtual const char* getArgumentName(unsigned int i) const { switch (i) {case 0: return "BaseSurface"; case 1: return "AgreementFlag"; } return IfcGeometricRepresentationItem::getArgumentName(i); } virtual Argument* getArgument(unsigned int i) const { return entity->getArgument(i); } bool is(Type::Enum v) const; @@ -15623,7 +15680,7 @@ public: void setColourIndex(std::vector< int > /*[1:?]*/ v); virtual unsigned int getArgumentCount() const { return 4; } virtual IfcUtil::ArgumentType getArgumentType(unsigned int i) const { switch (i) {case 0: return IfcUtil::Argument_ENTITY_INSTANCE; case 1: return IfcUtil::Argument_ENTITY_INSTANCE; case 2: return IfcUtil::Argument_ENTITY_INSTANCE; case 3: return IfcUtil::Argument_AGGREGATE_OF_INT; } return IfcPresentationItem::getArgumentType(i); } - virtual Type::Enum getArgumentEntity(unsigned int i) const { switch (i) {case 0: return Type::IfcTessellatedFaceSet; case 1: return Type::IfcSurfaceStyleShading; case 2: return Type::IfcColourRgbList; case 3: return Type::UNDEFINED; } return IfcPresentationItem::getArgumentEntity(i); } + virtual Type::Enum getArgumentEntity(unsigned int i) const { switch (i) {case 0: return Type::IfcTessellatedFaceSet; case 1: return Type::IfcSurfaceStyleShading; case 2: return Type::IfcColourRgbList; case 3: return Type::IfcPositiveInteger; } return IfcPresentationItem::getArgumentEntity(i); } virtual const char* getArgumentName(unsigned int i) const { switch (i) {case 0: return "MappedTo"; case 1: return "Overrides"; case 2: return "Colours"; case 3: return "ColourIndex"; } return IfcPresentationItem::getArgumentName(i); } virtual Argument* getArgument(unsigned int i) const { return entity->getArgument(i); } bool is(Type::Enum v) const; @@ -15661,7 +15718,7 @@ public: void setTexCoordIndex(std::vector< std::vector< int > > v); virtual unsigned int getArgumentCount() const { return 4; } virtual IfcUtil::ArgumentType getArgumentType(unsigned int i) const { switch (i) {case 3: return IfcUtil::Argument_AGGREGATE_OF_AGGREGATE_OF_INT; } return IfcIndexedTextureMap::getArgumentType(i); } - virtual Type::Enum getArgumentEntity(unsigned int i) const { switch (i) {case 3: return Type::UNDEFINED; } return IfcIndexedTextureMap::getArgumentEntity(i); } + virtual Type::Enum getArgumentEntity(unsigned int i) const { switch (i) {case 3: return Type::IfcPositiveInteger; } return IfcIndexedTextureMap::getArgumentEntity(i); } virtual const char* getArgumentName(unsigned int i) const { switch (i) {case 3: return "TexCoordIndex"; } return IfcIndexedTextureMap::getArgumentName(i); } virtual Argument* getArgument(unsigned int i) const { return entity->getArgument(i); } bool is(Type::Enum v) const; @@ -16852,7 +16909,7 @@ public: void setOrientation(bool v); virtual unsigned int getArgumentCount() const { return 4; } virtual IfcUtil::ArgumentType getArgumentType(unsigned int i) const { switch (i) {case 2: return IfcUtil::Argument_ENTITY_INSTANCE; case 3: return IfcUtil::Argument_BOOL; } return IfcEdge::getArgumentType(i); } - virtual Type::Enum getArgumentEntity(unsigned int i) const { switch (i) {case 2: return Type::IfcEdge; case 3: return Type::UNDEFINED; } return IfcEdge::getArgumentEntity(i); } + virtual Type::Enum getArgumentEntity(unsigned int i) const { switch (i) {case 2: return Type::IfcEdge; case 3: return Type::IfcBoolean; } return IfcEdge::getArgumentEntity(i); } virtual const char* getArgumentName(unsigned int i) const { switch (i) {case 2: return "EdgeElement"; case 3: return "Orientation"; } return IfcEdge::getArgumentName(i); } virtual Argument* getArgument(unsigned int i) const { return entity->getArgument(i); } bool is(Type::Enum v) const; @@ -17029,7 +17086,7 @@ public: void setPixel(std::vector< boost::dynamic_bitset<> > /*[1:?]*/ v); virtual unsigned int getArgumentCount() const { return 9; } virtual IfcUtil::ArgumentType getArgumentType(unsigned int i) const { switch (i) {case 5: return IfcUtil::Argument_INT; case 6: return IfcUtil::Argument_INT; case 7: return IfcUtil::Argument_INT; case 8: return IfcUtil::Argument_AGGREGATE_OF_BINARY; } return IfcSurfaceTexture::getArgumentType(i); } - virtual Type::Enum getArgumentEntity(unsigned int i) const { switch (i) {case 5: return Type::IfcInteger; case 6: return Type::IfcInteger; case 7: return Type::IfcInteger; case 8: return Type::UNDEFINED; } return IfcSurfaceTexture::getArgumentEntity(i); } + virtual Type::Enum getArgumentEntity(unsigned int i) const { switch (i) {case 5: return Type::IfcInteger; case 6: return Type::IfcInteger; case 7: return Type::IfcInteger; case 8: return Type::IfcBinary; } return IfcSurfaceTexture::getArgumentEntity(i); } virtual const char* getArgumentName(unsigned int i) const { switch (i) {case 5: return "Width"; case 6: return "Height"; case 7: return "ColourComponents"; case 8: return "Pixel"; } return IfcSurfaceTexture::getArgumentName(i); } virtual Argument* getArgument(unsigned int i) const { return entity->getArgument(i); } bool is(Type::Enum v) const; @@ -17446,6 +17503,8 @@ public: IfcTemplatedEntityList< IfcPropertyDependencyRelationship >::ptr PropertyForDependance() const; // INVERSE IfcPropertyDependencyRelationship::DependingProperty IfcTemplatedEntityList< IfcPropertyDependencyRelationship >::ptr PropertyDependsOn() const; // INVERSE IfcPropertyDependencyRelationship::DependantProperty IfcTemplatedEntityList< IfcComplexProperty >::ptr PartOfComplex() const; // INVERSE IfcComplexProperty::HasProperties + IfcTemplatedEntityList< IfcResourceConstraintRelationship >::ptr HasConstraints() const; // INVERSE IfcResourceConstraintRelationship::RelatedResourceObjects + IfcTemplatedEntityList< IfcResourceApprovalRelationship >::ptr HasApprovals() const; // INVERSE IfcResourceApprovalRelationship::RelatedResourceObjects bool is(Type::Enum v) const; Type::Enum type() const; static Type::Enum Class(); @@ -17958,7 +18017,7 @@ public: void setCompletion(double v); virtual unsigned int getArgumentCount() const { return 18; } virtual IfcUtil::ArgumentType getArgumentType(unsigned int i) const { switch (i) {case 3: return IfcUtil::Argument_STRING; case 4: return IfcUtil::Argument_DOUBLE; case 5: return IfcUtil::Argument_STRING; case 6: return IfcUtil::Argument_STRING; case 7: return IfcUtil::Argument_STRING; case 8: return IfcUtil::Argument_STRING; case 9: return IfcUtil::Argument_BOOL; case 10: return IfcUtil::Argument_STRING; case 11: return IfcUtil::Argument_STRING; case 12: return IfcUtil::Argument_DOUBLE; case 13: return IfcUtil::Argument_STRING; case 14: return IfcUtil::Argument_STRING; case 15: return IfcUtil::Argument_STRING; case 16: return IfcUtil::Argument_DOUBLE; case 17: return IfcUtil::Argument_DOUBLE; } return IfcSchedulingTime::getArgumentType(i); } - virtual Type::Enum getArgumentEntity(unsigned int i) const { switch (i) {case 3: return Type::IfcDuration; case 4: return Type::IfcPositiveRatioMeasure; case 5: return Type::IfcDateTime; case 6: return Type::IfcDateTime; case 7: return Type::IfcLabel; case 8: return Type::IfcDuration; case 9: return Type::UNDEFINED; case 10: return Type::IfcDateTime; case 11: return Type::IfcDuration; case 12: return Type::IfcPositiveRatioMeasure; case 13: return Type::IfcDateTime; case 14: return Type::IfcDateTime; case 15: return Type::IfcDuration; case 16: return Type::IfcPositiveRatioMeasure; case 17: return Type::IfcPositiveRatioMeasure; } return IfcSchedulingTime::getArgumentEntity(i); } + virtual Type::Enum getArgumentEntity(unsigned int i) const { switch (i) {case 3: return Type::IfcDuration; case 4: return Type::IfcPositiveRatioMeasure; case 5: return Type::IfcDateTime; case 6: return Type::IfcDateTime; case 7: return Type::IfcLabel; case 8: return Type::IfcDuration; case 9: return Type::IfcBoolean; case 10: return Type::IfcDateTime; case 11: return Type::IfcDuration; case 12: return Type::IfcPositiveRatioMeasure; case 13: return Type::IfcDateTime; case 14: return Type::IfcDateTime; case 15: return Type::IfcDuration; case 16: return Type::IfcPositiveRatioMeasure; case 17: return Type::IfcPositiveRatioMeasure; } return IfcSchedulingTime::getArgumentEntity(i); } virtual const char* getArgumentName(unsigned int i) const { switch (i) {case 3: return "ScheduleWork"; case 4: return "ScheduleUsage"; case 5: return "ScheduleStart"; case 6: return "ScheduleFinish"; case 7: return "ScheduleContour"; case 8: return "LevelingDelay"; case 9: return "IsOverAllocated"; case 10: return "StatusTime"; case 11: return "ActualWork"; case 12: return "ActualUsage"; case 13: return "ActualStart"; case 14: return "ActualFinish"; case 15: return "RemainingWork"; case 16: return "RemainingUsage"; case 17: return "Completion"; } return IfcSchedulingTime::getArgumentName(i); } virtual Argument* getArgument(unsigned int i) const { return entity->getArgument(i); } bool is(Type::Enum v) const; @@ -19591,7 +19650,7 @@ public: void setSizeable(bool v); virtual unsigned int getArgumentCount() const { return 12; } virtual IfcUtil::ArgumentType getArgumentType(unsigned int i) const { switch (i) {case 8: return IfcUtil::Argument_ENUMERATION; case 9: return IfcUtil::Argument_ENUMERATION; case 10: return IfcUtil::Argument_BOOL; case 11: return IfcUtil::Argument_BOOL; } return IfcTypeProduct::getArgumentType(i); } - virtual Type::Enum getArgumentEntity(unsigned int i) const { switch (i) {case 8: return Type::IfcWindowStyleConstructionEnum; case 9: return Type::IfcWindowStyleOperationEnum; case 10: return Type::UNDEFINED; case 11: return Type::UNDEFINED; } return IfcTypeProduct::getArgumentEntity(i); } + virtual Type::Enum getArgumentEntity(unsigned int i) const { switch (i) {case 8: return Type::IfcWindowStyleConstructionEnum; case 9: return Type::IfcWindowStyleOperationEnum; case 10: return Type::IfcBoolean; case 11: return Type::IfcBoolean; } return IfcTypeProduct::getArgumentEntity(i); } virtual const char* getArgumentName(unsigned int i) const { switch (i) {case 8: return "ConstructionType"; case 9: return "OperationType"; case 10: return "ParameterTakesPrecedence"; case 11: return "Sizeable"; } return IfcTypeProduct::getArgumentName(i); } virtual Argument* getArgument(unsigned int i) const { return entity->getArgument(i); } bool is(Type::Enum v) const; @@ -20185,6 +20244,23 @@ public: typedef IfcTemplatedEntityList< IfcCartesianPointList > list; }; +class IfcCartesianPointList2D : public IfcCartesianPointList { +public: + std::vector< std::vector< double > > CoordList() const; + void setCoordList(std::vector< std::vector< double > > v); + virtual unsigned int getArgumentCount() const { return 1; } + virtual IfcUtil::ArgumentType getArgumentType(unsigned int i) const { switch (i) {case 0: return IfcUtil::Argument_AGGREGATE_OF_AGGREGATE_OF_DOUBLE; } return IfcCartesianPointList::getArgumentType(i); } + virtual Type::Enum getArgumentEntity(unsigned int i) const { switch (i) {case 0: return Type::IfcLengthMeasure; } return IfcCartesianPointList::getArgumentEntity(i); } + virtual const char* getArgumentName(unsigned int i) const { switch (i) {case 0: return "CoordList"; } return IfcCartesianPointList::getArgumentName(i); } + virtual Argument* getArgument(unsigned int i) const { return entity->getArgument(i); } + bool is(Type::Enum v) const; + Type::Enum type() const; + static Type::Enum Class(); + IfcCartesianPointList2D (IfcAbstractEntity* e); + IfcCartesianPointList2D (std::vector< std::vector< double > > v1_CoordList); + typedef IfcTemplatedEntityList< IfcCartesianPointList2D > list; +}; + class IfcCartesianPointList3D : public IfcCartesianPointList { public: std::vector< std::vector< double > > CoordList() const; @@ -20253,7 +20329,7 @@ public: void setScale(double v); virtual unsigned int getArgumentCount() const { return 4; } virtual IfcUtil::ArgumentType getArgumentType(unsigned int i) const { switch (i) {case 0: return IfcUtil::Argument_ENTITY_INSTANCE; case 1: return IfcUtil::Argument_ENTITY_INSTANCE; case 2: return IfcUtil::Argument_ENTITY_INSTANCE; case 3: return IfcUtil::Argument_DOUBLE; } return IfcGeometricRepresentationItem::getArgumentType(i); } - virtual Type::Enum getArgumentEntity(unsigned int i) const { switch (i) {case 0: return Type::IfcDirection; case 1: return Type::IfcDirection; case 2: return Type::IfcCartesianPoint; case 3: return Type::UNDEFINED; } return IfcGeometricRepresentationItem::getArgumentEntity(i); } + virtual Type::Enum getArgumentEntity(unsigned int i) const { switch (i) {case 0: return Type::IfcDirection; case 1: return Type::IfcDirection; case 2: return Type::IfcCartesianPoint; case 3: return Type::IfcReal; } return IfcGeometricRepresentationItem::getArgumentEntity(i); } virtual const char* getArgumentName(unsigned int i) const { switch (i) {case 0: return "Axis1"; case 1: return "Axis2"; case 2: return "LocalOrigin"; case 3: return "Scale"; } return IfcGeometricRepresentationItem::getArgumentName(i); } virtual Argument* getArgument(unsigned int i) const { return entity->getArgument(i); } bool is(Type::Enum v) const; @@ -20301,7 +20377,7 @@ public: void setScale2(double v); virtual unsigned int getArgumentCount() const { return 5; } virtual IfcUtil::ArgumentType getArgumentType(unsigned int i) const { switch (i) {case 4: return IfcUtil::Argument_DOUBLE; } return IfcCartesianTransformationOperator2D::getArgumentType(i); } - virtual Type::Enum getArgumentEntity(unsigned int i) const { switch (i) {case 4: return Type::UNDEFINED; } return IfcCartesianTransformationOperator2D::getArgumentEntity(i); } + virtual Type::Enum getArgumentEntity(unsigned int i) const { switch (i) {case 4: return Type::IfcReal; } return IfcCartesianTransformationOperator2D::getArgumentEntity(i); } virtual const char* getArgumentName(unsigned int i) const { switch (i) {case 4: return "Scale2"; } return IfcCartesianTransformationOperator2D::getArgumentName(i); } virtual Argument* getArgument(unsigned int i) const { return entity->getArgument(i); } bool is(Type::Enum v) const; @@ -20360,7 +20436,7 @@ public: void setScale3(double v); virtual unsigned int getArgumentCount() const { return 7; } virtual IfcUtil::ArgumentType getArgumentType(unsigned int i) const { switch (i) {case 5: return IfcUtil::Argument_DOUBLE; case 6: return IfcUtil::Argument_DOUBLE; } return IfcCartesianTransformationOperator3D::getArgumentType(i); } - virtual Type::Enum getArgumentEntity(unsigned int i) const { switch (i) {case 5: return Type::UNDEFINED; case 6: return Type::UNDEFINED; } return IfcCartesianTransformationOperator3D::getArgumentEntity(i); } + virtual Type::Enum getArgumentEntity(unsigned int i) const { switch (i) {case 5: return Type::IfcReal; case 6: return Type::IfcReal; } return IfcCartesianTransformationOperator3D::getArgumentEntity(i); } virtual const char* getArgumentName(unsigned int i) const { switch (i) {case 5: return "Scale2"; case 6: return "Scale3"; } return IfcCartesianTransformationOperator3D::getArgumentName(i); } virtual Argument* getArgument(unsigned int i) const { return entity->getArgument(i); } bool is(Type::Enum v) const; @@ -20547,7 +20623,7 @@ public: void setParentCurve(IfcCurve* v); virtual unsigned int getArgumentCount() const { return 3; } virtual IfcUtil::ArgumentType getArgumentType(unsigned int i) const { switch (i) {case 0: return IfcUtil::Argument_ENUMERATION; case 1: return IfcUtil::Argument_BOOL; case 2: return IfcUtil::Argument_ENTITY_INSTANCE; } return IfcGeometricRepresentationItem::getArgumentType(i); } - virtual Type::Enum getArgumentEntity(unsigned int i) const { switch (i) {case 0: return Type::IfcTransitionCode; case 1: return Type::UNDEFINED; case 2: return Type::IfcCurve; } return IfcGeometricRepresentationItem::getArgumentEntity(i); } + virtual Type::Enum getArgumentEntity(unsigned int i) const { switch (i) {case 0: return Type::IfcTransitionCode; case 1: return Type::IfcBoolean; case 2: return Type::IfcCurve; } return IfcGeometricRepresentationItem::getArgumentEntity(i); } virtual const char* getArgumentName(unsigned int i) const { switch (i) {case 0: return "Transition"; case 1: return "SameSense"; case 2: return "ParentCurve"; } return IfcGeometricRepresentationItem::getArgumentName(i); } virtual Argument* getArgument(unsigned int i) const { return entity->getArgument(i); } IfcTemplatedEntityList< IfcCompositeCurve >::ptr UsingCurves() const; // INVERSE IfcCompositeCurve::Segments @@ -20853,7 +20929,7 @@ public: void setImplicitOuter(bool v); virtual unsigned int getArgumentCount() const { return 3; } virtual IfcUtil::ArgumentType getArgumentType(unsigned int i) const { switch (i) {case 0: return IfcUtil::Argument_ENTITY_INSTANCE; case 1: return IfcUtil::Argument_AGGREGATE_OF_ENTITY_INSTANCE; case 2: return IfcUtil::Argument_BOOL; } return IfcBoundedSurface::getArgumentType(i); } - virtual Type::Enum getArgumentEntity(unsigned int i) const { switch (i) {case 0: return Type::IfcSurface; case 1: return Type::IfcBoundaryCurve; case 2: return Type::UNDEFINED; } return IfcBoundedSurface::getArgumentEntity(i); } + virtual Type::Enum getArgumentEntity(unsigned int i) const { switch (i) {case 0: return Type::IfcSurface; case 1: return Type::IfcBoundaryCurve; case 2: return Type::IfcBoolean; } return IfcBoundedSurface::getArgumentEntity(i); } virtual const char* getArgumentName(unsigned int i) const { switch (i) {case 0: return "BasisSurface"; case 1: return "Boundaries"; case 2: return "ImplicitOuter"; } return IfcBoundedSurface::getArgumentName(i); } virtual Argument* getArgument(unsigned int i) const { return entity->getArgument(i); } bool is(Type::Enum v) const; @@ -20877,7 +20953,7 @@ public: void setDirectionRatios(std::vector< double > /*[2:3]*/ v); virtual unsigned int getArgumentCount() const { return 1; } virtual IfcUtil::ArgumentType getArgumentType(unsigned int i) const { switch (i) {case 0: return IfcUtil::Argument_AGGREGATE_OF_DOUBLE; } return IfcGeometricRepresentationItem::getArgumentType(i); } - virtual Type::Enum getArgumentEntity(unsigned int i) const { switch (i) {case 0: return Type::UNDEFINED; } return IfcGeometricRepresentationItem::getArgumentEntity(i); } + virtual Type::Enum getArgumentEntity(unsigned int i) const { switch (i) {case 0: return Type::IfcReal; } return IfcGeometricRepresentationItem::getArgumentEntity(i); } virtual const char* getArgumentName(unsigned int i) const { switch (i) {case 0: return "DirectionRatios"; } return IfcGeometricRepresentationItem::getArgumentName(i); } virtual Argument* getArgument(unsigned int i) const { return entity->getArgument(i); } bool is(Type::Enum v) const; @@ -20929,7 +21005,7 @@ public: void setSizeable(bool v); virtual unsigned int getArgumentCount() const { return 12; } virtual IfcUtil::ArgumentType getArgumentType(unsigned int i) const { switch (i) {case 8: return IfcUtil::Argument_ENUMERATION; case 9: return IfcUtil::Argument_ENUMERATION; case 10: return IfcUtil::Argument_BOOL; case 11: return IfcUtil::Argument_BOOL; } return IfcTypeProduct::getArgumentType(i); } - virtual Type::Enum getArgumentEntity(unsigned int i) const { switch (i) {case 8: return Type::IfcDoorStyleOperationEnum; case 9: return Type::IfcDoorStyleConstructionEnum; case 10: return Type::UNDEFINED; case 11: return Type::UNDEFINED; } return IfcTypeProduct::getArgumentEntity(i); } + virtual Type::Enum getArgumentEntity(unsigned int i) const { switch (i) {case 8: return Type::IfcDoorStyleOperationEnum; case 9: return Type::IfcDoorStyleConstructionEnum; case 10: return Type::IfcBoolean; case 11: return Type::IfcBoolean; } return IfcTypeProduct::getArgumentEntity(i); } virtual const char* getArgumentName(unsigned int i) const { switch (i) {case 8: return "OperationType"; case 9: return "ConstructionType"; case 10: return "ParameterTakesPrecedence"; case 11: return "Sizeable"; } return IfcTypeProduct::getArgumentName(i); } virtual Argument* getArgument(unsigned int i) const { return entity->getArgument(i); } bool is(Type::Enum v) const; @@ -22301,7 +22377,7 @@ public: void setSelfIntersect(bool v); virtual unsigned int getArgumentCount() const { return 3; } virtual IfcUtil::ArgumentType getArgumentType(unsigned int i) const { switch (i) {case 0: return IfcUtil::Argument_ENTITY_INSTANCE; case 1: return IfcUtil::Argument_DOUBLE; case 2: return IfcUtil::Argument_BOOL; } return IfcCurve::getArgumentType(i); } - virtual Type::Enum getArgumentEntity(unsigned int i) const { switch (i) {case 0: return Type::IfcCurve; case 1: return Type::IfcLengthMeasure; case 2: return Type::UNDEFINED; } return IfcCurve::getArgumentEntity(i); } + virtual Type::Enum getArgumentEntity(unsigned int i) const { switch (i) {case 0: return Type::IfcCurve; case 1: return Type::IfcLengthMeasure; case 2: return Type::IfcLogical; } return IfcCurve::getArgumentEntity(i); } virtual const char* getArgumentName(unsigned int i) const { switch (i) {case 0: return "BasisCurve"; case 1: return "Distance"; case 2: return "SelfIntersect"; } return IfcCurve::getArgumentName(i); } virtual Argument* getArgument(unsigned int i) const { return entity->getArgument(i); } bool is(Type::Enum v) const; @@ -22342,7 +22418,7 @@ public: void setRefDirection(IfcDirection* v); virtual unsigned int getArgumentCount() const { return 4; } virtual IfcUtil::ArgumentType getArgumentType(unsigned int i) const { switch (i) {case 0: return IfcUtil::Argument_ENTITY_INSTANCE; case 1: return IfcUtil::Argument_DOUBLE; case 2: return IfcUtil::Argument_BOOL; case 3: return IfcUtil::Argument_ENTITY_INSTANCE; } return IfcCurve::getArgumentType(i); } - virtual Type::Enum getArgumentEntity(unsigned int i) const { switch (i) {case 0: return Type::IfcCurve; case 1: return Type::IfcLengthMeasure; case 2: return Type::UNDEFINED; case 3: return Type::IfcDirection; } return IfcCurve::getArgumentEntity(i); } + virtual Type::Enum getArgumentEntity(unsigned int i) const { switch (i) {case 0: return Type::IfcCurve; case 1: return Type::IfcLengthMeasure; case 2: return Type::IfcLogical; case 3: return Type::IfcDirection; } return IfcCurve::getArgumentEntity(i); } virtual const char* getArgumentName(unsigned int i) const { switch (i) {case 0: return "BasisCurve"; case 1: return "Distance"; case 2: return "SelfIntersect"; case 3: return "RefDirection"; } return IfcCurve::getArgumentName(i); } virtual Argument* getArgument(unsigned int i) const { return entity->getArgument(i); } bool is(Type::Enum v) const; @@ -22352,7 +22428,13 @@ public: IfcOffsetCurve3D (IfcCurve* v1_BasisCurve, double v2_Distance, bool v3_SelfIntersect, IfcDirection* v4_RefDirection); typedef IfcTemplatedEntityList< IfcOffsetCurve3D > list; }; - +/// Definition from ISO/CD 10303-42:1992: A pcurve is a curve which lies on the basis of a surface and is defined in the parameter space of that surface. The basis curve is a curve defined in the two-dimensional parametric space of a reference basis surface. Although it is defined by a curve in two dimensional space, the variables involved are u and v, which occur in the parametric representation of the referenced surface, rather than the x, y, Cartesian coordinates. +/// +/// The basis curve is only defined within the parametric range of the surface. +/// +/// NOTE Corresponding ISO 10303 entity: pcurve. Please refer to ISO/IS 10303-42:1994, p.59 for the final definition of the formal standard. The definition of IfcPCurve derivates from pcurve. The following changes have been made: The BasisCurve replaces the definition of reference_to_curve since there is no requirement of having same dimensionality within the representation context. +/// +/// HISTORY New class in IFC2x4. class IfcPcurve : public IfcCurve { public: IfcSurface* BasisSurface() const; @@ -23892,7 +23974,7 @@ public: void setVsense(bool v); virtual unsigned int getArgumentCount() const { return 7; } virtual IfcUtil::ArgumentType getArgumentType(unsigned int i) const { switch (i) {case 0: return IfcUtil::Argument_ENTITY_INSTANCE; case 1: return IfcUtil::Argument_DOUBLE; case 2: return IfcUtil::Argument_DOUBLE; case 3: return IfcUtil::Argument_DOUBLE; case 4: return IfcUtil::Argument_DOUBLE; case 5: return IfcUtil::Argument_BOOL; case 6: return IfcUtil::Argument_BOOL; } return IfcBoundedSurface::getArgumentType(i); } - virtual Type::Enum getArgumentEntity(unsigned int i) const { switch (i) {case 0: return Type::IfcSurface; case 1: return Type::IfcParameterValue; case 2: return Type::IfcParameterValue; case 3: return Type::IfcParameterValue; case 4: return Type::IfcParameterValue; case 5: return Type::UNDEFINED; case 6: return Type::UNDEFINED; } return IfcBoundedSurface::getArgumentEntity(i); } + virtual Type::Enum getArgumentEntity(unsigned int i) const { switch (i) {case 0: return Type::IfcSurface; case 1: return Type::IfcParameterValue; case 2: return Type::IfcParameterValue; case 3: return Type::IfcParameterValue; case 4: return Type::IfcParameterValue; case 5: return Type::IfcBoolean; case 6: return Type::IfcBoolean; } return IfcBoundedSurface::getArgumentEntity(i); } virtual const char* getArgumentName(unsigned int i) const { switch (i) {case 0: return "BasisSurface"; case 1: return "U1"; case 2: return "V1"; case 3: return "U2"; case 4: return "V2"; case 5: return "Usense"; case 6: return "Vsense"; } return IfcBoundedSurface::getArgumentName(i); } virtual Argument* getArgument(unsigned int i) const { return entity->getArgument(i); } bool is(Type::Enum v) const; @@ -24601,11 +24683,11 @@ public: class IfcRelConnectsPathElements : public IfcRelConnectsElements { public: /// Priorities for connection. It refers to the layers of the RelatingObject. - std::vector< double > /*[0:?]*/ RelatingPriorities() const; - void setRelatingPriorities(std::vector< double > /*[0:?]*/ v); + std::vector< int > /*[0:?]*/ RelatingPriorities() const; + void setRelatingPriorities(std::vector< int > /*[0:?]*/ v); /// Priorities for connection. It refers to the layers of the RelatedObject. - std::vector< double > /*[0:?]*/ RelatedPriorities() const; - void setRelatedPriorities(std::vector< double > /*[0:?]*/ v); + std::vector< int > /*[0:?]*/ RelatedPriorities() const; + void setRelatedPriorities(std::vector< int > /*[0:?]*/ v); /// Indication of the connection type in relation to the path of the RelatingObject. IfcConnectionTypeEnum::IfcConnectionTypeEnum RelatedConnectionType() const; void setRelatedConnectionType(IfcConnectionTypeEnum::IfcConnectionTypeEnum v); @@ -24613,15 +24695,15 @@ public: IfcConnectionTypeEnum::IfcConnectionTypeEnum RelatingConnectionType() const; void setRelatingConnectionType(IfcConnectionTypeEnum::IfcConnectionTypeEnum v); virtual unsigned int getArgumentCount() const { return 11; } - virtual IfcUtil::ArgumentType getArgumentType(unsigned int i) const { switch (i) {case 7: return IfcUtil::Argument_AGGREGATE_OF_DOUBLE; case 8: return IfcUtil::Argument_AGGREGATE_OF_DOUBLE; case 9: return IfcUtil::Argument_ENUMERATION; case 10: return IfcUtil::Argument_ENUMERATION; } return IfcRelConnectsElements::getArgumentType(i); } - virtual Type::Enum getArgumentEntity(unsigned int i) const { switch (i) {case 7: return Type::UNDEFINED; case 8: return Type::UNDEFINED; case 9: return Type::IfcConnectionTypeEnum; case 10: return Type::IfcConnectionTypeEnum; } return IfcRelConnectsElements::getArgumentEntity(i); } + virtual IfcUtil::ArgumentType getArgumentType(unsigned int i) const { switch (i) {case 7: return IfcUtil::Argument_AGGREGATE_OF_INT; case 8: return IfcUtil::Argument_AGGREGATE_OF_INT; case 9: return IfcUtil::Argument_ENUMERATION; case 10: return IfcUtil::Argument_ENUMERATION; } return IfcRelConnectsElements::getArgumentType(i); } + virtual Type::Enum getArgumentEntity(unsigned int i) const { switch (i) {case 7: return Type::IfcInteger; case 8: return Type::IfcInteger; case 9: return Type::IfcConnectionTypeEnum; case 10: return Type::IfcConnectionTypeEnum; } return IfcRelConnectsElements::getArgumentEntity(i); } virtual const char* getArgumentName(unsigned int i) const { switch (i) {case 7: return "RelatingPriorities"; case 8: return "RelatedPriorities"; case 9: return "RelatedConnectionType"; case 10: return "RelatingConnectionType"; } return IfcRelConnectsElements::getArgumentName(i); } virtual Argument* getArgument(unsigned int i) const { return entity->getArgument(i); } bool is(Type::Enum v) const; Type::Enum type() const; static Type::Enum Class(); IfcRelConnectsPathElements (IfcAbstractEntity* e); - IfcRelConnectsPathElements (std::string v1_GlobalId, IfcOwnerHistory* v2_OwnerHistory, boost::optional< std::string > v3_Name, boost::optional< std::string > v4_Description, IfcConnectionGeometry* v5_ConnectionGeometry, IfcElement* v6_RelatingElement, IfcElement* v7_RelatedElement, std::vector< double > /*[0:?]*/ v8_RelatingPriorities, std::vector< double > /*[0:?]*/ v9_RelatedPriorities, IfcConnectionTypeEnum::IfcConnectionTypeEnum v10_RelatedConnectionType, IfcConnectionTypeEnum::IfcConnectionTypeEnum v11_RelatingConnectionType); + IfcRelConnectsPathElements (std::string v1_GlobalId, IfcOwnerHistory* v2_OwnerHistory, boost::optional< std::string > v3_Name, boost::optional< std::string > v4_Description, IfcConnectionGeometry* v5_ConnectionGeometry, IfcElement* v6_RelatingElement, IfcElement* v7_RelatedElement, std::vector< int > /*[0:?]*/ v8_RelatingPriorities, std::vector< int > /*[0:?]*/ v9_RelatedPriorities, IfcConnectionTypeEnum::IfcConnectionTypeEnum v10_RelatedConnectionType, IfcConnectionTypeEnum::IfcConnectionTypeEnum v11_RelatingConnectionType); typedef IfcTemplatedEntityList< IfcRelConnectsPathElements > list; }; /// The objectified relationship @@ -28083,7 +28165,7 @@ public: void setPredefinedType(IfcTaskTypeEnum::IfcTaskTypeEnum v); virtual unsigned int getArgumentCount() const { return 13; } virtual IfcUtil::ArgumentType getArgumentType(unsigned int i) const { switch (i) {case 7: return IfcUtil::Argument_STRING; case 8: return IfcUtil::Argument_STRING; case 9: return IfcUtil::Argument_BOOL; case 10: return IfcUtil::Argument_INT; case 11: return IfcUtil::Argument_ENTITY_INSTANCE; case 12: return IfcUtil::Argument_ENUMERATION; } return IfcProcess::getArgumentType(i); } - virtual Type::Enum getArgumentEntity(unsigned int i) const { switch (i) {case 7: return Type::IfcLabel; case 8: return Type::IfcLabel; case 9: return Type::UNDEFINED; case 10: return Type::UNDEFINED; case 11: return Type::IfcTaskTime; case 12: return Type::IfcTaskTypeEnum; } return IfcProcess::getArgumentEntity(i); } + virtual Type::Enum getArgumentEntity(unsigned int i) const { switch (i) {case 7: return Type::IfcLabel; case 8: return Type::IfcLabel; case 9: return Type::IfcBoolean; case 10: return Type::IfcInteger; case 11: return Type::IfcTaskTime; case 12: return Type::IfcTaskTypeEnum; } return IfcProcess::getArgumentEntity(i); } virtual const char* getArgumentName(unsigned int i) const { switch (i) {case 7: return "Status"; case 8: return "WorkMethod"; case 9: return "IsMilestone"; case 10: return "Priority"; case 11: return "TaskTime"; case 12: return "PredefinedType"; } return IfcProcess::getArgumentName(i); } virtual Argument* getArgument(unsigned int i) const { return entity->getArgument(i); } bool is(Type::Enum v) const; @@ -28171,7 +28253,7 @@ public: void setClosed(bool v); virtual unsigned int getArgumentCount() const { return 3; } virtual IfcUtil::ArgumentType getArgumentType(unsigned int i) const { switch (i) {case 0: return IfcUtil::Argument_ENTITY_INSTANCE; case 1: return IfcUtil::Argument_AGGREGATE_OF_AGGREGATE_OF_DOUBLE; case 2: return IfcUtil::Argument_BOOL; } return IfcTessellatedItem::getArgumentType(i); } - virtual Type::Enum getArgumentEntity(unsigned int i) const { switch (i) {case 0: return Type::IfcCartesianPointList3D; case 1: return Type::IfcParameterValue; case 2: return Type::UNDEFINED; } return IfcTessellatedItem::getArgumentEntity(i); } + virtual Type::Enum getArgumentEntity(unsigned int i) const { switch (i) {case 0: return Type::IfcCartesianPointList3D; case 1: return Type::IfcParameterValue; case 2: return Type::IfcBoolean; } return IfcTessellatedItem::getArgumentEntity(i); } virtual const char* getArgumentName(unsigned int i) const { switch (i) {case 0: return "Coordinates"; case 1: return "Normals"; case 2: return "Closed"; } return IfcTessellatedItem::getArgumentName(i); } virtual Argument* getArgument(unsigned int i) const { return entity->getArgument(i); } IfcTemplatedEntityList< IfcIndexedColourMap >::ptr HasColours() const; // INVERSE IfcIndexedColourMap::MappedTo @@ -28274,7 +28356,7 @@ public: void setNormalIndex(std::vector< std::vector< int > > v); virtual unsigned int getArgumentCount() const { return 5; } virtual IfcUtil::ArgumentType getArgumentType(unsigned int i) const { switch (i) {case 3: return IfcUtil::Argument_AGGREGATE_OF_AGGREGATE_OF_INT; case 4: return IfcUtil::Argument_AGGREGATE_OF_AGGREGATE_OF_INT; } return IfcTessellatedFaceSet::getArgumentType(i); } - virtual Type::Enum getArgumentEntity(unsigned int i) const { switch (i) {case 3: return Type::UNDEFINED; case 4: return Type::UNDEFINED; } return IfcTessellatedFaceSet::getArgumentEntity(i); } + virtual Type::Enum getArgumentEntity(unsigned int i) const { switch (i) {case 3: return Type::IfcPositiveInteger; case 4: return Type::IfcPositiveInteger; } return IfcTessellatedFaceSet::getArgumentEntity(i); } virtual const char* getArgumentName(unsigned int i) const { switch (i) {case 3: return "CoordIndex"; case 4: return "NormalIndex"; } return IfcTessellatedFaceSet::getArgumentName(i); } virtual Argument* getArgument(unsigned int i) const { return entity->getArgument(i); } bool is(Type::Enum v) const; @@ -28945,7 +29027,7 @@ public: void setSelfIntersect(bool v); virtual unsigned int getArgumentCount() const { return 7; } virtual IfcUtil::ArgumentType getArgumentType(unsigned int i) const { switch (i) {case 0: return IfcUtil::Argument_INT; case 1: return IfcUtil::Argument_INT; case 2: return IfcUtil::Argument_AGGREGATE_OF_AGGREGATE_OF_ENTITY_INSTANCE; case 3: return IfcUtil::Argument_ENUMERATION; case 4: return IfcUtil::Argument_BOOL; case 5: return IfcUtil::Argument_BOOL; case 6: return IfcUtil::Argument_BOOL; } return IfcBoundedSurface::getArgumentType(i); } - virtual Type::Enum getArgumentEntity(unsigned int i) const { switch (i) {case 0: return Type::UNDEFINED; case 1: return Type::UNDEFINED; case 2: return Type::IfcCartesianPoint; case 3: return Type::IfcBSplineSurfaceForm; case 4: return Type::UNDEFINED; case 5: return Type::UNDEFINED; case 6: return Type::UNDEFINED; } return IfcBoundedSurface::getArgumentEntity(i); } + virtual Type::Enum getArgumentEntity(unsigned int i) const { switch (i) {case 0: return Type::IfcInteger; case 1: return Type::IfcInteger; case 2: return Type::IfcCartesianPoint; case 3: return Type::IfcBSplineSurfaceForm; case 4: return Type::IfcLogical; case 5: return Type::IfcLogical; case 6: return Type::IfcLogical; } return IfcBoundedSurface::getArgumentEntity(i); } virtual const char* getArgumentName(unsigned int i) const { switch (i) {case 0: return "UDegree"; case 1: return "VDegree"; case 2: return "ControlPointsList"; case 3: return "SurfaceForm"; case 4: return "UClosed"; case 5: return "VClosed"; case 6: return "SelfIntersect"; } return IfcBoundedSurface::getArgumentName(i); } virtual Argument* getArgument(unsigned int i) const { return entity->getArgument(i); } bool is(Type::Enum v) const; @@ -28981,7 +29063,7 @@ public: void setKnotSpec(IfcKnotType::IfcKnotType v); virtual unsigned int getArgumentCount() const { return 12; } virtual IfcUtil::ArgumentType getArgumentType(unsigned int i) const { switch (i) {case 7: return IfcUtil::Argument_AGGREGATE_OF_INT; case 8: return IfcUtil::Argument_AGGREGATE_OF_INT; case 9: return IfcUtil::Argument_AGGREGATE_OF_DOUBLE; case 10: return IfcUtil::Argument_AGGREGATE_OF_DOUBLE; case 11: return IfcUtil::Argument_ENUMERATION; } return IfcBSplineSurface::getArgumentType(i); } - virtual Type::Enum getArgumentEntity(unsigned int i) const { switch (i) {case 7: return Type::UNDEFINED; case 8: return Type::UNDEFINED; case 9: return Type::IfcParameterValue; case 10: return Type::IfcParameterValue; case 11: return Type::IfcKnotType; } return IfcBSplineSurface::getArgumentEntity(i); } + virtual Type::Enum getArgumentEntity(unsigned int i) const { switch (i) {case 7: return Type::IfcInteger; case 8: return Type::IfcInteger; case 9: return Type::IfcParameterValue; case 10: return Type::IfcParameterValue; case 11: return Type::IfcKnotType; } return IfcBSplineSurface::getArgumentEntity(i); } virtual const char* getArgumentName(unsigned int i) const { switch (i) {case 7: return "UMultiplicities"; case 8: return "VMultiplicities"; case 9: return "UKnots"; case 10: return "VKnots"; case 11: return "KnotSpec"; } return IfcBSplineSurface::getArgumentName(i); } virtual Argument* getArgument(unsigned int i) const { return entity->getArgument(i); } bool is(Type::Enum v) const; @@ -29917,7 +29999,7 @@ public: void setSelfIntersect(bool v); virtual unsigned int getArgumentCount() const { return 2; } virtual IfcUtil::ArgumentType getArgumentType(unsigned int i) const { switch (i) {case 0: return IfcUtil::Argument_AGGREGATE_OF_ENTITY_INSTANCE; case 1: return IfcUtil::Argument_BOOL; } return IfcBoundedCurve::getArgumentType(i); } - virtual Type::Enum getArgumentEntity(unsigned int i) const { switch (i) {case 0: return Type::IfcCompositeCurveSegment; case 1: return Type::UNDEFINED; } return IfcBoundedCurve::getArgumentEntity(i); } + virtual Type::Enum getArgumentEntity(unsigned int i) const { switch (i) {case 0: return Type::IfcCompositeCurveSegment; case 1: return Type::IfcLogical; } return IfcBoundedCurve::getArgumentEntity(i); } virtual const char* getArgumentName(unsigned int i) const { switch (i) {case 0: return "Segments"; case 1: return "SelfIntersect"; } return IfcBoundedCurve::getArgumentName(i); } virtual Argument* getArgument(unsigned int i) const { return entity->getArgument(i); } bool is(Type::Enum v) const; @@ -31103,7 +31185,7 @@ public: void setUserDefinedOperationType(std::string v); virtual unsigned int getArgumentCount() const { return 13; } virtual IfcUtil::ArgumentType getArgumentType(unsigned int i) const { switch (i) {case 9: return IfcUtil::Argument_ENUMERATION; case 10: return IfcUtil::Argument_ENUMERATION; case 11: return IfcUtil::Argument_BOOL; case 12: return IfcUtil::Argument_STRING; } return IfcBuildingElementType::getArgumentType(i); } - virtual Type::Enum getArgumentEntity(unsigned int i) const { switch (i) {case 9: return Type::IfcDoorTypeEnum; case 10: return Type::IfcDoorTypeOperationEnum; case 11: return Type::UNDEFINED; case 12: return Type::IfcLabel; } return IfcBuildingElementType::getArgumentEntity(i); } + virtual Type::Enum getArgumentEntity(unsigned int i) const { switch (i) {case 9: return Type::IfcDoorTypeEnum; case 10: return Type::IfcDoorTypeOperationEnum; case 11: return Type::IfcBoolean; case 12: return Type::IfcLabel; } return IfcBuildingElementType::getArgumentEntity(i); } virtual const char* getArgumentName(unsigned int i) const { switch (i) {case 9: return "PredefinedType"; case 10: return "OperationType"; case 11: return "ParameterTakesPrecedence"; case 12: return "UserDefinedOperationType"; } return IfcBuildingElementType::getArgumentName(i); } virtual Argument* getArgument(unsigned int i) const { return entity->getArgument(i); } bool is(Type::Enum v) const; @@ -31302,6 +31384,7 @@ public: IfcTemplatedEntityList< IfcRelSpaceBoundary >::ptr ProvidesBoundaries() const; // INVERSE IfcRelSpaceBoundary::RelatedBuildingElement IfcTemplatedEntityList< IfcRelConnectsElements >::ptr ConnectedFrom() const; // INVERSE IfcRelConnectsElements::RelatedElement IfcTemplatedEntityList< IfcRelContainedInSpatialStructure >::ptr ContainedInStructure() const; // INVERSE IfcRelContainedInSpatialStructure::RelatedElements + IfcTemplatedEntityList< IfcRelCoversBldgElements >::ptr HasCoverings() const; // INVERSE IfcRelCoversBldgElements::RelatingBuildingElement bool is(Type::Enum v) const; Type::Enum type() const; static Type::Enum Class(); @@ -33205,6 +33288,31 @@ public: IfcHumidifierType (std::string v1_GlobalId, IfcOwnerHistory* v2_OwnerHistory, boost::optional< std::string > v3_Name, boost::optional< std::string > v4_Description, boost::optional< std::string > v5_ApplicableOccurrence, boost::optional< IfcTemplatedEntityList< IfcPropertySetDefinition >::ptr > v6_HasPropertySets, boost::optional< IfcTemplatedEntityList< IfcRepresentationMap >::ptr > v7_RepresentationMaps, boost::optional< std::string > v8_Tag, boost::optional< std::string > v9_ElementType, IfcHumidifierTypeEnum::IfcHumidifierTypeEnum v10_PredefinedType); typedef IfcTemplatedEntityList< IfcHumidifierType > list; }; + +class IfcIndexedPolyCurve : public IfcBoundedCurve { +public: + IfcCartesianPointList* Points() const; + void setPoints(IfcCartesianPointList* v); + /// Whether the optional attribute Segments is defined for this IfcIndexedPolyCurve + bool hasSegments() const; + IfcEntityList::ptr Segments() const; + void setSegments(IfcEntityList::ptr v); + /// Whether the optional attribute SelfIntersect is defined for this IfcIndexedPolyCurve + bool hasSelfIntersect() const; + bool SelfIntersect() const; + void setSelfIntersect(bool v); + virtual unsigned int getArgumentCount() const { return 3; } + virtual IfcUtil::ArgumentType getArgumentType(unsigned int i) const { switch (i) {case 0: return IfcUtil::Argument_ENTITY_INSTANCE; case 1: return IfcUtil::Argument_AGGREGATE_OF_ENTITY_INSTANCE; case 2: return IfcUtil::Argument_BOOL; } return IfcBoundedCurve::getArgumentType(i); } + virtual Type::Enum getArgumentEntity(unsigned int i) const { switch (i) {case 0: return Type::IfcCartesianPointList; case 1: return Type::IfcSegmentIndexSelect; case 2: return Type::IfcBoolean; } return IfcBoundedCurve::getArgumentEntity(i); } + virtual const char* getArgumentName(unsigned int i) const { switch (i) {case 0: return "Points"; case 1: return "Segments"; case 2: return "SelfIntersect"; } return IfcBoundedCurve::getArgumentName(i); } + virtual Argument* getArgument(unsigned int i) const { return entity->getArgument(i); } + bool is(Type::Enum v) const; + Type::Enum type() const; + static Type::Enum Class(); + IfcIndexedPolyCurve (IfcAbstractEntity* e); + IfcIndexedPolyCurve (IfcCartesianPointList* v1_Points, boost::optional< IfcEntityList::ptr > v2_Segments, boost::optional< bool > v3_SelfIntersect); + typedef IfcTemplatedEntityList< IfcIndexedPolyCurve > list; +}; /// The flow treatment device type IfcInterceptorType defines commonly shared information for occurrences of interceptors. The set of shared information may include: /// /// common properties with shared property sets @@ -35279,7 +35387,7 @@ public: void setWeightsData(std::vector< std::vector< double > > v); virtual unsigned int getArgumentCount() const { return 13; } virtual IfcUtil::ArgumentType getArgumentType(unsigned int i) const { switch (i) {case 12: return IfcUtil::Argument_AGGREGATE_OF_AGGREGATE_OF_DOUBLE; } return IfcBSplineSurfaceWithKnots::getArgumentType(i); } - virtual Type::Enum getArgumentEntity(unsigned int i) const { switch (i) {case 12: return Type::UNDEFINED; } return IfcBSplineSurfaceWithKnots::getArgumentEntity(i); } + virtual Type::Enum getArgumentEntity(unsigned int i) const { switch (i) {case 12: return Type::IfcReal; } return IfcBSplineSurfaceWithKnots::getArgumentEntity(i); } virtual const char* getArgumentName(unsigned int i) const { switch (i) {case 12: return "WeightsData"; } return IfcBSplineSurfaceWithKnots::getArgumentName(i); } virtual Argument* getArgument(unsigned int i) const { return entity->getArgument(i); } bool is(Type::Enum v) const; @@ -36624,7 +36732,7 @@ public: void setDestabilizingLoad(bool v); virtual unsigned int getArgumentCount() const { return 10; } virtual IfcUtil::ArgumentType getArgumentType(unsigned int i) const { switch (i) {case 9: return IfcUtil::Argument_BOOL; } return IfcStructuralActivity::getArgumentType(i); } - virtual Type::Enum getArgumentEntity(unsigned int i) const { switch (i) {case 9: return Type::UNDEFINED; } return IfcStructuralActivity::getArgumentEntity(i); } + virtual Type::Enum getArgumentEntity(unsigned int i) const { switch (i) {case 9: return Type::IfcBoolean; } return IfcStructuralActivity::getArgumentEntity(i); } virtual const char* getArgumentName(unsigned int i) const { switch (i) {case 9: return "DestabilizingLoad"; } return IfcStructuralActivity::getArgumentName(i); } virtual Argument* getArgument(unsigned int i) const { return entity->getArgument(i); } bool is(Type::Enum v) const; @@ -37187,7 +37295,7 @@ public: void setIsLinear(bool v); virtual unsigned int getArgumentCount() const { return 8; } virtual IfcUtil::ArgumentType getArgumentType(unsigned int i) const { switch (i) {case 5: return IfcUtil::Argument_ENUMERATION; case 6: return IfcUtil::Argument_ENTITY_INSTANCE; case 7: return IfcUtil::Argument_BOOL; } return IfcGroup::getArgumentType(i); } - virtual Type::Enum getArgumentEntity(unsigned int i) const { switch (i) {case 5: return Type::IfcAnalysisTheoryTypeEnum; case 6: return Type::IfcStructuralLoadGroup; case 7: return Type::UNDEFINED; } return IfcGroup::getArgumentEntity(i); } + virtual Type::Enum getArgumentEntity(unsigned int i) const { switch (i) {case 5: return Type::IfcAnalysisTheoryTypeEnum; case 6: return Type::IfcStructuralLoadGroup; case 7: return Type::IfcBoolean; } return IfcGroup::getArgumentEntity(i); } virtual const char* getArgumentName(unsigned int i) const { switch (i) {case 5: return "TheoryType"; case 6: return "ResultForLoadGroup"; case 7: return "IsLinear"; } return IfcGroup::getArgumentName(i); } virtual Argument* getArgument(unsigned int i) const { return entity->getArgument(i); } IfcTemplatedEntityList< IfcStructuralAnalysisModel >::ptr ResultGroupFor() const; // INVERSE IfcStructuralAnalysisModel::HasResults @@ -37963,7 +38071,7 @@ public: void setMasterRepresentation(IfcTrimmingPreference::IfcTrimmingPreference v); virtual unsigned int getArgumentCount() const { return 5; } virtual IfcUtil::ArgumentType getArgumentType(unsigned int i) const { switch (i) {case 0: return IfcUtil::Argument_ENTITY_INSTANCE; case 1: return IfcUtil::Argument_AGGREGATE_OF_ENTITY_INSTANCE; case 2: return IfcUtil::Argument_AGGREGATE_OF_ENTITY_INSTANCE; case 3: return IfcUtil::Argument_BOOL; case 4: return IfcUtil::Argument_ENUMERATION; } return IfcBoundedCurve::getArgumentType(i); } - virtual Type::Enum getArgumentEntity(unsigned int i) const { switch (i) {case 0: return Type::IfcCurve; case 1: return Type::IfcTrimmingSelect; case 2: return Type::IfcTrimmingSelect; case 3: return Type::UNDEFINED; case 4: return Type::IfcTrimmingPreference; } return IfcBoundedCurve::getArgumentEntity(i); } + virtual Type::Enum getArgumentEntity(unsigned int i) const { switch (i) {case 0: return Type::IfcCurve; case 1: return Type::IfcTrimmingSelect; case 2: return Type::IfcTrimmingSelect; case 3: return Type::IfcBoolean; case 4: return Type::IfcTrimmingPreference; } return IfcBoundedCurve::getArgumentEntity(i); } virtual const char* getArgumentName(unsigned int i) const { switch (i) {case 0: return "BasisCurve"; case 1: return "Trim1"; case 2: return "Trim2"; case 3: return "SenseAgreement"; case 4: return "MasterRepresentation"; } return IfcBoundedCurve::getArgumentName(i); } virtual Argument* getArgument(unsigned int i) const { return entity->getArgument(i); } bool is(Type::Enum v) const; @@ -38654,7 +38762,7 @@ public: void setUserDefinedPartitioningType(std::string v); virtual unsigned int getArgumentCount() const { return 13; } virtual IfcUtil::ArgumentType getArgumentType(unsigned int i) const { switch (i) {case 9: return IfcUtil::Argument_ENUMERATION; case 10: return IfcUtil::Argument_ENUMERATION; case 11: return IfcUtil::Argument_BOOL; case 12: return IfcUtil::Argument_STRING; } return IfcBuildingElementType::getArgumentType(i); } - virtual Type::Enum getArgumentEntity(unsigned int i) const { switch (i) {case 9: return Type::IfcWindowTypeEnum; case 10: return Type::IfcWindowTypePartitioningEnum; case 11: return Type::UNDEFINED; case 12: return Type::IfcLabel; } return IfcBuildingElementType::getArgumentEntity(i); } + virtual Type::Enum getArgumentEntity(unsigned int i) const { switch (i) {case 9: return Type::IfcWindowTypeEnum; case 10: return Type::IfcWindowTypePartitioningEnum; case 11: return Type::IfcBoolean; case 12: return Type::IfcLabel; } return IfcBuildingElementType::getArgumentEntity(i); } virtual const char* getArgumentName(unsigned int i) const { switch (i) {case 9: return "PredefinedType"; case 10: return "PartitioningType"; case 11: return "ParameterTakesPrecedence"; case 12: return "UserDefinedPartitioningType"; } return IfcBuildingElementType::getArgumentName(i); } virtual Argument* getArgument(unsigned int i) const { return entity->getArgument(i); } bool is(Type::Enum v) const; @@ -39435,7 +39543,7 @@ public: void setSelfIntersect(bool v); virtual unsigned int getArgumentCount() const { return 5; } virtual IfcUtil::ArgumentType getArgumentType(unsigned int i) const { switch (i) {case 0: return IfcUtil::Argument_INT; case 1: return IfcUtil::Argument_AGGREGATE_OF_ENTITY_INSTANCE; case 2: return IfcUtil::Argument_ENUMERATION; case 3: return IfcUtil::Argument_BOOL; case 4: return IfcUtil::Argument_BOOL; } return IfcBoundedCurve::getArgumentType(i); } - virtual Type::Enum getArgumentEntity(unsigned int i) const { switch (i) {case 0: return Type::UNDEFINED; case 1: return Type::IfcCartesianPoint; case 2: return Type::IfcBSplineCurveForm; case 3: return Type::UNDEFINED; case 4: return Type::UNDEFINED; } return IfcBoundedCurve::getArgumentEntity(i); } + virtual Type::Enum getArgumentEntity(unsigned int i) const { switch (i) {case 0: return Type::IfcInteger; case 1: return Type::IfcCartesianPoint; case 2: return Type::IfcBSplineCurveForm; case 3: return Type::IfcLogical; case 4: return Type::IfcLogical; } return IfcBoundedCurve::getArgumentEntity(i); } virtual const char* getArgumentName(unsigned int i) const { switch (i) {case 0: return "Degree"; case 1: return "ControlPointsList"; case 2: return "CurveForm"; case 3: return "ClosedCurve"; case 4: return "SelfIntersect"; } return IfcBoundedCurve::getArgumentName(i); } virtual Argument* getArgument(unsigned int i) const { return entity->getArgument(i); } bool is(Type::Enum v) const; @@ -39475,7 +39583,7 @@ public: void setKnotSpec(IfcKnotType::IfcKnotType v); virtual unsigned int getArgumentCount() const { return 8; } virtual IfcUtil::ArgumentType getArgumentType(unsigned int i) const { switch (i) {case 5: return IfcUtil::Argument_AGGREGATE_OF_INT; case 6: return IfcUtil::Argument_AGGREGATE_OF_DOUBLE; case 7: return IfcUtil::Argument_ENUMERATION; } return IfcBSplineCurve::getArgumentType(i); } - virtual Type::Enum getArgumentEntity(unsigned int i) const { switch (i) {case 5: return Type::UNDEFINED; case 6: return Type::IfcParameterValue; case 7: return Type::IfcKnotType; } return IfcBSplineCurve::getArgumentEntity(i); } + virtual Type::Enum getArgumentEntity(unsigned int i) const { switch (i) {case 5: return Type::IfcInteger; case 6: return Type::IfcParameterValue; case 7: return Type::IfcKnotType; } return IfcBSplineCurve::getArgumentEntity(i); } virtual const char* getArgumentName(unsigned int i) const { switch (i) {case 5: return "KnotMultiplicities"; case 6: return "Knots"; case 7: return "KnotSpec"; } return IfcBSplineCurve::getArgumentName(i); } virtual Argument* getArgument(unsigned int i) const { return entity->getArgument(i); } bool is(Type::Enum v) const; @@ -40037,7 +40145,6 @@ public: virtual Type::Enum getArgumentEntity(unsigned int i) const { return IfcElement::getArgumentEntity(i); } virtual const char* getArgumentName(unsigned int i) const { return IfcElement::getArgumentName(i); } virtual Argument* getArgument(unsigned int i) const { return entity->getArgument(i); } - IfcTemplatedEntityList< IfcRelCoversBldgElements >::ptr HasCoverings() const; // INVERSE IfcRelCoversBldgElements::RelatingBuildingElement bool is(Type::Enum v) const; Type::Enum type() const; static Type::Enum Class(); @@ -40404,16 +40511,20 @@ public: /// Predefined types of distribution systems. IfcBuildingSystemTypeEnum::IfcBuildingSystemTypeEnum PredefinedType() const; void setPredefinedType(IfcBuildingSystemTypeEnum::IfcBuildingSystemTypeEnum v); - virtual unsigned int getArgumentCount() const { return 6; } - virtual IfcUtil::ArgumentType getArgumentType(unsigned int i) const { switch (i) {case 5: return IfcUtil::Argument_ENUMERATION; } return IfcSystem::getArgumentType(i); } - virtual Type::Enum getArgumentEntity(unsigned int i) const { switch (i) {case 5: return Type::IfcBuildingSystemTypeEnum; } return IfcSystem::getArgumentEntity(i); } - virtual const char* getArgumentName(unsigned int i) const { switch (i) {case 5: return "PredefinedType"; } return IfcSystem::getArgumentName(i); } + /// Whether the optional attribute LongName is defined for this IfcBuildingSystem + bool hasLongName() const; + std::string LongName() const; + void setLongName(std::string v); + virtual unsigned int getArgumentCount() const { return 7; } + virtual IfcUtil::ArgumentType getArgumentType(unsigned int i) const { switch (i) {case 5: return IfcUtil::Argument_ENUMERATION; case 6: return IfcUtil::Argument_STRING; } return IfcSystem::getArgumentType(i); } + virtual Type::Enum getArgumentEntity(unsigned int i) const { switch (i) {case 5: return Type::IfcBuildingSystemTypeEnum; case 6: return Type::IfcLabel; } return IfcSystem::getArgumentEntity(i); } + virtual const char* getArgumentName(unsigned int i) const { switch (i) {case 5: return "PredefinedType"; case 6: return "LongName"; } return IfcSystem::getArgumentName(i); } virtual Argument* getArgument(unsigned int i) const { return entity->getArgument(i); } bool is(Type::Enum v) const; Type::Enum type() const; static Type::Enum Class(); IfcBuildingSystem (IfcAbstractEntity* e); - IfcBuildingSystem (std::string v1_GlobalId, IfcOwnerHistory* v2_OwnerHistory, boost::optional< std::string > v3_Name, boost::optional< std::string > v4_Description, boost::optional< std::string > v5_ObjectType, boost::optional< IfcBuildingSystemTypeEnum::IfcBuildingSystemTypeEnum > v6_PredefinedType); + IfcBuildingSystem (std::string v1_GlobalId, IfcOwnerHistory* v2_OwnerHistory, boost::optional< std::string > v3_Name, boost::optional< std::string > v4_Description, boost::optional< std::string > v5_ObjectType, boost::optional< IfcBuildingSystemTypeEnum::IfcBuildingSystemTypeEnum > v6_PredefinedType, boost::optional< std::string > v7_LongName); typedef IfcTemplatedEntityList< IfcBuildingSystem > list; }; /// The energy conversion device type IfcBurnerType defines commonly shared information for occurrences of burners. The set of shared information may include: @@ -47481,7 +47592,7 @@ public: void setWeightsData(std::vector< double > /*[2:?]*/ v); virtual unsigned int getArgumentCount() const { return 9; } virtual IfcUtil::ArgumentType getArgumentType(unsigned int i) const { switch (i) {case 8: return IfcUtil::Argument_AGGREGATE_OF_DOUBLE; } return IfcBSplineCurveWithKnots::getArgumentType(i); } - virtual Type::Enum getArgumentEntity(unsigned int i) const { switch (i) {case 8: return Type::UNDEFINED; } return IfcBSplineCurveWithKnots::getArgumentEntity(i); } + virtual Type::Enum getArgumentEntity(unsigned int i) const { switch (i) {case 8: return Type::IfcReal; } return IfcBSplineCurveWithKnots::getArgumentEntity(i); } virtual const char* getArgumentName(unsigned int i) const { switch (i) {case 8: return "WeightsData"; } return IfcBSplineCurveWithKnots::getArgumentName(i); } virtual Argument* getArgument(unsigned int i) const { return entity->getArgument(i); } bool is(Type::Enum v) const; @@ -49144,13 +49255,10 @@ public: /// Figure 131 — Stair flight body class IfcStairFlight : public IfcBuildingElement { public: - /// Whether the optional attribute NumberOfRiser is defined for this IfcStairFlight - bool hasNumberOfRiser() const; - /// Number of the risers included in the stair flight - /// - /// IFC2x4 CHANGE The attribute has been deprecated it shall only be exposed with a NIL value. Use Pset_StairFlightCommon.NumberOfRisers instead. - int NumberOfRiser() const; - void setNumberOfRiser(int v); + /// Whether the optional attribute NumberOfRisers is defined for this IfcStairFlight + bool hasNumberOfRisers() const; + int NumberOfRisers() const; + void setNumberOfRisers(int v); /// Whether the optional attribute NumberOfTreads is defined for this IfcStairFlight bool hasNumberOfTreads() const; /// Number of treads included in the stair flight. @@ -49182,14 +49290,14 @@ public: void setPredefinedType(IfcStairFlightTypeEnum::IfcStairFlightTypeEnum v); virtual unsigned int getArgumentCount() const { return 13; } virtual IfcUtil::ArgumentType getArgumentType(unsigned int i) const { switch (i) {case 8: return IfcUtil::Argument_INT; case 9: return IfcUtil::Argument_INT; case 10: return IfcUtil::Argument_DOUBLE; case 11: return IfcUtil::Argument_DOUBLE; case 12: return IfcUtil::Argument_ENUMERATION; } return IfcBuildingElement::getArgumentType(i); } - virtual Type::Enum getArgumentEntity(unsigned int i) const { switch (i) {case 8: return Type::UNDEFINED; case 9: return Type::UNDEFINED; case 10: return Type::IfcPositiveLengthMeasure; case 11: return Type::IfcPositiveLengthMeasure; case 12: return Type::IfcStairFlightTypeEnum; } return IfcBuildingElement::getArgumentEntity(i); } - virtual const char* getArgumentName(unsigned int i) const { switch (i) {case 8: return "NumberOfRiser"; case 9: return "NumberOfTreads"; case 10: return "RiserHeight"; case 11: return "TreadLength"; case 12: return "PredefinedType"; } return IfcBuildingElement::getArgumentName(i); } + virtual Type::Enum getArgumentEntity(unsigned int i) const { switch (i) {case 8: return Type::IfcInteger; case 9: return Type::IfcInteger; case 10: return Type::IfcPositiveLengthMeasure; case 11: return Type::IfcPositiveLengthMeasure; case 12: return Type::IfcStairFlightTypeEnum; } return IfcBuildingElement::getArgumentEntity(i); } + virtual const char* getArgumentName(unsigned int i) const { switch (i) {case 8: return "NumberOfRisers"; case 9: return "NumberOfTreads"; case 10: return "RiserHeight"; case 11: return "TreadLength"; case 12: return "PredefinedType"; } return IfcBuildingElement::getArgumentName(i); } virtual Argument* getArgument(unsigned int i) const { return entity->getArgument(i); } bool is(Type::Enum v) const; Type::Enum type() const; static Type::Enum Class(); IfcStairFlight (IfcAbstractEntity* e); - IfcStairFlight (std::string v1_GlobalId, IfcOwnerHistory* v2_OwnerHistory, boost::optional< std::string > v3_Name, boost::optional< std::string > v4_Description, boost::optional< std::string > v5_ObjectType, IfcObjectPlacement* v6_ObjectPlacement, IfcProductRepresentation* v7_Representation, boost::optional< std::string > v8_Tag, boost::optional< int > v9_NumberOfRiser, boost::optional< int > v10_NumberOfTreads, boost::optional< double > v11_RiserHeight, boost::optional< double > v12_TreadLength, boost::optional< IfcStairFlightTypeEnum::IfcStairFlightTypeEnum > v13_PredefinedType); + IfcStairFlight (std::string v1_GlobalId, IfcOwnerHistory* v2_OwnerHistory, boost::optional< std::string > v3_Name, boost::optional< std::string > v4_Description, boost::optional< std::string > v5_ObjectType, IfcObjectPlacement* v6_ObjectPlacement, IfcProductRepresentation* v7_Representation, boost::optional< std::string > v8_Tag, boost::optional< int > v9_NumberOfRisers, boost::optional< int > v10_NumberOfTreads, boost::optional< double > v11_RiserHeight, boost::optional< double > v12_TreadLength, boost::optional< IfcStairFlightTypeEnum::IfcStairFlightTypeEnum > v13_PredefinedType); typedef IfcTemplatedEntityList< IfcStairFlight > list; }; /// Definition from IAI: The IfcStructuralAnalysisModel is used to assemble all information needed to represent a structural analysis model. It encompasses certain general properties (such as analysis type), references to all contained structural members, structural supports or connections, as well as loads and the respective load results. @@ -55147,4 +55255,8 @@ void InitStringMap(); IfcUtil::IfcBaseClass* SchemaEntity(IfcAbstractEntity* e = 0); } +#ifdef _MSC_VER +#pragma warning(pop) +#endif + #endif diff --git a/src/ifcparse/Ifc4enum.h b/src/ifcparse/Ifc4enum.h index afd5aa744b..c098027beb 100644 --- a/src/ifcparse/Ifc4enum.h +++ b/src/ifcparse/Ifc4enum.h @@ -27,15 +27,17 @@ #ifndef IFC4ENUM_H #define IFC4ENUM_H +#include + #define IfcSchema Ifc4 namespace Ifc4 { namespace Type { typedef enum { - IfcAbsorbedDoseMeasure, IfcAccelerationMeasure, IfcActionRequest, IfcActionRequestTypeEnum, IfcActionSourceTypeEnum, IfcActionTypeEnum, IfcActor, IfcActorRole, IfcActorSelect, IfcActuator, IfcActuatorType, IfcActuatorTypeEnum, IfcAddress, IfcAddressTypeEnum, IfcAdvancedBrep, IfcAdvancedBrepWithVoids, IfcAdvancedFace, IfcAirTerminal, IfcAirTerminalBox, IfcAirTerminalBoxType, IfcAirTerminalBoxTypeEnum, IfcAirTerminalType, IfcAirTerminalTypeEnum, IfcAirToAirHeatRecovery, IfcAirToAirHeatRecoveryType, IfcAirToAirHeatRecoveryTypeEnum, IfcAlarm, IfcAlarmType, IfcAlarmTypeEnum, IfcAmountOfSubstanceMeasure, IfcAnalysisModelTypeEnum, IfcAnalysisTheoryTypeEnum, IfcAngularVelocityMeasure, IfcAnnotation, IfcAnnotationFillArea, IfcApplication, IfcAppliedValue, IfcAppliedValueSelect, IfcApproval, IfcApprovalRelationship, IfcArbitraryClosedProfileDef, IfcArbitraryOpenProfileDef, IfcArbitraryProfileDefWithVoids, IfcAreaDensityMeasure, IfcAreaMeasure, IfcArithmeticOperatorEnum, IfcAssemblyPlaceEnum, IfcAsset, IfcAsymmetricIShapeProfileDef, IfcAudioVisualAppliance, IfcAudioVisualApplianceType, IfcAudioVisualApplianceTypeEnum, IfcAxis1Placement, IfcAxis2Placement, IfcAxis2Placement2D, IfcAxis2Placement3D, IfcBSplineCurve, IfcBSplineCurveForm, IfcBSplineCurveWithKnots, IfcBSplineSurface, IfcBSplineSurfaceForm, IfcBSplineSurfaceWithKnots, IfcBeam, IfcBeamStandardCase, IfcBeamType, IfcBeamTypeEnum, IfcBenchmarkEnum, IfcBendingParameterSelect, IfcBlobTexture, IfcBlock, IfcBoiler, IfcBoilerType, IfcBoilerTypeEnum, IfcBoolean, IfcBooleanClippingResult, IfcBooleanOperand, IfcBooleanOperator, IfcBooleanResult, IfcBoundaryCondition, IfcBoundaryCurve, IfcBoundaryEdgeCondition, IfcBoundaryFaceCondition, IfcBoundaryNodeCondition, IfcBoundaryNodeConditionWarping, IfcBoundedCurve, IfcBoundedSurface, IfcBoundingBox, IfcBoxAlignment, IfcBoxedHalfSpace, IfcBuilding, IfcBuildingElement, IfcBuildingElementPart, IfcBuildingElementPartType, IfcBuildingElementPartTypeEnum, IfcBuildingElementProxy, IfcBuildingElementProxyType, IfcBuildingElementProxyTypeEnum, IfcBuildingElementType, IfcBuildingStorey, IfcBuildingSystem, IfcBuildingSystemTypeEnum, IfcBurner, IfcBurnerType, IfcBurnerTypeEnum, IfcCShapeProfileDef, IfcCableCarrierFitting, IfcCableCarrierFittingType, IfcCableCarrierFittingTypeEnum, IfcCableCarrierSegment, IfcCableCarrierSegmentType, IfcCableCarrierSegmentTypeEnum, IfcCableFitting, IfcCableFittingType, IfcCableFittingTypeEnum, IfcCableSegment, IfcCableSegmentType, IfcCableSegmentTypeEnum, IfcCardinalPointReference, IfcCartesianPoint, IfcCartesianPointList, IfcCartesianPointList3D, IfcCartesianTransformationOperator, IfcCartesianTransformationOperator2D, IfcCartesianTransformationOperator2DnonUniform, IfcCartesianTransformationOperator3D, IfcCartesianTransformationOperator3DnonUniform, IfcCenterLineProfileDef, IfcChangeActionEnum, IfcChiller, IfcChillerType, IfcChillerTypeEnum, IfcChimney, IfcChimneyType, IfcChimneyTypeEnum, IfcCircle, IfcCircleHollowProfileDef, IfcCircleProfileDef, IfcCivilElement, IfcCivilElementType, IfcClassification, IfcClassificationReference, IfcClassificationReferenceSelect, IfcClassificationSelect, IfcClosedShell, IfcCoil, IfcCoilType, IfcCoilTypeEnum, IfcColour, IfcColourOrFactor, IfcColourRgb, IfcColourRgbList, IfcColourSpecification, IfcColumn, IfcColumnStandardCase, IfcColumnType, IfcColumnTypeEnum, IfcCommunicationsAppliance, IfcCommunicationsApplianceType, IfcCommunicationsApplianceTypeEnum, IfcComplexNumber, IfcComplexProperty, IfcComplexPropertyTemplate, IfcComplexPropertyTemplateTypeEnum, IfcCompositeCurve, IfcCompositeCurveOnSurface, IfcCompositeCurveSegment, IfcCompositeProfileDef, IfcCompoundPlaneAngleMeasure, IfcCompressor, IfcCompressorType, IfcCompressorTypeEnum, IfcCondenser, IfcCondenserType, IfcCondenserTypeEnum, IfcConic, IfcConnectedFaceSet, IfcConnectionCurveGeometry, IfcConnectionGeometry, IfcConnectionPointEccentricity, IfcConnectionPointGeometry, IfcConnectionSurfaceGeometry, IfcConnectionTypeEnum, IfcConnectionVolumeGeometry, IfcConstraint, IfcConstraintEnum, IfcConstructionEquipmentResource, IfcConstructionEquipmentResourceType, IfcConstructionEquipmentResourceTypeEnum, IfcConstructionMaterialResource, IfcConstructionMaterialResourceType, IfcConstructionMaterialResourceTypeEnum, IfcConstructionProductResource, IfcConstructionProductResourceType, IfcConstructionProductResourceTypeEnum, IfcConstructionResource, IfcConstructionResourceType, IfcContext, IfcContextDependentMeasure, IfcContextDependentUnit, IfcControl, IfcController, IfcControllerType, IfcControllerTypeEnum, IfcConversionBasedUnit, IfcConversionBasedUnitWithOffset, IfcCooledBeam, IfcCooledBeamType, IfcCooledBeamTypeEnum, IfcCoolingTower, IfcCoolingTowerType, IfcCoolingTowerTypeEnum, IfcCoordinateOperation, IfcCoordinateReferenceSystem, IfcCoordinateReferenceSystemSelect, IfcCostItem, IfcCostItemTypeEnum, IfcCostSchedule, IfcCostScheduleTypeEnum, IfcCostValue, IfcCountMeasure, IfcCovering, IfcCoveringType, IfcCoveringTypeEnum, IfcCrewResource, IfcCrewResourceType, IfcCrewResourceTypeEnum, IfcCsgPrimitive3D, IfcCsgSelect, IfcCsgSolid, IfcCurrencyRelationship, IfcCurtainWall, IfcCurtainWallType, IfcCurtainWallTypeEnum, IfcCurvatureMeasure, IfcCurve, IfcCurveBoundedPlane, IfcCurveBoundedSurface, IfcCurveFontOrScaledCurveFontSelect, IfcCurveInterpolationEnum, IfcCurveOnSurface, IfcCurveOrEdgeCurve, IfcCurveStyle, IfcCurveStyleFont, IfcCurveStyleFontAndScaling, IfcCurveStyleFontPattern, IfcCurveStyleFontSelect, IfcCylindricalSurface, IfcDamper, IfcDamperType, IfcDamperTypeEnum, IfcDataOriginEnum, IfcDate, IfcDateTime, IfcDayInMonthNumber, IfcDayInWeekNumber, IfcDefinitionSelect, IfcDerivedMeasureValue, IfcDerivedProfileDef, IfcDerivedUnit, IfcDerivedUnitElement, IfcDerivedUnitEnum, IfcDescriptiveMeasure, IfcDimensionCount, IfcDimensionalExponents, IfcDirection, IfcDirectionSenseEnum, IfcDiscreteAccessory, IfcDiscreteAccessoryType, IfcDiscreteAccessoryTypeEnum, IfcDistributionChamberElement, IfcDistributionChamberElementType, IfcDistributionChamberElementTypeEnum, IfcDistributionCircuit, IfcDistributionControlElement, IfcDistributionControlElementType, IfcDistributionElement, IfcDistributionElementType, IfcDistributionFlowElement, IfcDistributionFlowElementType, IfcDistributionPort, IfcDistributionPortTypeEnum, IfcDistributionSystem, IfcDistributionSystemEnum, IfcDocumentConfidentialityEnum, IfcDocumentInformation, IfcDocumentInformationRelationship, IfcDocumentReference, IfcDocumentSelect, IfcDocumentStatusEnum, IfcDoor, IfcDoorLiningProperties, IfcDoorPanelOperationEnum, IfcDoorPanelPositionEnum, IfcDoorPanelProperties, IfcDoorStandardCase, IfcDoorStyle, IfcDoorStyleConstructionEnum, IfcDoorStyleOperationEnum, IfcDoorType, IfcDoorTypeEnum, IfcDoorTypeOperationEnum, IfcDoseEquivalentMeasure, IfcDraughtingPreDefinedColour, IfcDraughtingPreDefinedCurveFont, IfcDuctFitting, IfcDuctFittingType, IfcDuctFittingTypeEnum, IfcDuctSegment, IfcDuctSegmentType, IfcDuctSegmentTypeEnum, IfcDuctSilencer, IfcDuctSilencerType, IfcDuctSilencerTypeEnum, IfcDuration, IfcDynamicViscosityMeasure, IfcEdge, IfcEdgeCurve, IfcEdgeLoop, IfcElectricAppliance, IfcElectricApplianceType, IfcElectricApplianceTypeEnum, IfcElectricCapacitanceMeasure, IfcElectricChargeMeasure, IfcElectricConductanceMeasure, IfcElectricCurrentMeasure, IfcElectricDistributionBoard, IfcElectricDistributionBoardType, IfcElectricDistributionBoardTypeEnum, IfcElectricFlowStorageDevice, IfcElectricFlowStorageDeviceType, IfcElectricFlowStorageDeviceTypeEnum, IfcElectricGenerator, IfcElectricGeneratorType, IfcElectricGeneratorTypeEnum, IfcElectricMotor, IfcElectricMotorType, IfcElectricMotorTypeEnum, IfcElectricResistanceMeasure, IfcElectricTimeControl, IfcElectricTimeControlType, IfcElectricTimeControlTypeEnum, IfcElectricVoltageMeasure, IfcElement, IfcElementAssembly, IfcElementAssemblyType, IfcElementAssemblyTypeEnum, IfcElementComponent, IfcElementComponentType, IfcElementCompositionEnum, IfcElementQuantity, IfcElementType, IfcElementarySurface, IfcEllipse, IfcEllipseProfileDef, IfcEnergyConversionDevice, IfcEnergyConversionDeviceType, IfcEnergyMeasure, IfcEngine, IfcEngineType, IfcEngineTypeEnum, IfcEvaporativeCooler, IfcEvaporativeCoolerType, IfcEvaporativeCoolerTypeEnum, IfcEvaporator, IfcEvaporatorType, IfcEvaporatorTypeEnum, IfcEvent, IfcEventTime, IfcEventTriggerTypeEnum, IfcEventType, IfcEventTypeEnum, IfcExtendedProperties, IfcExternalInformation, IfcExternalReference, IfcExternalReferenceRelationship, IfcExternalSpatialElement, IfcExternalSpatialElementTypeEnum, IfcExternalSpatialStructureElement, IfcExternallyDefinedHatchStyle, IfcExternallyDefinedSurfaceStyle, IfcExternallyDefinedTextFont, IfcExtrudedAreaSolid, IfcExtrudedAreaSolidTapered, IfcFace, IfcFaceBasedSurfaceModel, IfcFaceBound, IfcFaceOuterBound, IfcFaceSurface, IfcFacetedBrep, IfcFacetedBrepWithVoids, IfcFailureConnectionCondition, IfcFan, IfcFanType, IfcFanTypeEnum, IfcFastener, IfcFastenerType, IfcFastenerTypeEnum, IfcFeatureElement, IfcFeatureElementAddition, IfcFeatureElementSubtraction, IfcFillAreaStyle, IfcFillAreaStyleHatching, IfcFillAreaStyleTiles, IfcFillStyleSelect, IfcFilter, IfcFilterType, IfcFilterTypeEnum, IfcFireSuppressionTerminal, IfcFireSuppressionTerminalType, IfcFireSuppressionTerminalTypeEnum, IfcFixedReferenceSweptAreaSolid, IfcFlowController, IfcFlowControllerType, IfcFlowDirectionEnum, IfcFlowFitting, IfcFlowFittingType, IfcFlowInstrument, IfcFlowInstrumentType, IfcFlowInstrumentTypeEnum, IfcFlowMeter, IfcFlowMeterType, IfcFlowMeterTypeEnum, IfcFlowMovingDevice, IfcFlowMovingDeviceType, IfcFlowSegment, IfcFlowSegmentType, IfcFlowStorageDevice, IfcFlowStorageDeviceType, IfcFlowTerminal, IfcFlowTerminalType, IfcFlowTreatmentDevice, IfcFlowTreatmentDeviceType, IfcFontStyle, IfcFontVariant, IfcFontWeight, IfcFooting, IfcFootingType, IfcFootingTypeEnum, IfcForceMeasure, IfcFrequencyMeasure, IfcFurnishingElement, IfcFurnishingElementType, IfcFurniture, IfcFurnitureType, IfcFurnitureTypeEnum, IfcGeographicElement, IfcGeographicElementType, IfcGeographicElementTypeEnum, IfcGeometricCurveSet, IfcGeometricProjectionEnum, IfcGeometricRepresentationContext, IfcGeometricRepresentationItem, IfcGeometricRepresentationSubContext, IfcGeometricSet, IfcGeometricSetSelect, IfcGlobalOrLocalEnum, IfcGloballyUniqueId, IfcGrid, IfcGridAxis, IfcGridPlacement, IfcGridPlacementDirectionSelect, IfcGridTypeEnum, IfcGroup, IfcHalfSpaceSolid, IfcHatchLineDistanceSelect, IfcHeatExchanger, IfcHeatExchangerType, IfcHeatExchangerTypeEnum, IfcHeatFluxDensityMeasure, IfcHeatingValueMeasure, IfcHumidifier, IfcHumidifierType, IfcHumidifierTypeEnum, IfcIShapeProfileDef, IfcIdentifier, IfcIlluminanceMeasure, IfcImageTexture, IfcIndexedColourMap, IfcIndexedTextureMap, IfcIndexedTriangleTextureMap, IfcInductanceMeasure, IfcInteger, IfcIntegerCountRateMeasure, IfcInterceptor, IfcInterceptorType, IfcInterceptorTypeEnum, IfcInternalOrExternalEnum, IfcInventory, IfcInventoryTypeEnum, IfcIonConcentrationMeasure, IfcIrregularTimeSeries, IfcIrregularTimeSeriesValue, IfcIsothermalMoistureCapacityMeasure, IfcJunctionBox, IfcJunctionBoxType, IfcJunctionBoxTypeEnum, IfcKinematicViscosityMeasure, IfcKnotType, IfcLShapeProfileDef, IfcLabel, IfcLaborResource, IfcLaborResourceType, IfcLaborResourceTypeEnum, IfcLagTime, IfcLamp, IfcLampType, IfcLampTypeEnum, IfcLanguageId, IfcLayerSetDirectionEnum, IfcLayeredItem, IfcLengthMeasure, IfcLibraryInformation, IfcLibraryReference, IfcLibrarySelect, IfcLightDistributionCurveEnum, IfcLightDistributionData, IfcLightDistributionDataSourceSelect, IfcLightEmissionSourceEnum, IfcLightFixture, IfcLightFixtureType, IfcLightFixtureTypeEnum, IfcLightIntensityDistribution, IfcLightSource, IfcLightSourceAmbient, IfcLightSourceDirectional, IfcLightSourceGoniometric, IfcLightSourcePositional, IfcLightSourceSpot, IfcLine, IfcLinearForceMeasure, IfcLinearMomentMeasure, IfcLinearStiffnessMeasure, IfcLinearVelocityMeasure, IfcLoadGroupTypeEnum, IfcLocalPlacement, IfcLogical, IfcLogicalOperatorEnum, IfcLoop, IfcLuminousFluxMeasure, IfcLuminousIntensityDistributionMeasure, IfcLuminousIntensityMeasure, IfcMagneticFluxDensityMeasure, IfcMagneticFluxMeasure, IfcManifoldSolidBrep, IfcMapConversion, IfcMappedItem, IfcMassDensityMeasure, IfcMassFlowRateMeasure, IfcMassMeasure, IfcMassPerLengthMeasure, IfcMaterial, IfcMaterialClassificationRelationship, IfcMaterialConstituent, IfcMaterialConstituentSet, IfcMaterialDefinition, IfcMaterialDefinitionRepresentation, IfcMaterialLayer, IfcMaterialLayerSet, IfcMaterialLayerSetUsage, IfcMaterialLayerWithOffsets, IfcMaterialList, IfcMaterialProfile, IfcMaterialProfileSet, IfcMaterialProfileSetUsage, IfcMaterialProfileSetUsageTapering, IfcMaterialProfileWithOffsets, IfcMaterialProperties, IfcMaterialRelationship, IfcMaterialSelect, IfcMaterialUsageDefinition, IfcMeasureValue, IfcMeasureWithUnit, IfcMechanicalFastener, IfcMechanicalFastenerType, IfcMechanicalFastenerTypeEnum, IfcMedicalDevice, IfcMedicalDeviceType, IfcMedicalDeviceTypeEnum, IfcMember, IfcMemberStandardCase, IfcMemberType, IfcMemberTypeEnum, IfcMetric, IfcMetricValueSelect, IfcMirroredProfileDef, IfcModulusOfElasticityMeasure, IfcModulusOfLinearSubgradeReactionMeasure, IfcModulusOfRotationalSubgradeReactionMeasure, IfcModulusOfRotationalSubgradeReactionSelect, IfcModulusOfSubgradeReactionMeasure, IfcModulusOfSubgradeReactionSelect, IfcModulusOfTranslationalSubgradeReactionSelect, IfcMoistureDiffusivityMeasure, IfcMolecularWeightMeasure, IfcMomentOfInertiaMeasure, IfcMonetaryMeasure, IfcMonetaryUnit, IfcMonthInYearNumber, IfcMotorConnection, IfcMotorConnectionType, IfcMotorConnectionTypeEnum, IfcNamedUnit, IfcNonNegativeLengthMeasure, IfcNormalisedRatioMeasure, IfcNullStyle, IfcNumericMeasure, IfcObject, IfcObjectDefinition, IfcObjectPlacement, IfcObjectReferenceSelect, IfcObjectTypeEnum, IfcObjective, IfcObjectiveEnum, IfcOccupant, IfcOccupantTypeEnum, IfcOffsetCurve2D, IfcOffsetCurve3D, IfcOpenShell, IfcOpeningElement, IfcOpeningElementTypeEnum, IfcOpeningStandardCase, IfcOrganization, IfcOrganizationRelationship, IfcOrientedEdge, IfcOuterBoundaryCurve, IfcOutlet, IfcOutletType, IfcOutletTypeEnum, IfcOwnerHistory, IfcPHMeasure, IfcParameterValue, IfcParameterizedProfileDef, IfcPath, IfcPcurve, IfcPerformanceHistory, IfcPerformanceHistoryTypeEnum, IfcPermeableCoveringOperationEnum, IfcPermeableCoveringProperties, IfcPermit, IfcPermitTypeEnum, IfcPerson, IfcPersonAndOrganization, IfcPhysicalComplexQuantity, IfcPhysicalOrVirtualEnum, IfcPhysicalQuantity, IfcPhysicalSimpleQuantity, IfcPile, IfcPileConstructionEnum, IfcPileType, IfcPileTypeEnum, IfcPipeFitting, IfcPipeFittingType, IfcPipeFittingTypeEnum, IfcPipeSegment, IfcPipeSegmentType, IfcPipeSegmentTypeEnum, IfcPixelTexture, IfcPlacement, IfcPlanarBox, IfcPlanarExtent, IfcPlanarForceMeasure, IfcPlane, IfcPlaneAngleMeasure, IfcPlate, IfcPlateStandardCase, IfcPlateType, IfcPlateTypeEnum, IfcPoint, IfcPointOnCurve, IfcPointOnSurface, IfcPointOrVertexPoint, IfcPolyLoop, IfcPolygonalBoundedHalfSpace, IfcPolyline, IfcPort, IfcPositiveLengthMeasure, IfcPositivePlaneAngleMeasure, IfcPositiveRatioMeasure, IfcPostalAddress, IfcPowerMeasure, IfcPreDefinedColour, IfcPreDefinedCurveFont, IfcPreDefinedItem, IfcPreDefinedProperties, IfcPreDefinedPropertySet, IfcPreDefinedTextFont, IfcPresentableText, IfcPresentationItem, IfcPresentationLayerAssignment, IfcPresentationLayerWithStyle, IfcPresentationStyle, IfcPresentationStyleAssignment, IfcPresentationStyleSelect, IfcPressureMeasure, IfcProcedure, IfcProcedureType, IfcProcedureTypeEnum, IfcProcess, IfcProcessSelect, IfcProduct, IfcProductDefinitionShape, IfcProductRepresentation, IfcProductRepresentationSelect, IfcProductSelect, IfcProfileDef, IfcProfileProperties, IfcProfileTypeEnum, IfcProject, IfcProjectLibrary, IfcProjectOrder, IfcProjectOrderTypeEnum, IfcProjectedCRS, IfcProjectedOrTrueLengthEnum, IfcProjectionElement, IfcProjectionElementTypeEnum, IfcProperty, IfcPropertyAbstraction, IfcPropertyBoundedValue, IfcPropertyDefinition, IfcPropertyDependencyRelationship, IfcPropertyEnumeratedValue, IfcPropertyEnumeration, IfcPropertyListValue, IfcPropertyReferenceValue, IfcPropertySet, IfcPropertySetDefinition, IfcPropertySetDefinitionSelect, IfcPropertySetDefinitionSet, IfcPropertySetTemplate, IfcPropertySetTemplateTypeEnum, IfcPropertySingleValue, IfcPropertyTableValue, IfcPropertyTemplate, IfcPropertyTemplateDefinition, IfcProtectiveDevice, IfcProtectiveDeviceTrippingUnit, IfcProtectiveDeviceTrippingUnitType, IfcProtectiveDeviceTrippingUnitTypeEnum, IfcProtectiveDeviceType, IfcProtectiveDeviceTypeEnum, IfcProxy, IfcPump, IfcPumpType, IfcPumpTypeEnum, IfcQuantityArea, IfcQuantityCount, IfcQuantityLength, IfcQuantitySet, IfcQuantityTime, IfcQuantityVolume, IfcQuantityWeight, IfcRadioActivityMeasure, IfcRailing, IfcRailingType, IfcRailingTypeEnum, IfcRamp, IfcRampFlight, IfcRampFlightType, IfcRampFlightTypeEnum, IfcRampType, IfcRampTypeEnum, IfcRatioMeasure, IfcRationalBSplineCurveWithKnots, IfcRationalBSplineSurfaceWithKnots, IfcReal, IfcRectangleHollowProfileDef, IfcRectangleProfileDef, IfcRectangularPyramid, IfcRectangularTrimmedSurface, IfcRecurrencePattern, IfcRecurrenceTypeEnum, IfcReference, IfcReflectanceMethodEnum, IfcRegularTimeSeries, IfcReinforcementBarProperties, IfcReinforcementDefinitionProperties, IfcReinforcingBar, IfcReinforcingBarRoleEnum, IfcReinforcingBarSurfaceEnum, IfcReinforcingBarType, IfcReinforcingBarTypeEnum, IfcReinforcingElement, IfcReinforcingElementType, IfcReinforcingMesh, IfcReinforcingMeshType, IfcReinforcingMeshTypeEnum, IfcRelAggregates, IfcRelAssigns, IfcRelAssignsToActor, IfcRelAssignsToControl, IfcRelAssignsToGroup, IfcRelAssignsToGroupByFactor, IfcRelAssignsToProcess, IfcRelAssignsToProduct, IfcRelAssignsToResource, IfcRelAssociates, IfcRelAssociatesApproval, IfcRelAssociatesClassification, IfcRelAssociatesConstraint, IfcRelAssociatesDocument, IfcRelAssociatesLibrary, IfcRelAssociatesMaterial, IfcRelConnects, IfcRelConnectsElements, IfcRelConnectsPathElements, IfcRelConnectsPortToElement, IfcRelConnectsPorts, IfcRelConnectsStructuralActivity, IfcRelConnectsStructuralMember, IfcRelConnectsWithEccentricity, IfcRelConnectsWithRealizingElements, IfcRelContainedInSpatialStructure, IfcRelCoversBldgElements, IfcRelCoversSpaces, IfcRelDeclares, IfcRelDecomposes, IfcRelDefines, IfcRelDefinesByObject, IfcRelDefinesByProperties, IfcRelDefinesByTemplate, IfcRelDefinesByType, IfcRelFillsElement, IfcRelFlowControlElements, IfcRelInterferesElements, IfcRelNests, IfcRelProjectsElement, IfcRelReferencedInSpatialStructure, IfcRelSequence, IfcRelServicesBuildings, IfcRelSpaceBoundary, IfcRelSpaceBoundary1stLevel, IfcRelSpaceBoundary2ndLevel, IfcRelVoidsElement, IfcRelationship, IfcReparametrisedCompositeCurveSegment, IfcRepresentation, IfcRepresentationContext, IfcRepresentationItem, IfcRepresentationMap, IfcResource, IfcResourceApprovalRelationship, IfcResourceConstraintRelationship, IfcResourceLevelRelationship, IfcResourceObjectSelect, IfcResourceSelect, IfcResourceTime, IfcRevolvedAreaSolid, IfcRevolvedAreaSolidTapered, IfcRightCircularCone, IfcRightCircularCylinder, IfcRoleEnum, IfcRoof, IfcRoofType, IfcRoofTypeEnum, IfcRoot, IfcRotationalFrequencyMeasure, IfcRotationalMassMeasure, IfcRotationalStiffnessMeasure, IfcRotationalStiffnessSelect, IfcRoundedRectangleProfileDef, IfcSIPrefix, IfcSIUnit, IfcSIUnitName, IfcSanitaryTerminal, IfcSanitaryTerminalType, IfcSanitaryTerminalTypeEnum, IfcSchedulingTime, IfcSectionModulusMeasure, IfcSectionProperties, IfcSectionReinforcementProperties, IfcSectionTypeEnum, IfcSectionalAreaIntegralMeasure, IfcSectionedSpine, IfcSensor, IfcSensorType, IfcSensorTypeEnum, IfcSequenceEnum, IfcShadingDevice, IfcShadingDeviceType, IfcShadingDeviceTypeEnum, IfcShapeAspect, IfcShapeModel, IfcShapeRepresentation, IfcShearModulusMeasure, IfcShell, IfcShellBasedSurfaceModel, IfcSimpleProperty, IfcSimplePropertyTemplate, IfcSimplePropertyTemplateTypeEnum, IfcSimpleValue, IfcSite, IfcSizeSelect, IfcSlab, IfcSlabElementedCase, IfcSlabStandardCase, IfcSlabType, IfcSlabTypeEnum, IfcSlippageConnectionCondition, IfcSolarDevice, IfcSolarDeviceType, IfcSolarDeviceTypeEnum, IfcSolidAngleMeasure, IfcSolidModel, IfcSolidOrShell, IfcSoundPowerLevelMeasure, IfcSoundPowerMeasure, IfcSoundPressureLevelMeasure, IfcSoundPressureMeasure, IfcSpace, IfcSpaceBoundarySelect, IfcSpaceHeater, IfcSpaceHeaterType, IfcSpaceHeaterTypeEnum, IfcSpaceType, IfcSpaceTypeEnum, IfcSpatialElement, IfcSpatialElementType, IfcSpatialStructureElement, IfcSpatialStructureElementType, IfcSpatialZone, IfcSpatialZoneType, IfcSpatialZoneTypeEnum, IfcSpecificHeatCapacityMeasure, IfcSpecularExponent, IfcSpecularHighlightSelect, IfcSpecularRoughness, IfcSphere, IfcStackTerminal, IfcStackTerminalType, IfcStackTerminalTypeEnum, IfcStair, IfcStairFlight, IfcStairFlightType, IfcStairFlightTypeEnum, IfcStairType, IfcStairTypeEnum, IfcStateEnum, IfcStructuralAction, IfcStructuralActivity, IfcStructuralActivityAssignmentSelect, IfcStructuralAnalysisModel, IfcStructuralConnection, IfcStructuralConnectionCondition, IfcStructuralCurveAction, IfcStructuralCurveActivityTypeEnum, IfcStructuralCurveConnection, IfcStructuralCurveMember, IfcStructuralCurveMemberTypeEnum, IfcStructuralCurveMemberVarying, IfcStructuralCurveReaction, IfcStructuralItem, IfcStructuralLinearAction, IfcStructuralLoad, IfcStructuralLoadCase, IfcStructuralLoadConfiguration, IfcStructuralLoadGroup, IfcStructuralLoadLinearForce, IfcStructuralLoadOrResult, IfcStructuralLoadPlanarForce, IfcStructuralLoadSingleDisplacement, IfcStructuralLoadSingleDisplacementDistortion, IfcStructuralLoadSingleForce, IfcStructuralLoadSingleForceWarping, IfcStructuralLoadStatic, IfcStructuralLoadTemperature, IfcStructuralMember, IfcStructuralPlanarAction, IfcStructuralPointAction, IfcStructuralPointConnection, IfcStructuralPointReaction, IfcStructuralReaction, IfcStructuralResultGroup, IfcStructuralSurfaceAction, IfcStructuralSurfaceActivityTypeEnum, IfcStructuralSurfaceConnection, IfcStructuralSurfaceMember, IfcStructuralSurfaceMemberTypeEnum, IfcStructuralSurfaceMemberVarying, IfcStructuralSurfaceReaction, IfcStyleAssignmentSelect, IfcStyleModel, IfcStyledItem, IfcStyledRepresentation, IfcSubContractResource, IfcSubContractResourceType, IfcSubContractResourceTypeEnum, IfcSubedge, IfcSurface, IfcSurfaceCurveSweptAreaSolid, IfcSurfaceFeature, IfcSurfaceFeatureTypeEnum, IfcSurfaceOfLinearExtrusion, IfcSurfaceOfRevolution, IfcSurfaceOrFaceSurface, IfcSurfaceReinforcementArea, IfcSurfaceSide, IfcSurfaceStyle, IfcSurfaceStyleElementSelect, IfcSurfaceStyleLighting, IfcSurfaceStyleRefraction, IfcSurfaceStyleRendering, IfcSurfaceStyleShading, IfcSurfaceStyleWithTextures, IfcSurfaceTexture, IfcSweptAreaSolid, IfcSweptDiskSolid, IfcSweptDiskSolidPolygonal, IfcSweptSurface, IfcSwitchingDevice, IfcSwitchingDeviceType, IfcSwitchingDeviceTypeEnum, IfcSystem, IfcSystemFurnitureElement, IfcSystemFurnitureElementType, IfcSystemFurnitureElementTypeEnum, IfcTShapeProfileDef, IfcTable, IfcTableColumn, IfcTableRow, IfcTank, IfcTankType, IfcTankTypeEnum, IfcTask, IfcTaskDurationEnum, IfcTaskTime, IfcTaskTimeRecurring, IfcTaskType, IfcTaskTypeEnum, IfcTelecomAddress, IfcTemperatureGradientMeasure, IfcTemperatureRateOfChangeMeasure, IfcTendon, IfcTendonAnchor, IfcTendonAnchorType, IfcTendonAnchorTypeEnum, IfcTendonType, IfcTendonTypeEnum, IfcTessellatedFaceSet, IfcTessellatedItem, IfcText, IfcTextAlignment, IfcTextDecoration, IfcTextFontName, IfcTextFontSelect, IfcTextLiteral, IfcTextLiteralWithExtent, IfcTextPath, IfcTextStyle, IfcTextStyleFontModel, IfcTextStyleForDefinedFont, IfcTextStyleTextModel, IfcTextTransformation, IfcTextureCoordinate, IfcTextureCoordinateGenerator, IfcTextureMap, IfcTextureVertex, IfcTextureVertexList, IfcThermalAdmittanceMeasure, IfcThermalConductivityMeasure, IfcThermalExpansionCoefficientMeasure, IfcThermalResistanceMeasure, IfcThermalTransmittanceMeasure, IfcThermodynamicTemperatureMeasure, IfcTime, IfcTimeMeasure, IfcTimeOrRatioSelect, IfcTimePeriod, IfcTimeSeries, IfcTimeSeriesDataTypeEnum, IfcTimeSeriesValue, IfcTimeStamp, IfcTopologicalRepresentationItem, IfcTopologyRepresentation, IfcTorqueMeasure, IfcTransformer, IfcTransformerType, IfcTransformerTypeEnum, IfcTransitionCode, IfcTranslationalStiffnessSelect, IfcTransportElement, IfcTransportElementType, IfcTransportElementTypeEnum, IfcTrapeziumProfileDef, IfcTriangulatedFaceSet, IfcTrimmedCurve, IfcTrimmingPreference, IfcTrimmingSelect, IfcTubeBundle, IfcTubeBundleType, IfcTubeBundleTypeEnum, IfcTypeObject, IfcTypeProcess, IfcTypeProduct, IfcTypeResource, IfcURIReference, IfcUShapeProfileDef, IfcUnit, IfcUnitAssignment, IfcUnitEnum, IfcUnitaryControlElement, IfcUnitaryControlElementType, IfcUnitaryControlElementTypeEnum, IfcUnitaryEquipment, IfcUnitaryEquipmentType, IfcUnitaryEquipmentTypeEnum, IfcValue, IfcValve, IfcValveType, IfcValveTypeEnum, IfcVaporPermeabilityMeasure, IfcVector, IfcVectorOrDirection, IfcVertex, IfcVertexLoop, IfcVertexPoint, IfcVibrationIsolator, IfcVibrationIsolatorType, IfcVibrationIsolatorTypeEnum, IfcVirtualElement, IfcVirtualGridIntersection, IfcVoidingFeature, IfcVoidingFeatureTypeEnum, IfcVolumeMeasure, IfcVolumetricFlowRateMeasure, IfcWall, IfcWallElementedCase, IfcWallStandardCase, IfcWallType, IfcWallTypeEnum, IfcWarpingConstantMeasure, IfcWarpingMomentMeasure, IfcWarpingStiffnessSelect, IfcWasteTerminal, IfcWasteTerminalType, IfcWasteTerminalTypeEnum, IfcWindow, IfcWindowLiningProperties, IfcWindowPanelOperationEnum, IfcWindowPanelPositionEnum, IfcWindowPanelProperties, IfcWindowStandardCase, IfcWindowStyle, IfcWindowStyleConstructionEnum, IfcWindowStyleOperationEnum, IfcWindowType, IfcWindowTypeEnum, IfcWindowTypePartitioningEnum, IfcWorkCalendar, IfcWorkCalendarTypeEnum, IfcWorkControl, IfcWorkPlan, IfcWorkPlanTypeEnum, IfcWorkSchedule, IfcWorkScheduleTypeEnum, IfcWorkTime, IfcZShapeProfileDef, IfcZone, UNDEFINED + IfcAbsorbedDoseMeasure, IfcAccelerationMeasure, IfcActionRequest, IfcActionRequestTypeEnum, IfcActionSourceTypeEnum, IfcActionTypeEnum, IfcActor, IfcActorRole, IfcActorSelect, IfcActuator, IfcActuatorType, IfcActuatorTypeEnum, IfcAddress, IfcAddressTypeEnum, IfcAdvancedBrep, IfcAdvancedBrepWithVoids, IfcAdvancedFace, IfcAirTerminal, IfcAirTerminalBox, IfcAirTerminalBoxType, IfcAirTerminalBoxTypeEnum, IfcAirTerminalType, IfcAirTerminalTypeEnum, IfcAirToAirHeatRecovery, IfcAirToAirHeatRecoveryType, IfcAirToAirHeatRecoveryTypeEnum, IfcAlarm, IfcAlarmType, IfcAlarmTypeEnum, IfcAmountOfSubstanceMeasure, IfcAnalysisModelTypeEnum, IfcAnalysisTheoryTypeEnum, IfcAngularVelocityMeasure, IfcAnnotation, IfcAnnotationFillArea, IfcApplication, IfcAppliedValue, IfcAppliedValueSelect, IfcApproval, IfcApprovalRelationship, IfcArbitraryClosedProfileDef, IfcArbitraryOpenProfileDef, IfcArbitraryProfileDefWithVoids, IfcArcIndex, IfcAreaDensityMeasure, IfcAreaMeasure, IfcArithmeticOperatorEnum, IfcAssemblyPlaceEnum, IfcAsset, IfcAsymmetricIShapeProfileDef, IfcAudioVisualAppliance, IfcAudioVisualApplianceType, IfcAudioVisualApplianceTypeEnum, IfcAxis1Placement, IfcAxis2Placement, IfcAxis2Placement2D, IfcAxis2Placement3D, IfcBSplineCurve, IfcBSplineCurveForm, IfcBSplineCurveWithKnots, IfcBSplineSurface, IfcBSplineSurfaceForm, IfcBSplineSurfaceWithKnots, IfcBeam, IfcBeamStandardCase, IfcBeamType, IfcBeamTypeEnum, IfcBenchmarkEnum, IfcBendingParameterSelect, IfcBinary, IfcBlobTexture, IfcBlock, IfcBoiler, IfcBoilerType, IfcBoilerTypeEnum, IfcBoolean, IfcBooleanClippingResult, IfcBooleanOperand, IfcBooleanOperator, IfcBooleanResult, IfcBoundaryCondition, IfcBoundaryCurve, IfcBoundaryEdgeCondition, IfcBoundaryFaceCondition, IfcBoundaryNodeCondition, IfcBoundaryNodeConditionWarping, IfcBoundedCurve, IfcBoundedSurface, IfcBoundingBox, IfcBoxAlignment, IfcBoxedHalfSpace, IfcBuilding, IfcBuildingElement, IfcBuildingElementPart, IfcBuildingElementPartType, IfcBuildingElementPartTypeEnum, IfcBuildingElementProxy, IfcBuildingElementProxyType, IfcBuildingElementProxyTypeEnum, IfcBuildingElementType, IfcBuildingStorey, IfcBuildingSystem, IfcBuildingSystemTypeEnum, IfcBurner, IfcBurnerType, IfcBurnerTypeEnum, IfcCShapeProfileDef, IfcCableCarrierFitting, IfcCableCarrierFittingType, IfcCableCarrierFittingTypeEnum, IfcCableCarrierSegment, IfcCableCarrierSegmentType, IfcCableCarrierSegmentTypeEnum, IfcCableFitting, IfcCableFittingType, IfcCableFittingTypeEnum, IfcCableSegment, IfcCableSegmentType, IfcCableSegmentTypeEnum, IfcCardinalPointReference, IfcCartesianPoint, IfcCartesianPointList, IfcCartesianPointList2D, IfcCartesianPointList3D, IfcCartesianTransformationOperator, IfcCartesianTransformationOperator2D, IfcCartesianTransformationOperator2DnonUniform, IfcCartesianTransformationOperator3D, IfcCartesianTransformationOperator3DnonUniform, IfcCenterLineProfileDef, IfcChangeActionEnum, IfcChiller, IfcChillerType, IfcChillerTypeEnum, IfcChimney, IfcChimneyType, IfcChimneyTypeEnum, IfcCircle, IfcCircleHollowProfileDef, IfcCircleProfileDef, IfcCivilElement, IfcCivilElementType, IfcClassification, IfcClassificationReference, IfcClassificationReferenceSelect, IfcClassificationSelect, IfcClosedShell, IfcCoil, IfcCoilType, IfcCoilTypeEnum, IfcColour, IfcColourOrFactor, IfcColourRgb, IfcColourRgbList, IfcColourSpecification, IfcColumn, IfcColumnStandardCase, IfcColumnType, IfcColumnTypeEnum, IfcCommunicationsAppliance, IfcCommunicationsApplianceType, IfcCommunicationsApplianceTypeEnum, IfcComplexNumber, IfcComplexProperty, IfcComplexPropertyTemplate, IfcComplexPropertyTemplateTypeEnum, IfcCompositeCurve, IfcCompositeCurveOnSurface, IfcCompositeCurveSegment, IfcCompositeProfileDef, IfcCompoundPlaneAngleMeasure, IfcCompressor, IfcCompressorType, IfcCompressorTypeEnum, IfcCondenser, IfcCondenserType, IfcCondenserTypeEnum, IfcConic, IfcConnectedFaceSet, IfcConnectionCurveGeometry, IfcConnectionGeometry, IfcConnectionPointEccentricity, IfcConnectionPointGeometry, IfcConnectionSurfaceGeometry, IfcConnectionTypeEnum, IfcConnectionVolumeGeometry, IfcConstraint, IfcConstraintEnum, IfcConstructionEquipmentResource, IfcConstructionEquipmentResourceType, IfcConstructionEquipmentResourceTypeEnum, IfcConstructionMaterialResource, IfcConstructionMaterialResourceType, IfcConstructionMaterialResourceTypeEnum, IfcConstructionProductResource, IfcConstructionProductResourceType, IfcConstructionProductResourceTypeEnum, IfcConstructionResource, IfcConstructionResourceType, IfcContext, IfcContextDependentMeasure, IfcContextDependentUnit, IfcControl, IfcController, IfcControllerType, IfcControllerTypeEnum, IfcConversionBasedUnit, IfcConversionBasedUnitWithOffset, IfcCooledBeam, IfcCooledBeamType, IfcCooledBeamTypeEnum, IfcCoolingTower, IfcCoolingTowerType, IfcCoolingTowerTypeEnum, IfcCoordinateOperation, IfcCoordinateReferenceSystem, IfcCoordinateReferenceSystemSelect, IfcCostItem, IfcCostItemTypeEnum, IfcCostSchedule, IfcCostScheduleTypeEnum, IfcCostValue, IfcCountMeasure, IfcCovering, IfcCoveringType, IfcCoveringTypeEnum, IfcCrewResource, IfcCrewResourceType, IfcCrewResourceTypeEnum, IfcCsgPrimitive3D, IfcCsgSelect, IfcCsgSolid, IfcCurrencyRelationship, IfcCurtainWall, IfcCurtainWallType, IfcCurtainWallTypeEnum, IfcCurvatureMeasure, IfcCurve, IfcCurveBoundedPlane, IfcCurveBoundedSurface, IfcCurveFontOrScaledCurveFontSelect, IfcCurveInterpolationEnum, IfcCurveOnSurface, IfcCurveOrEdgeCurve, IfcCurveStyle, IfcCurveStyleFont, IfcCurveStyleFontAndScaling, IfcCurveStyleFontPattern, IfcCurveStyleFontSelect, IfcCylindricalSurface, IfcDamper, IfcDamperType, IfcDamperTypeEnum, IfcDataOriginEnum, IfcDate, IfcDateTime, IfcDayInMonthNumber, IfcDayInWeekNumber, IfcDefinitionSelect, IfcDerivedMeasureValue, IfcDerivedProfileDef, IfcDerivedUnit, IfcDerivedUnitElement, IfcDerivedUnitEnum, IfcDescriptiveMeasure, IfcDimensionCount, IfcDimensionalExponents, IfcDirection, IfcDirectionSenseEnum, IfcDiscreteAccessory, IfcDiscreteAccessoryType, IfcDiscreteAccessoryTypeEnum, IfcDistributionChamberElement, IfcDistributionChamberElementType, IfcDistributionChamberElementTypeEnum, IfcDistributionCircuit, IfcDistributionControlElement, IfcDistributionControlElementType, IfcDistributionElement, IfcDistributionElementType, IfcDistributionFlowElement, IfcDistributionFlowElementType, IfcDistributionPort, IfcDistributionPortTypeEnum, IfcDistributionSystem, IfcDistributionSystemEnum, IfcDocumentConfidentialityEnum, IfcDocumentInformation, IfcDocumentInformationRelationship, IfcDocumentReference, IfcDocumentSelect, IfcDocumentStatusEnum, IfcDoor, IfcDoorLiningProperties, IfcDoorPanelOperationEnum, IfcDoorPanelPositionEnum, IfcDoorPanelProperties, IfcDoorStandardCase, IfcDoorStyle, IfcDoorStyleConstructionEnum, IfcDoorStyleOperationEnum, IfcDoorType, IfcDoorTypeEnum, IfcDoorTypeOperationEnum, IfcDoseEquivalentMeasure, IfcDraughtingPreDefinedColour, IfcDraughtingPreDefinedCurveFont, IfcDuctFitting, IfcDuctFittingType, IfcDuctFittingTypeEnum, IfcDuctSegment, IfcDuctSegmentType, IfcDuctSegmentTypeEnum, IfcDuctSilencer, IfcDuctSilencerType, IfcDuctSilencerTypeEnum, IfcDuration, IfcDynamicViscosityMeasure, IfcEdge, IfcEdgeCurve, IfcEdgeLoop, IfcElectricAppliance, IfcElectricApplianceType, IfcElectricApplianceTypeEnum, IfcElectricCapacitanceMeasure, IfcElectricChargeMeasure, IfcElectricConductanceMeasure, IfcElectricCurrentMeasure, IfcElectricDistributionBoard, IfcElectricDistributionBoardType, IfcElectricDistributionBoardTypeEnum, IfcElectricFlowStorageDevice, IfcElectricFlowStorageDeviceType, IfcElectricFlowStorageDeviceTypeEnum, IfcElectricGenerator, IfcElectricGeneratorType, IfcElectricGeneratorTypeEnum, IfcElectricMotor, IfcElectricMotorType, IfcElectricMotorTypeEnum, IfcElectricResistanceMeasure, IfcElectricTimeControl, IfcElectricTimeControlType, IfcElectricTimeControlTypeEnum, IfcElectricVoltageMeasure, IfcElement, IfcElementAssembly, IfcElementAssemblyType, IfcElementAssemblyTypeEnum, IfcElementComponent, IfcElementComponentType, IfcElementCompositionEnum, IfcElementQuantity, IfcElementType, IfcElementarySurface, IfcEllipse, IfcEllipseProfileDef, IfcEnergyConversionDevice, IfcEnergyConversionDeviceType, IfcEnergyMeasure, IfcEngine, IfcEngineType, IfcEngineTypeEnum, IfcEvaporativeCooler, IfcEvaporativeCoolerType, IfcEvaporativeCoolerTypeEnum, IfcEvaporator, IfcEvaporatorType, IfcEvaporatorTypeEnum, IfcEvent, IfcEventTime, IfcEventTriggerTypeEnum, IfcEventType, IfcEventTypeEnum, IfcExtendedProperties, IfcExternalInformation, IfcExternalReference, IfcExternalReferenceRelationship, IfcExternalSpatialElement, IfcExternalSpatialElementTypeEnum, IfcExternalSpatialStructureElement, IfcExternallyDefinedHatchStyle, IfcExternallyDefinedSurfaceStyle, IfcExternallyDefinedTextFont, IfcExtrudedAreaSolid, IfcExtrudedAreaSolidTapered, IfcFace, IfcFaceBasedSurfaceModel, IfcFaceBound, IfcFaceOuterBound, IfcFaceSurface, IfcFacetedBrep, IfcFacetedBrepWithVoids, IfcFailureConnectionCondition, IfcFan, IfcFanType, IfcFanTypeEnum, IfcFastener, IfcFastenerType, IfcFastenerTypeEnum, IfcFeatureElement, IfcFeatureElementAddition, IfcFeatureElementSubtraction, IfcFillAreaStyle, IfcFillAreaStyleHatching, IfcFillAreaStyleTiles, IfcFillStyleSelect, IfcFilter, IfcFilterType, IfcFilterTypeEnum, IfcFireSuppressionTerminal, IfcFireSuppressionTerminalType, IfcFireSuppressionTerminalTypeEnum, IfcFixedReferenceSweptAreaSolid, IfcFlowController, IfcFlowControllerType, IfcFlowDirectionEnum, IfcFlowFitting, IfcFlowFittingType, IfcFlowInstrument, IfcFlowInstrumentType, IfcFlowInstrumentTypeEnum, IfcFlowMeter, IfcFlowMeterType, IfcFlowMeterTypeEnum, IfcFlowMovingDevice, IfcFlowMovingDeviceType, IfcFlowSegment, IfcFlowSegmentType, IfcFlowStorageDevice, IfcFlowStorageDeviceType, IfcFlowTerminal, IfcFlowTerminalType, IfcFlowTreatmentDevice, IfcFlowTreatmentDeviceType, IfcFontStyle, IfcFontVariant, IfcFontWeight, IfcFooting, IfcFootingType, IfcFootingTypeEnum, IfcForceMeasure, IfcFrequencyMeasure, IfcFurnishingElement, IfcFurnishingElementType, IfcFurniture, IfcFurnitureType, IfcFurnitureTypeEnum, IfcGeographicElement, IfcGeographicElementType, IfcGeographicElementTypeEnum, IfcGeometricCurveSet, IfcGeometricProjectionEnum, IfcGeometricRepresentationContext, IfcGeometricRepresentationItem, IfcGeometricRepresentationSubContext, IfcGeometricSet, IfcGeometricSetSelect, IfcGlobalOrLocalEnum, IfcGloballyUniqueId, IfcGrid, IfcGridAxis, IfcGridPlacement, IfcGridPlacementDirectionSelect, IfcGridTypeEnum, IfcGroup, IfcHalfSpaceSolid, IfcHatchLineDistanceSelect, IfcHeatExchanger, IfcHeatExchangerType, IfcHeatExchangerTypeEnum, IfcHeatFluxDensityMeasure, IfcHeatingValueMeasure, IfcHumidifier, IfcHumidifierType, IfcHumidifierTypeEnum, IfcIShapeProfileDef, IfcIdentifier, IfcIlluminanceMeasure, IfcImageTexture, IfcIndexedColourMap, IfcIndexedPolyCurve, IfcIndexedTextureMap, IfcIndexedTriangleTextureMap, IfcInductanceMeasure, IfcInteger, IfcIntegerCountRateMeasure, IfcInterceptor, IfcInterceptorType, IfcInterceptorTypeEnum, IfcInternalOrExternalEnum, IfcInventory, IfcInventoryTypeEnum, IfcIonConcentrationMeasure, IfcIrregularTimeSeries, IfcIrregularTimeSeriesValue, IfcIsothermalMoistureCapacityMeasure, IfcJunctionBox, IfcJunctionBoxType, IfcJunctionBoxTypeEnum, IfcKinematicViscosityMeasure, IfcKnotType, IfcLShapeProfileDef, IfcLabel, IfcLaborResource, IfcLaborResourceType, IfcLaborResourceTypeEnum, IfcLagTime, IfcLamp, IfcLampType, IfcLampTypeEnum, IfcLanguageId, IfcLayerSetDirectionEnum, IfcLayeredItem, IfcLengthMeasure, IfcLibraryInformation, IfcLibraryReference, IfcLibrarySelect, IfcLightDistributionCurveEnum, IfcLightDistributionData, IfcLightDistributionDataSourceSelect, IfcLightEmissionSourceEnum, IfcLightFixture, IfcLightFixtureType, IfcLightFixtureTypeEnum, IfcLightIntensityDistribution, IfcLightSource, IfcLightSourceAmbient, IfcLightSourceDirectional, IfcLightSourceGoniometric, IfcLightSourcePositional, IfcLightSourceSpot, IfcLine, IfcLineIndex, IfcLinearForceMeasure, IfcLinearMomentMeasure, IfcLinearStiffnessMeasure, IfcLinearVelocityMeasure, IfcLoadGroupTypeEnum, IfcLocalPlacement, IfcLogical, IfcLogicalOperatorEnum, IfcLoop, IfcLuminousFluxMeasure, IfcLuminousIntensityDistributionMeasure, IfcLuminousIntensityMeasure, IfcMagneticFluxDensityMeasure, IfcMagneticFluxMeasure, IfcManifoldSolidBrep, IfcMapConversion, IfcMappedItem, IfcMassDensityMeasure, IfcMassFlowRateMeasure, IfcMassMeasure, IfcMassPerLengthMeasure, IfcMaterial, IfcMaterialClassificationRelationship, IfcMaterialConstituent, IfcMaterialConstituentSet, IfcMaterialDefinition, IfcMaterialDefinitionRepresentation, IfcMaterialLayer, IfcMaterialLayerSet, IfcMaterialLayerSetUsage, IfcMaterialLayerWithOffsets, IfcMaterialList, IfcMaterialProfile, IfcMaterialProfileSet, IfcMaterialProfileSetUsage, IfcMaterialProfileSetUsageTapering, IfcMaterialProfileWithOffsets, IfcMaterialProperties, IfcMaterialRelationship, IfcMaterialSelect, IfcMaterialUsageDefinition, IfcMeasureValue, IfcMeasureWithUnit, IfcMechanicalFastener, IfcMechanicalFastenerType, IfcMechanicalFastenerTypeEnum, IfcMedicalDevice, IfcMedicalDeviceType, IfcMedicalDeviceTypeEnum, IfcMember, IfcMemberStandardCase, IfcMemberType, IfcMemberTypeEnum, IfcMetric, IfcMetricValueSelect, IfcMirroredProfileDef, IfcModulusOfElasticityMeasure, IfcModulusOfLinearSubgradeReactionMeasure, IfcModulusOfRotationalSubgradeReactionMeasure, IfcModulusOfRotationalSubgradeReactionSelect, IfcModulusOfSubgradeReactionMeasure, IfcModulusOfSubgradeReactionSelect, IfcModulusOfTranslationalSubgradeReactionSelect, IfcMoistureDiffusivityMeasure, IfcMolecularWeightMeasure, IfcMomentOfInertiaMeasure, IfcMonetaryMeasure, IfcMonetaryUnit, IfcMonthInYearNumber, IfcMotorConnection, IfcMotorConnectionType, IfcMotorConnectionTypeEnum, IfcNamedUnit, IfcNonNegativeLengthMeasure, IfcNormalisedRatioMeasure, IfcNullStyle, IfcNumericMeasure, IfcObject, IfcObjectDefinition, IfcObjectPlacement, IfcObjectReferenceSelect, IfcObjectTypeEnum, IfcObjective, IfcObjectiveEnum, IfcOccupant, IfcOccupantTypeEnum, IfcOffsetCurve2D, IfcOffsetCurve3D, IfcOpenShell, IfcOpeningElement, IfcOpeningElementTypeEnum, IfcOpeningStandardCase, IfcOrganization, IfcOrganizationRelationship, IfcOrientedEdge, IfcOuterBoundaryCurve, IfcOutlet, IfcOutletType, IfcOutletTypeEnum, IfcOwnerHistory, IfcPHMeasure, IfcParameterValue, IfcParameterizedProfileDef, IfcPath, IfcPcurve, IfcPerformanceHistory, IfcPerformanceHistoryTypeEnum, IfcPermeableCoveringOperationEnum, IfcPermeableCoveringProperties, IfcPermit, IfcPermitTypeEnum, IfcPerson, IfcPersonAndOrganization, IfcPhysicalComplexQuantity, IfcPhysicalOrVirtualEnum, IfcPhysicalQuantity, IfcPhysicalSimpleQuantity, IfcPile, IfcPileConstructionEnum, IfcPileType, IfcPileTypeEnum, IfcPipeFitting, IfcPipeFittingType, IfcPipeFittingTypeEnum, IfcPipeSegment, IfcPipeSegmentType, IfcPipeSegmentTypeEnum, IfcPixelTexture, IfcPlacement, IfcPlanarBox, IfcPlanarExtent, IfcPlanarForceMeasure, IfcPlane, IfcPlaneAngleMeasure, IfcPlate, IfcPlateStandardCase, IfcPlateType, IfcPlateTypeEnum, IfcPoint, IfcPointOnCurve, IfcPointOnSurface, IfcPointOrVertexPoint, IfcPolyLoop, IfcPolygonalBoundedHalfSpace, IfcPolyline, IfcPort, IfcPositiveInteger, IfcPositiveLengthMeasure, IfcPositivePlaneAngleMeasure, IfcPositiveRatioMeasure, IfcPostalAddress, IfcPowerMeasure, IfcPreDefinedColour, IfcPreDefinedCurveFont, IfcPreDefinedItem, IfcPreDefinedProperties, IfcPreDefinedPropertySet, IfcPreDefinedTextFont, IfcPresentableText, IfcPresentationItem, IfcPresentationLayerAssignment, IfcPresentationLayerWithStyle, IfcPresentationStyle, IfcPresentationStyleAssignment, IfcPresentationStyleSelect, IfcPressureMeasure, IfcProcedure, IfcProcedureType, IfcProcedureTypeEnum, IfcProcess, IfcProcessSelect, IfcProduct, IfcProductDefinitionShape, IfcProductRepresentation, IfcProductRepresentationSelect, IfcProductSelect, IfcProfileDef, IfcProfileProperties, IfcProfileTypeEnum, IfcProject, IfcProjectLibrary, IfcProjectOrder, IfcProjectOrderTypeEnum, IfcProjectedCRS, IfcProjectedOrTrueLengthEnum, IfcProjectionElement, IfcProjectionElementTypeEnum, IfcProperty, IfcPropertyAbstraction, IfcPropertyBoundedValue, IfcPropertyDefinition, IfcPropertyDependencyRelationship, IfcPropertyEnumeratedValue, IfcPropertyEnumeration, IfcPropertyListValue, IfcPropertyReferenceValue, IfcPropertySet, IfcPropertySetDefinition, IfcPropertySetDefinitionSelect, IfcPropertySetDefinitionSet, IfcPropertySetTemplate, IfcPropertySetTemplateTypeEnum, IfcPropertySingleValue, IfcPropertyTableValue, IfcPropertyTemplate, IfcPropertyTemplateDefinition, IfcProtectiveDevice, IfcProtectiveDeviceTrippingUnit, IfcProtectiveDeviceTrippingUnitType, IfcProtectiveDeviceTrippingUnitTypeEnum, IfcProtectiveDeviceType, IfcProtectiveDeviceTypeEnum, IfcProxy, IfcPump, IfcPumpType, IfcPumpTypeEnum, IfcQuantityArea, IfcQuantityCount, IfcQuantityLength, IfcQuantitySet, IfcQuantityTime, IfcQuantityVolume, IfcQuantityWeight, IfcRadioActivityMeasure, IfcRailing, IfcRailingType, IfcRailingTypeEnum, IfcRamp, IfcRampFlight, IfcRampFlightType, IfcRampFlightTypeEnum, IfcRampType, IfcRampTypeEnum, IfcRatioMeasure, IfcRationalBSplineCurveWithKnots, IfcRationalBSplineSurfaceWithKnots, IfcReal, IfcRectangleHollowProfileDef, IfcRectangleProfileDef, IfcRectangularPyramid, IfcRectangularTrimmedSurface, IfcRecurrencePattern, IfcRecurrenceTypeEnum, IfcReference, IfcReflectanceMethodEnum, IfcRegularTimeSeries, IfcReinforcementBarProperties, IfcReinforcementDefinitionProperties, IfcReinforcingBar, IfcReinforcingBarRoleEnum, IfcReinforcingBarSurfaceEnum, IfcReinforcingBarType, IfcReinforcingBarTypeEnum, IfcReinforcingElement, IfcReinforcingElementType, IfcReinforcingMesh, IfcReinforcingMeshType, IfcReinforcingMeshTypeEnum, IfcRelAggregates, IfcRelAssigns, IfcRelAssignsToActor, IfcRelAssignsToControl, IfcRelAssignsToGroup, IfcRelAssignsToGroupByFactor, IfcRelAssignsToProcess, IfcRelAssignsToProduct, IfcRelAssignsToResource, IfcRelAssociates, IfcRelAssociatesApproval, IfcRelAssociatesClassification, IfcRelAssociatesConstraint, IfcRelAssociatesDocument, IfcRelAssociatesLibrary, IfcRelAssociatesMaterial, IfcRelConnects, IfcRelConnectsElements, IfcRelConnectsPathElements, IfcRelConnectsPortToElement, IfcRelConnectsPorts, IfcRelConnectsStructuralActivity, IfcRelConnectsStructuralMember, IfcRelConnectsWithEccentricity, IfcRelConnectsWithRealizingElements, IfcRelContainedInSpatialStructure, IfcRelCoversBldgElements, IfcRelCoversSpaces, IfcRelDeclares, IfcRelDecomposes, IfcRelDefines, IfcRelDefinesByObject, IfcRelDefinesByProperties, IfcRelDefinesByTemplate, IfcRelDefinesByType, IfcRelFillsElement, IfcRelFlowControlElements, IfcRelInterferesElements, IfcRelNests, IfcRelProjectsElement, IfcRelReferencedInSpatialStructure, IfcRelSequence, IfcRelServicesBuildings, IfcRelSpaceBoundary, IfcRelSpaceBoundary1stLevel, IfcRelSpaceBoundary2ndLevel, IfcRelVoidsElement, IfcRelationship, IfcReparametrisedCompositeCurveSegment, IfcRepresentation, IfcRepresentationContext, IfcRepresentationItem, IfcRepresentationMap, IfcResource, IfcResourceApprovalRelationship, IfcResourceConstraintRelationship, IfcResourceLevelRelationship, IfcResourceObjectSelect, IfcResourceSelect, IfcResourceTime, IfcRevolvedAreaSolid, IfcRevolvedAreaSolidTapered, IfcRightCircularCone, IfcRightCircularCylinder, IfcRoleEnum, IfcRoof, IfcRoofType, IfcRoofTypeEnum, IfcRoot, IfcRotationalFrequencyMeasure, IfcRotationalMassMeasure, IfcRotationalStiffnessMeasure, IfcRotationalStiffnessSelect, IfcRoundedRectangleProfileDef, IfcSIPrefix, IfcSIUnit, IfcSIUnitName, IfcSanitaryTerminal, IfcSanitaryTerminalType, IfcSanitaryTerminalTypeEnum, IfcSchedulingTime, IfcSectionModulusMeasure, IfcSectionProperties, IfcSectionReinforcementProperties, IfcSectionTypeEnum, IfcSectionalAreaIntegralMeasure, IfcSectionedSpine, IfcSegmentIndexSelect, IfcSensor, IfcSensorType, IfcSensorTypeEnum, IfcSequenceEnum, IfcShadingDevice, IfcShadingDeviceType, IfcShadingDeviceTypeEnum, IfcShapeAspect, IfcShapeModel, IfcShapeRepresentation, IfcShearModulusMeasure, IfcShell, IfcShellBasedSurfaceModel, IfcSimpleProperty, IfcSimplePropertyTemplate, IfcSimplePropertyTemplateTypeEnum, IfcSimpleValue, IfcSite, IfcSizeSelect, IfcSlab, IfcSlabElementedCase, IfcSlabStandardCase, IfcSlabType, IfcSlabTypeEnum, IfcSlippageConnectionCondition, IfcSolarDevice, IfcSolarDeviceType, IfcSolarDeviceTypeEnum, IfcSolidAngleMeasure, IfcSolidModel, IfcSolidOrShell, IfcSoundPowerLevelMeasure, IfcSoundPowerMeasure, IfcSoundPressureLevelMeasure, IfcSoundPressureMeasure, IfcSpace, IfcSpaceBoundarySelect, IfcSpaceHeater, IfcSpaceHeaterType, IfcSpaceHeaterTypeEnum, IfcSpaceType, IfcSpaceTypeEnum, IfcSpatialElement, IfcSpatialElementType, IfcSpatialStructureElement, IfcSpatialStructureElementType, IfcSpatialZone, IfcSpatialZoneType, IfcSpatialZoneTypeEnum, IfcSpecificHeatCapacityMeasure, IfcSpecularExponent, IfcSpecularHighlightSelect, IfcSpecularRoughness, IfcSphere, IfcStackTerminal, IfcStackTerminalType, IfcStackTerminalTypeEnum, IfcStair, IfcStairFlight, IfcStairFlightType, IfcStairFlightTypeEnum, IfcStairType, IfcStairTypeEnum, IfcStateEnum, IfcStructuralAction, IfcStructuralActivity, IfcStructuralActivityAssignmentSelect, IfcStructuralAnalysisModel, IfcStructuralConnection, IfcStructuralConnectionCondition, IfcStructuralCurveAction, IfcStructuralCurveActivityTypeEnum, IfcStructuralCurveConnection, IfcStructuralCurveMember, IfcStructuralCurveMemberTypeEnum, IfcStructuralCurveMemberVarying, IfcStructuralCurveReaction, IfcStructuralItem, IfcStructuralLinearAction, IfcStructuralLoad, IfcStructuralLoadCase, IfcStructuralLoadConfiguration, IfcStructuralLoadGroup, IfcStructuralLoadLinearForce, IfcStructuralLoadOrResult, IfcStructuralLoadPlanarForce, IfcStructuralLoadSingleDisplacement, IfcStructuralLoadSingleDisplacementDistortion, IfcStructuralLoadSingleForce, IfcStructuralLoadSingleForceWarping, IfcStructuralLoadStatic, IfcStructuralLoadTemperature, IfcStructuralMember, IfcStructuralPlanarAction, IfcStructuralPointAction, IfcStructuralPointConnection, IfcStructuralPointReaction, IfcStructuralReaction, IfcStructuralResultGroup, IfcStructuralSurfaceAction, IfcStructuralSurfaceActivityTypeEnum, IfcStructuralSurfaceConnection, IfcStructuralSurfaceMember, IfcStructuralSurfaceMemberTypeEnum, IfcStructuralSurfaceMemberVarying, IfcStructuralSurfaceReaction, IfcStyleAssignmentSelect, IfcStyleModel, IfcStyledItem, IfcStyledRepresentation, IfcSubContractResource, IfcSubContractResourceType, IfcSubContractResourceTypeEnum, IfcSubedge, IfcSurface, IfcSurfaceCurveSweptAreaSolid, IfcSurfaceFeature, IfcSurfaceFeatureTypeEnum, IfcSurfaceOfLinearExtrusion, IfcSurfaceOfRevolution, IfcSurfaceOrFaceSurface, IfcSurfaceReinforcementArea, IfcSurfaceSide, IfcSurfaceStyle, IfcSurfaceStyleElementSelect, IfcSurfaceStyleLighting, IfcSurfaceStyleRefraction, IfcSurfaceStyleRendering, IfcSurfaceStyleShading, IfcSurfaceStyleWithTextures, IfcSurfaceTexture, IfcSweptAreaSolid, IfcSweptDiskSolid, IfcSweptDiskSolidPolygonal, IfcSweptSurface, IfcSwitchingDevice, IfcSwitchingDeviceType, IfcSwitchingDeviceTypeEnum, IfcSystem, IfcSystemFurnitureElement, IfcSystemFurnitureElementType, IfcSystemFurnitureElementTypeEnum, IfcTShapeProfileDef, IfcTable, IfcTableColumn, IfcTableRow, IfcTank, IfcTankType, IfcTankTypeEnum, IfcTask, IfcTaskDurationEnum, IfcTaskTime, IfcTaskTimeRecurring, IfcTaskType, IfcTaskTypeEnum, IfcTelecomAddress, IfcTemperatureGradientMeasure, IfcTemperatureRateOfChangeMeasure, IfcTendon, IfcTendonAnchor, IfcTendonAnchorType, IfcTendonAnchorTypeEnum, IfcTendonType, IfcTendonTypeEnum, IfcTessellatedFaceSet, IfcTessellatedItem, IfcText, IfcTextAlignment, IfcTextDecoration, IfcTextFontName, IfcTextFontSelect, IfcTextLiteral, IfcTextLiteralWithExtent, IfcTextPath, IfcTextStyle, IfcTextStyleFontModel, IfcTextStyleForDefinedFont, IfcTextStyleTextModel, IfcTextTransformation, IfcTextureCoordinate, IfcTextureCoordinateGenerator, IfcTextureMap, IfcTextureVertex, IfcTextureVertexList, IfcThermalAdmittanceMeasure, IfcThermalConductivityMeasure, IfcThermalExpansionCoefficientMeasure, IfcThermalResistanceMeasure, IfcThermalTransmittanceMeasure, IfcThermodynamicTemperatureMeasure, IfcTime, IfcTimeMeasure, IfcTimeOrRatioSelect, IfcTimePeriod, IfcTimeSeries, IfcTimeSeriesDataTypeEnum, IfcTimeSeriesValue, IfcTimeStamp, IfcTopologicalRepresentationItem, IfcTopologyRepresentation, IfcTorqueMeasure, IfcTransformer, IfcTransformerType, IfcTransformerTypeEnum, IfcTransitionCode, IfcTranslationalStiffnessSelect, IfcTransportElement, IfcTransportElementType, IfcTransportElementTypeEnum, IfcTrapeziumProfileDef, IfcTriangulatedFaceSet, IfcTrimmedCurve, IfcTrimmingPreference, IfcTrimmingSelect, IfcTubeBundle, IfcTubeBundleType, IfcTubeBundleTypeEnum, IfcTypeObject, IfcTypeProcess, IfcTypeProduct, IfcTypeResource, IfcURIReference, IfcUShapeProfileDef, IfcUnit, IfcUnitAssignment, IfcUnitEnum, IfcUnitaryControlElement, IfcUnitaryControlElementType, IfcUnitaryControlElementTypeEnum, IfcUnitaryEquipment, IfcUnitaryEquipmentType, IfcUnitaryEquipmentTypeEnum, IfcValue, IfcValve, IfcValveType, IfcValveTypeEnum, IfcVaporPermeabilityMeasure, IfcVector, IfcVectorOrDirection, IfcVertex, IfcVertexLoop, IfcVertexPoint, IfcVibrationIsolator, IfcVibrationIsolatorType, IfcVibrationIsolatorTypeEnum, IfcVirtualElement, IfcVirtualGridIntersection, IfcVoidingFeature, IfcVoidingFeatureTypeEnum, IfcVolumeMeasure, IfcVolumetricFlowRateMeasure, IfcWall, IfcWallElementedCase, IfcWallStandardCase, IfcWallType, IfcWallTypeEnum, IfcWarpingConstantMeasure, IfcWarpingMomentMeasure, IfcWarpingStiffnessSelect, IfcWasteTerminal, IfcWasteTerminalType, IfcWasteTerminalTypeEnum, IfcWindow, IfcWindowLiningProperties, IfcWindowPanelOperationEnum, IfcWindowPanelPositionEnum, IfcWindowPanelProperties, IfcWindowStandardCase, IfcWindowStyle, IfcWindowStyleConstructionEnum, IfcWindowStyleOperationEnum, IfcWindowType, IfcWindowTypeEnum, IfcWindowTypePartitioningEnum, IfcWorkCalendar, IfcWorkCalendarTypeEnum, IfcWorkControl, IfcWorkPlan, IfcWorkPlanTypeEnum, IfcWorkSchedule, IfcWorkScheduleTypeEnum, IfcWorkTime, IfcZShapeProfileDef, IfcZone, UNDEFINED } Enum; - Enum Parent(Enum v); + boost::optional Parent(Enum v); Enum FromString(const std::string& s); std::string ToString(Enum v); bool IsSimple(Enum v); diff --git a/src/ifcparse/IfcCharacterDecoder.cpp b/src/ifcparse/IfcCharacterDecoder.cpp index a3aad64c1e..f45c941528 100644 --- a/src/ifcparse/IfcCharacterDecoder.cpp +++ b/src/ifcparse/IfcCharacterDecoder.cpp @@ -47,6 +47,7 @@ #define ENDEXTENDED_0 (1 << 20) #define FOURTH_SOLIDUS (1 << 21) #define IGNORED_DIRECTIVE (1 << 22) +#define ENCOUNTERED_HEX (1 << 23) // FIXME: These probably need to be less forgiving in terms of wrongly defined sequences #define EXPECTS_ALPHABET(S) (S & FIRST_SOLIDUS) @@ -64,7 +65,7 @@ #define IS_VALID_ALPHABET_DEFINITION(C) (C >= 0x40 && C <= 0x4A) #define IS_HEXADECIMAL(C) ((C >= 0x30 && C <= 0x39 ) || (C >= 0x41 && C <= 0x46 )) #define HEX_TO_INT(C) ((C >= 0x30 && C <= 0x39 ) ? C - 0x30 : (C+10) - 0x41) -#define CLEAR_HEX(C) (C &= ~(HEX(1)&HEX(2)&HEX(3)&HEX(4)&HEX(5)&HEX(6)&HEX(7)&HEX(8))) +#define CLEAR_HEX(C) (C &= ~(HEX(1)|HEX(2)|HEX(3)|HEX(4)|HEX(5)|HEX(6)|HEX(7)|HEX(8))) using namespace IfcParse; using namespace IfcWrite; @@ -117,6 +118,7 @@ IfcCharacterDecoder::~IfcCharacterDecoder() { destination = 0; converter = 0; compatibility_converter = 0; + ucnv_flushCache(); #endif } IfcCharacterDecoder::operator std::string() { @@ -130,12 +132,12 @@ IfcCharacterDecoder::operator std::string() { #ifdef HAVE_ICU unsigned int old_hex = 0; // for compatibility_mode #endif - while ( current_char = file->Peek() ) { + while ( (current_char = file->Peek()) != 0 ) { if ( EXPECTS_CHARACTER(parse_state) ) { #ifdef HAVE_ICU if ( previous_codepage != codepage ) { if ( converter ) ucnv_close(converter); - char encoder[11] = {'i','s','o','-','8','8','5','9','-',codepage + 0x30}; + char encoder[11] = {'i','s','o','-','8','8','5','9','-', (char)codepage + 0x30}; converter = ucnv_open(encoder, &status); } const char characters[2] = { current_char + 0x80 }; @@ -155,7 +157,10 @@ IfcCharacterDecoder::operator std::string() { if ( parse_state & ALPHABET_DEFINITION || parse_state & IGNORED_DIRECTIVE || parse_state & ENDEXTENDED_0 ) parse_state = hex = hex_count = 0; - else if ( parse_state & HEX(3) ) parse_state += THIRD_SOLIDUS; + else if ( parse_state & ENCOUNTERED_HEX ) { + parse_state += THIRD_SOLIDUS; + parse_state -= ENCOUNTERED_HEX; + } else parse_state += SECOND_SOLIDUS; } else if ( current_char == 'X' && EXPECTS_ENDEXTENDED_X(parse_state) ) { parse_state += ENDEXTENDED_X; @@ -188,7 +193,7 @@ IfcCharacterDecoder::operator std::string() { if (old_hex == 0) { old_hex = hex; } else { - char characters[3] = { old_hex, hex }; + char characters[3] = { (char)old_hex, (char)hex }; const char* char_array = &characters[0]; UChar32 ch = ucnv_getNextUChar(compatibility_converter,&char_array,char_array+2,&status); addChar(s,ch); @@ -202,7 +207,10 @@ IfcCharacterDecoder::operator std::string() { } #endif if ( hex_count == 2 ) parse_state = 0; - else CLEAR_HEX(parse_state); + else { + CLEAR_HEX(parse_state); + parse_state |= ENCOUNTERED_HEX; + } hex = hex_count = 0; } } else if ( parse_state && !( @@ -227,7 +235,7 @@ void IfcCharacterDecoder::dryRun() { unsigned int parse_state = 0; char current_char; unsigned int hex_count = 0; - while ( current_char = file->Peek() ) { + while ((current_char = file->Peek()) != 0) { if ( EXPECTS_CHARACTER(parse_state) ) { parse_state = 0; } else if ( current_char == '\'' && ! parse_state ) { @@ -238,7 +246,10 @@ void IfcCharacterDecoder::dryRun() { if ( parse_state & ALPHABET_DEFINITION || parse_state & IGNORED_DIRECTIVE || parse_state & ENDEXTENDED_0 ) parse_state = hex_count = 0; - else if ( parse_state & HEX(3) ) parse_state += THIRD_SOLIDUS; + else if ( parse_state & ENCOUNTERED_HEX ) { + parse_state += THIRD_SOLIDUS; + parse_state -= ENCOUNTERED_HEX; + } else parse_state += SECOND_SOLIDUS; } else if ( current_char == 'X' && EXPECTS_ENDEXTENDED_X(parse_state) ) { parse_state += ENDEXTENDED_X; @@ -264,7 +275,10 @@ void IfcCharacterDecoder::dryRun() { (hex_count == 4 && !(parse_state & EXTENDED4)) || (hex_count == 8) ) { if ( hex_count == 2 ) parse_state = 0; - else CLEAR_HEX(parse_state); + else { + CLEAR_HEX(parse_state); + parse_state |= ENCOUNTERED_HEX; + } hex_count = 0; } } else if ( parse_state && !( @@ -340,8 +354,8 @@ IfcCharacterEncoder::operator std::string() { oss << "\\X" << num_bytes_str << "\\"; } if ( within_spf_range ) { - oss.put(ch); - if ( ch == '\\' || ch == '\'' ) oss.put(ch); + oss.put((char)ch); + if ( ch == '\\' || ch == '\'' ) oss.put((char)ch); } else { oss << std::hex << std::setw(num_bytes*2) << std::uppercase << std::setfill('0') << (int) ch; } diff --git a/src/ifcparse/IfcEntityDescriptor.h b/src/ifcparse/IfcEntityDescriptor.h index 588a90337e..12aa562c70 100644 --- a/src/ifcparse/IfcEntityDescriptor.h +++ b/src/ifcparse/IfcEntityDescriptor.h @@ -26,7 +26,8 @@ #include #include -#include "../ifcparse/SharedPointer.h" +#include + #include "../ifcparse/IfcUtil.h" #include "../ifcparse/IfcException.h" @@ -48,7 +49,7 @@ namespace IfcUtil { std::pair getIndex(const std::string& value) const { std::vector::const_iterator it = std::find(values.begin(), values.end(), value); if (it != values.end()) { - return std::make_pair(it->c_str(), std::distance(it, values.begin())); + return std::make_pair(it->c_str(), (int)std::distance(it, values.begin())); } else { throw IfcParse::IfcException("Invalid enumeration value"); } @@ -91,7 +92,7 @@ namespace IfcUtil { arguments.push_back(IfcArgumentDescriptor(name, optional, argument_type, data_type)); } unsigned getArgumentCount() const { - return (parent ? parent->getArgumentCount() : 0) + arguments.size(); + return (parent ? parent->getArgumentCount() : 0) + (unsigned)arguments.size(); } const std::string& getArgumentName(unsigned i) const { const unsigned a = argument_start(); diff --git a/src/ifcparse/IfcGlobalId.cpp b/src/ifcparse/IfcGlobalId.cpp index 85cdc1ad1c..e70189071f 100644 --- a/src/ifcparse/IfcGlobalId.cpp +++ b/src/ifcparse/IfcGlobalId.cpp @@ -23,6 +23,8 @@ #include #include #include +#include +#include #include "../ifcparse/IfcGlobalId.h" #include "../ifcparse/IfcException.h" @@ -38,7 +40,7 @@ std::string base64(unsigned v, int l) { r.push_back(chars[v%64]); v /= 64; } - while ( r.size() != l ) r.push_back('0'); + while ( (int)r.size() != l ) r.push_back('0'); std::reverse(r.begin(),r.end()); return r; } @@ -52,7 +54,7 @@ unsigned from_base64(const std::string& s) { r *= 64; const char* c = strchr(chars,*i); if ( !c ) throw IfcParse::IfcException("Failed to decode GlobalId"); - r += (c-chars); + r += (unsigned)(c-chars); } return r; } @@ -70,7 +72,7 @@ std::string compress(unsigned char* v) { // Expands the base64 representation into a UUID byte array void expand(const std::string& s, std::vector& v) { - v.push_back(from_base64(s.substr(0,2))); + v.push_back((unsigned char)from_base64(s.substr(0,2))); for( unsigned i = 0; i < 5; ++i ) { unsigned d = from_base64(s.substr(2+4*i,4)); for ( unsigned j = 0; j < 3; ++ j ) { @@ -87,7 +89,11 @@ IfcParse::IfcGlobalId::IfcGlobalId() { std::vector v(uuid_data.size()); std::copy(uuid_data.begin(), uuid_data.end(), v.begin()); string_data = compress(&v[0]); +#if BOOST_VERSION < 104400 + formatted_string = boost::lexical_cast(uuid_data); +#else formatted_string = boost::uuids::to_string(uuid_data); +#endif #ifndef NDEBUG std::vector test_vector; @@ -106,7 +112,11 @@ IfcParse::IfcGlobalId::IfcGlobalId(const std::string& s) std::vector v; expand(string_data, v); std::copy(v.begin(), v.end(), uuid_data.begin()); +#if BOOST_VERSION < 104400 + formatted_string = boost::lexical_cast(uuid_data); +#else formatted_string = boost::uuids::to_string(uuid_data); +#endif #ifndef NDEBUG const std::string test_string = compress(&uuid_data.data[0]); diff --git a/src/ifcparse/IfcHierarchyHelper.cpp b/src/ifcparse/IfcHierarchyHelper.cpp index d86fe6b7a4..ccaec9b587 100644 --- a/src/ifcparse/IfcHierarchyHelper.cpp +++ b/src/ifcparse/IfcHierarchyHelper.cpp @@ -290,7 +290,7 @@ void IfcHierarchyHelper::addBox(IfcSchema::IfcShapeRepresentation* rep, double w IfcSchema::IfcAxis2Placement2D* place, IfcSchema::IfcAxis2Placement3D* place2, IfcSchema::IfcDirection* dir, IfcSchema::IfcRepresentationContext* context) { - if (false) { + if (false) { // TODO What's this? IfcSchema::IfcRectangleProfileDef* profile = new IfcSchema::IfcRectangleProfileDef( IfcSchema::IfcProfileTypeEnum::IfcProfileType_AREA, boost::none, place ? place : addPlacement2d(), w, d); IfcSchema::IfcExtrudedAreaSolid* solid = new IfcSchema::IfcExtrudedAreaSolid(profile, @@ -303,10 +303,10 @@ void IfcHierarchyHelper::addBox(IfcSchema::IfcShapeRepresentation* rep, double w rep->setItems(items); } else { std::vector > points; - points.push_back(std::pair(-w/2, -d/2)); - points.push_back(std::pair(w/2, -d/2)); - points.push_back(std::pair(w/2, d/2)); - points.push_back(std::pair(-w/2, d/2)); + points.push_back(std::make_pair(-w/2, -d/2)); + points.push_back(std::make_pair(w/2, -d/2)); + points.push_back(std::make_pair(w/2, d/2)); + points.push_back(std::make_pair(-w/2, d/2)); // The call to addExtrudedPolyline() closes the polyline addExtrudedPolyline(rep, points, h, place, place2, dir, context); } diff --git a/src/ifcparse/IfcLateBoundEntity.cpp b/src/ifcparse/IfcLateBoundEntity.cpp index dbe78d1d04..9f8c64ddd9 100644 --- a/src/ifcparse/IfcLateBoundEntity.cpp +++ b/src/ifcparse/IfcLateBoundEntity.cpp @@ -68,8 +68,8 @@ unsigned int IfcParse::IfcLateBoundEntity::id() const { bool IfcParse::IfcLateBoundEntity::is(IfcSchema::Type::Enum v) const { IfcSchema::Type::Enum _ty = _type; if (v == _ty) return true; - while (_ty != -1) { - _ty = IfcSchema::Type::Parent(_ty); + while (IfcSchema::Type::Parent(_ty)) { + _ty = *IfcSchema::Type::Parent(_ty); if (v == _ty) return true; } return false; @@ -87,35 +87,35 @@ unsigned int IfcParse::IfcLateBoundEntity::getArgumentCount() const { return IfcSchema::Type::GetAttributeCount(_type); } IfcUtil::ArgumentType IfcParse::IfcLateBoundEntity::getArgumentType(unsigned int i) const { - return IfcSchema::Type::GetAttributeDerived(_type, i) + return IfcSchema::Type::GetAttributeDerived(_type, (unsigned char)i) ? IfcUtil::Argument_DERIVED - : IfcSchema::Type::GetAttributeType(_type,i); + : IfcSchema::Type::GetAttributeType(_type, (unsigned char)i); } IfcSchema::Type::Enum IfcParse::IfcLateBoundEntity::getArgumentEntity(unsigned int i) const { - return IfcSchema::Type::GetAttributeEntity(_type, i); + return IfcSchema::Type::GetAttributeEntity(_type, (unsigned char)i); } Argument* IfcParse::IfcLateBoundEntity::getArgument(unsigned int i) const { return entity->getArgument(i); } const char* IfcParse::IfcLateBoundEntity::getArgumentName(unsigned int i) const { - return IfcSchema::Type::GetAttributeName(_type,i).c_str(); + return IfcSchema::Type::GetAttributeName(_type, (unsigned char)i).c_str(); } bool IfcParse::IfcLateBoundEntity::getArgumentOptionality(unsigned int i) const { - return IfcSchema::Type::GetAttributeOptional(_type, i); + return IfcSchema::Type::GetAttributeOptional(_type, (unsigned char)i); } void IfcParse::IfcLateBoundEntity::invalid_argument(unsigned int i, const std::string& t) { - const std::string arg_name = IfcSchema::Type::GetAttributeName(_type,i); + const std::string arg_name = IfcSchema::Type::GetAttributeName(_type, (unsigned char)i); throw IfcException(t + " is not a valid type for '" + arg_name + "'"); } void IfcParse::IfcLateBoundEntity::setArgumentAsNull(unsigned int i) { - bool is_optional = IfcSchema::Type::GetAttributeOptional(_type, i); + bool is_optional = IfcSchema::Type::GetAttributeOptional(_type, (unsigned char)i); if (is_optional) { writable_entity()->setArgument(i); } else invalid_argument(i,"NULL"); } void IfcParse::IfcLateBoundEntity::setArgumentAsInt(unsigned int i, int v) { - IfcUtil::ArgumentType arg_type = IfcSchema::Type::GetAttributeType(_type,i); + IfcUtil::ArgumentType arg_type = IfcSchema::Type::GetAttributeType(_type, (unsigned char)i); if (arg_type == Argument_INT) { writable_entity()->setArgument(i,v); } else if ( (arg_type == Argument_BOOL) && ( (v == 0) || (v == 1) ) ) { @@ -123,23 +123,23 @@ void IfcParse::IfcLateBoundEntity::setArgumentAsInt(unsigned int i, int v) { } else invalid_argument(i,"INTEGER"); } void IfcParse::IfcLateBoundEntity::setArgumentAsBool(unsigned int i, bool v) { - IfcUtil::ArgumentType arg_type = IfcSchema::Type::GetAttributeType(_type,i); + IfcUtil::ArgumentType arg_type = IfcSchema::Type::GetAttributeType(_type, (unsigned char)i); if (arg_type == Argument_BOOL) { writable_entity()->setArgument(i,v); } else invalid_argument(i,"BOOLEAN"); } void IfcParse::IfcLateBoundEntity::setArgumentAsDouble(unsigned int i, double v) { - IfcUtil::ArgumentType arg_type = IfcSchema::Type::GetAttributeType(_type,i); + IfcUtil::ArgumentType arg_type = IfcSchema::Type::GetAttributeType(_type, (unsigned char)i); if (arg_type == Argument_DOUBLE) { writable_entity()->setArgument(i,v); } else invalid_argument(i,"REAL"); } void IfcParse::IfcLateBoundEntity::setArgumentAsString(unsigned int i, const std::string& a) { - IfcUtil::ArgumentType arg_type = IfcSchema::Type::GetAttributeType(_type,i); + IfcUtil::ArgumentType arg_type = IfcSchema::Type::GetAttributeType(_type, (unsigned char)i); if (arg_type == Argument_STRING) { writable_entity()->setArgument(i,a); } else if (arg_type == Argument_ENUMERATION) { - std::pair enum_data = IfcSchema::Type::GetEnumerationIndex(IfcSchema::Type::GetAttributeEntity(_type, i), a); + std::pair enum_data = IfcSchema::Type::GetEnumerationIndex(IfcSchema::Type::GetAttributeEntity(_type, (unsigned char)i), a); writable_entity()->setArgument(i, enum_data.second, enum_data.first); } else if (arg_type == Argument_BINARY) { if (valid_binary_string(a)) { @@ -151,19 +151,19 @@ void IfcParse::IfcLateBoundEntity::setArgumentAsString(unsigned int i, const std } else invalid_argument(i,"STRING"); } void IfcParse::IfcLateBoundEntity::setArgumentAsAggregateOfInt(unsigned int i, const std::vector& v) { - IfcUtil::ArgumentType arg_type = IfcSchema::Type::GetAttributeType(_type,i); + IfcUtil::ArgumentType arg_type = IfcSchema::Type::GetAttributeType(_type, (unsigned char)i); if (arg_type == Argument_AGGREGATE_OF_INT) { writable_entity()->setArgument(i,v); } else invalid_argument(i,"AGGREGATE OF INT"); } void IfcParse::IfcLateBoundEntity::setArgumentAsAggregateOfDouble(unsigned int i, const std::vector& v) { - IfcUtil::ArgumentType arg_type = IfcSchema::Type::GetAttributeType(_type,i); + IfcUtil::ArgumentType arg_type = IfcSchema::Type::GetAttributeType(_type, (unsigned char)i); if (arg_type == Argument_AGGREGATE_OF_DOUBLE) { writable_entity()->setArgument(i,v); } else invalid_argument(i,"AGGREGATE OF DOUBLE"); } void IfcParse::IfcLateBoundEntity::setArgumentAsAggregateOfString(unsigned int i, const std::vector& v) { - IfcUtil::ArgumentType arg_type = IfcSchema::Type::GetAttributeType(_type,i); + IfcUtil::ArgumentType arg_type = IfcSchema::Type::GetAttributeType(_type, (unsigned char)i); if (arg_type == Argument_AGGREGATE_OF_STRING) { writable_entity()->setArgument(i,v); } else if (arg_type == Argument_AGGREGATE_OF_BINARY) { @@ -180,31 +180,31 @@ void IfcParse::IfcLateBoundEntity::setArgumentAsAggregateOfString(unsigned int i } else invalid_argument(i,"AGGREGATE OF STRING"); } void IfcParse::IfcLateBoundEntity::setArgumentAsEntityInstance(unsigned int i, IfcParse::IfcLateBoundEntity* v) { - IfcUtil::ArgumentType arg_type = IfcSchema::Type::GetAttributeType(_type,i); + IfcUtil::ArgumentType arg_type = IfcSchema::Type::GetAttributeType(_type, (unsigned char)i); if (arg_type == Argument_ENTITY_INSTANCE) { writable_entity()->setArgument(i,v); } else invalid_argument(i,"ENTITY INSTANCE"); } void IfcParse::IfcLateBoundEntity::setArgumentAsAggregateOfEntityInstance(unsigned int i, IfcEntityList::ptr v) { - IfcUtil::ArgumentType arg_type = IfcSchema::Type::GetAttributeType(_type,i); + IfcUtil::ArgumentType arg_type = IfcSchema::Type::GetAttributeType(_type, (unsigned char)i); if (arg_type == Argument_AGGREGATE_OF_ENTITY_INSTANCE) { writable_entity()->setArgument(i,v); } else invalid_argument(i,"AGGREGATE OF ENTITY INSTANCE"); } void IfcParse::IfcLateBoundEntity::setArgumentAsAggregateOfAggregateOfInt(unsigned int i, const std::vector< std::vector >& v) { - IfcUtil::ArgumentType arg_type = IfcSchema::Type::GetAttributeType(_type,i); + IfcUtil::ArgumentType arg_type = IfcSchema::Type::GetAttributeType(_type, (unsigned char)i); if (arg_type == Argument_AGGREGATE_OF_AGGREGATE_OF_INT) { writable_entity()->setArgument(i,v); } else invalid_argument(i,"AGGREGATE OF AGGREGATE OF INT"); } void IfcParse::IfcLateBoundEntity::setArgumentAsAggregateOfAggregateOfDouble(unsigned int i, const std::vector< std::vector >& v) { - IfcUtil::ArgumentType arg_type = IfcSchema::Type::GetAttributeType(_type,i); + IfcUtil::ArgumentType arg_type = IfcSchema::Type::GetAttributeType(_type, (unsigned char)i); if (arg_type == Argument_AGGREGATE_OF_AGGREGATE_OF_DOUBLE) { writable_entity()->setArgument(i,v); } else invalid_argument(i,"AGGREGATE OF AGGREGATE OF DOUBLE"); } void IfcParse::IfcLateBoundEntity::setArgumentAsAggregateOfAggregateOfEntityInstance(unsigned int i, IfcEntityListList::ptr v) { - IfcUtil::ArgumentType arg_type = IfcSchema::Type::GetAttributeType(_type,i); + IfcUtil::ArgumentType arg_type = IfcSchema::Type::GetAttributeType(_type, (unsigned char)i); if (arg_type == Argument_AGGREGATE_OF_AGGREGATE_OF_ENTITY_INSTANCE) { writable_entity()->setArgument(i,v); } else invalid_argument(i,"AGGREGATE OF AGGREGATE OF ENTITY INSTANCE"); @@ -230,7 +230,7 @@ bool IfcParse::IfcLateBoundEntity::is_valid() { const Argument& arg = *getArgument(i); is_null = arg.isNull(); } catch(IfcException) {} - if (!IfcSchema::Type::GetAttributeOptional(_type,i) && is_null) { + if (!IfcSchema::Type::GetAttributeOptional(_type, (unsigned char)i) && is_null) { if (!valid) { oss << ", "; } diff --git a/src/ifcparse/IfcParse.cpp b/src/ifcparse/IfcParse.cpp index 3bb2cf36af..9b23760c75 100644 --- a/src/ifcparse/IfcParse.cpp +++ b/src/ifcparse/IfcParse.cpp @@ -69,7 +69,10 @@ void init_locale() { // // Opens the file, gets the filesize and reads a chunk in memory // -IfcSpfStream::IfcSpfStream(const std::string& fn) { +IfcSpfStream::IfcSpfStream(const std::string& fn) + : stream(0) + , buffer(0) +{ eof = false; #ifdef _MSC_VER int fn_buffer_size = MultiByteToWideChar(CP_UTF8, 0, fn.c_str(), -1, 0, 0); @@ -86,7 +89,7 @@ IfcSpfStream::IfcSpfStream(const std::string& fn) { } valid = true; fseek(stream, 0, SEEK_END); - size = (unsigned int) ftell(stream);; + size = (unsigned int) ftell(stream); rewind(stream); #ifdef BUF_SIZE offset = 0; @@ -96,11 +99,14 @@ IfcSpfStream::IfcSpfStream(const std::string& fn) { buffer = new char[size]; #endif ptr = 0; - len = 0; + len = 0; ReadBuffer(false); } -IfcSpfStream::IfcSpfStream(std::istream& f, int l) { +IfcSpfStream::IfcSpfStream(std::istream& f, int l) + : stream(0) + , buffer(0) +{ eof = false; size = l; #ifdef BUF_SIZE @@ -114,7 +120,10 @@ IfcSpfStream::IfcSpfStream(std::istream& f, int l) { len = l; } -IfcSpfStream::IfcSpfStream(void* data, int l) { +IfcSpfStream::IfcSpfStream(void* data, int l) + : stream(0) + , buffer(0) +{ eof = false; size = l; #ifdef BUF_SIZE @@ -124,7 +133,12 @@ IfcSpfStream::IfcSpfStream(void* data, int l) { buffer = (char*) data; valid = true; ptr = 0; - len = l; + len = l; +} + +IfcSpfStream::~IfcSpfStream() +{ + Close(); } void IfcSpfStream::Close() { @@ -143,6 +157,8 @@ void IfcSpfStream::ReadBuffer(bool inc) { offset += len; fseek(stream, offset, SEEK_SET); } +#else + (void)inc; #endif eof = feof(stream) != 0; if ( eof ) return; @@ -308,7 +324,7 @@ Token IfcSpfLexer::Next() { while ( ! stream->eof ) { // Read character and increment pointer if not starting a new token - char c = stream->Peek(); + c = stream->Peek(); if ( len && (c == '(' || c == ')' || c == '=' || c == ',' || c == ';' || c == '/') ) break; stream->Inc(); len ++; @@ -363,7 +379,7 @@ bool TokenFunc::startsWith(const Token& t, char c) { } bool TokenFunc::isOperator(const Token& t, char op) { - return (!t.first) && (!op || op == t.second); + return (!t.first) && (!op || (unsigned)op == t.second); } bool TokenFunc::isIdentifier(const Token& t) { @@ -394,8 +410,8 @@ bool TokenFunc::isInt(const Token& t) { const std::string str = asString(t); const char* start = str.c_str(); char* end; - long result = strtol(start,&end,10); - return ((end - start) == str.length()); + /*long result =*/ strtol(start,&end,10); + return ((end - start) == (ptrdiff_t)str.length()); } bool TokenFunc::isBool(const Token& t) { @@ -412,11 +428,11 @@ bool TokenFunc::isFloat(const Token& t) { const char* start = str.c_str(); char* end; #ifdef _MSC_VER - double result = _strtod_l(start,&end,locale); + /*double result =*/ _strtod_l(start,&end,locale); #else double result = strtod_l(start,&end,locale); #endif - return ((end - start) == str.length()); + return ((end - start) == (ptrdiff_t)str.length()); } int TokenFunc::asInt(const Token& t) { @@ -467,7 +483,7 @@ boost::dynamic_bitset<> TokenFunc::asBinary(const Token& t) { } ++it; - unsigned i = (str.size()-1) * 4 - n; + unsigned i = ((unsigned)str.size()-1) * 4 - n; boost::dynamic_bitset<> bitset(i); for(; it != str.end(); ++it) { @@ -508,8 +524,7 @@ EntityArgument::EntityArgument(const Token& t) { // Aditionally, stores the ids (i.e. #[\d]+) in a vector // void ArgumentList::read(IfcSpfLexer* t, std::vector& ids) { - IfcParse::IfcFile* file = t->file; - + //IfcParse::IfcFile* file = t->file; Token next = t->Next(); while( next.second || next.first ) { if ( TokenFunc::isOperator(next,',') ) { @@ -517,9 +532,9 @@ void ArgumentList::read(IfcSpfLexer* t, std::vector& ids) { } else if ( TokenFunc::isOperator(next,')') ) { break; } else if ( TokenFunc::isOperator(next,'(') ) { - ArgumentList* list = new ArgumentList(); - list->read(t, ids); - push(list); + ArgumentList* alist = new ArgumentList(); + alist->read(t, ids); + push(alist); } else { if ( TokenFunc::isIdentifier(next) ) { ids.push_back(TokenFunc::asInt(next)); @@ -640,7 +655,7 @@ ArgumentList::operator IfcEntityListList::ptr() const { for ( it = list.begin(); it != list.end(); ++ it ) { const Argument* arg = *it; const ArgumentList* arg_list; - if ((arg_list = dynamic_cast(arg))) { + if ((arg_list = dynamic_cast(arg)) != 0) { IfcEntityList::ptr e = *arg_list; l->push(e); } @@ -732,7 +747,7 @@ TokenArgument::operator std::vector< std::vector >() const { throw IfcExcep TokenArgument::operator std::vector< std::vector >() const { throw IfcException("Argument is not a list of list of floats"); } TokenArgument::operator IfcEntityListList::ptr() const { throw IfcException("Argument is not a list of list of entity instances"); } unsigned int TokenArgument::size() const { return 1; } -Argument* TokenArgument::operator [] (unsigned int i) const { throw IfcException("Argument is not a list of attributes"); } +Argument* TokenArgument::operator [] (unsigned int /*i*/) const { throw IfcException("Argument is not a list of attributes"); } std::string TokenArgument::toString(bool upper) const { if ( upper && TokenFunc::isString(token) ) { return IfcWrite::IfcCharacterEncoder(TokenFunc::asString(token)); @@ -764,7 +779,7 @@ EntityArgument::operator std::vector< std::vector >() const { throw IfcExce EntityArgument::operator std::vector< std::vector >() const { throw IfcException("Argument is not a list of list of floats"); } EntityArgument::operator IfcEntityListList::ptr() const { throw IfcException("Argument is not a list of list of entity instances"); } unsigned int EntityArgument::size() const { return 1; } -Argument* EntityArgument::operator [] (unsigned int i) const { throw IfcException("Argument is not a list of arguments"); } +Argument* EntityArgument::operator [] (unsigned int /*i*/) const { throw IfcException("Argument is not a list of arguments"); } std::string EntityArgument::toString(bool upper) const { return entity->entity->toString(upper); } @@ -979,15 +994,20 @@ bool IfcFile::Init(IfcParse::IfcSpfStream* s) { } IfcSchema::Type::Enum ty = entity->type(); - do { + for (;;) { IfcEntityList::ptr instances_by_type = entitiesByType(ty); if (!instances_by_type) { instances_by_type = IfcEntityList::ptr(new IfcEntityList()); bytype[ty] = instances_by_type; } instances_by_type->push(entity); - ty = IfcSchema::Type::Parent(ty); - } while ( ty > -1 ); + boost::optional pt = IfcSchema::Type::Parent(ty); + if (pt) { + ty = *pt; + } else { + break; + } + } if ( byid.find(currentId) != byid.end() ) { std::stringstream ss; @@ -1070,9 +1090,9 @@ void IfcFile::addEntities(IfcEntityList::ptr es) { IfcUtil::IfcBaseClass* IfcFile::addEntity(IfcUtil::IfcBaseClass* entity) { // If this instance has been inserted before, return // a reference to the copy that was created from it. - entity_entity_map_t::iterator it = entity_file_map.find(entity); - if (it != entity_file_map.end()) { - return it->second; + entity_entity_map_t::iterator mit = entity_file_map.find(entity); + if (mit != entity_file_map.end()) { + return mit->second; } // Obtain all forward references by a depth-first @@ -1185,15 +1205,21 @@ IfcUtil::IfcBaseClass* IfcFile::addEntity(IfcUtil::IfcBaseClass* entity) { // The mapping by entity type is updated. IfcSchema::Type::Enum ty = entity->type(); - do { + for (;;) { IfcEntityList::ptr instances_by_type = entitiesByType(ty); if (!instances_by_type) { instances_by_type = IfcEntityList::ptr(new IfcEntityList()); bytype[ty] = instances_by_type; } instances_by_type->push(entity); - ty = IfcSchema::Type::Parent(ty); - } while ( ty > -1 ); + boost::optional pt = IfcSchema::Type::Parent(ty); + if (pt) { + ty = *pt; + } + else { + break; + } + } int new_id = -1; if (entity->entity->isWritable() && !entity->entity->file) { @@ -1272,8 +1298,8 @@ void IfcFile::removeEntity(IfcUtil::IfcBaseClass* entity) { // moment, inversely related instances affected by the removal of the // entity being deleted are not deleted themselves. if (references) { - for (IfcEntityList::it it = references->begin(); it != references->end(); ++it) { - IfcUtil::IfcBaseEntity* related_instance = (IfcUtil::IfcBaseEntity*) *it; + for (IfcEntityList::it iit = references->begin(); iit != references->end(); ++iit) { + IfcUtil::IfcBaseEntity* related_instance = (IfcUtil::IfcBaseEntity*) *iit; for (unsigned i = 0; i < related_instance->getArgumentCount(); ++i) { Argument* attr = related_instance->getArgument(i); if (attr->isNull()) continue; @@ -1495,21 +1521,21 @@ std::pair IfcFile::getUnit(IfcSchema::IfcUnitE if (named_unit->UnitType() != type) { continue; } - IfcSchema::IfcSIUnit* unit = 0; + IfcSchema::IfcSIUnit* siunit = 0; if (named_unit->is(IfcSchema::Type::IfcConversionBasedUnit)) { IfcSchema::IfcConversionBasedUnit* u = (IfcSchema::IfcConversionBasedUnit*)named_unit; IfcSchema::IfcMeasureWithUnit* mu = u->ConversionFactor(); return_value.second *= static_cast(*mu->ValueComponent()->entity->getArgument(0)); return_value.first = named_unit; if (mu->UnitComponent()->is(IfcSchema::Type::IfcSIUnit)) { - unit = (IfcSchema::IfcSIUnit*) mu->UnitComponent(); + siunit = (IfcSchema::IfcSIUnit*) mu->UnitComponent(); } } else if (named_unit->is(IfcSchema::Type::IfcSIUnit)) { - return_value.first = unit = (IfcSchema::IfcSIUnit*) named_unit; + return_value.first = siunit = (IfcSchema::IfcSIUnit*) named_unit; } - if (unit) { - if (unit->hasPrefix()) { - return_value.second *= IfcSIPrefixToValue(unit->Prefix()); + if (siunit) { + if (siunit->hasPrefix()) { + return_value.second *= IfcSIPrefixToValue(siunit->Prefix()); } } } diff --git a/src/ifcparse/IfcParse.h b/src/ifcparse/IfcParse.h index 785e93f1f5..16907cf786 100644 --- a/src/ifcparse/IfcParse.h +++ b/src/ifcparse/IfcParse.h @@ -37,9 +37,9 @@ #include #include +#include #include -#include "../ifcparse/SharedPointer.h" #include "../ifcparse/IfcCharacterDecoder.h" #include "../ifcparse/IfcUtil.h" @@ -248,7 +248,7 @@ namespace IfcParse { unsigned int offset; Entity(unsigned int i, IfcFile* t); Entity(unsigned int i, IfcFile* t, unsigned int o); - ~Entity(); + virtual ~Entity(); IfcEntityList::ptr getInverse(IfcSchema::Type::Enum type, int attribute_index); void Load(std::vector& ids, bool seek=false) const; Argument* getArgument (unsigned int i); diff --git a/src/ifcparse/IfcSpfHeader.h b/src/ifcparse/IfcSpfHeader.h index 9edce30ea9..44eb719932 100644 --- a/src/ifcparse/IfcSpfHeader.h +++ b/src/ifcparse/IfcSpfHeader.h @@ -29,6 +29,9 @@ class HeaderEntity : public IfcAbstractEntity { private: ArgumentList* _list; const char * const _datatype; + + HeaderEntity(const HeaderEntity&); //N/A + HeaderEntity& operator =(const HeaderEntity&); //N/A protected: HeaderEntity(const char * const datatype, IfcSpfLexer* lexer) : _datatype(datatype), _list(0) @@ -40,7 +43,7 @@ protected: } } - ~HeaderEntity() { + virtual ~HeaderEntity() { delete _list; } @@ -65,7 +68,7 @@ public: return (*_list)[i]; } - IfcEntityList::ptr getInverse(IfcSchema::Type::Enum type, int attribute_index) { + IfcEntityList::ptr getInverse(IfcSchema::Type::Enum /*type*/, int /*attribute_index*/) { return IfcEntityList::ptr(new IfcEntityList); } @@ -81,7 +84,7 @@ public: return (IfcSchema::Type::Enum) -1; } - bool is(IfcSchema::Type::Enum v) const { + bool is(IfcSchema::Type::Enum /*v*/) const { return false; } @@ -163,7 +166,14 @@ public: _file_name = new FileName(); _file_schema = new FileSchema(); } - + + ~IfcSpfHeader() + { + delete _file_schema; + delete _file_name; + delete _file_description; + } + IfcSpfLexer* lexer() { return _lexer; } void lexer(IfcSpfLexer* l) { _lexer = l; } diff --git a/src/ifcparse/IfcSpfStream.h b/src/ifcparse/IfcSpfStream.h index 9f5799f2a2..a3d947606c 100644 --- a/src/ifcparse/IfcSpfStream.h +++ b/src/ifcparse/IfcSpfStream.h @@ -64,6 +64,7 @@ namespace IfcParse { IfcSpfStream(const std::string& fn); IfcSpfStream(std::istream& f, int len); IfcSpfStream(void* data, int len); + ~IfcSpfStream(); /// Returns the character at the cursor char Peek(); /// Returns the character at specified offset diff --git a/src/ifcparse/IfcUtil.cpp b/src/ifcparse/IfcUtil.cpp index 0f4bc13734..80bd257b14 100644 --- a/src/ifcparse/IfcUtil.cpp +++ b/src/ifcparse/IfcUtil.cpp @@ -17,12 +17,14 @@ * * ********************************************************************************/ +#include "IfcUtil.h" +#include "../ifcparse/IfcException.h" + +#include + #include #include -#include "../ifcparse/IfcException.h" - -#include "IfcUtil.h" void IfcEntityList::push(IfcUtil::IfcBaseClass* l) { if (l) { @@ -143,4 +145,43 @@ bool IfcUtil::valid_binary_string(const std::string& s) { if (*it != '0' && *it != '1') return false; } return true; -} \ No newline at end of file +} + +boost::regex IfcUtil::wildcard_string_to_regex(std::string str) +{ + // Escape all non-"*?" regex special chars + std::string special_chars = "\\^.$|()[]+/"; + foreach(char c, special_chars) { + std::string char_str(1, c); + boost::replace_all(str, char_str, "\\"+ char_str); + } + // Convert "*?" to their regex equivalents + boost::replace_all(str, "?", "."); + boost::replace_all(str, "*", ".*"); + return boost::regex(str); +} + +void IfcUtil::sanitate_material_name(std::string &str) +{ + // Spaces in material names have been observed to cause problems with obj and dae importers. + // Handle other potential problematic characters here too if observing problems. + boost::replace_all(str, " ", "_"); +} + +void IfcUtil::escape_xml(std::string &str) +{ + boost::replace_all(str, "\"", """); + boost::replace_all(str, "'", "'"); + boost::replace_all(str, "<", "<"); + boost::replace_all(str, ">", ">"); + boost::replace_all(str, "&", "&"); +} + +void IfcUtil::unescape_xml(std::string &str) +{ + boost::replace_all(str, """, "\""); + boost::replace_all(str, "'", "'"); + boost::replace_all(str, "<", "<"); + boost::replace_all(str, ">", ">"); + boost::replace_all(str, "&", "&"); +} diff --git a/src/ifcparse/IfcUtil.h b/src/ifcparse/IfcUtil.h index 3c10cd51b2..5e51d8232a 100644 --- a/src/ifcparse/IfcUtil.h +++ b/src/ifcparse/IfcUtil.h @@ -26,16 +26,20 @@ #include #include -#include - -#include "../ifcparse/SharedPointer.h" - #ifdef USE_IFC4 #include "../ifcparse/Ifc4enum.h" #else #include "../ifcparse/Ifc2x3enum.h" #endif +#include +#include +#include +#include + +#define foreach BOOST_FOREACH +#define rforeach BOOST_REVERSE_FOREACH + class Argument; class IfcEntityList; class IfcEntityListList; @@ -107,10 +111,17 @@ namespace IfcUtil { unsigned int getArgumentCount() const; Argument* getArgument(unsigned int i) const; const char* getArgumentName(unsigned int i) const; - IfcSchema::Type::Enum getArgumentEntity(unsigned int i) const { return IfcSchema::Type::UNDEFINED; } + IfcSchema::Type::Enum getArgumentEntity(unsigned int /*i*/) const { return IfcSchema::Type::UNDEFINED; } }; bool valid_binary_string(const std::string& s); + + boost::regex wildcard_string_to_regex(std::string str); + + /// Replaces spaces and potentially other problem causing characters with underscores. + void sanitate_material_name(std::string &str); + void escape_xml(std::string &str); + void unescape_xml(std::string &str); } template @@ -119,7 +130,7 @@ class IfcTemplatedEntityList; class IfcEntityList { std::vector ls; public: - typedef SHARED_PTR ptr; + typedef boost::shared_ptr ptr; typedef std::vector::const_iterator it; void push(IfcUtil::IfcBaseClass* l); void push(const ptr& l); @@ -143,7 +154,7 @@ template class IfcTemplatedEntityList { std::vector ls; public: - typedef SHARED_PTR< IfcTemplatedEntityList > ptr; + typedef boost::shared_ptr< IfcTemplatedEntityList > ptr; typedef typename std::vector::const_iterator it; void push(T* t) { if (t) { ls.push_back(t); } } void push(ptr t) { if (t) { for ( typename T::list::it it = t->begin(); it != t->end(); ++it ) push(*it); } } @@ -177,7 +188,7 @@ class IfcTemplatedEntityListList; class IfcEntityListList { std::vector< std::vector > ls; public: - typedef SHARED_PTR< IfcEntityListList > ptr; + typedef boost::shared_ptr< IfcEntityListList > ptr; typedef std::vector< std::vector >::const_iterator outer_it; typedef std::vector::const_iterator inner_it; void push(const std::vector& l) { @@ -194,11 +205,11 @@ public: } outer_it begin() const { return ls.begin(); } outer_it end() const { return ls.end(); } - int size() const { return ls.size(); } + int size() const { return (int)ls.size(); } int totalSize() const { int accum = 0; for (outer_it it = begin(); it != end(); ++it) { - accum += it->size(); + accum += (int)it->size(); } return accum; } @@ -231,13 +242,13 @@ template class IfcTemplatedEntityListList { std::vector< std::vector > ls; public: - typedef typename SHARED_PTR< IfcTemplatedEntityListList > ptr; + typedef typename boost::shared_ptr< IfcTemplatedEntityListList > ptr; typedef typename std::vector< std::vector >::const_iterator outer_it; typedef typename std::vector::const_iterator inner_it; void push(const std::vector& t) {ls.push_back(t);} outer_it begin() { return ls.begin(); } outer_it end() { return ls.end(); } - int size() const { return ls.size(); } + int size() const { return (int)ls.size(); } int totalSize() const { int accum = 0; for (outer_it it = begin(); it != end(); ++it) { diff --git a/src/ifcparse/IfcWrite.cpp b/src/ifcparse/IfcWrite.cpp index 86486ed992..cafe59fd9d 100644 --- a/src/ifcparse/IfcWrite.cpp +++ b/src/ifcparse/IfcWrite.cpp @@ -19,6 +19,7 @@ #include #include +#include #include @@ -84,7 +85,7 @@ Argument* IfcWritableEntity::getArgument (unsigned int i) { } return args[i]; } -unsigned int IfcWritableEntity::getArgumentCount() const {return args.size(); } +unsigned int IfcWritableEntity::getArgumentCount() const { return (unsigned)args.size(); } IfcSchema::Type::Enum IfcWritableEntity::type() const { return _type; } bool IfcWritableEntity::is(IfcSchema::Type::Enum v) const { return _type == v; } std::string IfcWritableEntity::toString(bool upper) const { @@ -104,14 +105,16 @@ std::string IfcWritableEntity::toString(bool upper) const { ss << dt << "("; for (std::map::const_iterator it = args.begin(); it != args.end(); ++ it) { if ( it != args.begin() ) ss << ","; - const Argument* a = it->second; ss << it->second->toString(upper); } ss << ")"; return ss.str(); } -unsigned int IfcWritableEntity::id() { +unsigned int IfcWritableEntity::id() { + if (!file) { + return 0; + } if ( !_id ) { _id = new int(file->FreshId()); } @@ -140,7 +143,6 @@ void IfcWritableEntity::setArgument(int i) { } void IfcWritableEntity::setArgument(int i, Argument* a) { - IfcWrite::IfcWriteArgument* wa = new IfcWrite::IfcWriteArgument(this); IfcUtil::ArgumentType attr_type = a->type(); switch(attr_type) { case IfcUtil::Argument_NULL: @@ -182,7 +184,7 @@ void IfcWritableEntity::setArgument(int i, Argument* a) { this->setArgument(i, attr_value); } break; case IfcUtil::Argument_ENUMERATION: { - IfcSchema::Type::Enum ty = IfcSchema::Type::GetAttributeEntity(_type, i); + IfcSchema::Type::Enum ty = IfcSchema::Type::GetAttributeEntity(_type, (unsigned char)i); std::string enum_literal = a->toString(); // Remove leading and trailing '.' enum_literal = enum_literal.substr(1, enum_literal.size() - 2); @@ -291,27 +293,30 @@ void IfcWritableEntity::setArgument(int i,const std::vector< boost::dynamic_bits class SizeVisitor : public boost::static_visitor { public: - int operator()(const boost::none_t& i) const { return -1; } - int operator()(const IfcWriteArgument::Derived& i) const { return -1; } - int operator()(const int& i) const { return -1; } - int operator()(const bool& i) const { return -1; } - int operator()(const double& i) const { return -1; } - int operator()(const std::string& i) const { return -1; } - int operator()(const boost::dynamic_bitset<>& i) const { return -1; } - int operator()(const std::vector& i) const { return i.size(); } - int operator()(const std::vector& i) const { return i.size(); } - int operator()(const std::vector< std::vector >& i) const { return i.size(); } - int operator()(const std::vector< std::vector >& i) const { return i.size(); } - int operator()(const std::vector& i) const { return i.size(); } - int operator()(const std::vector< boost::dynamic_bitset<> >& i) const { return i.size(); } - int operator()(const IfcWriteArgument::EnumerationReference& i) const { return -1; } - int operator()(const IfcUtil::IfcBaseClass* const& i) const { return -1; } + int operator()(const boost::none_t& /*i*/) const { return -1; } + int operator()(const IfcWriteArgument::Derived& /*i*/) const { return -1; } + int operator()(const int& /*i*/) const { return -1; } + int operator()(const bool& /*i*/) const { return -1; } + int operator()(const double& /*i*/) const { return -1; } + int operator()(const std::string& /*i*/) const { return -1; } + int operator()(const boost::dynamic_bitset<>& /*i*/) const { return -1; } + int operator()(const std::vector& i) const { return (int)i.size(); } + int operator()(const std::vector& i) const { return (int)i.size(); } + int operator()(const std::vector< std::vector >& i) const { return (int)i.size(); } + int operator()(const std::vector< std::vector >& i) const { return (int)i.size(); } + int operator()(const std::vector& i) const { return (int)i.size(); } + int operator()(const std::vector< boost::dynamic_bitset<> >& i) const { return (int)i.size(); } + int operator()(const IfcWriteArgument::EnumerationReference& /*i*/) const { return -1; } + int operator()(const IfcUtil::IfcBaseClass* const& /*i*/) const { return -1; } int operator()(const IfcEntityList::ptr& i) const { return i->size(); } int operator()(const IfcEntityListList::ptr& i) const { return i->size(); } }; class StringBuilderVisitor : public boost::static_visitor { private: + StringBuilderVisitor(const StringBuilderVisitor&); //N/A + StringBuilderVisitor& operator =(const StringBuilderVisitor&); //N/A + std::ostringstream& data; template void serialize(const std::vector& i) { data << "("; @@ -327,7 +332,7 @@ private: std::string format_double(const double& d) { std::ostringstream oss; oss.imbue(std::locale::classic()); - oss << std::setprecision(15) << d; + oss << std::setprecision(std::numeric_limits::digits10) << d; const std::string str = oss.str(); oss.str(""); std::string::size_type e = str.find('e'); @@ -351,7 +356,7 @@ private: oss.imbue(std::locale::classic()); oss.put('"'); oss << std::hex << std::setw(1); - unsigned c = b.size(); + unsigned c = (unsigned)b.size(); unsigned n = (4 - (c % 4)) & 3; oss << n; for (unsigned i = 0; i < c + n;) { @@ -370,8 +375,8 @@ private: public: StringBuilderVisitor(std::ostringstream& stream, bool upper = false) : data(stream), upper(upper) {} - void operator()(const boost::none_t& i) { data << "$"; } - void operator()(const IfcWriteArgument::Derived& i) { data << "*"; } + void operator()(const boost::none_t& /*i*/) { data << "$"; } + void operator()(const IfcWriteArgument::Derived& /*i*/) { data << "*"; } void operator()(const int& i) { data << i; } void operator()(const bool& i) { data << (i ? ".T." : ".F."); } void operator()(const double& i) { data << format_double(i); } @@ -412,8 +417,8 @@ public: void operator()(const IfcEntityListList::ptr& i) { data << "("; for (IfcEntityListList::outer_it outer_it = i->begin(); outer_it != i->end(); ++outer_it) { - data << "("; if (outer_it != i->begin()) data << ","; + data << "("; for (IfcEntityListList::inner_it inner_it = outer_it->begin(); inner_it != outer_it->end(); ++inner_it) { if (inner_it != outer_it->begin()) data << ","; (*this)(*inner_it); @@ -499,9 +504,9 @@ IfcWriteArgument::operator std::vector< boost::dynamic_bitset<> >() const { retu IfcWriteArgument::operator IfcEntityList::ptr() const { return as(); } IfcWriteArgument::operator std::vector< std::vector >() const { return as > >(); } IfcWriteArgument::operator std::vector< std::vector >() const { return as > >(); } -IfcWriteArgument::operator IfcEntityListList::ptr() const { throw; } +IfcWriteArgument::operator IfcEntityListList::ptr() const { return as(); } bool IfcWriteArgument::isNull() const { return type() == IfcUtil::Argument_NULL; } -Argument* IfcWriteArgument::operator [] (unsigned int i) const { throw IfcParse::IfcException("Invalid cast"); } +Argument* IfcWriteArgument::operator [] (unsigned int /*i*/) const { throw IfcParse::IfcException("Invalid cast"); } std::string IfcWriteArgument::toString(bool upper) const { std::ostringstream str; str.imbue(std::locale::classic()); diff --git a/src/ifcparse/SharedPointer.h b/src/ifcparse/SharedPointer.h deleted file mode 100644 index 3d261aa8c8..0000000000 --- a/src/ifcparse/SharedPointer.h +++ /dev/null @@ -1,41 +0,0 @@ -/******************************************************************************** - * * - * 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 defines the shared pointer implementation to use, shared pointers * - * are used extensively in IfcOpenShell * - * * - ********************************************************************************/ - -#ifdef __GNUC__ -#include -#define SHARED_PTR std::tr1::shared_ptr -#else -#if _MSC_VER >= 1600 -// MSVC 2008 does not have shared_ptr by default, but it comes -// in a feature pack. Therefore for IDEs prior to MSVC 2010 the -// shared_ptr that ships with boost is used. -#include -#define SHARED_PTR std::tr1::shared_ptr -#else -#include -#define SHARED_PTR boost::shared_ptr -#endif -#endif \ No newline at end of file diff --git a/src/ifcwrap/CMakeLists.txt b/src/ifcwrap/CMakeLists.txt index a5a2f36e22..eb6af21f3a 100644 --- a/src/ifcwrap/CMakeLists.txt +++ b/src/ifcwrap/CMakeLists.txt @@ -1,37 +1,84 @@ +################################################################################ +# # +# 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 . # +# # +################################################################################ + FIND_PACKAGE(SWIG) +IF(NOT SWIG_FOUND) + MESSAGE(FATAL_ERROR "BUILD_IFCPYTHON enabled, but unable to find SWIG. Disable BUILD_IFCPYTHON or fix SWIG paths to proceed.") +ENDIF() -IF(SWIG_FOUND) +INCLUDE(${SWIG_USE_FILE}) -INCLUDE(${SWIG_USE_FILE}) +IF(NOT "$ENV{PYTHON_INCLUDE_DIR}" STREQUAL "") + SET(PYTHON_INCLUDE_DIR $ENV{PYTHON_INCLUDE_DIR} CACHE FILEPATH "Python header files") + MESSAGE(STATUS "Looking for Python header files in: ${PYTHON_INCLUDE_DIR}") +ENDIF() +IF(NOT "$ENV{PYTHON_LIBRARY}" STREQUAL "") + SET(PYTHON_LIBRARY $ENV{PYTHON_LIBRARY} CACHE FILEPATH "Python library file") + MESSAGE(STATUS "Looking for Python library file in: ${PYTHON_LIBRARY}") +ENDIF() FIND_PACKAGE(PythonLibs) - -IF(PYTHONLIBS_FOUND) +IF(NOT PYTHONLIBS_FOUND) + MESSAGE(FATAL_ERROR "BUILD_IFCPYTHON enabled, but unable to find Python. Disable BUILD_IFCPYTHON or fix Python paths to proceed.") +ENDIF() INCLUDE_DIRECTORIES(${PYTHON_INCLUDE_PATH}) INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) SET(CMAKE_SWIG_FLAGS "") +# NOTE Workaround for most likely missing debug Python libraries on Windows (requires Python built from the source). +# Python 3.5 intaller and onwards will have an option to install the debug libraries too. +IF (WIN32 AND NOT PYTHON_DEBUG_LIBRARIES) + MESSAGE(STATUS "PYTHON_DEBUG_LIBRARIES not found, defining SWIG_PYTHON_INTERPRETER_NO_DEBUG workaround for IfcWrap.") + ADD_DEFINITIONS(-DSWIG_PYTHON_INTERPRETER_NO_DEBUG) +ENDIF() SET_SOURCE_FILES_PROPERTIES(IfcPython.i PROPERTIES CPLUSPLUS ON) SWIG_ADD_MODULE(ifcopenshell_wrapper python IfcPython.i) -SWIG_LINK_LIBRARIES(ifcopenshell_wrapper ${PYTHON_LIBRARIES} IfcParse IfcGeom TKernel TKMath TKBRep TKGeomBase TKGeomAlgo TKG3d TKG2d TKShHealing TKTopAlgo TKMesh TKPrim TKBool TKBO TKFillet TKOffset ${ICU_LIBRARIES}) +SWIG_LINK_LIBRARIES(ifcopenshell_wrapper IfcParse IfcGeom ${PYTHON_LIBRARIES} ${OPENCASCADE_LIBRARIES} ${ICU_LIBRARIES}) -# To install IfcPython let's get the site-packages dir from python -EXECUTE_PROCESS(COMMAND python -c "import sys; from distutils.sysconfig import get_python_lib; sys.stdout.write(get_python_lib())" - OUTPUT_VARIABLE python_package_dir) +# Try to find the Python interpreter to get the site-packages +# directory in which the wrapper can be installed. +FIND_PACKAGE(PythonInterp) +IF(PYTHONINTERP_FOUND) + EXECUTE_PROCESS( + COMMAND ${PYTHON_EXECUTABLE} -c "import sys; from distutils.sysconfig import get_python_lib; sys.stdout.write(get_python_lib())" + OUTPUT_VARIABLE python_package_dir + ) -INSTALL(FILES - "${CMAKE_BINARY_DIR}/ifcwrap/ifcopenshell_wrapper.py" - "${CMAKE_CURRENT_SOURCE_DIR}/../ifcopenshell-python/ifcopenshell/__init__.py" - "${CMAKE_CURRENT_SOURCE_DIR}/../ifcopenshell-python/ifcopenshell/guid.py" - DESTINATION "${python_package_dir}/ifcopenshell") -INSTALL(FILES - "${CMAKE_CURRENT_SOURCE_DIR}/../ifcopenshell-python/ifcopenshell/geom/__init__.py" - DESTINATION "${python_package_dir}/ifcopenshell/geom") -INSTALL(TARGETS _ifcopenshell_wrapper DESTINATION "${python_package_dir}/ifcopenshell") - -ENDIF(PYTHONLIBS_FOUND) - -ENDIF(SWIG_FOUND) \ No newline at end of file + IF("${python_package_dir}" STREQUAL "") + MESSAGE(WARNING "Unable to locate Python site-package directory, unable to install the Python wrapper") + ELSE() + INSTALL(FILES + "${CMAKE_BINARY_DIR}/ifcwrap/ifcopenshell_wrapper.py" + "${CMAKE_CURRENT_SOURCE_DIR}/../ifcopenshell-python/ifcopenshell/__init__.py" + "${CMAKE_CURRENT_SOURCE_DIR}/../ifcopenshell-python/ifcopenshell/guid.py" + DESTINATION "${python_package_dir}/ifcopenshell") + INSTALL(FILES + "${CMAKE_CURRENT_SOURCE_DIR}/../ifcopenshell-python/ifcopenshell/geom/__init__.py" + "${CMAKE_CURRENT_SOURCE_DIR}/../ifcopenshell-python/ifcopenshell/geom/app.py" + "${CMAKE_CURRENT_SOURCE_DIR}/../ifcopenshell-python/ifcopenshell/geom/main.py" + "${CMAKE_CURRENT_SOURCE_DIR}/../ifcopenshell-python/ifcopenshell/geom/occ_utils.py" + DESTINATION "${python_package_dir}/ifcopenshell/geom") + INSTALL(TARGETS _ifcopenshell_wrapper DESTINATION "${python_package_dir}/ifcopenshell") + ENDIF() +ELSE() + MESSAGE(WARNING "No Python interpreter found, unable to install the Python wrapper") +ENDIF() diff --git a/src/ifcwrap/IfcGeomWrapper.i b/src/ifcwrap/IfcGeomWrapper.i index 84a435b69e..3d40ab9f7d 100644 --- a/src/ifcwrap/IfcGeomWrapper.i +++ b/src/ifcwrap/IfcGeomWrapper.i @@ -168,6 +168,7 @@ struct ShapeRTTI : public boost::static_visitor # Hide the getters with read-only property implementations id = property(id) brep_data = property(brep_data) + surface_styles = property(surface_styles) %} }; @@ -244,8 +245,8 @@ struct ShapeRTTI : public boost::static_visitor IfcSchema::IfcProject* project = *projects->begin(); IfcGeom::Kernel kernel; - kernel.setValue(IfcGeom::Kernel::GV_MAX_FACES_TO_SEW, settings.sew_shells() ? 1000 : -1); - kernel.setValue(IfcGeom::Kernel::GV_DIMENSIONALITY, (settings.include_curves() ? (settings.exclude_solids_and_surfaces() ? -1. : 0.) : +1.)); + kernel.setValue(IfcGeom::Kernel::GV_MAX_FACES_TO_SEW, settings.get(IfcGeom::IteratorSettings::SEW_SHELLS) ? 1000 : -1); + kernel.setValue(IfcGeom::Kernel::GV_DIMENSIONALITY, (settings.get(IfcGeom::IteratorSettings::INCLUDE_CURVES) ? (settings.get(IfcGeom::IteratorSettings::EXCLUDE_SOLIDS_AND_SURFACES) ? -1. : 0.) : +1.)); std::pair length_unit = kernel.initializeUnits(project->UnitsInContext()); if (instance->is(IfcSchema::Type::IfcProduct)) { @@ -269,13 +270,13 @@ struct ShapeRTTI : public boost::static_visitor // First, try to find a representation based on the settings for (IfcSchema::IfcRepresentation::list::it it = reps->begin(); it != reps->end(); ++it) { IfcSchema::IfcRepresentation* rep = *it; - if (!settings.exclude_solids_and_surfaces()) { + if (!settings.get(IfcGeom::IteratorSettings::EXCLUDE_SOLIDS_AND_SURFACES)) { if (rep->RepresentationIdentifier() == "Body") { ifc_representation = rep; break; } } - if (settings.include_curves()) { + if (settings.get(IfcGeom::IteratorSettings::INCLUDE_CURVES)) { if (rep->RepresentationIdentifier() == "Plan" || rep->RepresentationIdentifier() == "Axis") { ifc_representation = rep; break; @@ -293,12 +294,12 @@ struct ShapeRTTI : public boost::static_visitor // TODO: Remove redundancy with IfcGeomIterator.h if (context->hasContextType()) { std::set context_types; - if (!settings.exclude_solids_and_surfaces()) { + if (!settings.get(IfcGeom::IteratorSettings::EXCLUDE_SOLIDS_AND_SURFACES)) { context_types.insert("model"); context_types.insert("design"); context_types.insert("model view"); } - if (settings.include_curves()) { + if (settings.get(IfcGeom::IteratorSettings::INCLUDE_CURVES)) { context_types.insert("plan"); } @@ -347,11 +348,11 @@ struct ShapeRTTI : public boost::static_visitor if (!brep) { throw IfcParse::IfcException("Failed to process shape"); } - if (settings.use_brep_data()) { + if (settings.get(IfcGeom::IteratorSettings::USE_BREP_DATA)) { IfcGeom::SerializedElement* serialization = new IfcGeom::SerializedElement(*brep); delete brep; return serialization; - } else if (!settings.disable_triangulation()) { + } else if (!settings.get(IfcGeom::IteratorSettings::DISABLE_TRIANGULATION)) { IfcGeom::TriangulationElement* triangulation = new IfcGeom::TriangulationElement(*brep); delete brep; return triangulation; @@ -366,9 +367,9 @@ struct ShapeRTTI : public boost::static_visitor IfcGeom::ElementSettings element_settings(settings, kernel.getValue(IfcGeom::Kernel::GV_LENGTH_UNIT), IfcSchema::Type::ToString(instance->type())); IfcGeom::Representation::BRep brep(element_settings, instance->entity->id(), shapes); try { - if (settings.use_brep_data()) { + if (settings.get(IfcGeom::IteratorSettings::USE_BREP_DATA)) { return new IfcGeom::Representation::Serialization(brep); - } else if (!settings.disable_triangulation()) { + } else if (!settings.get(IfcGeom::IteratorSettings::DISABLE_TRIANGULATION)) { return new IfcGeom::Representation::Triangulation(brep); } } catch (...) { diff --git a/src/ifcwrap/IfcParseWrapper.i b/src/ifcwrap/IfcParseWrapper.i index 23955f190f..cf5e227578 100644 --- a/src/ifcwrap/IfcParseWrapper.i +++ b/src/ifcwrap/IfcParseWrapper.i @@ -124,6 +124,18 @@ namespace IfcUtil { unsigned i = IfcSchema::Type::GetAttributeIndex($self->type(), a); return std::pair($self->getArgumentType(i), $self->getArgument(i)); } + + bool __eq__(IfcParse::IfcLateBoundEntity* other) const { + if ($self == other) { + return true; + } + return $self->id() == other->id() && $self->entity->file == other->entity->file; + } + + // Just something to have a somewhat sensible value to hash + size_t file_pointer() const { + return reinterpret_cast($self->entity->file); + } } %extend IfcParse::IfcSpfHeader { @@ -208,4 +220,14 @@ namespace IfcUtil { const char* const version() { return IFCOPENSHELL_VERSION; } + + std::string get_supertype(std::string n) { + boost::to_upper(n); + IfcSchema::Type::Enum t = IfcSchema::Type::FromString(n); + if (IfcSchema::Type::Parent(t)) { + return IfcSchema::Type::ToString(*IfcSchema::Type::Parent(t)); + } else { + return ""; + } + } %} \ No newline at end of file diff --git a/src/ifcwrap/IfcPython.i b/src/ifcwrap/IfcPython.i index 4fb584a088..ef42830a14 100644 --- a/src/ifcwrap/IfcPython.i +++ b/src/ifcwrap/IfcPython.i @@ -17,6 +17,36 @@ * * ********************************************************************************/ +%begin %{ +#if defined(_DEBUG) && defined(SWIG_PYTHON_INTERPRETER_NO_DEBUG) +/* https://github.com/swig/swig/issues/325 */ +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +#endif + +#ifdef _MSC_VER +# pragma warning(push) +# pragma warning(disable : 4127 4244 4702 4510 4512 4610) +# if _MSC_VER > 1800 +# pragma warning(disable : 4456 4459) +# endif +#endif +// TODO add '# pragma warning(pop)' to the very end of the file +%} + %include "std_string.i" %include "exception.i" diff --git a/src/ifcwrap/utils/type_conversion.i b/src/ifcwrap/utils/type_conversion.i index 6c739033d7..9ea0644457 100644 --- a/src/ifcwrap/utils/type_conversion.i +++ b/src/ifcwrap/utils/type_conversion.i @@ -132,9 +132,9 @@ template PyObject* pythonize_vector(const std::vector& v) { - const unsigned size = v.size(); + const size_t size = v.size(); PyObject* pyobj = PyTuple_New(size); - for (unsigned int i = 0; i < size; ++i) { + for (size_t i = 0; i < size; ++i) { PyTuple_SetItem(pyobj, i, pythonize(v[i])); } return pyobj; @@ -142,9 +142,9 @@ template PyObject* pythonize_vector2(const std::vector< std::vector >& v) { - const unsigned size = v.size(); + const size_t size = v.size(); PyObject* pyobj = PyTuple_New(size); - for (unsigned int i = 0; i < size; ++i) { + for (size_t i = 0; i < size; ++i) { PyTuple_SetItem(pyobj, i, pythonize_vector(v[i])); } return pyobj; diff --git a/src/qtviewer/CMakeLists.txt b/src/qtviewer/CMakeLists.txt index f6442fcfa8..81f97eba20 100644 --- a/src/qtviewer/CMakeLists.txt +++ b/src/qtviewer/CMakeLists.txt @@ -1,9 +1,21 @@ - -OPTION( QT_USE_QTVIEWER "IfcOpenShell QT GUI Viewer, QT environment required" OFF ) - - -IF (QT_USE_QTVIEWER) - +################################################################################ +# # +# 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 . # +# # +################################################################################ # Find QT header files SET(QT_MIN_VERSION "4.5.0") @@ -40,7 +52,4 @@ QT_WRAP_CPP(QTviewer QTviewer_SRCS ${QTviewer_MOC_SRCS}) ADD_EXECUTABLE( QTviewer ${QTviewer_SRCS} ${QTviewer_MOC_SRCS}) #http://www.qtcentre.org/wiki/index.php?title=Compiling_Qt4_apps_with_CMake -TARGET_LINK_libRARIES (QTviewer IfcParse IfcGeom ${QT_LIBRARIES} TKernel TKMath TKBRep TKGeomBase TKGeomAlgo TKG3d TKG2d TKShHealing TKTopAlgo TKMesh TKPrim TKBool TKBO TKFillet) - - -ENDIF (QT_USE_QTVIEWER) +TARGET_LINK_libRARIES (QTviewer IfcParse IfcGeom ${QT_LIBRARIES} ${OPENCASCADE_LIBRARIES}) diff --git a/test/input/large_offset.ifc b/test/input/large_offset.ifc new file mode 100644 index 0000000000..41beaf110e --- /dev/null +++ b/test/input/large_offset.ifc @@ -0,0 +1,1083 @@ +ISO-10303-21; +HEADER; + +/****************************************************************************************** +* STEP Physical File produced by: The EXPRESS Data Manager Version 5.02.0100.07 : 28 Aug 2013 +* Module: EDMstepFileFactory/EDMstandAlone +* Creation date: Thu Nov 19 15:05:44 2015 +* Host: DESKTOP-O02U94U +* Database: C:\Users\ANAMOU~1\AppData\Local\Temp\{E0C3FBC3-4736-4E0A-9D2F-C87BBC395BA5}\ifc +* Database version: 5507 +* Database creation date: Thu Nov 19 15:05:36 2015 +* Schema: IFC4 +* Model: DataRepository.ifc +* Model creation date: Thu Nov 19 15:05:37 2015 +* Header model: DataRepository.ifc_HeaderModel +* Header model creation date: Thu Nov 19 15:05:37 2015 +* EDMuser: sdai-user +* EDMgroup: sdai-group +* License ID and type: 5605 : Permanent license. Expiry date: +* EDMstepFileFactory options: 020000 +******************************************************************************************/ +FILE_DESCRIPTION(('ViewDefinition [CoordinationView_V2.0]'),'2;1'); +FILE_NAME('12370','2015-11-19T15:05:44',(''),(''),'The EXPRESS Data Manager Version 5.02.0100.07 : 28 Aug 2013','20150220_1215(x64) - Exporter 16.2.0.0 - Alternate UI 16.2.0.0',''); +FILE_SCHEMA(('IFC4')); +ENDSEC; + +DATA; +#1= IFCORGANIZATION($,'Autodesk Revit LT 2016 (ENU)',$,$,$); +#5= IFCAPPLICATION(#1,'2016','Autodesk Revit LT 2016 (ENU)','Revit'); +#6= IFCCARTESIANPOINT((0.,0.,0.)); +#10= IFCCARTESIANPOINT((0.,0.)); +#12= IFCDIRECTION((1.,0.,0.)); +#14= IFCDIRECTION((-1.,0.,0.)); +#16= IFCDIRECTION((0.,1.,0.)); +#18= IFCDIRECTION((0.,-1.,0.)); +#20= IFCDIRECTION((0.,0.,1.)); +#22= IFCDIRECTION((0.,0.,-1.)); +#24= IFCDIRECTION((1.,0.)); +#26= IFCDIRECTION((-1.,0.)); +#28= IFCDIRECTION((0.,1.)); +#30= IFCDIRECTION((0.,-1.)); +#32= IFCAXIS2PLACEMENT3D(#6,$,$); +#33= IFCLOCALPLACEMENT(#1853,#32); +#36= IFCPERSON($,'Moural','Ana',$,$,$,$,$); +#38= IFCORGANIZATION($,'PG Campus \X2\00C5\X0\s','A - Arkitekt',$,$); +#39= IFCPERSONANDORGANIZATION(#36,#38,$); +#42= IFCOWNERHISTORY(#39,#5,$,.NOCHANGE.,$,$,$,0); +#43= IFCSIUNIT(*,.LENGTHUNIT.,.MILLI.,.METRE.); +#44= IFCSIUNIT(*,.LENGTHUNIT.,$,.METRE.); +#45= IFCSIUNIT(*,.AREAUNIT.,$,.SQUARE_METRE.); +#46= IFCSIUNIT(*,.VOLUMEUNIT.,$,.CUBIC_METRE.); +#47= IFCSIUNIT(*,.PLANEANGLEUNIT.,$,.RADIAN.); +#48= IFCDIMENSIONALEXPONENTS(0,0,0,0,0,0,0); +#49= IFCMEASUREWITHUNIT(IFCRATIOMEASURE(0.0174532925199433),#47); +#50= IFCCONVERSIONBASEDUNIT(#48,.PLANEANGLEUNIT.,'DEGREE',#49); +#52= IFCSIUNIT(*,.MASSUNIT.,.KILO.,.GRAM.); +#53= IFCSIUNIT(*,.TIMEUNIT.,$,.SECOND.); +#54= IFCSIUNIT(*,.FREQUENCYUNIT.,$,.HERTZ.); +#55= IFCSIUNIT(*,.THERMODYNAMICTEMPERATUREUNIT.,$,.KELVIN.); +#56= IFCSIUNIT(*,.THERMODYNAMICTEMPERATUREUNIT.,$,.DEGREE_CELSIUS.); +#57= IFCDERIVEDUNITELEMENT(#52,1); +#58= IFCDERIVEDUNITELEMENT(#55,-1); +#59= IFCDERIVEDUNITELEMENT(#53,-3); +#60= IFCDERIVEDUNIT((#57,#58,#59),.THERMALTRANSMITTANCEUNIT.,$); +#62= IFCSIUNIT(*,.LENGTHUNIT.,.DECI.,.METRE.); +#63= IFCDERIVEDUNITELEMENT(#44,3); +#64= IFCDERIVEDUNITELEMENT(#53,-1); +#65= IFCDERIVEDUNIT((#63,#64),.VOLUMETRICFLOWRATEUNIT.,$); +#67= IFCSIUNIT(*,.ELECTRICCURRENTUNIT.,$,.AMPERE.); +#68= IFCSIUNIT(*,.ELECTRICVOLTAGEUNIT.,$,.VOLT.); +#69= IFCSIUNIT(*,.POWERUNIT.,$,.WATT.); +#70= IFCSIUNIT(*,.FORCEUNIT.,.KILO.,.NEWTON.); +#71= IFCSIUNIT(*,.ILLUMINANCEUNIT.,$,.LUX.); +#72= IFCSIUNIT(*,.LUMINOUSFLUXUNIT.,$,.LUMEN.); +#73= IFCSIUNIT(*,.LUMINOUSINTENSITYUNIT.,$,.CANDELA.); +#74= IFCDERIVEDUNITELEMENT(#52,-1); +#75= IFCDERIVEDUNITELEMENT(#44,-2); +#76= IFCDERIVEDUNITELEMENT(#53,3); +#77= IFCDERIVEDUNITELEMENT(#72,1); +#78= IFCDERIVEDUNIT((#74,#75,#76,#77),.USERDEFINED.,'Luminous Efficacy'); +#80= IFCDERIVEDUNITELEMENT(#44,1); +#81= IFCDERIVEDUNITELEMENT(#53,-1); +#82= IFCDERIVEDUNIT((#80,#81),.LINEARVELOCITYUNIT.,$); +#84= IFCSIUNIT(*,.PRESSUREUNIT.,$,.PASCAL.); +#85= IFCDERIVEDUNITELEMENT(#44,-2); +#86= IFCDERIVEDUNITELEMENT(#52,1); +#87= IFCDERIVEDUNITELEMENT(#53,-2); +#88= IFCDERIVEDUNIT((#85,#86,#87),.USERDEFINED.,'Friction Loss'); +#90= IFCUNITASSIGNMENT((#43,#45,#46,#50,#52,#53,#54,#56,#60,#65,#67,#68,#69,#70,#71,#72,#73,#78,#82,#84,#88)); +#92= IFCAXIS2PLACEMENT3D(#6,$,$); +#93= IFCDIRECTION((0.0916772417912353,0.995788774458495)); +#95= IFCGEOMETRICREPRESENTATIONCONTEXT($,'Model',3,0.01,#92,#93); +#98= IFCGEOMETRICREPRESENTATIONSUBCONTEXT('Axis','Model',*,*,*,*,#95,$,.GRAPH_VIEW.,$); +#100= IFCGEOMETRICREPRESENTATIONSUBCONTEXT('Body','Model',*,*,*,*,#95,$,.MODEL_VIEW.,$); +#101= IFCGEOMETRICREPRESENTATIONSUBCONTEXT('Box','Model',*,*,*,*,#95,$,.MODEL_VIEW.,$); +#102= IFCGEOMETRICREPRESENTATIONSUBCONTEXT('FootPrint','Model',*,*,*,*,#95,$,.MODEL_VIEW.,$); +#103= IFCGEOMETRICREPRESENTATIONCONTEXT($,'Annotation',3,0.01,#92,#93); +#104= IFCGEOMETRICREPRESENTATIONSUBCONTEXT($,'Annotation',*,*,*,*,#103,0.01,.PLAN_VIEW.,$); +#106= IFCPROJECT('3o91zj$Gr6cQ_i1EP5O_01',#42,'12370',$,$,'14323','02',(#95,#103),#90); +#117= IFCPOSTALADDRESS($,$,$,$,('Forprosjekt'),$,'','As','','Norge'); +#121= IFCBUILDING('3o91zj$Gr6cQ_i1EP5O_00',#42,'091',$,$,#33,$,'091',.ELEMENT.,$,$,#117); +#131= IFCCARTESIANPOINT((0.,0.,-4450.)); +#133= IFCAXIS2PLACEMENT3D(#131,$,$); +#2287= IFCRELVOIDSELEMENT('3EsgTT6fn7Xw9SBqFdrMkV',#42,$,$,#1066,#2284); +#1898= IFCRELDEFINESBYPROPERTIES('3tofk5JcvBsfvwT1fkqAen',#42,$,$,(#1854),#1886); +#138= IFCAXIS2PLACEMENT3D(#6,$,$); +#139= IFCLOCALPLACEMENT(#33,#138); +#140= IFCBUILDINGSTOREY('3o91zj$Gr6cQ_i1EQwd1x6',#42,'PLAN 01',$,$,#139,$,'PLAN 01',.ELEMENT.,0.); +#142= IFCCARTESIANPOINT((0.,0.,3060.)); +#144= IFCAXIS2PLACEMENT3D(#142,$,$); +#145= IFCLOCALPLACEMENT(#33,#144); +#146= IFCBUILDINGSTOREY('3o91zj$Gr6cQ_i1EQwc5Gk',#42,'PLAN 02',$,$,#145,$,'PLAN 02',.ELEMENT.,3060.); +#255= IFCAXIS2PLACEMENT3D(#6,$,$); +#2284= IFCOPENINGELEMENT('3n3el7tsPBORtUY8_VoM22',#42,'Basic Wall:V10:4932686',$,'Opening',#2283,#2277,$,.OPENING.); +#257= IFCCARTESIANPOINT((-215.482203135574,-117.851130197757)); +#259= IFCCARTESIANPOINT((284.517796864423,-117.851130197757)); +#261= IFCPOLYLINE((#257,#259)); +#263= IFCCOMPOSITECURVESEGMENT(.CONTINUOUS.,.T.,#261); +#265= IFCCARTESIANPOINT((284.517796864423,-117.851130197757)); +#267= IFCCARTESIANPOINT((-69.0355937288516,235.702260395512)); +#269= IFCPOLYLINE((#265,#267)); +#271= IFCCOMPOSITECURVESEGMENT(.CONTINUOUS.,.T.,#269); +#272= IFCCARTESIANPOINT((284.517796864429,-117.851130197759)); +#274= IFCDIRECTION((0.707106781186553,0.707106781186553)); +#276= IFCAXIS2PLACEMENT2D(#272,#274); +#277= IFCCIRCLE(#276,500.000000000003); +#278= IFCTRIMMEDCURVE(#277,(IFCPARAMETERVALUE(90.0000000000003)),(IFCPARAMETERVALUE(135.)),.T.,.PARAMETER.); +#281= IFCCOMPOSITECURVESEGMENT(.CONTINUOUS.,.T.,#278); +#282= IFCCOMPOSITECURVE((#263,#271,#281),.F.); +#287= IFCARBITRARYCLOSEDPROFILEDEF(.AREA.,'ARK',#282); +#290= IFCCARTESIANPOINT((-117.851130197759,284.517796864426,0.)); +#292= IFCDIRECTION((0.707106781186546,-0.707106781186549,0.)); +#294= IFCAXIS2PLACEMENT3D(#290,#20,#292); +#295= IFCEXTRUDEDAREASOLID(#287,#294,#20,1000.); +#296= IFCCARTESIANPOINT((-22.2701322115385,-16.1538461538461)); +#298= IFCCARTESIANPOINT((-15.7677283653846,-16.1538461538461)); +#300= IFCCARTESIANPOINT((-10.1427283653846,-0.769230769230751)); +#302= IFCCARTESIANPOINT((10.1337139423077,-0.769230769230751)); +#304= IFCCARTESIANPOINT((15.7707331730769,-16.1538461538461)); +#306= IFCCARTESIANPOINT((22.2731370192308,-16.1538461538461)); +#308= IFCCARTESIANPOINT((2.62169471153847,33.0769230769231)); +#310= IFCCARTESIANPOINT((-2.61868990384616,33.0769230769231)); +#312= IFCPOLYLINE((#296,#298,#300,#302,#304,#306,#308,#310,#296)); +#314= IFCCARTESIANPOINT((-7.88311298076925,5.38461538461539)); +#316= IFCCARTESIANPOINT((-3.06340144230768,18.5456730769231)); +#318= IFCCARTESIANPOINT((0.0015024038461509,26.9230769230769)); +#320= IFCCARTESIANPOINT((3.45102163461539,17.4879807692308)); +#322= IFCCARTESIANPOINT((7.88611778846155,5.38461538461539)); +#324= IFCPOLYLINE((#314,#316,#318,#320,#322,#314)); +#326= IFCARBITRARYPROFILEDEFWITHVOIDS(.AREA.,'ARK',#312,(#324)); +#328= IFCCARTESIANPOINT((-171.980586302626,295.540377228824,1000.)); +#330= IFCAXIS2PLACEMENT3D(#328,$,$); +#331= IFCEXTRUDEDAREASOLID(#326,#330,#20,10.); +#332= IFCCARTESIANPOINT((-23.1072874493927,-22.0657262145749)); +#334= IFCCARTESIANPOINT((-16.9534412955466,-22.0657262145749)); +#336= IFCCARTESIANPOINT((-16.9534412955466,-0.527264676113383)); +#338= IFCCARTESIANPOINT((-9.52555668016196,-0.527264676113383)); +#340= IFCCARTESIANPOINT((-5.95584514170041,-0.743610829959519)); +#342= IFCCARTESIANPOINT((-3.02916244939272,-1.91548582995952)); +#344= IFCCARTESIANPOINT((0.22203947368421,-5.1065915991903)); +#346= IFCCARTESIANPOINT((4.84944331983806,-11.861399291498)); +#348= IFCCARTESIANPOINT((11.2556933198381,-22.0657262145749)); +#350= IFCCARTESIANPOINT((18.4071356275304,-22.0657262145749)); +#352= IFCCARTESIANPOINT((10.1980010121458,-8.72438006072877)); +#354= IFCCARTESIANPOINT((5.21002024291498,-2.39024544534416)); +#356= IFCCARTESIANPOINT((1.71242408906881,0.241966093117401)); +#358= IFCCARTESIANPOINT((12.0189144736842,4.82129301619432)); +#360= IFCCARTESIANPOINT((15.3542510121457,13.6914853238866)); +#362= IFCCARTESIANPOINT((13.3410298582996,21.1373987854251)); +#364= IFCCARTESIANPOINT((7.95641447368421,25.8369180161943)); +#366= IFCCARTESIANPOINT((-1.89334514170039,27.1650430161943)); +#368= IFCCARTESIANPOINT((-23.1072874493927,27.1650430161943)); +#370= IFCPOLYLINE((#332,#334,#336,#338,#340,#342,#344,#346,#348,#350,#352,#354,#356,#358,#360,#362,#364,#366,#368,#332)); +#372= IFCCARTESIANPOINT((-16.9534412955466,5.62658147773276)); +#374= IFCCARTESIANPOINT((-16.9534412955466,21.0111968623482)); +#376= IFCCARTESIANPOINT((-1.62892206477732,21.0111968623482)); +#378= IFCCARTESIANPOINT((6.59824139676112,18.8837930161943)); +#380= IFCCARTESIANPOINT((9.20040485829959,13.4631199392712)); +#382= IFCCARTESIANPOINT((7.8362221659919,9.28643724696353)); +#384= IFCCARTESIANPOINT((3.84583755060729,6.49797570850204)); +#386= IFCCARTESIANPOINT((-3.1794028340081,5.62658147773276)); +#388= IFCPOLYLINE((#372,#374,#376,#378,#380,#382,#384,#386,#372)); +#390= IFCARBITRARYPROFILEDEFWITHVOIDS(.AREA.,'ARK',#370,(#388)); +#392= IFCCARTESIANPOINT((-120.025642603233,301.452257289553,1000.)); +#394= IFCAXIS2PLACEMENT3D(#392,$,$); +#395= IFCEXTRUDEDAREASOLID(#390,#394,#20,10.); +#396= IFCCARTESIANPOINT((-16.9401041666667,-24.4000400641025)); +#398= IFCCARTESIANPOINT((-10.7862580128205,-24.4000400641025)); +#400= IFCCARTESIANPOINT((-10.7862580128205,-7.47696314102559)); +#402= IFCCARTESIANPOINT((-2.49298878205128,0.43169070512825)); +#404= IFCCARTESIANPOINT((16.3050881410257,-24.4000400641025)); +#406= IFCCARTESIANPOINT((23.8291266025641,-24.4000400641025)); +#408= IFCCARTESIANPOINT((1.8699919871795,4.5903445512821)); +#410= IFCCARTESIANPOINT((23.0598958333334,24.8307291666667)); +#412= IFCCARTESIANPOINT((14.4541266025641,24.8307291666667)); +#414= IFCCARTESIANPOINT((-10.7862580128205,0.732171474359006)); +#416= IFCCARTESIANPOINT((-10.7862580128205,24.8307291666667)); +#418= IFCCARTESIANPOINT((-16.9401041666667,24.8307291666667)); +#420= IFCPOLYLINE((#396,#398,#400,#402,#404,#406,#408,#410,#412,#414,#416,#418,#396)); +#422= IFCARBITRARYCLOSEDPROFILEDEF(.AREA.,'ARK',#420); +#423= IFCCARTESIANPOINT((-76.9620566551901,303.78657113908,1000.)); +#425= IFCAXIS2PLACEMENT3D(#423,$,$); +#426= IFCEXTRUDEDAREASOLID(#422,#425,#20,10.); +#427= IFCCOLOURRGB($,0.,1.,0.); +#428= IFCSURFACESTYLERENDERING(#427,0.,$,$,$,$,IFCNORMALISEDRATIOMEASURE(0.5),IFCSPECULAREXPONENT(64.),.NOTDEFINED.); +#429= IFCSURFACESTYLE('NULPUNKT - ARK',.BOTH.,(#428)); +#431= IFCPRESENTATIONSTYLEASSIGNMENT((#429)); +#433= IFCSTYLEDITEM(#295,(#431),$); +#436= IFCCOLOURRGB($,0.498039215686275,0.498039215686275,0.498039215686275); +#437= IFCSURFACESTYLERENDERING(#436,0.,$,$,$,$,IFCNORMALISEDRATIOMEASURE(0.5),IFCSPECULAREXPONENT(64.),.NOTDEFINED.); +#438= IFCSURFACESTYLE('Default',.BOTH.,(#437)); +#440= IFCPRESENTATIONSTYLEASSIGNMENT((#438)); +#442= IFCSTYLEDITEM(#331,(#440),$); +#445= IFCSTYLEDITEM(#395,(#440),$); +#448= IFCSTYLEDITEM(#426,(#440),$); +#451= IFCSHAPEREPRESENTATION(#100,'Body','SweptSolid',(#295,#331,#395,#426)); +#458= IFCCARTESIANPOINT((-14.852961874911,14.1421356237286)); +#460= IFCCARTESIANPOINT((-0.,28.9950974986374)); +#462= IFCPOLYLINE((#458,#460)); +#464= IFCCARTESIANPOINT((-28.9950974986419,28.2842712474597)); +#466= IFCCARTESIANPOINT((-0.,57.2793687460993)); +#468= IFCPOLYLINE((#464,#466)); +#470= IFCCARTESIANPOINT((-43.1372331223728,42.4264068711906)); +#472= IFCCARTESIANPOINT((-0.,85.5636399935611)); +#474= IFCPOLYLINE((#470,#472)); +#476= IFCCARTESIANPOINT((-57.2793687461036,56.5685424949217)); +#478= IFCCARTESIANPOINT((-0.,113.847911241023)); +#480= IFCPOLYLINE((#476,#478)); +#482= IFCCARTESIANPOINT((-71.4215043698345,70.7106781186527)); +#484= IFCCARTESIANPOINT((-0.,142.132182488485)); +#486= IFCPOLYLINE((#482,#484)); +#488= IFCCARTESIANPOINT((-85.5636399935654,84.8528137423838)); +#490= IFCCARTESIANPOINT((-0.,170.416453735947)); +#492= IFCPOLYLINE((#488,#490)); +#494= IFCCARTESIANPOINT((-99.7057756172962,98.9949493661148)); +#496= IFCCARTESIANPOINT((-0.,198.700724983409)); +#498= IFCPOLYLINE((#494,#496)); +#500= IFCCARTESIANPOINT((-113.847911241027,113.137084989846)); +#502= IFCCARTESIANPOINT((-0.,226.984996230871)); +#504= IFCPOLYLINE((#500,#502)); +#506= IFCCARTESIANPOINT((-127.634633739169,127.634633739166)); +#508= IFCCARTESIANPOINT((-0.,255.269267478333)); +#510= IFCPOLYLINE((#506,#508)); +#512= IFCCARTESIANPOINT((-141.7767693629,141.776769362897)); +#514= IFCCARTESIANPOINT((-0.,283.553538725795)); +#516= IFCPOLYLINE((#512,#514)); +#518= IFCCARTESIANPOINT((-155.918904986631,155.918904986628)); +#520= IFCCARTESIANPOINT((-0.,311.837809973257)); +#522= IFCPOLYLINE((#518,#520)); +#524= IFCCARTESIANPOINT((-166.170093578841,173.95198764188)); +#526= IFCCARTESIANPOINT((-0.,340.122081220719)); +#528= IFCPOLYLINE((#524,#526)); +#530= IFCCARTESIANPOINT((-184.203176234092,184.20317623409)); +#532= IFCCARTESIANPOINT((-0.,368.40635246818)); +#534= IFCPOLYLINE((#530,#532)); +#536= IFCCARTESIANPOINT((-198.345311857823,198.345311857821)); +#538= IFCCARTESIANPOINT((-0.,396.690623715642)); +#540= IFCPOLYLINE((#536,#538)); +#542= IFCCARTESIANPOINT((-212.487447481554,212.487447481552)); +#544= IFCCARTESIANPOINT((-0.,424.974894963105)); +#546= IFCPOLYLINE((#542,#544)); +#548= IFCCARTESIANPOINT((-226.629583105285,226.629583105283)); +#550= IFCCARTESIANPOINT((-0.,453.259166210566)); +#552= IFCPOLYLINE((#548,#550)); +#554= IFCCARTESIANPOINT((-240.771718729016,240.771718729014)); +#556= IFCCARTESIANPOINT((-0.,481.543437458028)); +#558= IFCPOLYLINE((#554,#556)); +#560= IFCCARTESIANPOINT((-254.913854352747,254.913854352745)); +#562= IFCCARTESIANPOINT((-9.9262488315132,499.901459873978)); +#564= IFCPOLYLINE((#560,#562)); +#566= IFCCARTESIANPOINT((-269.055989976478,269.055989976476)); +#568= IFCCARTESIANPOINT((-39.6897451674856,498.422234785468)); +#570= IFCPOLYLINE((#566,#568)); +#572= IFCCARTESIANPOINT((-283.198125600209,283.198125600207)); +#574= IFCCARTESIANPOINT((-71.5408043081512,494.855446892265)); +#576= IFCPOLYLINE((#572,#574)); +#578= IFCCARTESIANPOINT((-297.34026122394,297.340261223938)); +#580= IFCCARTESIANPOINT((-106.058351323186,488.622171124692)); +#582= IFCPOLYLINE((#578,#580)); +#584= IFCCARTESIANPOINT((-311.482396847671,311.482396847669)); +#586= IFCCARTESIANPOINT((-144.214000388474,478.750793306866)); +#588= IFCPOLYLINE((#584,#586)); +#590= IFCCARTESIANPOINT((-325.624532471401,325.6245324714)); +#592= IFCCARTESIANPOINT((-187.897760009465,463.351304933336)); +#594= IFCPOLYLINE((#590,#592)); +#596= IFCCARTESIANPOINT((-339.766668095133,339.766668095131)); +#598= IFCCARTESIANPOINT((-241.998517598497,437.534818591767)); +#600= IFCPOLYLINE((#596,#598)); +#602= IFCCARTESIANPOINT((-0.,481.543437458028)); +#604= IFCCARTESIANPOINT((18.1278360413173,499.671273499347)); +#606= IFCPOLYLINE((#602,#604)); +#608= IFCAXIS2PLACEMENT2D(#10,#24); +#609= IFCCIRCLE(#608,500.); +#610= IFCCARTESIANPOINT((353.553390593277,353.553390593271)); +#612= IFCCARTESIANPOINT((-353.553390593274,-353.553390593274)); +#614= IFCPOLYLINE((#610,#612)); +#616= IFCCARTESIANPOINT((353.553390593271,-353.553390593276)); +#618= IFCCARTESIANPOINT((-353.553390593275,353.553390593273)); +#620= IFCPOLYLINE((#616,#618)); +#622= IFCCARTESIANPOINT((750.,-0.)); +#624= IFCCARTESIANPOINT((-750.,0.)); +#626= IFCPOLYLINE((#622,#624)); +#628= IFCCARTESIANPOINT((-0.,-750.)); +#630= IFCCARTESIANPOINT((-0.,750.)); +#632= IFCPOLYLINE((#628,#630)); +#634= IFCGEOMETRICSET((#462,#468,#474,#480,#486,#492,#498,#504,#510,#516,#522,#528,#534,#540,#546,#552,#558,#564,#570,#576,#582,#588,#594,#600,#606,#609,#614,#620,#626,#632)); +#636= IFCSHAPEREPRESENTATION(#104,'FootPrint','GeometricSet',(#634)); +#639= IFCAXIS2PLACEMENT3D(#6,$,$); +#640= IFCREPRESENTATIONMAP(#639,#451); +#644= IFCREPRESENTATIONMAP(#639,#636); +#646= IFCBUILDINGELEMENTPROXYTYPE('19G2kjMqT2bw6US8_6I3Jw',#42,'ARK',$,$,(#798,#809),(#640,#644),'235751',$,.NOTDEFINED.); +#650= IFCMATERIAL('NULPUNKT - ARK',$,$); +#657= IFCPRESENTATIONSTYLEASSIGNMENT((#429)); +#659= IFCSTYLEDITEM($,(#657),$); +#661= IFCSTYLEDREPRESENTATION(#95,'Style','Material',(#659)); +#664= IFCMATERIALDEFINITIONREPRESENTATION($,$,(#661),#650); +#668= IFCMATERIAL('Default',$,$); +#669= IFCPRESENTATIONSTYLEASSIGNMENT((#438)); +#671= IFCSTYLEDITEM($,(#669),$); +#673= IFCSTYLEDREPRESENTATION(#95,'Style','Material',(#671)); +#675= IFCMATERIALDEFINITIONREPRESENTATION($,$,(#673),#668); +#679= IFCMATERIALLIST((#650,#668)); +#681= IFCCLASSIFICATION('http://www.csiorg.net/uniformat','1998',$,'Uniformat',$,$,$); +#684= IFCCARTESIANTRANSFORMATIONOPERATOR3D($,$,#6,1.,$); +#685= IFCMAPPEDITEM(#640,#684); +#687= IFCSHAPEREPRESENTATION(#100,'Body','MappedRepresentation',(#685)); +#689= IFCMAPPEDITEM(#644,#684); +#691= IFCSHAPEREPRESENTATION(#104,'FootPrint','MappedRepresentation',(#689)); +#693= IFCPRODUCTDEFINITIONSHAPE($,$,(#687,#691)); +#699= IFCAXIS2PLACEMENT3D(#6,$,$); +#700= IFCLOCALPLACEMENT(#139,#699); +#701= IFCBUILDINGELEMENTPROXY('19G2kjMqT2bw6US8_6I2Vy',#42,'Prosjekt nullpunkt - ARK:ARK:232417',$,'ARK',#700,#693,'232417',$); +#716= IFCMATERIALLIST((#650,#668)); +#718= IFCPROPERTYSINGLEVALUE('Host',$,IFCTEXT('Level : PLAN 01'),$); +#724= IFCPROPERTYSINGLEVALUE('Level',$,IFCLABEL('Level: PLAN 01'),$); +#725= IFCPROPERTYSINGLEVALUE('Moves With Nearby Elements',$,IFCBOOLEAN(.F.),$); +#726= IFCPROPERTYSINGLEVALUE('Offset',$,IFCLENGTHMEASURE(0.),$); +#727= IFCPROPERTYSINGLEVALUE('Phase Created',$,IFCLABEL('New Construction'),$); +#728= IFCPROPERTYSINGLEVALUE('Area',$,IFCAREAMEASURE(0.800782485703027),$); +#729= IFCPROPERTYSINGLEVALUE('H\X2\00F8\X0\yde over prosjektnullpunkt',$,IFCLENGTHMEASURE(5000.),$); +#730= IFCPROPERTYSINGLEVALUE('H\X2\00F8\X0\yde under prosjektnullpunkt',$,IFCLENGTHMEASURE(1000.),$); +#731= IFCPROPERTYSINGLEVALUE('Volume',$,IFCVOLUMEMEASURE(0.0981970030347725),$); +#732= IFCPROPERTYSINGLEVALUE('Design Option',$,IFCLABEL('Akselinier (primary)'),$); +#733= IFCPROPERTYSINGLEVALUE('Mark',$,IFCTEXT('1'),$); +#734= IFCPROPERTYSINGLEVALUE('Reference Nr. On/Off',$,IFCBOOLEAN(.F.),$); +#735= IFCPROPERTYSINGLEVALUE('Category',$,IFCLABEL('Generic Models'),$); +#736= IFCPROPERTYSINGLEVALUE('Family',$,IFCLABEL('Prosjekt nullpunkt - ARK: ARK'),$); +#737= IFCPROPERTYSINGLEVALUE('Family and Type',$,IFCLABEL('Prosjekt nullpunkt - ARK: ARK'),$); +#738= IFCPROPERTYSINGLEVALUE('Type',$,IFCLABEL('Prosjekt nullpunkt - ARK: ARK'),$); +#739= IFCPROPERTYSINGLEVALUE('Type Id',$,IFCLABEL('Prosjekt nullpunkt - ARK: ARK'),$); +#740= IFCPROPERTYSINGLEVALUE('Assembly Code',$,IFCTEXT(''),$); +#741= IFCPROPERTYSINGLEVALUE('Assembly Description',$,IFCTEXT(''),$); +#742= IFCPROPERTYSINGLEVALUE('Code Name',$,IFCTEXT(''),$); +#743= IFCPROPERTYSINGLEVALUE('Description',$,IFCTEXT('Prosjekt nullpunkt'),$); +#744= IFCPROPERTYSINGLEVALUE('Model',$,IFCTEXT(''),$); +#745= IFCPROPERTYSINGLEVALUE('OmniClass Number',$,IFCTEXT(''),$); +#746= IFCPROPERTYSINGLEVALUE('OmniClass Title',$,IFCTEXT(''),$); +#747= IFCPROPERTYSINGLEVALUE('Type Comments',$,IFCTEXT(''),$); +#748= IFCPROPERTYSINGLEVALUE('Type Name',$,IFCTEXT('ARK'),$); +#749= IFCPROPERTYSINGLEVALUE('Family Name',$,IFCTEXT('Prosjekt nullpunkt - ARK'),$); +#750= IFCPROPERTYSET('19G2kjMqT2bw6UTfk6I2Vy',#42,'Constraints',$,(#718,#724,#725,#726)); +#761= IFCRELDEFINESBYPROPERTIES('19G2kjMqT2bw6UTvk6I2Vy',#42,$,$,(#701),#750); +#765= IFCPROPERTYSET('19G2kjMqT2bw6UTes6I2Vy',#42,'Dimensions',$,(#728,#729,#730,#731)); +#771= IFCRELDEFINESBYPROPERTIES('19G2kjMqT2bw6UTus6I2Vy',#42,$,$,(#701),#765); +#774= IFCPROPERTYSET('19G2kjMqT2bw6UTew6I2Vy',#42,'Identity Data',$,(#732,#733,#734)); +#779= IFCRELDEFINESBYPROPERTIES('19G2kjMqT2bw6UTuw6I2Vy',#42,$,$,(#701),#774); +#782= IFCPROPERTYSET('04ex9yUQn3xgXt9j78lgww',#42,'Other',$,(#735,#736,#737,#738,#739)); +#789= IFCRELDEFINESBYPROPERTIES('0BPTyWIbPEk9rSL4IWNn9D',#42,$,$,(#701),#782); +#792= IFCPROPERTYSET('19G2kjMqT2bw6UTe26I2Vy',#42,'Phasing',$,(#727)); +#795= IFCRELDEFINESBYPROPERTIES('19G2kjMqT2bw6UTu26I2Vy',#42,$,$,(#701),#792); +#798= IFCPROPERTYSET('19G2kjMqT2bw6UTew6I3Jw',#42,'Identity Data',$,(#740,#741,#742,#743,#744,#745,#746,#747,#748)); +#809= IFCPROPERTYSET('0Rca49yqv2WOWW$EUHuWC8',#42,'Other',$,(#735,#749)); +#815= IFCAXIS2PLACEMENT3D(#6,$,$); +#816= IFCLOCALPLACEMENT(#139,#815); +#817= IFCCARTESIANPOINT((-11.6666666666666,-11.6666666666665)); +#819= IFCCARTESIANPOINT((23.3333333333334,-11.6666666666665)); +#821= IFCPOLYLINE((#817,#819)); +#823= IFCCOMPOSITECURVESEGMENT(.CONTINUOUS.,.T.,#821); +#824= IFCCARTESIANPOINT((-11.6666666666666,-11.6666666666665)); +#826= IFCAXIS2PLACEMENT2D(#824,#28); +#827= IFCCIRCLE(#826,35.); +#828= IFCTRIMMEDCURVE(#827,(IFCPARAMETERVALUE(269.999999999999)),(IFCPARAMETERVALUE(359.999999999999)),.T.,.PARAMETER.); +#831= IFCCOMPOSITECURVESEGMENT(.CONTINUOUS.,.T.,#828); +#832= IFCCARTESIANPOINT((-11.6666666666667,23.3333333333335)); +#834= IFCCARTESIANPOINT((-11.6666666666666,-11.6666666666665)); +#836= IFCPOLYLINE((#832,#834)); +#838= IFCCOMPOSITECURVESEGMENT(.CONTINUOUS.,.T.,#836); +#839= IFCCOMPOSITECURVE((#823,#831,#838),.F.); +#844= IFCARBITRARYCLOSEDPROFILEDEF(.AREA.,'Custom',#839); +#845= IFCCARTESIANPOINT((11.6666666666665,-11.6666666666667,0.)); +#847= IFCAXIS2PLACEMENT3D(#845,#20,#18); +#848= IFCEXTRUDEDAREASOLID(#844,#847,#20,0.8); +#849= IFCCARTESIANPOINT((-11.6666666666666,-11.6666666666665)); +#851= IFCCARTESIANPOINT((23.3333333333334,-11.6666666666665)); +#853= IFCPOLYLINE((#849,#851)); +#855= IFCCOMPOSITECURVESEGMENT(.CONTINUOUS.,.T.,#853); +#856= IFCCARTESIANPOINT((-11.6666666666666,-11.6666666666665)); +#858= IFCAXIS2PLACEMENT2D(#856,#28); +#859= IFCCIRCLE(#858,35.); +#860= IFCTRIMMEDCURVE(#859,(IFCPARAMETERVALUE(269.999999999999)),(IFCPARAMETERVALUE(359.999999999999)),.T.,.PARAMETER.); +#863= IFCCOMPOSITECURVESEGMENT(.CONTINUOUS.,.T.,#860); +#864= IFCCARTESIANPOINT((-11.6666666666667,23.3333333333335)); +#866= IFCCARTESIANPOINT((-11.6666666666666,-11.6666666666665)); +#868= IFCPOLYLINE((#864,#866)); +#870= IFCCOMPOSITECURVESEGMENT(.CONTINUOUS.,.T.,#868); +#871= IFCCOMPOSITECURVE((#855,#863,#870),.F.); +#876= IFCARBITRARYCLOSEDPROFILEDEF(.AREA.,'Custom',#871); +#877= IFCCARTESIANPOINT((-11.6666666666669,11.6666666666668,0.)); +#879= IFCAXIS2PLACEMENT3D(#877,#20,#16); +#880= IFCEXTRUDEDAREASOLID(#876,#879,#20,0.8); +#881= IFCCOLOURRGB($,0.,0.,0.); +#882= IFCSURFACESTYLERENDERING(#881,0.,$,$,$,$,IFCNORMALISEDRATIOMEASURE(0.5),IFCSPECULAREXPONENT(64.),.NOTDEFINED.); +#883= IFCSURFACESTYLE('Black',.BOTH.,(#882)); +#885= IFCPRESENTATIONSTYLEASSIGNMENT((#883)); +#887= IFCSTYLEDITEM(#848,(#885),$); +#890= IFCSTYLEDITEM(#880,(#885),$); +#893= IFCSHAPEREPRESENTATION(#100,'Body','SweptSolid',(#848,#880)); +#895= IFCPRODUCTDEFINITIONSHAPE($,$,(#893)); +#898= IFCSLAB('19G2kjMqT2bw6US8_6I2V$',#42,'SurveyMarker:Custom:232418',$,'SurveyMarker:Custom',#816,#895,'232418',.FLOOR.); +#901= IFCMATERIAL('Black',$,$); +#902= IFCPRESENTATIONSTYLEASSIGNMENT((#883)); +#904= IFCSTYLEDITEM($,(#902),$); +#906= IFCSTYLEDREPRESENTATION(#95,'Style','Material',(#904)); +#908= IFCMATERIALDEFINITIONREPRESENTATION($,$,(#906),#901); +#912= IFCPROPERTYSINGLEVALUE('Host',$,IFCTEXT('Level : PLAN 01'),$); +#913= IFCPROPERTYSINGLEVALUE('Moves With Grids',$,IFCBOOLEAN(.T.),$); +#914= IFCPROPERTYSINGLEVALUE('Rebar Cover - Bottom Face',$,IFCLABEL('Rebar Cover Settings: Rebar Cover 1'),$); +#915= IFCPROPERTYSINGLEVALUE('Rebar Cover - Other Faces',$,IFCLABEL('Rebar Cover Settings: Rebar Cover 1'),$); +#916= IFCPROPERTYSINGLEVALUE('Rebar Cover - Top Face',$,IFCLABEL('Rebar Cover Settings: Rebar Cover 1'),$); +#917= IFCPROPERTYSINGLEVALUE('Switch Marker',$,IFCBOOLEAN(.T.),$); +#918= IFCPROPERTYSINGLEVALUE('Area',$,IFCAREAMEASURE(0.00192397103712917),$); +#919= IFCPROPERTYSINGLEVALUE('Volume',$,IFCVOLUMEMEASURE(1.53930324981553E-6),$); +#920= IFCPROPERTYSINGLEVALUE('Host Family Description',$,IFCTEXT('Prosjekt nullpunkt'),$); +#921= IFCPROPERTYSINGLEVALUE('Reference Nr.',$,IFCTEXT('1'),$); +#922= IFCPROPERTYSINGLEVALUE('Category',$,IFCLABEL('Structural Foundations'),$); +#923= IFCPROPERTYSINGLEVALUE('Family',$,IFCLABEL('SurveyMarker: Custom'),$); +#924= IFCPROPERTYSINGLEVALUE('Family and Type',$,IFCLABEL('SurveyMarker: Custom'),$); +#925= IFCPROPERTYSINGLEVALUE('Type',$,IFCLABEL('SurveyMarker: Custom'),$); +#926= IFCPROPERTYSINGLEVALUE('Type Id',$,IFCLABEL('SurveyMarker: Custom'),$); +#927= IFCPROPERTYSINGLEVALUE('Circle',$,IFCBOOLEAN(.T.),$); +#928= IFCPROPERTYSINGLEVALUE('Square',$,IFCBOOLEAN(.T.),$); +#929= IFCPROPERTYSINGLEVALUE('Fill',$,IFCBOOLEAN(.T.),$); +#930= IFCPROPERTYSINGLEVALUE('Length',$,IFCLENGTHMEASURE(35.),$); +#931= IFCPROPERTYSINGLEVALUE('Scale',$,IFCLENGTHMEASURE(35.),$); +#932= IFCPROPERTYSINGLEVALUE('Width',$,IFCLENGTHMEASURE(35.),$); +#933= IFCPROPERTYSINGLEVALUE('Type Comments',$,IFCTEXT('SurveyMarker'),$); +#934= IFCPROPERTYSINGLEVALUE('Type Name',$,IFCTEXT('Custom'),$); +#935= IFCPROPERTYSINGLEVALUE('Family Name',$,IFCTEXT('SurveyMarker'),$); +#936= IFCPROPERTYSET('19G2kjMqT2bw6UTfk6I2V$',#42,'Constraints',$,(#724,#726,#912,#913)); +#940= IFCRELDEFINESBYPROPERTIES('19G2kjMqT2bw6UTvk6I2V$',#42,$,$,(#898),#936); +#944= IFCPROPERTYSET('19G2kjMqT2bw6UTes6I2V$',#42,'Dimensions',$,(#918,#919)); +#948= IFCRELDEFINESBYPROPERTIES('19G2kjMqT2bw6UTus6I2V$',#42,$,$,(#898),#944); +#951= IFCPROPERTYSET('19G2kjMqT2bw6UTeg6I2V$',#42,'Graphics',$,(#917)); +#954= IFCRELDEFINESBYPROPERTIES('19G2kjMqT2bw6UTug6I2V$',#42,$,$,(#898),#951); +#957= IFCPROPERTYSET('19G2kjMqT2bw6UTew6I2V$',#42,'Identity Data',$,(#732,#734,#920,#921)); +#961= IFCRELDEFINESBYPROPERTIES('19G2kjMqT2bw6UTuw6I2V$',#42,$,$,(#898),#957); +#964= IFCPROPERTYSET('2KSntZC_j7LBUsDOKI4aYw',#42,'Other',$,(#922,#923,#924,#925,#926)); +#971= IFCRELDEFINESBYPROPERTIES('24qsqZIqL3vPw_oKCiH3X6',#42,$,$,(#898),#964); +#974= IFCPROPERTYSET('19G2kjMqT2bw6UTe26I2V$',#42,'Phasing',$,(#727)); +#976= IFCRELDEFINESBYPROPERTIES('19G2kjMqT2bw6UTu26I2V$',#42,$,$,(#898),#974); +#979= IFCPROPERTYSET('19G2kjMqT2bw6UTeA6I2V$',#42,'Structural',$,(#914,#915,#916)); +#984= IFCRELDEFINESBYPROPERTIES('19G2kjMqT2bw6UTuA6I2V$',#42,$,$,(#898),#979); +#987= IFCPROPERTYSET('19G2kjMqT2bw6UTek6I3JE',#42,'Construction',$,(#929)); +#990= IFCPROPERTYSET('19G2kjMqT2bw6UTes6I3JE',#42,'Dimensions',$,(#930,#931,#932)); +#995= IFCPROPERTYSET('19G2kjMqT2bw6UTeg6I3JE',#42,'Graphics',$,(#927,#928)); +#999= IFCPROPERTYSET('19G2kjMqT2bw6UTew6I3JE',#42,'Identity Data',$,(#740,#741,#742,#744,#745,#746,#933,#934)); +#1003= IFCPROPERTYSET('0wYiXNUp58QeDog$ZtpK0I',#42,'Other',$,(#922,#935)); +#1006= IFCAXIS2PLACEMENT3D(#6,$,$); +#1007= IFCLOCALPLACEMENT(#145,#1029); +#1008= IFCCARTESIANPOINT((240928.581159878,149778.983059267)); +#1010= IFCCARTESIANPOINT((240914.439024255,149793.12519489)); +#1012= IFCPOLYLINE((#1008,#1010)); +#1014= IFCGEOMETRICCURVESET((#1012)); +#1016= IFCCOLOURRGB($,0.,0.,0.); +#1017= IFCDRAUGHTINGPREDEFINEDCURVEFONT('continuous'); +#1018= IFCCURVESTYLE('Thin Lines',#1017,$,#1016,$); +#1019= IFCPRESENTATIONSTYLEASSIGNMENT((#1018)); +#1021= IFCSTYLEDITEM(#1014,(#1019),$); +#1024= IFCSHAPEREPRESENTATION(#104,'Annotation','Annotation2D',(#1014)); +#1026= IFCPRODUCTDEFINITIONSHAPE($,$,(#1024)); +#1029= IFCAXIS2PLACEMENT3D(#6,$,$); +#1030= IFCANNOTATION('1jkJR2yV94xeQKZO34YBI4',#42,$,$,$,#1007,#1026); +#1034= IFCCARTESIANPOINT((9914.49999983799,30485.5000000002,0.)); +#1036= IFCAXIS2PLACEMENT3D(#1034,$,$); +#1037= IFCLOCALPLACEMENT(#139,#1036); +#1038= IFCCARTESIANPOINT((54171.,0.)); +#1040= IFCPOLYLINE((#10,#1038)); +#1042= IFCSHAPEREPRESENTATION(#98,'Axis','Curve2D',(#1040)); +#1045= IFCCARTESIANPOINT((27085.5,3.41060513164848E-13)); +#1047= IFCAXIS2PLACEMENT2D(#1045,#26); +#1048= IFCRECTANGLEPROFILEDEF(.AREA.,$,#1047,54171.,213.000000000004); +#1049= IFCAXIS2PLACEMENT3D(#6,$,$); +#1050= IFCEXTRUDEDAREASOLID(#1048,#1049,#20,3000.); +#1051= IFCCOLOURRGB($,0.96078431372549,0.96078431372549,0.96078431372549); +#1052= IFCSURFACESTYLERENDERING(#1051,0.,$,$,$,$,IFCNORMALISEDRATIOMEASURE(0.5),IFCSPECULAREXPONENT(64.),.NOTDEFINED.); +#1053= IFCSURFACESTYLE('Dobbelfals Liggende Kledning - R\X2\00D8\X0\D',.BOTH.,(#1052)); +#1055= IFCPRESENTATIONSTYLEASSIGNMENT((#1053)); +#1057= IFCSTYLEDITEM(#1050,(#1055),$); +#1060= IFCSHAPEREPRESENTATION(#100,'Body','SweptSolid',(#1050)); +#1062= IFCPRODUCTDEFINITIONSHAPE($,$,(#1042,#1060)); +#1066= IFCWALLSTANDARDCASE('03NDr_iTb47OvHk1xabUui',#42,'Basic Wall:V10:4932686',$,'Basic Wall:V10:4929999',#1037,#1062,'4932686',.NOTDEFINED.); +#1069= IFCMATERIAL('Dobbelfals Liggende Kledning - R\X2\00D8\X0\D',$,$); +#1070= IFCPRESENTATIONSTYLEASSIGNMENT((#1053)); +#1072= IFCSTYLEDITEM($,(#1070),$); +#1074= IFCSTYLEDREPRESENTATION(#95,'Style','Material',(#1072)); +#1076= IFCMATERIALDEFINITIONREPRESENTATION($,$,(#1074),#1069); +#1080= IFCMATERIAL('Luft',$,$); +#1081= IFCCOLOURRGB($,1.,1.,1.); +#1082= IFCSURFACESTYLERENDERING(#1081,0.,$,$,$,$,IFCNORMALISEDRATIOMEASURE(0.5),IFCSPECULAREXPONENT(0.),.NOTDEFINED.); +#1083= IFCSURFACESTYLE('Luft',.BOTH.,(#1082)); +#1085= IFCPRESENTATIONSTYLEASSIGNMENT((#1083)); +#1087= IFCSTYLEDITEM($,(#1085),$); +#1089= IFCSTYLEDREPRESENTATION(#95,'Style','Material',(#1087)); +#1091= IFCMATERIALDEFINITIONREPRESENTATION($,$,(#1089),#1080); +#1095= IFCMATERIAL('Asfaltplate',$,$); +#1096= IFCCOLOURRGB($,0.0352941176470588,0.0352941176470588,0.0352941176470588); +#1097= IFCSURFACESTYLERENDERING(#1096,0.,$,$,$,$,IFCNORMALISEDRATIOMEASURE(0.5),IFCSPECULAREXPONENT(64.),.NOTDEFINED.); +#1098= IFCSURFACESTYLE('Asfaltplate',.BOTH.,(#1097)); +#1100= IFCPRESENTATIONSTYLEASSIGNMENT((#1098)); +#1102= IFCSTYLEDITEM($,(#1100),$); +#1104= IFCSTYLEDREPRESENTATION(#95,'Style','Material',(#1102)); +#1106= IFCMATERIALDEFINITIONREPRESENTATION($,$,(#1104),#1095); +#1110= IFCMATERIAL('Stender/Isolasjon',$,$); +#1111= IFCCOLOURRGB($,0.6,0.6,0.6); +#1112= IFCSURFACESTYLERENDERING(#1111,0.,$,$,$,$,IFCNORMALISEDRATIOMEASURE(0.5),IFCSPECULAREXPONENT(64.),.NOTDEFINED.); +#1113= IFCSURFACESTYLE('Stender/Isolasjon',.BOTH.,(#1112)); +#1115= IFCPRESENTATIONSTYLEASSIGNMENT((#1113)); +#1117= IFCSTYLEDITEM($,(#1115),$); +#1119= IFCSTYLEDREPRESENTATION(#95,'Style','Material',(#1117)); +#1121= IFCMATERIALDEFINITIONREPRESENTATION($,$,(#1119),#1110); +#1125= IFCMATERIAL('Vegg - Gips',$,$); +#1126= IFCCOLOURRGB($,0.956862745098039,0.956862745098039,0.956862745098039); +#1127= IFCSURFACESTYLERENDERING(#1126,0.,$,$,$,$,IFCNORMALISEDRATIOMEASURE(0.5),IFCSPECULAREXPONENT(128.),.NOTDEFINED.); +#1128= IFCSURFACESTYLE('Vegg - Gips',.BOTH.,(#1127)); +#1130= IFCPRESENTATIONSTYLEASSIGNMENT((#1128)); +#1132= IFCSTYLEDITEM($,(#1130),$); +#1134= IFCSTYLEDREPRESENTATION(#95,'Style','Material',(#1132)); +#1136= IFCMATERIALDEFINITIONREPRESENTATION($,$,(#1134),#1125); +#1140= IFCMATERIALLAYER(#1069,19.,$,$,$,$,$); +#1142= IFCMATERIALLAYER(#1080,23.,$,$,$,$,$); +#1143= IFCMATERIALLAYER(#1095,0.,$,$,$,$,$); +#1144= IFCMATERIALLAYER(#1110,150.,$,$,$,$,$); +#1145= IFCMATERIALLAYER(#1125,21.,$,$,$,$,$); +#1146= IFCMATERIALLAYERSET((#1140,#1142,#1143,#1144,#1145),'Basic Wall:V10',$); +#1153= IFCMATERIALLAYERSETUSAGE(#1146,.AXIS2.,.NEGATIVE.,106.5,$); +#1155= IFCWALLTYPE('2g96BiTO1FDP$QYgEYThRH',#42,'Basic Wall:V10',$,$,(#1239,#1243,#1249,#1252,#1256,#1259),$,'4929999',$,.NOTDEFINED.); +#1156= IFCPROPERTYSINGLEVALUE('Base Constraint',$,IFCLABEL('Level: PLAN 01'),$); +#1157= IFCPROPERTYSINGLEVALUE('Base Extension Distance',$,IFCLENGTHMEASURE(0.),$); +#1158= IFCPROPERTYSINGLEVALUE('Base is Attached',$,IFCBOOLEAN(.F.),$); +#1159= IFCPROPERTYSINGLEVALUE('Base Offset',$,IFCLENGTHMEASURE(0.),$); +#1160= IFCPROPERTYSINGLEVALUE('Location Line',$,IFCIDENTIFIER('Finish Face: Interior'),$); +#1161= IFCPROPERTYSINGLEVALUE('Related to Mass',$,IFCBOOLEAN(.F.),$); +#1162= IFCPROPERTYSINGLEVALUE('Room Bounding',$,IFCBOOLEAN(.T.),$); +#1163= IFCPROPERTYSINGLEVALUE('Top Extension Distance',$,IFCLENGTHMEASURE(0.),$); +#1164= IFCPROPERTYSINGLEVALUE('Top is Attached',$,IFCBOOLEAN(.F.),$); +#1165= IFCPROPERTYSINGLEVALUE('Top Offset',$,IFCLENGTHMEASURE(0.),$); +#1166= IFCPROPERTYSINGLEVALUE('Unconnected Height',$,IFCLENGTHMEASURE(3000.),$); +#1167= IFCPROPERTYSINGLEVALUE('Phase Created',$,IFCLABEL('Existing'),$); +#1168= IFCPROPERTYSINGLEVALUE('Enable Analytical Model',$,IFCBOOLEAN(.F.),$); +#1169= IFCPROPERTYSINGLEVALUE('Structural',$,IFCBOOLEAN(.F.),$); +#1170= IFCPROPERTYSINGLEVALUE('Structural Usage',$,IFCIDENTIFIER('Non-bearing'),$); +#1171= IFCPROPERTYSINGLEVALUE('Area',$,IFCAREAMEASURE(155.07025),$); +#1172= IFCPROPERTYSINGLEVALUE('Length',$,IFCLENGTHMEASURE(54171.),$); +#1173= IFCPROPERTYSINGLEVALUE('Volume',$,IFCVOLUMEMEASURE(33.0299632499999),$); +#1174= IFCPROPERTYSINGLEVALUE('Category',$,IFCLABEL('Walls'),$); +#1175= IFCPROPERTYSINGLEVALUE('Family',$,IFCLABEL('Basic Wall: V10'),$); +#1176= IFCPROPERTYSINGLEVALUE('Family and Type',$,IFCLABEL('Basic Wall: V10'),$); +#1177= IFCPROPERTYSINGLEVALUE('Type',$,IFCLABEL('Basic Wall: V10'),$); +#1178= IFCPROPERTYSINGLEVALUE('Type Id',$,IFCLABEL('Basic Wall: V10'),$); +#1179= IFCPROPERTYSINGLEVALUE('Absorptance',$,IFCREAL(0.1),$); +#1180= IFCPROPERTYSINGLEVALUE('Roughness',$,IFCINTEGER(1),$); +#1181= IFCPROPERTYSINGLEVALUE('Structural Material',$,IFCLABEL('Stender/Isolasjon'),$); +#1182= IFCPROPERTYSINGLEVALUE('Coarse Scale Fill Color',$,IFCINTEGER(0),$); +#1183= IFCPROPERTYSINGLEVALUE('Function',$,IFCIDENTIFIER('Exterior'),$); +#1184= IFCPROPERTYSINGLEVALUE('Width',$,IFCLENGTHMEASURE(213.),$); +#1185= IFCPROPERTYSINGLEVALUE('Wrapping at Ends',$,IFCIDENTIFIER('None'),$); +#1186= IFCPROPERTYSINGLEVALUE('Wrapping at Inserts',$,IFCIDENTIFIER('Do not wrap'),$); +#1187= IFCPROPERTYSINGLEVALUE('Type Comments',$,IFCTEXT('1'),$); +#1188= IFCPROPERTYSINGLEVALUE('Type Name',$,IFCTEXT('V10'),$); +#1189= IFCPROPERTYSINGLEVALUE('Family Name',$,IFCTEXT('Basic Wall'),$); +#1190= IFCPROPERTYSET('03NDr_iTb47OvHlWhabUui',#42,'Constraints',$,(#1156,#1157,#1158,#1159,#1160,#1161,#1162,#1163,#1164,#1165,#1166)); +#1203= IFCRELDEFINESBYPROPERTIES('03NDr_iTb47OvHlmhabUui',#42,$,$,(#1066),#1190); +#1207= IFCPROPERTYSET('03NDr_iTb47OvHlXpabUui',#42,'Dimensions',$,(#1171,#1172,#1173)); +#1212= IFCRELDEFINESBYPROPERTIES('03NDr_iTb47OvHlnpabUui',#42,$,$,(#1066),#1207); +#1215= IFCPROPERTYSET('35OoXI64v27fLUuLKme2ma',#42,'Other',$,(#1174,#1175,#1176,#1177,#1178)); +#1222= IFCRELDEFINESBYPROPERTIES('3cyXhmDsPA8RRkkeG1JFpJ',#42,$,$,(#1066),#1215); +#1225= IFCPROPERTYSET('03NDr_iTb47OvHlX7abUui',#42,'Phasing',$,(#1167)); +#1228= IFCRELDEFINESBYPROPERTIES('03NDr_iTb47OvHln7abUui',#42,$,$,(#1066),#1225); +#1231= IFCPROPERTYSET('03NDr_iTb47OvHlXFabUui',#42,'Structural',$,(#1168,#1169,#1170)); +#1236= IFCRELDEFINESBYPROPERTIES('03NDr_iTb47OvHlnFabUui',#42,$,$,(#1066),#1231); +#1239= IFCPROPERTYSET('2g96BiTO1FDP$QZFwYThRH',#42,'Analytical Properties',$,(#1179,#1180)); +#1243= IFCPROPERTYSET('2g96BiTO1FDP$QZAUYThRH',#42,'Construction',$,(#1183,#1184,#1185,#1186)); +#1249= IFCPROPERTYSET('2g96BiTO1FDP$QZAQYThRH',#42,'Graphics',$,(#1182)); +#1252= IFCPROPERTYSET('2g96BiTO1FDP$QZAAYThRH',#42,'Identity Data',$,(#740,#741,#1187,#1188)); +#1256= IFCPROPERTYSET('2g96BiTO1FDP$QZAMYThRH',#42,'Materials and Finishes',$,(#1181)); +#1259= IFCPROPERTYSET('2NUKjTKavCBgnhbHKmcMf9',#42,'Other',$,(#1174,#1189)); +#1269= IFCCARTESIANPOINT((-865.,-450.)); +#1271= IFCCARTESIANPOINT((865.,-450.)); +#1273= IFCCARTESIANPOINT((865.,450.)); +#1275= IFCCARTESIANPOINT((-865.,450.)); +#1277= IFCPOLYLINE((#1269,#1271,#1273,#1275,#1269)); +#1279= IFCCARTESIANPOINT((-325.,-400.)); +#1281= IFCCARTESIANPOINT((-815.,-400.)); +#1283= IFCCARTESIANPOINT((-815.,400.)); +#1285= IFCCARTESIANPOINT((-325.,400.)); +#1287= IFCPOLYLINE((#1279,#1281,#1283,#1285,#1279)); +#1289= IFCCARTESIANPOINT((815.,400.)); +#1291= IFCCARTESIANPOINT((815.,-400.)); +#1293= IFCCARTESIANPOINT((325.,-400.)); +#1295= IFCCARTESIANPOINT((325.,400.)); +#1297= IFCPOLYLINE((#1289,#1291,#1293,#1295,#1289)); +#1299= IFCCARTESIANPOINT((-275.,-400.)); +#1301= IFCCARTESIANPOINT((-275.,400.)); +#1303= IFCCARTESIANPOINT((275.,400.)); +#1305= IFCCARTESIANPOINT((275.,-400.)); +#1307= IFCPOLYLINE((#1299,#1301,#1303,#1305,#1299)); +#1309= IFCARBITRARYPROFILEDEFWITHVOIDS(.AREA.,'Vindu 3 felt med 3 \X2\00E5\X0\pninger',#1277,(#1287,#1297,#1307)); +#1311= IFCCARTESIANPOINT((959.796538590871,153.,460.)); +#1313= IFCAXIS2PLACEMENT3D(#1311,#18,#14); +#1314= IFCEXTRUDEDAREASOLID(#1309,#1313,#20,99.999999999996); +#1315= IFCCARTESIANPOINT((-865.,-450.)); +#1317= IFCCARTESIANPOINT((865.,-450.)); +#1319= IFCCARTESIANPOINT((865.,450.)); +#1321= IFCCARTESIANPOINT((-865.,450.)); +#1323= IFCPOLYLINE((#1315,#1317,#1319,#1321,#1315)); +#1325= IFCCARTESIANPOINT((-845.,-430.)); +#1327= IFCCARTESIANPOINT((-845.,430.)); +#1329= IFCCARTESIANPOINT((845.,430.)); +#1331= IFCCARTESIANPOINT((845.,-430.)); +#1333= IFCPOLYLINE((#1325,#1327,#1329,#1331,#1325)); +#1335= IFCARBITRARYPROFILEDEFWITHVOIDS(.AREA.,'Vindu 3 felt med 3 \X2\00E5\X0\pninger',#1323,(#1333)); +#1337= IFCCARTESIANPOINT((959.796538590869,53.,460.)); +#1339= IFCAXIS2PLACEMENT3D(#1337,#18,#12); +#1340= IFCEXTRUDEDAREASOLID(#1335,#1339,#20,93.000000000008); +#1341= IFCCARTESIANPOINT((0.,1.77635683940025E-15)); +#1343= IFCAXIS2PLACEMENT2D(#1341,#24); +#1344= IFCRECTANGLEPROFILEDEF(.AREA.,'Vindu 3 felt med 3 \X2\00E5\X0\pninger',#1343,550.000000000005,10.); +#1345= IFCCARTESIANPOINT((959.796538590869,128.,60.)); +#1347= IFCAXIS2PLACEMENT3D(#1345,#20,#14); +#1348= IFCEXTRUDEDAREASOLID(#1344,#1347,#20,799.999999999981); +#1349= IFCCOLOURRGB($,0.956862745098039,0.956862745098039,0.956862745098039); +#1350= IFCSURFACESTYLERENDERING(#1349,0.,$,$,$,$,IFCNORMALISEDRATIOMEASURE(0.5),IFCSPECULAREXPONENT(128.),.NOTDEFINED.); +#1351= IFCSURFACESTYLE('Hvit',.BOTH.,(#1350)); +#1353= IFCPRESENTATIONSTYLEASSIGNMENT((#1351)); +#1355= IFCSTYLEDITEM(#1314,(#1353),$); +#1358= IFCSTYLEDITEM(#1340,(#1353),$); +#1361= IFCCOLOURRGB($,0.854901960784314,0.890196078431373,0.87843137254902); +#1362= IFCSURFACESTYLERENDERING(#1361,0.85,$,$,$,$,IFCNORMALISEDRATIOMEASURE(0.5),IFCSPECULAREXPONENT(12.),.NOTDEFINED.); +#1363= IFCSURFACESTYLE('Glassplater',.BOTH.,(#1362)); +#1365= IFCPRESENTATIONSTYLEASSIGNMENT((#1363)); +#1367= IFCSTYLEDITEM(#1348,(#1365),$); +#1370= IFCSHAPEREPRESENTATION(#100,'Body','SweptSolid',(#1314,#1340,#1348)); +#1372= IFCCARTESIANPOINT((1749.32448009269,297.459222269011)); +#1374= IFCCARTESIANPOINT((1774.79653859088,153.)); +#1376= IFCPOLYLINE((#1372,#1374)); +#1378= IFCCARTESIANPOINT((609.324480092671,297.45922226901)); +#1380= IFCCARTESIANPOINT((634.796538590859,153.)); +#1382= IFCPOLYLINE((#1378,#1380)); +#1384= IFCCARTESIANPOINT((609.324480092671,297.45922226901)); +#1386= IFCCARTESIANPOINT((144.79653859087,153.)); +#1388= IFCPOLYLINE((#1384,#1386)); +#1390= IFCCARTESIANPOINT((1749.32448009269,297.459222269011)); +#1392= IFCCARTESIANPOINT((1284.79653859088,153.)); +#1394= IFCPOLYLINE((#1390,#1392)); +#1396= IFCGEOMETRICSET((#1376,#1382,#1388,#1394)); +#1398= IFCSHAPEREPRESENTATION(#104,'FootPrint','GeometricSet',(#1396)); +#1400= IFCAXIS2PLACEMENT3D(#6,$,$); +#1401= IFCREPRESENTATIONMAP(#1400,#1370); +#1403= IFCREPRESENTATIONMAP(#1400,#1398); +#1405= IFCWINDOWLININGPROPERTIES('2s384mGt93XQ6GAKtxEBEF',#42,'Eks V1:Vindu 3 felt med 3 \X2\00E5\X0\pninger:5304233',$,$,$,$,$,$,$,$,$,$,$,$,$); +#1406= IFCWINDOWTYPE('2BB$9YoXb9ofcxEmoUuBl7',#42,'Vindu 3 felt med 3 \X2\00E5\X0\pninger',$,$,(#1405,#1535,#1538,#1541,#1545,#1554,#1560,#1565),(#1401,#1403),'6053107',$,.WINDOW.,.NOTDEFINED.,.F.,$); +#1410= IFCMATERIAL('Hvit',$,$); +#1411= IFCPRESENTATIONSTYLEASSIGNMENT((#1351)); +#1413= IFCSTYLEDITEM($,(#1411),$); +#1415= IFCSTYLEDREPRESENTATION(#95,'Style','Material',(#1413)); +#1417= IFCMATERIALDEFINITIONREPRESENTATION($,$,(#1415),#1410); +#1421= IFCMATERIAL('Glassplater',$,$); +#1422= IFCPRESENTATIONSTYLEASSIGNMENT((#1363)); +#1424= IFCSTYLEDITEM($,(#1422),$); +#1426= IFCSTYLEDREPRESENTATION(#95,'Style','Material',(#1424)); +#1428= IFCMATERIALDEFINITIONREPRESENTATION($,$,(#1426),#1421); +#1432= IFCMATERIALLIST((#1410,#1421)); +#1434= IFCMAPPEDITEM(#1401,#684); +#1436= IFCSHAPEREPRESENTATION(#100,'Body','MappedRepresentation',(#1434)); +#1438= IFCMAPPEDITEM(#1403,#684); +#1440= IFCSHAPEREPRESENTATION(#104,'FootPrint','MappedRepresentation',(#1438)); +#1442= IFCPRODUCTDEFINITIONSHAPE($,$,(#1436,#1440)); +#1446= IFCCARTESIANPOINT((61178.1361954652,30419.,1200.)); +#1448= IFCAXIS2PLACEMENT3D(#1446,$,$); +#2170= IFCLOCALPLACEMENT(#2154,#2169); +#1450= IFCWINDOW('1PTz52_o9DlAOe37wu2tDU',#42,'Eks V1:Vindu 3 felt med 3 \X2\00E5\X0\pninger:5304233',$,'Vindu 3 felt med 3 \X2\00E5\X0\pninger',#2170,#1442,'5304233',920.000000000016,1750.,.WINDOW.,.NOTDEFINED.,$); +#1453= IFCMATERIALLIST((#1410,#1421)); +#1455= IFCPROPERTYSINGLEVALUE('Sill Height',$,IFCLENGTHMEASURE(1200.),$); +#1456= IFCPROPERTYSINGLEVALUE('Area',$,IFCAREAMEASURE(2.02784000000005),$); +#1457= IFCPROPERTYSINGLEVALUE('Height',$,IFCLENGTHMEASURE(920.),$); +#1458= IFCPROPERTYSINGLEVALUE('Innsetting',$,IFCLENGTHMEASURE(20.),$); +#1459= IFCPROPERTYSINGLEVALUE('Spalte',$,IFCLENGTHMEASURE(10.),$); +#1460= IFCPROPERTYSINGLEVALUE('Veggtykkelse',$,IFCLENGTHMEASURE(213.),$); +#1461= IFCPROPERTYSINGLEVALUE('Volume',$,IFCVOLUMEMEASURE(0.0473348000000038),$); +#1462= IFCPROPERTYSINGLEVALUE('Width',$,IFCLENGTHMEASURE(1750.),$); +#1463= IFCPROPERTYSINGLEVALUE('Mark',$,IFCTEXT('32'),$); +#1464= IFCPROPERTYSINGLEVALUE('Category',$,IFCLABEL('Windows'),$); +#1465= IFCPROPERTYSINGLEVALUE('Family',$,IFCLABEL('Eks V1: Vindu 3 felt med 3 \X2\00E5\X0\pninger'),$); +#1466= IFCPROPERTYSINGLEVALUE('Family and Type',$,IFCLABEL('Eks V1: Vindu 3 felt med 3 \X2\00E5\X0\pninger'),$); +#1467= IFCPROPERTYSINGLEVALUE('Head Height',$,IFCLENGTHMEASURE(2120.),$); +#1468= IFCPROPERTYSINGLEVALUE('Host Id',$,IFCLABEL('Basic Wall: V10'),$); +#1469= IFCPROPERTYSINGLEVALUE('Type',$,IFCLABEL('Eks V1: Vindu 3 felt med 3 \X2\00E5\X0\pninger'),$); +#1470= IFCPROPERTYSINGLEVALUE('Type Id',$,IFCLABEL('Eks V1: Vindu 3 felt med 3 \X2\00E5\X0\pninger'),$); +#1471= IFCPROPERTYSINGLEVALUE('Analytic Construction',$,IFCTEXT(''),$); +#1472= IFCPROPERTYSINGLEVALUE('Total glass area',$,IFCAREAMEASURE(0.7352),$); +#1473= IFCPROPERTYSINGLEVALUE('Glassmateriale',$,IFCLABEL('Glassplater'),$); +#1474= IFCPROPERTYSINGLEVALUE('Karmmateriale',$,IFCLABEL('Hvit'),$); +#1475= IFCPROPERTYSINGLEVALUE('Utforingsmateriale',$,IFCLABEL('Hvit'),$); +#1476= IFCPROPERTYSINGLEVALUE('Utforing',$,IFCBOOLEAN(.T.),$); +#1477= IFCPROPERTYSINGLEVALUE('Wall Closure',$,IFCIDENTIFIER('By host'),$); +#1478= IFCPROPERTYSINGLEVALUE('Bredde \X2\00E5\X0\pningsfelt',$,IFCLENGTHMEASURE(590.),$); +#1479= IFCPROPERTYSINGLEVALUE('Karmbredde',$,IFCLENGTHMEASURE(50.),$); +#1480= IFCPROPERTYSINGLEVALUE('Karmdybde',$,IFCLENGTHMEASURE(100.),$); +#1481= IFCPROPERTYSINGLEVALUE('Rammebredde',$,IFCLENGTHMEASURE(40.),$); +#1482= IFCPROPERTYSINGLEVALUE('Rough Height',$,IFCLENGTHMEASURE(900.),$); +#1483= IFCPROPERTYSINGLEVALUE('Rough Width',$,IFCLENGTHMEASURE(1730.),$); +#1484= IFCPROPERTYSINGLEVALUE('Utforingstykkelse',$,IFCLENGTHMEASURE(20.),$); +#1485= IFCPROPERTYSINGLEVALUE('Type Mark',$,IFCTEXT('EKS'),$); +#1486= IFCPROPERTYSINGLEVALUE('Type Name',$,IFCTEXT('Vindu 3 felt med 3 \X2\00E5\X0\pninger'),$); +#1487= IFCPROPERTYSINGLEVALUE('URL',$,IFCTEXT(''),$); +#1488= IFCPROPERTYSINGLEVALUE('WindowBasalOpening',$,IFCTEXT('Unspecified'),$); +#1489= IFCPROPERTYSINGLEVALUE('Default Sill Height',$,IFCLENGTHMEASURE(900.),$); +#1490= IFCPROPERTYSINGLEVALUE('Family Name',$,IFCTEXT('Eks V1'),$); +#1491= IFCPROPERTYSINGLEVALUE('M_Height',$,IFCINTEGER(9),$); +#1492= IFCPROPERTYSINGLEVALUE('M_Width',$,IFCINTEGER(17),$); +#1493= IFCPROPERTYSET('1PTz52_o9DlAOe2cgu2tDU',#42,'Constraints',$,(#724,#1455)); +#1496= IFCRELDEFINESBYPROPERTIES('1PTz52_o9DlAOe2sgu2tDU',#42,$,$,(#1450),#1493); +#1500= IFCPROPERTYSET('1PTz52_o9DlAOe2dou2tDU',#42,'Dimensions',$,(#1456,#1457,#1458,#1459,#1460,#1461,#1462)); +#1509= IFCRELDEFINESBYPROPERTIES('1PTz52_o9DlAOe2tou2tDU',#42,$,$,(#1450),#1500); +#1512= IFCPROPERTYSET('1PTz52_o9DlAOe2d_u2tDU',#42,'Identity Data',$,(#1463)); +#1515= IFCRELDEFINESBYPROPERTIES('1PTz52_o9DlAOe2t_u2tDU',#42,$,$,(#1450),#1512); +#1518= IFCPROPERTYSET('0OD0h_ZWTC9w4ma4waZMTk',#42,'Other',$,(#1464,#1465,#1466,#1467,#1468,#1469,#1470)); +#1527= IFCRELDEFINESBYPROPERTIES('1W7re08Ab2whlzYuJMxO6o',#42,$,$,(#1450),#1518); +#1530= IFCPROPERTYSET('1PTz52_o9DlAOe2d6u2tDU',#42,'Phasing',$,(#1167)); +#1532= IFCRELDEFINESBYPROPERTIES('1PTz52_o9DlAOe2t6u2tDU',#42,$,$,(#1450),#1530); +#1535= IFCPROPERTYSET('2BB$9YoXb9ofcxFIUUu8yJ',#42,'Analysis Results',$,(#1472)); +#1538= IFCPROPERTYSET('2BB$9YoXb9ofcxFKIUu8yJ',#42,'Analytical Properties',$,(#1471)); +#1541= IFCPROPERTYSET('2BB$9YoXb9ofcxFHsUu8yJ',#42,'Construction',$,(#1476,#1477)); +#1545= IFCPROPERTYSET('2BB$9YoXb9ofcxFHkUu8yJ',#42,'Dimensions',$,(#1478,#1479,#1480,#1481,#1482,#1483,#1484)); +#1554= IFCPROPERTYSET('2BB$9YoXb9ofcxFHYUu8yJ',#42,'Identity Data',$,(#740,#741,#742,#744,#745,#746,#747,#1485,#1486,#1487,#1488)); +#1560= IFCPROPERTYSET('2BB$9YoXb9ofcxFH_Uu8yJ',#42,'Materials and Finishes',$,(#1473,#1474,#1475)); +#1565= IFCPROPERTYSET('0F3yDlIkfCzwJW1hy5mnqw',#42,'Other',$,(#1464,#1489,#1490,#1491,#1492)); +#1579= IFCCARTESIANPOINT((41181.,30485.5000000001,1050.)); +#1581= IFCAXIS2PLACEMENT3D(#1579,$,$); +#1582= IFCLOCALPLACEMENT(#139,#1581); +#1583= IFCCARTESIANPOINT((1050.,-0.)); +#1585= IFCPOLYLINE((#10,#1583)); +#1587= IFCSHAPEREPRESENTATION(#98,'Axis','Curve2D',(#1585)); +#1589= IFCCARTESIANPOINT((0.,0.)); +#1591= IFCAXIS2PLACEMENT2D(#1589,#24); +#1592= IFCRECTANGLEPROFILEDEF(.AREA.,'V10',#1591,1049.99999999999,212.999999999999); +#1593= IFCCARTESIANPOINT((525.,0.,0.)); +#1595= IFCAXIS2PLACEMENT3D(#1593,$,$); +#1596= IFCEXTRUDEDAREASOLID(#1592,#1595,#20,955.000000000028); +#1597= IFCSTYLEDITEM(#1596,(#1055),$); +#1600= IFCSHAPEREPRESENTATION(#100,'Body','SweptSolid',(#1596)); +#1602= IFCPRODUCTDEFINITIONSHAPE($,$,(#1587,#1600)); +#1606= IFCWALLSTANDARDCASE('3UltsdvPH0afI77DdCyC7z',#42,'Basic Wall:V10:5626624',$,'Basic Wall:V10:4929999',#1582,#1602,'5626624',.NOTDEFINED.); +#1609= IFCMATERIALLAYERSETUSAGE(#1146,.AXIS2.,.NEGATIVE.,106.5,$); +#1610= IFCPROPERTYSINGLEVALUE('Location Line',$,IFCIDENTIFIER('Wall Centerline'),$); +#1611= IFCPROPERTYSINGLEVALUE('Area',$,IFCAREAMEASURE(1.00275000000003),$); +#1612= IFCPROPERTYSINGLEVALUE('Volume',$,IFCVOLUMEMEASURE(0.213585750000004),$); +#1613= IFCPROPERTYSET('3UltsdvPH0afI76itCyC7z',#42,'Constraints',$,(#1157,#1161,#1163,#1610)); +#1616= IFCRELDEFINESBYPROPERTIES('3UltsdvPH0afI76ytCyC7z',#42,$,$,(#1606),#1613); +#1620= IFCPROPERTYSET('3UltsdvPH0afI76jlCyC7z',#42,'Dimensions',$,(#1611,#1612)); +#1624= IFCRELDEFINESBYPROPERTIES('3UltsdvPH0afI76zlCyC7z',#42,$,$,(#1606),#1620); +#1627= IFCPROPERTYSET('3$$ekGHX90XuxsyUbzpLxd',#42,'Other',$,(#1174,#1175,#1176,#1177,#1178)); +#1629= IFCRELDEFINESBYPROPERTIES('3aT2$J5_jCqf3wnAUTstKb',#42,$,$,(#1606),#1627); +#1632= IFCPROPERTYSET('3UltsdvPH0afI76jJCyC7z',#42,'Structural',$,(#1168,#1169,#1170)); +#1634= IFCRELDEFINESBYPROPERTIES('3UltsdvPH0afI76zJCyC7z',#42,$,$,(#1606),#1632); +#1637= IFCCARTESIANPOINT((18125.,30485.5000000002,1050.)); +#1639= IFCAXIS2PLACEMENT3D(#1637,$,$); +#1640= IFCLOCALPLACEMENT(#139,#1639); +#1641= IFCCARTESIANPOINT((1750.,0.)); +#1643= IFCPOLYLINE((#10,#1641)); +#1645= IFCSHAPEREPRESENTATION(#98,'Axis','Curve2D',(#1643)); +#1647= IFCCARTESIANPOINT((-2.21689333557151E-12,0.)); +#1649= IFCAXIS2PLACEMENT2D(#1647,#24); +#1650= IFCRECTANGLEPROFILEDEF(.AREA.,'V10',#1649,1750.,212.999999999999); +#1651= IFCCARTESIANPOINT((875.,0.,0.)); +#1653= IFCAXIS2PLACEMENT3D(#1651,#20,#14); +#1654= IFCEXTRUDEDAREASOLID(#1650,#1653,#20,920.000000000016); +#1655= IFCSTYLEDITEM(#1654,(#1055),$); +#1658= IFCSHAPEREPRESENTATION(#100,'Body','SweptSolid',(#1654)); +#1660= IFCPRODUCTDEFINITIONSHAPE($,$,(#1645,#1658)); +#1664= IFCWALLSTANDARDCASE('3n3el7tsPBORtUY9oVoMDi',#42,'Basic Wall:V10:5839377',$,'Basic Wall:V10:4929999',#1640,#1660,'5839377',.NOTDEFINED.); +#1667= IFCMATERIALLAYERSETUSAGE(#1146,.AXIS2.,.NEGATIVE.,106.5,$); +#1668= IFCPROPERTYSINGLEVALUE('Area',$,IFCAREAMEASURE(1.61000000000002),$); +#1669= IFCPROPERTYSINGLEVALUE('Volume',$,IFCVOLUMEMEASURE(0.342930000000004),$); +#1670= IFCPROPERTYSET('3n3el7tsPBORtUZeYVoMDi',#42,'Constraints',$,(#1157,#1161,#1163,#1610)); +#1672= IFCRELDEFINESBYPROPERTIES('3n3el7tsPBORtUZuYVoMDi',#42,$,$,(#1664),#1670); +#1676= IFCPROPERTYSET('3n3el7tsPBORtUZfwVoMDi',#42,'Dimensions',$,(#1668,#1669)); +#1680= IFCRELDEFINESBYPROPERTIES('3n3el7tsPBORtUZvwVoMDi',#42,$,$,(#1664),#1676); +#1683= IFCPROPERTYSET('3jSro$XJ943vTpKXds2soE',#42,'Other',$,(#1174,#1175,#1176,#1177,#1178)); +#1685= IFCRELDEFINESBYPROPERTIES('1w0L6nC6j6iha$8sZIQ7fE',#42,$,$,(#1664),#1683); +#1688= IFCPROPERTYSET('3n3el7tsPBORtUZf6VoMDi',#42,'Structural',$,(#1168,#1169,#1170)); +#1690= IFCRELDEFINESBYPROPERTIES('3n3el7tsPBORtUZv6VoMDi',#42,$,$,(#1664),#1688); +#1693= IFCCARTESIANPOINT((14525.,30485.5000000002,1050.)); +#1695= IFCAXIS2PLACEMENT3D(#1693,$,$); +#1696= IFCLOCALPLACEMENT(#139,#1695); +#1697= IFCCARTESIANPOINT((1750.,-0.)); +#1699= IFCPOLYLINE((#10,#1697)); +#1701= IFCSHAPEREPRESENTATION(#98,'Axis','Curve2D',(#1699)); +#1703= IFCCARTESIANPOINT((0.,2.16715534406831E-12)); +#1705= IFCAXIS2PLACEMENT2D(#1703,#24); +#1706= IFCRECTANGLEPROFILEDEF(.AREA.,'V10',#1705,1750.,212.999999999999); +#1707= IFCCARTESIANPOINT((875.,0.,0.)); +#1709= IFCAXIS2PLACEMENT3D(#1707,#20,#14); +#1710= IFCEXTRUDEDAREASOLID(#1706,#1709,#20,920.000000000016); +#1711= IFCSTYLEDITEM(#1710,(#1055),$); +#1714= IFCSHAPEREPRESENTATION(#100,'Body','SweptSolid',(#1710)); +#1716= IFCPRODUCTDEFINITIONSHAPE($,$,(#1701,#1714)); +#1720= IFCWALLSTANDARDCASE('3n3el7tsPBORtUY9oVoMDl',#42,'Basic Wall:V10:5839378',$,'Basic Wall:V10:4929999',#1696,#1716,'5839378',.NOTDEFINED.); +#1723= IFCMATERIALLAYERSETUSAGE(#1146,.AXIS2.,.NEGATIVE.,106.5,$); +#1724= IFCPROPERTYSINGLEVALUE('Area',$,IFCAREAMEASURE(1.61000000000003),$); +#1725= IFCPROPERTYSINGLEVALUE('Volume',$,IFCVOLUMEMEASURE(0.342930000000004),$); +#1726= IFCPROPERTYSET('3n3el7tsPBORtUZeYVoMDl',#42,'Constraints',$,(#1157,#1161,#1163,#1610)); +#1728= IFCRELDEFINESBYPROPERTIES('3n3el7tsPBORtUZuYVoMDl',#42,$,$,(#1720),#1726); +#1732= IFCPROPERTYSET('3n3el7tsPBORtUZfwVoMDl',#42,'Dimensions',$,(#1724,#1725)); +#1736= IFCRELDEFINESBYPROPERTIES('3n3el7tsPBORtUZvwVoMDl',#42,$,$,(#1720),#1732); +#1739= IFCPROPERTYSET('39krQ544P8_OprvvIRSUar',#42,'Other',$,(#1174,#1175,#1176,#1177,#1178)); +#1741= IFCRELDEFINESBYPROPERTIES('2Ov7dVxmz1dOGNawy3WYsC',#42,$,$,(#1720),#1739); +#1744= IFCPROPERTYSET('3n3el7tsPBORtUZf6VoMDl',#42,'Structural',$,(#1168,#1169,#1170)); +#1746= IFCRELDEFINESBYPROPERTIES('3n3el7tsPBORtUZv6VoMDl',#42,$,$,(#1720),#1744); +#1749= IFCCARTESIANPOINT((10925.,30485.5000000002,1050.)); +#1751= IFCAXIS2PLACEMENT3D(#1749,$,$); +#1752= IFCLOCALPLACEMENT(#139,#1751); +#1753= IFCCARTESIANPOINT((1750.,0.)); +#1755= IFCPOLYLINE((#10,#1753)); +#1757= IFCSHAPEREPRESENTATION(#98,'Axis','Curve2D',(#1755)); +#1759= IFCCARTESIANPOINT((0.,0.)); +#1761= IFCAXIS2PLACEMENT2D(#1759,#24); +#1762= IFCRECTANGLEPROFILEDEF(.AREA.,'V10',#1761,1750.,212.999999999999); +#1763= IFCCARTESIANPOINT((875.,0.,0.)); +#1765= IFCAXIS2PLACEMENT3D(#1763,#20,#14); +#1766= IFCEXTRUDEDAREASOLID(#1762,#1765,#20,920.000000000016); +#1767= IFCSTYLEDITEM(#1766,(#1055),$); +#1770= IFCSHAPEREPRESENTATION(#100,'Body','SweptSolid',(#1766)); +#1772= IFCPRODUCTDEFINITIONSHAPE($,$,(#1757,#1770)); +#1776= IFCWALLSTANDARDCASE('3n3el7tsPBORtUY9oVoMDk',#42,'Basic Wall:V10:5839379',$,'Basic Wall:V10:4929999',#1752,#1772,'5839379',.NOTDEFINED.); +#1779= IFCMATERIALLAYERSETUSAGE(#1146,.AXIS2.,.NEGATIVE.,106.5,$); +#1780= IFCPROPERTYSINGLEVALUE('Area',$,IFCAREAMEASURE(1.61000000000002),$); +#1781= IFCPROPERTYSINGLEVALUE('Volume',$,IFCVOLUMEMEASURE(0.342930000000004),$); +#1782= IFCPROPERTYSET('3n3el7tsPBORtUZeYVoMDk',#42,'Constraints',$,(#1157,#1161,#1163,#1610)); +#1784= IFCRELDEFINESBYPROPERTIES('3n3el7tsPBORtUZuYVoMDk',#42,$,$,(#1776),#1782); +#1788= IFCPROPERTYSET('3n3el7tsPBORtUZfwVoMDk',#42,'Dimensions',$,(#1780,#1781)); +#1792= IFCRELDEFINESBYPROPERTIES('3n3el7tsPBORtUZvwVoMDk',#42,$,$,(#1776),#1788); +#1795= IFCPROPERTYSET('2aiBhn_mH4LAX$O4Mvq2Pe',#42,'Other',$,(#1174,#1175,#1176,#1177,#1178)); +#1797= IFCRELDEFINESBYPROPERTIES('21L6h0R5T3yRZPLjGBWChp',#42,$,$,(#1776),#1795); +#1800= IFCPROPERTYSET('3n3el7tsPBORtUZf6VoMDk',#42,'Structural',$,(#1168,#1169,#1170)); +#1802= IFCRELDEFINESBYPROPERTIES('3n3el7tsPBORtUZv6VoMDk',#42,$,$,(#1776),#1800); +#1805= IFCTEXTSTYLEFONTMODEL('Text Font',('Arial Narrow'),$,$,$,IFCPOSITIVELENGTHMEASURE(250.)); +#1807= IFCCOLOURRGB($,0.,0.,0.); +#1808= IFCTEXTSTYLEFORDEFINEDFONT(#1807,$); +#1809= IFCTEXTSTYLE('2.5mm Arial Narrow',#1808,$,#1805,$); +#1810= IFCPRESENTATIONSTYLEASSIGNMENT((#1809)); +#1812= IFCAXIS2PLACEMENT3D(#6,$,$); +#1813= IFCLOCALPLACEMENT(#145,#1812); +#1814= IFCCARTESIANPOINT((20035.1896219398,22141.9509375934,0.)); +#1816= IFCAXIS2PLACEMENT3D(#1814,$,$); +#1817= IFCPLANAREXTENT(2925.,801.587301587301); +#1818= IFCTEXTLITERALWITHEXTENT('SPILLBAKKE H=50MM\X\0D\X\0ATILPASSES ',#1816,.LEFT.,#1817,'top-left'); +#1819= IFCSTYLEDITEM(#1818,(#1810),$); +#1822= IFCSHAPEREPRESENTATION(#104,'Annotation','Annotation2D',(#1818)); +#1824= IFCPRODUCTDEFINITIONSHAPE($,$,(#1822)); +#1827= IFCANNOTATION('11bZi6bUHFtOf1eiw_jjuT',#42,$,$,$,#1813,#1824); +#1830= IFCAXIS2PLACEMENT3D(#6,$,$); +#1831= IFCLOCALPLACEMENT(#145,#1830); +#1832= IFCCARTESIANPOINT((28028.0779111512,18894.0915743089,0.)); +#1834= IFCAXIS2PLACEMENT3D(#1832,$,$); +#1835= IFCPLANAREXTENT(3080.,801.587301587301); +#1836= IFCTEXTLITERALWITHEXTENT('SPILLBAKKE H=100MM\X\0D\X\0ATILPASSES ',#1834,.LEFT.,#1835,'top-left'); +#1837= IFCSTYLEDITEM(#1836,(#1810),$); +#1840= IFCSHAPEREPRESENTATION(#104,'Annotation','Annotation2D',(#1836)); +#1842= IFCPRODUCTDEFINITIONSHAPE($,$,(#1840)); +#1845= IFCANNOTATION('2oJ8CMMon7WQXfpAJDJOgH',#42,$,$,$,#1831,#1842); +#1848= IFCCARTESIANPOINT((114502766.318516,1185944009.,0.)); +#1850= IFCDIRECTION((0.995788774458495,0.0916772417912352,0.)); +#1852= IFCAXIS2PLACEMENT3D(#1848,#20,#1850); +#1853= IFCLOCALPLACEMENT($,#1852); +#1854= IFCSITE('3o91zj$Gr6cQ_i1EP5O_03',#42,'0214 41 1 00',$,'',#1853,$,'14323',.ELEMENT.,(59,39,52,987060),(10,47,40,726547),62050.,'0214 41 1 00',$); +#1858= IFCPROPERTYSINGLEVALUE('Author',$,IFCTEXT(''),$); +#1859= IFCPROPERTYSINGLEVALUE('Building Name',$,IFCTEXT('091'),$); +#1860= IFCPROPERTYSINGLEVALUE('CQIncludeDoorSwing',$,IFCBOOLEAN(.F.),$); +#1861= IFCPROPERTYSINGLEVALUE('CQIncludeRoomNumber',$,IFCBOOLEAN(.F.),$); +#1862= IFCPROPERTYSINGLEVALUE('Organization Description',$,IFCTEXT('A - Arkitekt'),$); +#1863= IFCPROPERTYSINGLEVALUE('Organization Name',$,IFCTEXT('PG Campus \X2\00C5\X0\s'),$); +#1864= IFCPROPERTYSINGLEVALUE('Category',$,IFCLABEL('Project Information'),$); +#1865= IFCPROPERTYSINGLEVALUE('Client Name',$,IFCTEXT('Statsbygg'),$); +#1866= IFCPROPERTYSINGLEVALUE('CQDoorSwingCodes',$,IFCTEXT('Left=L;Right=R;notMirrored =;mirrored ='),$); +#1867= IFCPROPERTYSINGLEVALUE('CQIncludeTemporaryDoors',$,IFCBOOLEAN(.F.),$); +#1868= IFCPROPERTYSINGLEVALUE('CQPhaseFilter',$,IFCTEXT('Existing:True;New Construction:True;Temporary:True;'),$); +#1869= IFCPROPERTYSINGLEVALUE('Project Address',$,IFCTEXT('Forprosjekt'),$); +#1870= IFCPROPERTYSINGLEVALUE('Project Issue Date',$,IFCTEXT('SB_14323_03_ARK_091'),$); +#1871= IFCPROPERTYSINGLEVALUE('Project Name',$,IFCTEXT('14323'),$); +#1872= IFCPROPERTYSINGLEVALUE('Project Number',$,IFCTEXT('12370'),$); +#1873= IFCPROPERTYSINGLEVALUE('Project Status',$,IFCTEXT('02'),$); +#1874= IFCPROPERTYSET('27PCKGLxT4mxtV86o6mgBW',#42,'Identity Data',$,(#1858,#1859,#1860,#1861,#1862,#1863)); +#1882= IFCRELDEFINESBYPROPERTIES('27PCKGLxT4mxtV8Mo6mgBW',#42,$,$,(#1854),#1874); +#1886= IFCPROPERTYSET('3AcspaXOj4mxnskMsaPI1b',#42,'Other',$,(#1864,#1865,#1866,#1867,#1868,#1869,#1870,#1871,#1872,#1873)); +#1902= IFCPROPERTYSINGLEVALUE('Elevation',$,IFCLENGTHMEASURE(0.),$); +#1903= IFCPROPERTYSINGLEVALUE('Computation Height',$,IFCLENGTHMEASURE(1200.),$); +#1904= IFCPROPERTYSINGLEVALUE('Building Story',$,IFCBOOLEAN(.T.),$); +#1905= IFCPROPERTYSINGLEVALUE('Name',$,IFCTEXT('PLAN 01'),$); +#1906= IFCPROPERTYSINGLEVALUE('Category',$,IFCLABEL('Levels'),$); +#1907= IFCPROPERTYSINGLEVALUE('Family',$,IFCLABEL('Level: 8mm Niv\X2\00E5\X0\hode Lokale Koter'),$); +#1908= IFCPROPERTYSINGLEVALUE('Family and Type',$,IFCLABEL('Level: 8mm Niv\X2\00E5\X0\hode Lokale Koter'),$); +#1909= IFCPROPERTYSINGLEVALUE('Type',$,IFCLABEL('Level: 8mm Niv\X2\00E5\X0\hode Lokale Koter'),$); +#1910= IFCPROPERTYSINGLEVALUE('Type Id',$,IFCLABEL('Level: 8mm Niv\X2\00E5\X0\hode Lokale Koter'),$); +#1911= IFCPROPERTYSINGLEVALUE('Elevation Base',$,IFCIDENTIFIER('Project Base Point'),$); +#1912= IFCPROPERTYSINGLEVALUE('Color',$,IFCINTEGER(0),$); +#1913= IFCPROPERTYSINGLEVALUE('Line Pattern',$,IFCLABEL('Centre'),$); +#1914= IFCPROPERTYSINGLEVALUE('Line Weight',$,IFCIDENTIFIER('1'),$); +#1915= IFCPROPERTYSINGLEVALUE('Symbol',$,IFCLABEL('View - Niv\X2\00E5\X0\hode: Niv\X2\00E5\X0\hode Trekant'),$); +#1916= IFCPROPERTYSINGLEVALUE('Symbol at End 1 Default',$,IFCBOOLEAN(.F.),$); +#1917= IFCPROPERTYSINGLEVALUE('Symbol at End 2 Default',$,IFCBOOLEAN(.T.),$); +#1918= IFCPROPERTYSINGLEVALUE('Type Name',$,IFCTEXT('8mm Niv\X2\00E5\X0\hode Lokale Koter'),$); +#1919= IFCPROPERTYSINGLEVALUE('Family Name',$,IFCTEXT('Level'),$); +#1920= IFCPROPERTYSET('3Zu5Bv0LOHrPC11XI6FoQQ',#42,'Constraints',$,(#1902)); +#1923= IFCRELDEFINESBYPROPERTIES('3Zu5Bv0LOHrPC11nI6FoQQ',#42,$,$,(#140),#1920); +#1927= IFCPROPERTYSET('3Zu5Bv0LOHrPC11WA6FoQQ',#42,'Dimensions',$,(#1903)); +#1930= IFCRELDEFINESBYPROPERTIES('3Zu5Bv0LOHrPC11mA6FoQQ',#42,$,$,(#140),#1927); +#1933= IFCPROPERTYSET('3Zu5Bv0LOHrPC11W66FoQQ',#42,'Identity Data',$,(#1169,#1904,#1905)); +#1937= IFCRELDEFINESBYPROPERTIES('3Zu5Bv0LOHrPC11m66FoQQ',#42,$,$,(#140),#1933); +#1940= IFCPROPERTYSET('2FA06uA3PFMQNbcHaAvqjj',#42,'Other',$,(#1906,#1907,#1908,#1909,#1910)); +#1947= IFCRELDEFINESBYPROPERTIES('0litd1LpDBRBpkKGx9T$S5',#42,$,$,(#140),#1940); +#1950= IFCPROPERTYSET('3Zu5Bv0LOHrPC11XI6FoQS',#42,'Constraints',$,(#1911)); +#1953= IFCPROPERTYSET('3Zu5Bv0LOHrPC11WM6FoQS',#42,'Graphics',$,(#1912,#1913,#1914,#1915,#1916,#1917)); +#1961= IFCPROPERTYSET('3Zu5Bv0LOHrPC11W66FoQS',#42,'Identity Data',$,(#1918)); +#1964= IFCPROPERTYSET('2w96tQqqbFpepd87QA_4lP',#42,'Other',$,(#1906,#1919)); +#1967= IFCRELCONTAINEDINSPATIALSTRUCTURE('3Zu5Bv0LOHrPC10066FoQQ',#42,$,$,(#701,#898,#1066,#1450,#1606,#1664,#1720,#1776),#140); +#1978= IFCPROPERTYSINGLEVALUE('Elevation',$,IFCLENGTHMEASURE(3060.),$); +#1979= IFCPROPERTYSINGLEVALUE('Computation Height',$,IFCLENGTHMEASURE(1650.),$); +#1980= IFCPROPERTYSINGLEVALUE('Name',$,IFCTEXT('PLAN 02'),$); +#1981= IFCPROPERTYSET('34TXSA2TTDdQqr5CiMy0Ob',#42,'Constraints',$,(#1978)); +#1984= IFCRELDEFINESBYPROPERTIES('34TXSA2TTDdQqr5SiMy0Ob',#42,$,$,(#146),#1981); +#1988= IFCPROPERTYSET('34TXSA2TTDdQqr5DqMy0Ob',#42,'Dimensions',$,(#1979)); +#1991= IFCRELDEFINESBYPROPERTIES('34TXSA2TTDdQqr5TqMy0Ob',#42,$,$,(#146),#1988); +#1994= IFCPROPERTYSET('34TXSA2TTDdQqr5DuMy0Ob',#42,'Identity Data',$,(#1169,#1904,#1980)); +#1997= IFCRELDEFINESBYPROPERTIES('34TXSA2TTDdQqr5TuMy0Ob',#42,$,$,(#146),#1994); +#2000= IFCPROPERTYSET('0HRd3FfE9Es8SpPf9AbDpj',#42,'Other',$,(#1906,#1907,#1908,#1909,#1910)); +#2002= IFCRELDEFINESBYPROPERTIES('2DQfuJyFXELQJICDJEI8vW',#42,$,$,(#146),#2000); +#2005= IFCRELCONTAINEDINSPATIALSTRUCTURE('34TXSA2TTDdQqr4juMy0Ob',#42,$,$,(#1030,#1827,#1845),#146); +#2011= IFCRELAGGREGATES('10zuuVffX3Jv03CpcKTsyG',#42,$,$,#106,(#1854)); +#2015= IFCRELAGGREGATES('0ySE4kjJb7IQEcMkONDvhL',#42,$,$,#1854,(#121)); +#2019= IFCRELAGGREGATES('27PCKGLxT4mxtV9cw6mgBW',#42,$,$,#121,(#140,#146)); +#2024= IFCPROPERTYSINGLEVALUE('Building Name',$,IFCTEXT('091'),$); +#2025= IFCPROPERTYSINGLEVALUE('Organization Description',$,IFCTEXT('A - Arkitekt'),$); +#2026= IFCPROPERTYSINGLEVALUE('Organization Name',$,IFCTEXT('PG Campus \X2\00C5\X0\s'),$); +#2027= IFCPROPERTYSINGLEVALUE('Client Name',$,IFCTEXT('Statsbygg'),$); +#2028= IFCPROPERTYSINGLEVALUE('CQDoorSwingCodes',$,IFCTEXT('Left=L;Right=R;notMirrored =;mirrored ='),$); +#2029= IFCPROPERTYSINGLEVALUE('CQPhaseFilter',$,IFCTEXT('Existing:True;New Construction:True;Temporary:True;'),$); +#2030= IFCPROPERTYSINGLEVALUE('Project Address',$,IFCTEXT('Forprosjekt'),$); +#2031= IFCPROPERTYSINGLEVALUE('Project Issue Date',$,IFCTEXT('SB_14323_03_ARK_091'),$); +#2032= IFCPROPERTYSINGLEVALUE('Project Name',$,IFCTEXT('14323'),$); +#2033= IFCPROPERTYSINGLEVALUE('Project Number',$,IFCTEXT('12370'),$); +#2034= IFCPROPERTYSINGLEVALUE('Project Status',$,IFCTEXT('02'),$); +#2035= IFCPROPERTYSET('2SEynX0yz5uQxuaiE4IiyJ',#42,'Identity Data',$,(#1858,#1860,#1861,#2024,#2025,#2026)); +#2040= IFCRELDEFINESBYPROPERTIES('1aRw6GMwvElBEY0jF64TpU',#42,$,$,(#121),#2035); +#2044= IFCPROPERTYSET('2911NfldvE9w6uXVbaFvXD',#42,'Other',$,(#1864,#1867,#2027,#2028,#2029,#2030,#2031,#2032,#2033,#2034)); +#2054= IFCRELDEFINESBYPROPERTIES('2uMCXemlDDof69kUP2ewno',#42,$,$,(#121),#2044); +#2057= IFCRELASSOCIATESMATERIAL('1wrST1aZvCJetfNbIF067B',#42,$,$,(#1066),#1153); +#2061= IFCRELASSOCIATESMATERIAL('2GOrZdWCjDTPYdngHZu_Sn',#42,$,$,(#1155),#1146); +#2065= IFCRELASSOCIATESMATERIAL('2SQ6mTkrjEsx16FeMiz3oX',#42,$,$,(#1606),#1609); +#2069= IFCRELASSOCIATESMATERIAL('2oK1CfU$H1tQdkVHDrIIYf',#42,$,$,(#1664),#1667); +#2073= IFCRELASSOCIATESMATERIAL('2DAF128$v7CAD7HKwHzb4N',#42,$,$,(#1720),#1723); +#2077= IFCRELASSOCIATESMATERIAL('2Tui85BkfAN9NOj1xBEBWu',#42,$,$,(#1776),#1779); +#2081= IFCRELASSOCIATESMATERIAL('2CNeT3b699CRaXImGOUQoV',#42,$,$,(#646),#679); +#2084= IFCRELASSOCIATESMATERIAL('2HHKaNXSTBiuf1wgw$jDSu',#42,$,$,(#701),#716); +#2087= IFCRELASSOCIATESMATERIAL('1jvfaMfm18RxXm6y1sOrTd',#42,$,$,(#898),#901); +#2091= IFCRELASSOCIATESMATERIAL('3vcB1OwLr5ZB2z0AU8V9M0',#42,$,$,(#1406),#1432); +#2094= IFCRELASSOCIATESMATERIAL('3j5TIeGNfF5xW7rwoTszyP',#42,$,$,(#1450),#1453); +#2097= IFCRELDEFINESBYTYPE('3z97E8y9f5I88dNUvhjEgQ',#42,$,$,(#701),#646); +#2101= IFCRELDEFINESBYTYPE('2idYhS38PBD9GOiHzQutED',#42,$,$,(#1066,#1606,#1664,#1720,#1776),#1155); +#2109= IFCRELDEFINESBYTYPE('1rC0Auz_LFgALvGtykUsTn',#42,$,$,(#1450),#1406); +#2113= IFCRELDEFINESBYPROPERTIES('3ezTUOAkD9sOw0yQQg_dAI',#42,$,$,(#898),#987); +#2116= IFCRELDEFINESBYPROPERTIES('29pF_ma0r37xMADUOcx0Uo',#42,$,$,(#898),#990); +#2119= IFCRELDEFINESBYPROPERTIES('2$HZSmMMDEZP0sGNJXPisb',#42,$,$,(#898),#995); +#2122= IFCRELDEFINESBYPROPERTIES('1SLhVKZYvEVQjgjIQKZBGs',#42,$,$,(#898),#999); +#2125= IFCRELDEFINESBYPROPERTIES('1ZLxsh0fjCDRuolTCYCzr3',#42,$,$,(#898),#1003); +#2128= IFCRELDEFINESBYPROPERTIES('005VeXd29DP9UOaXww58OI',#42,$,$,(#140,#146),#1950); +#2131= IFCRELDEFINESBYPROPERTIES('0BzkEEIyX6mg$7DJ6thFc1',#42,$,$,(#140,#146),#1953); +#2134= IFCRELDEFINESBYPROPERTIES('3Yv4JfIObEPfoyGpwJq_Z6',#42,$,$,(#140,#146),#1961); +#2137= IFCRELDEFINESBYPROPERTIES('1fCFSvmcX05O1C30h1grtJ',#42,$,$,(#140,#146),#1964); +#2140= IFCCARTESIANPOINT((460.000000000008,874.999999999999)); +#2142= IFCAXIS2PLACEMENT2D(#2140,#24); +#2143= IFCRECTANGLEPROFILEDEF(.AREA.,$,#2142,920.000000000016,1750.); +#2144= IFCAXIS2PLACEMENT3D(#6,#16,#20); +#2145= IFCEXTRUDEDAREASOLID(#2143,#2144,#20,213.); +#2146= IFCSHAPEREPRESENTATION(#100,'Body','SweptSolid',(#2145)); +#2148= IFCPRODUCTDEFINITIONSHAPE($,$,(#2146)); +#2151= IFCCARTESIANPOINT((51348.432734218,-106.500000000174,1200.)); +#2153= IFCAXIS2PLACEMENT3D(#2151,$,$); +#2154= IFCLOCALPLACEMENT(#1037,#2153); +#2156= IFCOPENINGELEMENT('1PTz52_o9DlAOe36su2tDU',#42,'Eks V1:Vindu 3 felt med 3 \X2\00E5\X0\pninger:5304233:1',$,'Opening',#2154,#2148,$,.OPENING.); +#2161= IFCRELVOIDSELEMENT('1PTz52_o9DlAOe36gu2tDU',#42,$,$,#1066,#2156); +#2164= IFCRELFILLSELEMENT('2RI5C5EYf0WgKQFKrHJrgN',#42,$,$,#2156,#1450); +#2167= IFCCARTESIANPOINT((-84.7965385908683,40.,0.)); +#2169= IFCAXIS2PLACEMENT3D(#2167,$,$); +#2173= IFCAXIS2PLACEMENT3D(#6,$,$); +#2291= IFCAXIS2PLACEMENT3D(#2289,$,$); +#2175= IFCAXIS2PLACEMENT3D(#2188,$,$); +#2289= IFCCARTESIANPOINT((41181.,28855.,1050.)); +#2178= IFCCARTESIANPOINT((-5.68434188608080E-14,-4.32009983342141E-12)); +#2180= IFCAXIS2PLACEMENT2D(#2178,#24); +#2181= IFCRECTANGLEPROFILEDEF(.AREA.,'Vindu 1 felt eksisterende',#2180,955.000000000028,1050.); +#2182= IFCCARTESIANPOINT((525.,0.,477.500000000014)); +#2184= IFCAXIS2PLACEMENT3D(#2182,#16,#20); +#2185= IFCEXTRUDEDAREASOLID(#2181,#2184,#20,3048.); +#2186= IFCSHAPEREPRESENTATION(#100,'Body','SweptSolid',(#2185)); +#2188= IFCCARTESIANPOINT((41181.,28855.,1050.)); +#2190= IFCPRODUCTDEFINITIONSHAPE($,$,(#2186)); +#2193= IFCCARTESIANPOINT((31266.500000162,-1630.5000000002,1050.)); +#2195= IFCAXIS2PLACEMENT3D(#2193,$,$); +#2196= IFCLOCALPLACEMENT(#1037,#2195); +#2197= IFCOPENINGELEMENT('0HNfUe8E1CBeeczp8rXNWv',#42,'Basic Wall:V10:4932686',$,'Opening',#2196,#2190,$,.OPENING.); +#2200= IFCRELVOIDSELEMENT('3eBR5DHnfAIBOAfK6IPTcw',#42,$,$,#1066,#2197); +#2202= IFCAXIS2PLACEMENT3D(#6,$,$); +#2294= IFCAXIS2PLACEMENT3D(#2292,$,$); +#2204= IFCAXIS2PLACEMENT3D(#2217,$,$); +#2292= IFCCARTESIANPOINT((10925.,28855.,1050.)); +#2207= IFCCARTESIANPOINT((0.,-5.68434188608080E-14)); +#2209= IFCAXIS2PLACEMENT2D(#2207,#28); +#2210= IFCRECTANGLEPROFILEDEF(.AREA.,'Sidehengslet \X2\00E5\X0\pningsvindu 3 felt',#2209,920.000000000016,1750.); +#2211= IFCCARTESIANPOINT((875.,0.,460.)); +#2213= IFCAXIS2PLACEMENT3D(#2211,#16,#14); +#2214= IFCEXTRUDEDAREASOLID(#2210,#2213,#20,3048.); +#2215= IFCSHAPEREPRESENTATION(#100,'Body','SweptSolid',(#2214)); +#2217= IFCCARTESIANPOINT((10925.,28855.,1050.)); +#2219= IFCPRODUCTDEFINITIONSHAPE($,$,(#2215)); +#2222= IFCCARTESIANPOINT((1010.50000016201,-1630.5000000002,1050.)); +#2224= IFCAXIS2PLACEMENT3D(#2222,$,$); +#2225= IFCLOCALPLACEMENT(#1037,#2224); +#2226= IFCOPENINGELEMENT('3n3el7tsPBORtUY8_VoM7z',#42,'Basic Wall:V10:4932686',$,'Opening',#2225,#2219,$,.OPENING.); +#2229= IFCRELVOIDSELEMENT('2AF0YiP7L7lfAkYu2KIXhf',#42,$,$,#1066,#2226); +#2231= IFCAXIS2PLACEMENT3D(#6,$,$); +#2297= IFCAXIS2PLACEMENT3D(#2295,$,$); +#2233= IFCAXIS2PLACEMENT3D(#2246,$,$); +#2295= IFCCARTESIANPOINT((14525.,28855.,1050.)); +#2236= IFCCARTESIANPOINT((0.,-5.68434188608080E-14)); +#2238= IFCAXIS2PLACEMENT2D(#2236,#28); +#2239= IFCRECTANGLEPROFILEDEF(.AREA.,'Sidehengslet \X2\00E5\X0\pningsvindu 3 felt',#2238,920.000000000016,1750.); +#2240= IFCCARTESIANPOINT((875.,0.,460.)); +#2242= IFCAXIS2PLACEMENT3D(#2240,#16,#14); +#2243= IFCEXTRUDEDAREASOLID(#2239,#2242,#20,3048.); +#2244= IFCSHAPEREPRESENTATION(#100,'Body','SweptSolid',(#2243)); +#2246= IFCCARTESIANPOINT((14525.,28855.,1050.)); +#2248= IFCPRODUCTDEFINITIONSHAPE($,$,(#2244)); +#2251= IFCCARTESIANPOINT((4610.50000016201,-1630.5000000002,1050.)); +#2253= IFCAXIS2PLACEMENT3D(#2251,$,$); +#2254= IFCLOCALPLACEMENT(#1037,#2253); +#2255= IFCOPENINGELEMENT('3n3el7tsPBORtUY8_VoM3Y',#42,'Basic Wall:V10:4932686',$,'Opening',#2254,#2248,$,.OPENING.); +#2258= IFCRELVOIDSELEMENT('0cUXaV6M5BuRg1_EPMcQP$',#42,$,$,#1066,#2255); +#2260= IFCAXIS2PLACEMENT3D(#6,$,$); +#2300= IFCAXIS2PLACEMENT3D(#2298,$,$); +#2262= IFCAXIS2PLACEMENT3D(#2275,$,$); +#2298= IFCCARTESIANPOINT((18125.,28855.,1050.)); +#2265= IFCCARTESIANPOINT((-1.08002495835535E-12,-5.68434188608080E-14)); +#2267= IFCAXIS2PLACEMENT2D(#2265,#28); +#2268= IFCRECTANGLEPROFILEDEF(.AREA.,'Sidehengslet \X2\00E5\X0\pningsvindu 3 felt',#2267,920.000000000016,1750.); +#2269= IFCCARTESIANPOINT((875.,0.,460.)); +#2271= IFCAXIS2PLACEMENT3D(#2269,#16,#14); +#2272= IFCEXTRUDEDAREASOLID(#2268,#2271,#20,3048.); +#2273= IFCSHAPEREPRESENTATION(#100,'Body','SweptSolid',(#2272)); +#2275= IFCCARTESIANPOINT((18125.,28855.,1050.)); +#2277= IFCPRODUCTDEFINITIONSHAPE($,$,(#2273)); +#2280= IFCCARTESIANPOINT((8210.50000016201,-1630.5000000002,1050.)); +#2282= IFCAXIS2PLACEMENT3D(#2280,$,$); +#2283= IFCLOCALPLACEMENT(#1037,#2282); +#2301= IFCPRESENTATIONLAYERASSIGNMENT('A-DETL-____-OTLN',$,(#1024),$); +#2304= IFCPRESENTATIONLAYERASSIGNMENT('A-GENM-____-OTLN',$,(#451,#636,#687,#691),$); +#2310= IFCPRESENTATIONLAYERASSIGNMENT('A-GLAZ-____-OTLN',$,(#1370,#1398,#1436,#1440,#2186,#2215,#2244,#2273),$); +#2320= IFCPRESENTATIONLAYERASSIGNMENT('A-WALL-____-OTLN',$,(#1042,#1060,#1587,#1600,#1645,#1658,#1701,#1714,#1757,#1770,#2146),$); +#2333= IFCPRESENTATIONLAYERASSIGNMENT('G-____-____-TEXT',$,(#1822,#1840),$); +#2337= IFCPRESENTATIONLAYERASSIGNMENT('S-FNDN-____-OTLN',$,(#893),$); +ENDSEC; + +END-ISO-10303-21; diff --git a/test/input/mapped_item_style.ifc b/test/input/mapped_item_style.ifc new file mode 100644 index 0000000000..61c905545c --- /dev/null +++ b/test/input/mapped_item_style.ifc @@ -0,0 +1,183 @@ +ISO-10303-21; +HEADER; +FILE_DESCRIPTION (('ViewDefinition [CoordinationView_V2.0]'), '2;1'); +FILE_NAME ('GreenPipe', '2015-11-18T12:57:39', ('- -'), ('-'), 'BSProLib (15th of March 2014)', 'MagiCAD HPV 2014.4', ' '); +FILE_SCHEMA (('IFC2X3')); +ENDSEC; +DATA; +#1 = IFCOWNERHISTORY(#2, #3, $, .ADDED., $, $, $, 1447851459); +#2 = IFCPERSONANDORGANIZATION(#4, #5, $); +#3 = IFCAPPLICATION(#6, 'Not Defined', 'Not Defined', 'Not Defined'); +#4 = IFCPERSON($, $, $, $, $, $, $, $); +#5 = IFCORGANIZATION($, 'simplebim', $, $, $); +#6 = IFCORGANIZATION($, 'Datacubist', $, $, $); +#7 = IFCBUILDING('026Lkbgdr7wf6pe_Hm4pbI', #8, $, $, '', #139, $, $, .ELEMENT., $, $, $); +#8 = IFCOWNERHISTORY(#9, #12, $, .NOCHANGE., $, $, $, 1422863967); +#9 = IFCPERSONANDORGANIZATION(#10, #11, $); +#10 = IFCPERSON($, '-', '-', $, $, $, $, $); +#11 = IFCORGANIZATION($, '-', $, $, $); +#12 = IFCAPPLICATION(#11, '2012.11', 'MagiCAD HPV 2012.11', 'MagiCAD HPV'); +#13 = IFCBUILDINGSTOREY('0AhpSxd0P1QRiBUgahlB62', #8, '3. etasje', $, '', #141, $, $, .ELEMENT., 55900.); +#14 = IFCFLOWSEGMENT('0k6g4TkpX8LvcVQUYZl7mx', #15, $, $, '', #144, #17, $); +#15 = IFCOWNERHISTORY(#9, #16, $, .NOCHANGE., $, $, $, 1429106599); +#16 = IFCAPPLICATION(#11, '2014.4', 'MagiCAD HPV 2014.4', 'MagiCAD HPV'); +#17 = IFCPRODUCTDEFINITIONSHAPE($, $, (#18)); +#18 = IFCSHAPEREPRESENTATION(#19, 'Body', 'MappedRepresentation', (#27)); +#19 = IFCGEOMETRICREPRESENTATIONSUBCONTEXT('Body', 'Model', *, *, *, *, #20, $, .MODEL_VIEW., $); +#20 = IFCGEOMETRICREPRESENTATIONCONTEXT($, 'Model', 3, 1.E-5, #21, $); +#21 = IFCAXIS2PLACEMENT3D(#22, #23, #24); +#22 = IFCCARTESIANPOINT((0., 0., 0.)); +#23 = IFCDIRECTION((0., 0., 1.)); +#24 = IFCDIRECTION((1., 0., 0.)); +#25 = IFCGEOMETRICREPRESENTATIONSUBCONTEXT('Body', 'Model', *, *, *, *, #20, $, .MODEL_VIEW., $); +#26 = IFCGEOMETRICREPRESENTATIONSUBCONTEXT('Body', 'Model', *, *, *, *, #20, $, .MODEL_VIEW., $); +#27 = IFCMAPPEDITEM(#28, #113); +#28 = IFCREPRESENTATIONMAP(#29, #30); +#29 = IFCAXIS2PLACEMENT3D(#22, #23, #24); +#30 = IFCSHAPEREPRESENTATION(#19, 'Body', 'SurfaceModel', (#31)); +#31 = IFCSHELLBASEDSURFACEMODEL((#32)); +#32 = IFCOPENSHELL((#33, #40, #45, #50, #55, #60, #65, #70, #75, #80, #85, #90, #95, #100, #105, #110)); +#33 = IFCFACE((#34)); +#34 = IFCFACEOUTERBOUND(#35, .T.); +#35 = IFCPOLYLOOP((#36, #37, #38, #39)); +#36 = IFCCARTESIANPOINT((-725., 383.1113, -115.00318)); +#37 = IFCCARTESIANPOINT((-725., 397.9585, 40.36126)); +#38 = IFCCARTESIANPOINT((725., 397.9585, 40.36126)); +#39 = IFCCARTESIANPOINT((725., 383.1113, -115.00318)); +#40 = IFCFACE((#41)); +#41 = IFCFACEOUTERBOUND(#42, .T.); +#42 = IFCPOLYLOOP((#37, #43, #44, #38)); +#43 = IFCCARTESIANPOINT((-725., 352.22013, 189.58107)); +#44 = IFCCARTESIANPOINT((725., 352.22013, 189.58107)); +#45 = IFCFACE((#46)); +#46 = IFCFACEOUTERBOUND(#47, .T.); +#47 = IFCPOLYLOOP((#43, #48, #49, #44)); +#48 = IFCCARTESIANPOINT((-725., 252.85943, 309.93888)); +#49 = IFCCARTESIANPOINT((725., 252.85943, 309.93888)); +#50 = IFCFACE((#51)); +#51 = IFCFACEOUTERBOUND(#52, .T.); +#52 = IFCPOLYLOOP((#48, #53, #54, #49)); +#53 = IFCCARTESIANPOINT((-725., 115.00318, 383.1113)); +#54 = IFCCARTESIANPOINT((725., 115.00318, 383.1113)); +#55 = IFCFACE((#56)); +#56 = IFCFACEOUTERBOUND(#57, .T.); +#57 = IFCPOLYLOOP((#53, #58, #59, #54)); +#58 = IFCCARTESIANPOINT((-725., -40.36126, 397.9585)); +#59 = IFCCARTESIANPOINT((725., -40.36126, 397.9585)); +#60 = IFCFACE((#61)); +#61 = IFCFACEOUTERBOUND(#62, .T.); +#62 = IFCPOLYLOOP((#58, #63, #64, #59)); +#63 = IFCCARTESIANPOINT((-725., -189.58107, 352.22013)); +#64 = IFCCARTESIANPOINT((725., -189.58107, 352.22013)); +#65 = IFCFACE((#66)); +#66 = IFCFACEOUTERBOUND(#67, .T.); +#67 = IFCPOLYLOOP((#63, #68, #69, #64)); +#68 = IFCCARTESIANPOINT((-725., -309.93888, 252.85943)); +#69 = IFCCARTESIANPOINT((725., -309.93888, 252.85943)); +#70 = IFCFACE((#71)); +#71 = IFCFACEOUTERBOUND(#72, .T.); +#72 = IFCPOLYLOOP((#68, #73, #74, #69)); +#73 = IFCCARTESIANPOINT((-725., -383.1113, 115.00318)); +#74 = IFCCARTESIANPOINT((725., -383.1113, 115.00318)); +#75 = IFCFACE((#76)); +#76 = IFCFACEOUTERBOUND(#77, .T.); +#77 = IFCPOLYLOOP((#73, #78, #79, #74)); +#78 = IFCCARTESIANPOINT((-725., -397.9585, -40.36126)); +#79 = IFCCARTESIANPOINT((725., -397.9585, -40.36126)); +#80 = IFCFACE((#81)); +#81 = IFCFACEOUTERBOUND(#82, .T.); +#82 = IFCPOLYLOOP((#78, #83, #84, #79)); +#83 = IFCCARTESIANPOINT((-725., -352.22013, -189.58107)); +#84 = IFCCARTESIANPOINT((725., -352.22013, -189.58107)); +#85 = IFCFACE((#86)); +#86 = IFCFACEOUTERBOUND(#87, .T.); +#87 = IFCPOLYLOOP((#83, #88, #89, #84)); +#88 = IFCCARTESIANPOINT((-725., -252.85943, -309.93888)); +#89 = IFCCARTESIANPOINT((725., -252.85943, -309.93888)); +#90 = IFCFACE((#91)); +#91 = IFCFACEOUTERBOUND(#92, .T.); +#92 = IFCPOLYLOOP((#88, #93, #94, #89)); +#93 = IFCCARTESIANPOINT((-725., -115.00318, -383.1113)); +#94 = IFCCARTESIANPOINT((725., -115.00318, -383.1113)); +#95 = IFCFACE((#96)); +#96 = IFCFACEOUTERBOUND(#97, .T.); +#97 = IFCPOLYLOOP((#93, #98, #99, #94)); +#98 = IFCCARTESIANPOINT((-725., 40.36126, -397.9585)); +#99 = IFCCARTESIANPOINT((725., 40.36126, -397.9585)); +#100 = IFCFACE((#101)); +#101 = IFCFACEOUTERBOUND(#102, .T.); +#102 = IFCPOLYLOOP((#98, #103, #104, #99)); +#103 = IFCCARTESIANPOINT((-725., 189.58107, -352.22013)); +#104 = IFCCARTESIANPOINT((725., 189.58107, -352.22013)); +#105 = IFCFACE((#106)); +#106 = IFCFACEOUTERBOUND(#107, .T.); +#107 = IFCPOLYLOOP((#103, #108, #109, #104)); +#108 = IFCCARTESIANPOINT((-725., 309.93888, -252.85943)); +#109 = IFCCARTESIANPOINT((725., 309.93888, -252.85943)); +#110 = IFCFACE((#111)); +#111 = IFCFACEOUTERBOUND(#112, .T.); +#112 = IFCPOLYLOOP((#108, #36, #39, #109)); +#113 = IFCCARTESIANTRANSFORMATIONOPERATOR3DNONUNIFORM($, $, #22, 2.689655, $, 1., 1.); +#114 = IFCPROJECT('0EHdefYCr4XA02OBEnhWph', #8, $, $, '', $, $, (#20), #148); +#115 = IFCSITE('0yjrC3GhPFGhTAhGjFoXgU', #8, $, $, '', #137, $, $, .ELEMENT., $, $, $, $, $); +#116 = IFCDUCTSEGMENTTYPE('33ZUtxFLT3oflCfdbTV7YR', #15, 'Sirk. kanal, Forsinket st\X\E5l', '2-SIRK', $, (#119), $, $, $, .RIGIDSEGMENT.); +#117 = IFCCLASSIFICATIONREFERENCE($, 'VB2.121212', 'Not defined', #118); +#118 = IFCCLASSIFICATION('NS', '', $, 'NS3420'); +#119 = IFCPROPERTYSET('0KogclmVD8u9NLoxd55q2Z', #1, 'Pset_DuctSegmentTypeCommon', $, (#120, #121)); +#120 = IFCPROPERTYSINGLEVALUE('Length', $, IFCPOSITIVELENGTHMEASURE(3900.), $); +#121 = IFCPROPERTYLISTVALUE('NominalDiameterOrWidth', $, (IFCPOSITIVELENGTHMEASURE(800.)), $); +#122 = IFCRELDEFINESBYTYPE('2QWHtAK4v0NuXpTn$cwRcO', #1, $, $, (#14), #116); +#123 = IFCRELASSIGNSTOGROUP('2NMUbNdzv2NPmHrl0xeehB', #1, $, $, (#14), $, #124); +#124 = IFCSYSTEM('2qqMrTwlLERAeiT2j5aCl8', #125, '3601 Tilluft', '3601-1', $); +#125 = IFCOWNERHISTORY($, $, $, .NOCHANGE., $, $, $, 1429103705); +#126 = IFCRELSERVICESBUILDINGS('2k0QCS0pjDDPvlG2POE5oE', #1, $, $, #124, (#7)); +#127 = IFCPRESENTATIONLAYERASSIGNMENT('362--V-3601-T-36', $, (#18), $); +#128 = IFCCOLOURRGB($, 0., 1., 0.); +#129 = IFCSURFACESTYLERENDERING(#128, 0., $, $, $, $, $, $, .NOTDEFINED.); +#130 = IFCSURFACESTYLE($, .BOTH., (#129)); +#131 = IFCPRESENTATIONSTYLEASSIGNMENT((#130)); +#132 = IFCSTYLEDITEM(#27, (#131), $); +#133 = IFCRELCONTAINEDINSPATIALSTRUCTURE('0WOibVXVXFLQabcILOoRAW', #1, $, $, (#14), #13); +#134 = IFCRELAGGREGATES('1PBxJnWMLBlP8BcL_PXo71', #1, $, $, #7, (#13)); +#135 = IFCRELAGGREGATES('3$h1BhDfnDQfWZXBRDMGbj', #1, $, $, #115, (#7)); +#136 = IFCRELAGGREGATES('1UmwNW7crDGeh$LdqIdCWH', #1, $, $, #114, (#115)); +#137 = IFCLOCALPLACEMENT($, #138); +#138 = IFCAXIS2PLACEMENT3D(#22, #23, #24); +#139 = IFCLOCALPLACEMENT(#137, #140); +#140 = IFCAXIS2PLACEMENT3D(#22, #23, #24); +#141 = IFCLOCALPLACEMENT(#139, #142); +#142 = IFCAXIS2PLACEMENT3D(#143, #23, #24); +#143 = IFCCARTESIANPOINT((0., 0., 55900.)); +#144 = IFCLOCALPLACEMENT(#141, #145); +#145 = IFCAXIS2PLACEMENT3D(#146, #147, #23); +#146 = IFCCARTESIANPOINT((0, 0, 0)); +#147 = IFCDIRECTION((9.57778850166525E-1, 2.87505955023003E-1, 0.)); +#148 = IFCUNITASSIGNMENT((#149, #150, #151, #152, #153, #154, #155, #156, #157, #158, #159, #160, #164, #167, #172)); +#149 = IFCSIUNIT(*, .PLANEANGLEUNIT., $, .RADIAN.); +#150 = IFCSIUNIT(*, .AREAUNIT., $, .SQUARE_METRE.); +#151 = IFCSIUNIT(*, .LENGTHUNIT., .MILLI., .METRE.); +#152 = IFCSIUNIT(*, .MASSUNIT., $, .GRAM.); +#153 = IFCSIUNIT(*, .POWERUNIT., $, .WATT.); +#154 = IFCSIUNIT(*, .PRESSUREUNIT., .KILO., .PASCAL.); +#155 = IFCSIUNIT(*, .FORCEUNIT., .KILO., .NEWTON.); +#156 = IFCSIUNIT(*, .ELECTRICCURRENTUNIT., $, .AMPERE.); +#157 = IFCSIUNIT(*, .THERMODYNAMICTEMPERATUREUNIT., $, .DEGREE_CELSIUS.); +#158 = IFCSIUNIT(*, .TIMEUNIT., $, .SECOND.); +#159 = IFCSIUNIT(*, .VOLUMEUNIT., $, .CUBIC_METRE.); +#160 = IFCDERIVEDUNIT((#161, #162), .LINEARVELOCITYUNIT., $); +#161 = IFCDERIVEDUNITELEMENT(#163, 1); +#162 = IFCDERIVEDUNITELEMENT(#158, -1); +#163 = IFCSIUNIT(*, .LENGTHUNIT., $, .METRE.); +#164 = IFCDERIVEDUNIT((#165, #166), .VOLUMETRICFLOWRATEUNIT., $); +#165 = IFCDERIVEDUNITELEMENT(#159, 1); +#166 = IFCDERIVEDUNITELEMENT(#158, -1); +#167 = IFCDERIVEDUNIT((#168, #169, #170), .THERMALTRANSMITTANCEUNIT., $); +#168 = IFCDERIVEDUNITELEMENT(#153, 1); +#169 = IFCDERIVEDUNITELEMENT(#171, -1); +#170 = IFCDERIVEDUNITELEMENT(#150, -1); +#171 = IFCSIUNIT(*, .THERMODYNAMICTEMPERATUREUNIT., $, .KELVIN.); +#172 = IFCDERIVEDUNIT((#173), .SOUNDPRESSUREUNIT., $); +#173 = IFCDERIVEDUNITELEMENT(#174, 1); +#174 = IFCSIUNIT(*, .PRESSUREUNIT., $, .PASCAL.); +ENDSEC; +END-ISO-10303-21; diff --git a/win/IfcConvert.vcproj b/win/IfcConvert.vcproj deleted file mode 100644 index b7e27a2ca2..0000000000 --- a/win/IfcConvert.vcproj +++ /dev/null @@ -1,248 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/win/IfcGeom.vcproj b/win/IfcGeom.vcproj deleted file mode 100644 index 561649b717..0000000000 --- a/win/IfcGeom.vcproj +++ /dev/null @@ -1,293 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/win/IfcMax.vcproj b/win/IfcMax.vcproj deleted file mode 100644 index e8e107280f..0000000000 --- a/win/IfcMax.vcproj +++ /dev/null @@ -1,204 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/win/IfcOpenHouse.vcproj b/win/IfcOpenHouse.vcproj deleted file mode 100644 index dd884cc213..0000000000 --- a/win/IfcOpenHouse.vcproj +++ /dev/null @@ -1,184 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/win/IfcOpenShell.sln b/win/IfcOpenShell.sln deleted file mode 100644 index 898dddbb71..0000000000 --- a/win/IfcOpenShell.sln +++ /dev/null @@ -1,73 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 10.00 -# Visual C++ Express 2008 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "IfcParse", "IfcParse.vcproj", "{F7600775-3D48-426A-88E2-F3A4BF4408A2}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "IfcPython", "IfcWrap.vcproj", "{DF780EE9-405F-4D15-A679-A251E30E84E2}" - ProjectSection(ProjectDependencies) = postProject - {F7600775-3D48-426A-88E2-F3A4BF4408A2} = {F7600775-3D48-426A-88E2-F3A4BF4408A2} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "IfcMax", "IfcMax.vcproj", "{BD4D152C-8619-4DB9-8637-56DA166979F3}" - ProjectSection(ProjectDependencies) = postProject - {F7600775-3D48-426A-88E2-F3A4BF4408A2} = {F7600775-3D48-426A-88E2-F3A4BF4408A2} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "IfcConvert", "IfcConvert.vcproj", "{5B0BAAB3-9FC4-4C0C-9D38-8BF4B07F4A85}" - ProjectSection(ProjectDependencies) = postProject - {BA57AF0F-1D12-4FAC-BD40-7474D729CAE9} = {BA57AF0F-1D12-4FAC-BD40-7474D729CAE9} - {F7600775-3D48-426A-88E2-F3A4BF4408A2} = {F7600775-3D48-426A-88E2-F3A4BF4408A2} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "IfcGeom", "IfcGeom.vcproj", "{BA57AF0F-1D12-4FAC-BD40-7474D729CAE9}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "IfcParseExamples", "IfcParseExamples.vcproj", "{4DA9E9D7-60A6-4031-BA78-A3741BD62CB9}" - ProjectSection(ProjectDependencies) = postProject - {F7600775-3D48-426A-88E2-F3A4BF4408A2} = {F7600775-3D48-426A-88E2-F3A4BF4408A2} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "IfcOpenHouse", "IfcOpenHouse.vcproj", "{163D7E4F-5337-4FAD-AC11-4D40078395A3}" - ProjectSection(ProjectDependencies) = postProject - {BA57AF0F-1D12-4FAC-BD40-7474D729CAE9} = {BA57AF0F-1D12-4FAC-BD40-7474D729CAE9} - {F7600775-3D48-426A-88E2-F3A4BF4408A2} = {F7600775-3D48-426A-88E2-F3A4BF4408A2} - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Release|Win32 = Release|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {F7600775-3D48-426A-88E2-F3A4BF4408A2}.Debug|Win32.ActiveCfg = Debug|Win32 - {F7600775-3D48-426A-88E2-F3A4BF4408A2}.Debug|Win32.Build.0 = Debug|Win32 - {F7600775-3D48-426A-88E2-F3A4BF4408A2}.Release|Win32.ActiveCfg = Release|Win32 - {F7600775-3D48-426A-88E2-F3A4BF4408A2}.Release|Win32.Build.0 = Release|Win32 - {DF780EE9-405F-4D15-A679-A251E30E84E2}.Debug|Win32.ActiveCfg = Debug|Win32 - {DF780EE9-405F-4D15-A679-A251E30E84E2}.Debug|Win32.Build.0 = Debug|Win32 - {DF780EE9-405F-4D15-A679-A251E30E84E2}.Release|Win32.ActiveCfg = Release|Win32 - {DF780EE9-405F-4D15-A679-A251E30E84E2}.Release|Win32.Build.0 = Release|Win32 - {BD4D152C-8619-4DB9-8637-56DA166979F3}.Debug|Win32.ActiveCfg = Debug|Win32 - {BD4D152C-8619-4DB9-8637-56DA166979F3}.Debug|Win32.Build.0 = Debug|Win32 - {BD4D152C-8619-4DB9-8637-56DA166979F3}.Release|Win32.ActiveCfg = Release|Win32 - {BD4D152C-8619-4DB9-8637-56DA166979F3}.Release|Win32.Build.0 = Release|Win32 - {5B0BAAB3-9FC4-4C0C-9D38-8BF4B07F4A85}.Debug|Win32.ActiveCfg = Debug|Win32 - {5B0BAAB3-9FC4-4C0C-9D38-8BF4B07F4A85}.Debug|Win32.Build.0 = Debug|Win32 - {5B0BAAB3-9FC4-4C0C-9D38-8BF4B07F4A85}.Release|Win32.ActiveCfg = Release|Win32 - {5B0BAAB3-9FC4-4C0C-9D38-8BF4B07F4A85}.Release|Win32.Build.0 = Release|Win32 - {BA57AF0F-1D12-4FAC-BD40-7474D729CAE9}.Debug|Win32.ActiveCfg = Debug|Win32 - {BA57AF0F-1D12-4FAC-BD40-7474D729CAE9}.Debug|Win32.Build.0 = Debug|Win32 - {BA57AF0F-1D12-4FAC-BD40-7474D729CAE9}.Release|Win32.ActiveCfg = Release|Win32 - {BA57AF0F-1D12-4FAC-BD40-7474D729CAE9}.Release|Win32.Build.0 = Release|Win32 - {4DA9E9D7-60A6-4031-BA78-A3741BD62CB9}.Debug|Win32.ActiveCfg = Debug|Win32 - {4DA9E9D7-60A6-4031-BA78-A3741BD62CB9}.Debug|Win32.Build.0 = Debug|Win32 - {4DA9E9D7-60A6-4031-BA78-A3741BD62CB9}.Release|Win32.ActiveCfg = Release|Win32 - {4DA9E9D7-60A6-4031-BA78-A3741BD62CB9}.Release|Win32.Build.0 = Release|Win32 - {163D7E4F-5337-4FAD-AC11-4D40078395A3}.Debug|Win32.ActiveCfg = Debug|Win32 - {163D7E4F-5337-4FAD-AC11-4D40078395A3}.Debug|Win32.Build.0 = Debug|Win32 - {163D7E4F-5337-4FAD-AC11-4D40078395A3}.Release|Win32.ActiveCfg = Release|Win32 - {163D7E4F-5337-4FAD-AC11-4D40078395A3}.Release|Win32.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/win/IfcParse.vcproj b/win/IfcParse.vcproj deleted file mode 100644 index 0723f5743a..0000000000 --- a/win/IfcParse.vcproj +++ /dev/null @@ -1,330 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/win/IfcParseExamples.vcproj b/win/IfcParseExamples.vcproj deleted file mode 100644 index c53313c791..0000000000 --- a/win/IfcParseExamples.vcproj +++ /dev/null @@ -1,195 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/win/IfcWrap.vcproj b/win/IfcWrap.vcproj deleted file mode 100644 index 99a3820186..0000000000 --- a/win/IfcWrap.vcproj +++ /dev/null @@ -1,217 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/win/build-all.cmd b/win/build-all.cmd new file mode 100644 index 0000000000..4f29f0edd3 --- /dev/null +++ b/win/build-all.cmd @@ -0,0 +1,44 @@ +::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: +:: :: +:: 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 . :: +:: :: +::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: + +:: The first argument is assumed to be a CMake generator and it is passed for build-deps, run-cmake, build-ifcopenshell, +:: and install-ifcopenshell. The second argument is assumed to be a build configuration type and it is passed for build-deps, +:: build-ifcopenshell and install-ifcopenshell. The rest of the arguments are passed for run-cmake. +:: Usage example for doing an optimized vs2015-x64 build with debug information and using IFC 4: +:: > build-all.cmd vs2015-x64 RelWithDebInfo -DUSE_IFC4=1 -DENABLE_BUILD_OPTIMIZATIONS=1 + +@echo off + +setlocal EnableDelayedExpansion + +call vs-cfg.cmd %1 +if not %ERRORLEVEL%==0 GOTO :Error +:: Use "yes" trick to break the pause in build-deps.cmd +echo y | call .\build-deps %1 %2 +if not %ERRORLEVEL%==0 goto :EOF +:: Same trick as in run-cmake.bat +set ARGUMENTS=%* +if not (%1)==() call set ARGUMENTS=%%ARGUMENTS:%1=%% +if not (%2)==() call set ARGUMENTS=%%ARGUMENTS:%2=%% +call .\run-cmake %1 %ARGUMENTS% +if not %ERRORLEVEL%==0 goto :EOF +call .\build-ifcopenshell %1 %2 +ECHO %ERRORLEVEL% +if not %ERRORLEVEL%==0 goto :EOF +call .\install-ifcopenshell %1 %2 diff --git a/win/build-deps.cmd b/win/build-deps.cmd new file mode 100644 index 0000000000..324c9cf79d --- /dev/null +++ b/win/build-deps.cmd @@ -0,0 +1,459 @@ +::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: +:: :: +:: 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 batch file expects CMake generator as %1 and build configuration type as %2. If not provided, +:: a deduced generator will be used for %1 and BUILD_CFG_DEFAULT for %2 (both set in vs-cfg.cmd) +:: Optionally a build type (Build/Rebuild/Clean) can be passed as %3. + +@echo off +echo. + +set PROJECT_NAME=IfcOpenShell +call utils\cecho.cmd 15 0 "This script fetches and builds all %PROJECT_NAME% dependencies" +echo. + +:: Enable the delayed environment variable expansion needed in vs-cfg.cmd. +setlocal EnableDelayedExpansion + +:: Make sure vcvarsall.bat is called and dev env set is up. +IF "%VSINSTALLDIR%"=="" ( + call utils\cecho.cmd 0 12 "Visual Studio environment variables not set- cannot proceed." + GOTO :ErrorAndPrintUsage +) + +:: Check for cl.exe - at least the "Typical" Visual Studio 2015 installation does not include the C++ toolset by default, +:: http://blogs.msdn.com/b/vcblog/archive/2015/07/24/setup-changes-in-visual-studio-2015-affecting-c-developers.aspx +where cl.exe 2>&1>NUL +if not %ERRORLEVEL%==0 ( + call utils\cecho.cmd 0 12 "%~nx0: cl.exe not in PATH. Make sure to select the C++ toolset when installing Visual Studio- cannot proceed." + GOTO :ErrorAndPrintUsage +) + +:: Set up variables depending on the used Visual Studio version +call vs-cfg.cmd %1 +IF NOT %ERRORLEVEL%==0 GOTO :Error +call build-type-cfg.cmd %2 +IF NOT %ERRORLEVEL%==0 GOTO :Error + +set BUILD_TYPE=%3 +IF "%BUILD_TYPE%"=="" set BUILD_TYPE=Build + +IF NOT "!BUILD_TYPE!"=="Build" IF NOT "!BUILD_TYPE!"=="Rebuild" IF NOT "!BUILD_TYPE!"=="Clean" ( + call utils\cecho.cmd 0 12 "Invalid build type passed: !BUILD_TYPE!. Cannot proceed, aborting!" + GOTO :Error +) + +:: Make sure deps and install folders exists. +IF NOT EXIST %DEPS_DIR%. mkdir %DEPS_DIR% +IF NOT EXIST %INSTALL_DIR%. mkdir %INSTALL_DIR% + +:: If we use VS2008, framework path (for MSBuild) may not be correctly set. Manually attempt to add in that case +IF %VS_VER%==2008 set PATH=C:\Windows\Microsoft.NET\Framework\v3.5;%PATH% + +:: User-configurable build options +IF NOT DEFINED IFCOS_INSTALL_PYTHON set IFCOS_INSTALL_PYTHON=TRUE +IF NOT DEFINED IFCOS_USE_PYTHON2 set IFCOS_USE_PYTHON2=FALSE +IF NOT DEFINED IFCOS_NUM_BUILD_PROCS set IFCOS_NUM_BUILD_PROCS=%NUMBER_OF_PROCESSORS% + +:: For subroutines +set MSBUILD_CMD=MSBuild.exe /nologo /m:%IFCOS_NUM_BUILD_PROCS% /t:%BUILD_TYPE% +REM /clp:ErrorsOnly;WarningsOnly +:: Note BUILD_TYPE not passed, Clean e.g. wouldn't delete the installed files. +set INSTALL_CMD=MSBuild.exe /nologo /m:%IFCOS_NUM_BUILD_PROCS% + +echo. + +:: Check that required tools are in PATH +FOR %%i IN (powershell git cmake) DO ( + where.exe %%i 1> NUL 2> NUL || call cecho.cmd 0 12 "Required tool `'%%i`' not installed or not added to PATH" && goto :ErrorAndPrintUsage +) + +:: Print build configuration information + +call cecho.cmd 0 10 "Script configuration:" +call cecho.cmd 0 13 "* CMake Generator`t= '`"%GENERATOR%`'`t +echo - Passed to CMake -G option. +call cecho.cmd 0 13 "* Target Architecture`t= %TARGET_ARCH%" +echo - Whether were doing 32-bit (x86) or 64-bit (x64) build. +call cecho.cmd 0 13 "* Dependency Directory`t= %DEPS_DIR%" +echo - The directory where %PROJECT_NAME% dependencies are fetched and built. +call cecho.cmd 0 13 "* Installation Directory = %INSTALL_DIR%" +echo - The directory where %PROJECT_NAME% dependencies are installed. +call cecho.cmd 0 13 "* Build Config Type`t= %BUILD_CFG%" +echo - The used build configuration type for the dependencies. +echo Defaults to RelWithDebInfo if not specified. +IF %BUILD_CFG%==MinSizeRel call cecho.cmd 0 14 " WARNING: MinSizeRel build can suffer from a significant performance loss." +call cecho.cmd 0 13 "* Build Type`t`t= %BUILD_TYPE%" +echo - The used build type for the dependencies (Build, Rebuild, Clean). +echo Defaults to Build if not specified. Rebuild/Clean also uninstalls Python (if it was installed by this script). +call cecho.cmd 0 13 "* IFCOS_INSTALL_PYTHON`t= %IFCOS_INSTALL_PYTHON%" +echo - Download and install Python. +echo Set to something other than TRUE if you wish to use an already installed version of Python. +call cecho.cmd 0 13 "* IFCOS_USE_PYTHON2`t= %IFCOS_USE_PYTHON2%" +echo - Use Python 2 instead of 3. +echo Set to TRUE if you wish to use Python 2 instead of 3. Has no effect if IFCOS_INSTALL_PYTHON is not TRUE. +call cecho.cmd 0 13 "* IFCOS_NUM_BUILD_PROCS`t= %IFCOS_NUM_BUILD_PROCS%" +echo - How many MSBuild.exe processes may be run in parallel. +echo Defaults to NUMBER_OF_PROCESSORS. Used also by other IfcOpenShell build scripts. +echo. + +call :PrintUsage + +call cecho.cmd 0 14 "Warning: You will need roughly 8 GB of disk space to proceed `(VS 2015 x64 RelWithDebInfo`)." +echo. + +call cecho.cmd black cyan "If you are not ready with the above, press Ctrl-C to abort!" + +pause +echo. +set START_TIME=%TIME% +echo Build started at %START_TIME%. +set BUILD_STARTED=TRUE +echo. + +cd %DEPS_DIR% + +:: Note all of the depedencies have approriate label so that user can easily skip something if wanted +:: by modifying this file and using goto. +:Boost +set BOOST_VERSION=1.59.0 +:: DEPENDENCY_NAME is used for logging and DEPENDENCY_DIR for saving from some redundant typing +set DEPENDENCY_NAME=Boost %BOOST_VERSION% +set DEPENDENCY_DIR="%DEPS_DIR%\boost" +:: Version string with underscores instead of dots. +set BOOST_VER=%BOOST_VERSION:.=_% +set BOOST_ROOT=%DEPS_DIR%\boost +REM set BOOST_INCLUDEDIR=%DEPS_DIR%\boost +set BOOST_LIBRARYDIR=%DEPS_DIR%\boost\stage\%VS_PLATFORM%\lib +:: NOTE Also zip download exists, if encountering problems with 7z for some reason. +set ZIP_EXT=7z +set BOOST_ZIP=boost_%BOOST_VER%.%ZIP_EXT% + +call :DownloadFile http://downloads.sourceforge.net/project/boost/boost/%BOOST_VERSION%/%BOOST_ZIP% "%DEPS_DIR%" %BOOST_ZIP% + +IF NOT %ERRORLEVEL%==0 GOTO :Error +call :ExtractArchive %BOOST_ZIP% "%DEPS_DIR%" "%DEPS_DIR%\boost" +IF NOT %ERRORLEVEL%==0 GOTO :Error + +:: Build Boost build script +IF EXIST "%DEPS_DIR%\boost_%BOOST_VER%". ( + cd "%DEPS_DIR%" + ren boost_%BOOST_VER% boost + IF NOT EXIST "%DEPS_DIR%\boost\boost.css" GOTO :Error + cd "%DEPS_DIR%\boost" + call cecho.cmd 0 13 "Building Boost build script." + call bootstrap vc%VC_VER% + IF NOT %ERRORLEVEL%==0 GOTO :Error +) + +set BOOST_LIBS=--with-system --with-regex --with-thread --with-program_options --with-date_time +:: NOTE Boost is fast to build with limited set of libraries so build it always. +cd "%DEPS_DIR%\boost" +call cecho.cmd 0 13 "Building %DEPENDENCY_NAME% %BOOST_LIBS% Please be patient, this will take a while." +IF EXIST "%DEPS_DIR%\boost\bin.v2\project-cache.jam" del "%DEPS_DIR%\boost\bin.v2\project-cache.jam" +call .\b2 toolset=msvc-%VC_VER%.0 runtime-link=static address-model=%ARCH_BITS% -j%IFCOS_NUM_BUILD_PROCS% ^ + variant=%DEBUG_OR_RELEASE_LOWERCASE% %BOOST_LIBS% stage --stagedir=stage/vs%VS_VER%-%VS_PLATFORM% +IF NOT %ERRORLEVEL%==0 GOTO :Error + +:ICU +set DEPENDENCY_NAME=ICU +set DEPENDENCY_DIR=N/A +set ICU_ZIP=icu-55.1-vs%VS_VER%.7z +cd "%DEPS_DIR%" +call :DownloadFile http://www.npcglib.org/~stathis/downloads/%ICU_ZIP% "%DEPS_DIR%" %ICU_ZIP% +IF NOT %ERRORLEVEL%==0 GOTO :Error +call :ExtractArchive %ICU_ZIP% "%DEPS_DIR%" "%INSTALL_DIR%\icu" +IF NOT %ERRORLEVEL%==0 GOTO :Error +:: Rename lib and bin directories to predictable form +IF EXIST "%DEPS_DIR%\icu-55.1-vs%VS_VER%". ( + pushd "%DEPS_DIR%\icu-55.1-vs%VS_VER%" + IF EXIST bin. ren bin bin%ARCH_BITS%" + IF EXIST lib. ren lib lib%ARCH_BITS%" + popd +) + +IF EXIST "%DEPS_DIR%\icu-55.1-vs%VS_VER%\". ( + robocopy "%DEPS_DIR%\icu-55.1-vs%VS_VER%\include" "%INSTALL_DIR%\icu\include" /E /IS /njh /njs + IF NOT EXIST "%INSTALL_DIR%\icu\lib". mkdir "%INSTALL_DIR%\icu\lib" + copy /y "%DEPS_DIR%\icu-55.1-vs%VS_VER%\lib%ARCH_BITS%\sicutest%POSTFIX_D%.lib" "%INSTALL_DIR%\icu\lib\icutest%POSTFIX_D%.lib" + copy /y "%DEPS_DIR%\icu-55.1-vs%VS_VER%\lib%ARCH_BITS%\sicutu%POSTFIX_D%.lib" "%INSTALL_DIR%\icu\lib\icutu%POSTFIX_D%.lib" + copy /y "%DEPS_DIR%\icu-55.1-vs%VS_VER%\lib%ARCH_BITS%\sicuuc%POSTFIX_D%.lib" "%INSTALL_DIR%\icu\lib\icuuc%POSTFIX_D%.lib" + copy /y "%DEPS_DIR%\icu-55.1-vs%VS_VER%\lib%ARCH_BITS%\sicudt%POSTFIX_D%.lib" "%INSTALL_DIR%\icu\lib\icudt%POSTFIX_D%.lib" + copy /y "%DEPS_DIR%\icu-55.1-vs%VS_VER%\lib%ARCH_BITS%\sicuin%POSTFIX_D%.lib" "%INSTALL_DIR%\icu\lib\icuin%POSTFIX_D%.lib" + copy /y "%DEPS_DIR%\icu-55.1-vs%VS_VER%\lib%ARCH_BITS%\sicuio%POSTFIX_D%.lib" "%INSTALL_DIR%\icu\lib\icuio%POSTFIX_D%.lib" + copy /y "%DEPS_DIR%\icu-55.1-vs%VS_VER%\lib%ARCH_BITS%\sicule%POSTFIX_D%.lib" "%INSTALL_DIR%\icu\lib\icule%POSTFIX_D%.lib" + copy /y "%DEPS_DIR%\icu-55.1-vs%VS_VER%\lib%ARCH_BITS%\siculx%POSTFIX_D%.lib" "%INSTALL_DIR%\icu\lib\iculx%POSTFIX_D%.lib" +) + +:OpenCOLLADA +:: Note OpenCOLLADA has only Release and Debug builds. +set DEPENDENCY_NAME=OpenCOLLADA +set DEPENDENCY_DIR=%DEPS_DIR%\OpenCOLLADA +:: Use a fixed revision in order to prevent introducing breaking changes +call :GitCloneAndCheckoutRevision https://github.com/KhronosGroup/OpenCOLLADA.git "%DEPENDENCY_DIR%" 064a60b65c2c31b94f013820856bc84fb1937cc6 +IF NOT %ERRORLEVEL%==0 GOTO :Error +cd "%DEPENDENCY_DIR%" +:: Debug build of OpenCOLLADAValidator fails (https://github.com/KhronosGroup/OpenCOLLADA/issues/377) so +:: so disable it from the build altogether as we have no use for it +findstr #add_subdirectory(COLLADAValidator) CMakeLists.txt>NUL +IF NOT %ERRORLEVEL%==0 git apply --reject --whitespace=fix "%~dp0patches\OpenCOLLADA_CMakeLists.txt.patch" +:: NOTE OpenCOLLADA has been observed to have problems with switching between debug and release builds so +:: uncomment to following line in order to delete the CMakeCache.txt always if experiencing problems. +REM IF EXIST "%DEPENDENCY_DIR%\%BUILD_DIR%\CMakeCache.txt". del "%DEPENDENCY_DIR%\%BUILD_DIR%\CMakeCache.txt" +:: NOTE Enforce that the embedded LibXml2 and PCRE are used as there might be problems with arbitrary versions of the libraries. +call :RunCMake -DCMAKE_INSTALL_PREFIX="%INSTALL_DIR%\OpenCOLLADA" -DUSE_STATIC_MSVC_RUNTIME=1 -DCMAKE_DEBUG_POSTFIX=d ^ + -DLIBXML2_LIBRARIES="" -DLIBXML2_INCLUDE_DIR="" -DPCRE_INCLUDE_DIR="" -DPCRE_LIBRARIES="" +IF NOT %ERRORLEVEL%==0 GOTO :Error +REM IF NOT EXIST "%DEPS_DIR%\OpenCOLLADA\%BUILD_DIR%\lib\%DEBUG_OR_RELEASE%\OpenCOLLADASaxFrameworkLoader.lib". +call :BuildSolution "%DEPENDENCY_DIR%\%BUILD_DIR%\OPENCOLLADA.sln" %DEBUG_OR_RELEASE% +IF NOT %ERRORLEVEL%==0 GOTO :Error +call :InstallCMakeProject "%DEPENDENCY_DIR%\%BUILD_DIR%" %DEBUG_OR_RELEASE% +IF NOT %ERRORLEVEL%==0 GOTO :Error + +:OCE +set DEPENDENCY_NAME=Open CASCADE Community Edition +set DEPENDENCY_DIR=%DEPS_DIR%\oce +call :GitCloneOrPullRepository https://github.com/tpaviot/oce.git "%DEPENDENCY_DIR%" +IF NOT %ERRORLEVEL%==0 GOTO :Error +:: Use the oce-win-bundle for OCE's dependencies +call :GitCloneOrPullRepository https://github.com/QbProg/oce-win-bundle.git "%DEPENDENCY_DIR%\oce-win-bundle" +IF NOT %ERRORLEVEL%==0 GOTO :Error + +cd "%DEPENDENCY_DIR%" +set OCE_BUNDLE_ROOT_PATH="%INSTALL_DIR%\oce-win-bundle" +:: NOTE Specify OCE_NO_LIBRARY_VERSION as rc.exe can fail due to long filenames and huge command-line parameter +:: input (more than 32,000 characters). Could maybe try using subst for the build dir to overcome this. +call :RunCMake -DOCE_BUILD_SHARED_LIB=0 -DOCE_INSTALL_PREFIX="%INSTALL_DIR%\oce" -DOCE_TESTING=0 ^ + -DOCE_NO_LIBRARY_VERSION=1 -DOCE_USE_STATIC_MSVC_RUNTIME=1 +IF NOT %ERRORLEVEL%==0 GOTO :Error +call :BuildSolution "%DEPENDENCY_DIR%\%BUILD_DIR%\OCE.sln" %BUILD_CFG% +IF NOT %ERRORLEVEL%==0 GOTO :Error +call :InstallCMakeProject "%DEPENDENCY_DIR%\%BUILD_DIR%" %BUILD_CFG% +IF NOT %ERRORLEVEL%==0 GOTO :Error + +:Python +:: TODO Update to 3.5 when it's released as it will have an option to install debug libraries. +:: NOTE If updating the default Python version, change PY_VER_MAJOR_MINOR accordingly in run-cmake.bat +set PYTHON_VERSION=3.4.3 +IF "%IFCOS_USE_PYTHON2%"=="TRUE" set PYTHON_VERSION=2.7.10 +set PY_VER_MAJOR_MINOR=%PYTHON_VERSION:~0,3% +set PY_VER_MAJOR_MINOR=%PY_VER_MAJOR_MINOR:.=% +set PYTHONHOME=%INSTALL_DIR%\Python%PY_VER_MAJOR_MINOR% + +set DEPENDENCY_NAME=Python %PYTHON_VERSION% +set DEPENDENCY_DIR=N/A +set PYTHON_AMD64_POSTFIX=.amd64 +:: NOTE/TODO Beginning from 3.5.0: set PYTHON_AMD64_POSTFIX=-amd64 +IF NOT %TARGET_ARCH%==x64 set PYTHON_AMD64_POSTFIX= +set PYTHON_INSTALLER=python-%PYTHON_VERSION%%PYTHON_AMD64_POSTFIX%.msi +:: NOTE/TODO 3.5.0 doesn't use MSI any longer, but exe: set PYTHON_INSTALLER=python-%PYTHON_VERSION%%PYTHON_AMD64_POSTFIX%.exe +IF "%IFCOS_INSTALL_PYTHON%"=="TRUE" ( + REM Store Python versions to BuildDepsCache.txt for run-cmake.bat + echo PY_VER_MAJOR_MINOR=%PY_VER_MAJOR_MINOR%>"%~dp0\BuildDepsCache-%TARGET_ARCH%.txt" + echo PYTHONHOME=%PYTHONHOME%>>"%~dp0\BuildDepsCache-%TARGET_ARCH%.txt" + + cd "%DEPS_DIR%" + call :DownloadFile https://www.python.org/ftp/python/%PYTHON_VERSION%/%PYTHON_INSTALLER% "%DEPS_DIR%" %PYTHON_INSTALLER% + IF NOT %ERRORLEVEL%==0 GOTO :Error + REM Uninstall if build Rebuild/Clean used + IF NOT %BUILD_TYPE%==Build ( + call cecho.cmd 0 13 "Uninstalling %DEPENDENCY_NAME%. Please be patient, this will take a while." + msiexec /x %PYTHON_INSTALLER% /qn + ) + + IF NOT EXIST "%PYTHONHOME%". ( + call cecho.cmd 0 13 "Installing %DEPENDENCY_NAME%. Please be patient, this will take a while." + msiexec /qn /i %PYTHON_INSTALLER% TARGETDIR="%PYTHONHOME%" + ) ELSE ( + call cecho.cmd 0 13 "%DEPENDENCY_NAME% already installed. Skipping." + ) +) ELSE ( + call cecho.cmd 0 13 "IFCOS_INSTALL_PYTHON not true, skipping installation of Python." +) + +:SWIG +set SWIG_VERSION=3.0.7 +set DEPENDENCY_NAME=SWIG %SWIG_VERSION% +set DEPENDENCY_DIR=N/A +set SWIG_ZIP=swigwin-%SWIG_VERSION%.zip +cd "%DEPS_DIR%" +call :DownloadFile http://sourceforge.net/projects/swig/files/swigwin/swigwin-%SWIG_VERSION%/%SWIG_ZIP% "%DEPS_DIR%" %SWIG_ZIP% +IF NOT %ERRORLEVEL%==0 GOTO :Error +call :ExtractArchive %SWIG_ZIP% "%DEPS_DIR%" "%DEPS_DIR%\swigwin" +IF NOT %ERRORLEVEL%==0 GOTO :Error +IF EXIST "%DEPS_DIR%\swigwin-%SWIG_VERSION%". ( + pushd %DEPS% + ren swigwin-%SWIG_VERSION% swigwin + popd +) +IF EXIST "%DEPS_DIR%\swigwin\". robocopy "%DEPS_DIR%\swigwin" "%INSTALL_DIR%\swigwin" /E /IS /MOVE /njh /njs + +:Successful +echo. +call %~dp0\utils\cecho.cmd 0 10 "%PROJECT_NAME% dependencies built." +set IFCOS_SCRIPT_RET=0 +goto :Finish + +:ErrorAndPrintUsage +echo. +call :PrintUsage +:Error +echo. +call %~dp0\utils\cecho.cmd 0 12 "An error occurred! Aborting!" +set IFCOS_SCRIPT_RET=1 +goto :Finish + +:Finish +:: Print end time and elapsed time, http://stackoverflow.com/a/9935540 +if not defined BUILD_STARTED goto :BuildTimeSkipped +set END_TIME=%TIME% +for /F "tokens=1-4 delims=:.," %%a in ("%START_TIME%") do ( + set /A "start=(((%%a*60)+1%%b %% 100)*60+1%%c %% 100)*100+1%%d %% 100" +) +for /F "tokens=1-4 delims=:.," %%a in ("%END_TIME%") do ( + set /A "end=(((%%a*60)+1%%b %% 100)*60+1%%c %% 100)*100+1%%d %% 100" +) +set /A elapsed=end-start +set /A hh=elapsed/(60*60*100), rest=elapsed%%(60*60*100), mm=rest/(60*100), rest%%=60*100, ss=rest/100, cc=rest%%100 +if %mm% lss 10 set mm=0%mm% +if %ss% lss 10 set ss=0%ss% +if %cc% lss 10 set cc=0%cc% +echo. +echo Build ended at %END_TIME%. Time elapsed %hh%:%mm%:%ss%.%cc%. +:BuildTimeSkipped +set PATH=%ORIGINAL_PATH% +cd %~dp0 +exit /b %IFCOS_SCRIPT_RET% + +::::::::::::::::::::::::::::::::::::: Subroutines ::::::::::::::::::::::::::::::::::::: + +:: DownloadFile - Downloads a file using wget +:: Params: %1 url, %2 destinationDir, %3 filename +:DownloadFile +pushd %2 +IF NOT EXIST "%3". ( + call cecho.cmd 0 13 "Downloading %DEPENDENCY_NAME% into %2." + powershell -Command "$webClient = new-object System.Net.WebClient; $webClient.DownloadFile('%1', '%3')" + REM Old wget version in case someone has problem with PowerShell: wget --no-check-certificate %1 +) ELSE ( + call cecho.cmd 0 13 "%DEPENDENCY_NAME% already downloaded. Skipping." +) +set RET=%ERRORLEVEL% +popd +exit /b %RET% + +:: ExtractArchive - Extracts an archive file using 7-zip +:: Params: %1 filename, %2 destinationDir, %3 dirAfterExtraction +:ExtractArchive +IF NOT EXIST "%3". ( + call cecho.cmd 0 13 "Extracting %DEPENDENCY_NAME% into %2." + 7za x %1 -y -o%2 +) ELSE ( + call cecho.cmd 0 13 "%DEPENDENCY_NAME% already extracted into %3. Skipping." +) +exit /b %ERRORLEVEL% + +:: GitCloneOrPullRepository - Clones or pulls (if repository already cloned) a Git repository +:: Params: %1 gitUrl, %2 destDir +:: F.ex. call :GitCloneRepository https://github.com/KhronosGroup/OpenCOLLADA.git "%DEPS_DIR%\OpenCOLLADA\" +:GitCloneOrPullRepository +IF NOT EXIST %2. ( + call cecho.cmd 0 13 "Cloning %DEPENDENCY_NAME% into %2." + pushd "%DEPS_DIR%" + call git clone %1 %2 + set RET=%ERRORLEVEL% +) ELSE ( + call cecho.cmd 0 13 "%DEPENDENCY_NAME% already cloned. Pulling latest changes." + pushd %2 + call git pull + set RET=0 +) +popd +exit /b %RET% + +:: GitCloneAndCheckoutRevision - Clones a Git repository and checks out a specific revision +:: Params: %1 gitUrl, %2 destDir, %3 revision +:: F.ex. call :GitCloneAndCheckoutRevision https://github.com/KhronosGroup/OpenCOLLADA.git "%DEPENDENCY_DIR%" 064a60b65c2c31b94f013820856bc84fb1937cc6 +:GitCloneAndCheckoutRevision +IF NOT EXIST "%2". ( + call cecho.cmd 0 13 "Cloning %DEPENDENCY_NAME% into %2." + pushd "%DEPS_DIR%" + call git clone %1 %2 + set RET=%ERRORLEVEL% + if not %RET%==0 exit /b %RET% + popd +) ELSE ( + call cecho.cmd 0 13 "%DEPENDENCY_NAME% already cloned." + set RET=0 +) +pushd "%2" +call cecho.cmd 0 13 "Checking out %DEPENDENCY_NAME% revision %3." +call git checkout %3 +set RET=%ERRORLEVEL% +popd +exit /b %RET% + +:: RunCMake - Runs CMake for a CMake-based project +:: Params: %* cmakeOptions +:: NOTE cd to root CMakeLists.txt folder before calling this if the CMakeLists.txt is not in the repo root. +:RunCMake +call cecho.cmd 0 13 "Running CMake for %DEPENDENCY_NAME%." +IF NOT EXIST %BUILD_DIR%. mkdir %BUILD_DIR% +IF NOT %ERRORLEVEL%==0 GOTO :Error +pushd %BUILD_DIR% +:: TODO make deleting cache a parameter for this subroutine? We probably want to delete the +:: cache always e.g. when we've had new changes in the repository. +IF %BUILD_TYPE%==Rebuild IF EXIST CMakeCache.txt. del CMakeCache.txt +cmake .. -G %GENERATOR% %* +set RET=%ERRORLEVEL% +popd +exit /b %RET% + +:: BuildSolution - Builds/Rebuilds/Cleans a solution using MSBuild +:: Params: %1 solutioName, %2 configuration +:BuildSolution +call cecho.cmd 0 13 "%BUILD_TYPE%ing %2 %DEPENDENCY_NAME%. Please be patient, this will take a while." +%MSBUILD_CMD% %1 /p:configuration=%2;platform=%VS_PLATFORM% +exit /b %ERRORLEVEL% + +:: InstallCMakeProject - Builds the INSTALL project of CMake-based project +:: Params: %1 buildDir, %2 == configuration +:: NOTE the actual install dir is set during cmake run. +:InstallCMakeProject +pushd %1 +call cecho.cmd 0 13 "Installing %2 %DEPENDENCY_NAME%. Please be patient, this will take a while." +%INSTALL_CMD% INSTALL.%VCPROJ_FILE_EXT% /p:configuration=%2;platform=%VS_PLATFORM% +set RET=%ERRORLEVEL% +popd +exit /b %RET% + +:: PrintUsage - Prints usage information +:PrintUsage +call %~dp0\utils\cecho.cmd 0 10 "Requirements for a successful execution:" +echo 1. Install PowerShell (preinstalled in Windows ^>= 7) and make sure 'powershell' is accessible from PATH. +echo - https://support.microsoft.com/en-us/kb/968929 +echo 2. Install Git and make sure 'git' is accessible from PATH. +echo - http://code.google.com/p/tortoisegit/ +echo 3. Install CMake and make sure 'cmake' is accessible from PATH. +echo - http://www.cmake.org/ +echo 4. Visual Studio 2008 or newer (2013 or newer recommended) with C++ toolset. +echo - https://www.visualstudio.com/ +echo 5. Run this batch script with Visual Studio environment variables set. +echo - https://msdn.microsoft.com/en-us/library/ms229859(v=vs.110).aspx +echo. diff --git a/win/build-ifcopenshell.cmd b/win/build-ifcopenshell.cmd new file mode 100644 index 0000000000..632b768dfd --- /dev/null +++ b/win/build-ifcopenshell.cmd @@ -0,0 +1,56 @@ +::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: +:: :: +:: 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 batch file expects CMake generator as %1 and build configuration type as %2. If not provided, +:: a deduced generator will be used for %1 and BUILD_CFG_DEFAULT for %2 (both set in vs-cfg.cmd) +:: Possible extra parameters are passed for the MSBuild call. + +@echo off +set PROJECT_NAME=IfcOpenShell +echo. + +:: Enable the delayed environment variable expansion needed in VSConfig.cmd. +setlocal EnableDelayedExpansion +call vs-cfg.cmd %1 +IF NOT %ERRORLEVEL%==0 GOTO :Error +call build-type-cfg.cmd %2 +IF NOT %ERRORLEVEL%==0 GOTO :Error + +echo. +IF "%IFCOS_NUM_BUILD_PROCS%"=="" set IFCOS_NUM_BUILD_PROCS=%NUMBER_OF_PROCESSORS% +call cecho.cmd 0 13 "* IFCOS_NUM_BUILD_PROCS`t= %IFCOS_NUM_BUILD_PROCS%" +echo. + +call cecho.cmd 0 13 "Building %VS_PLATFORM% %BUILD_CFG% %PROJECT_NAME%" +MSBuild ..\%BUILD_DIR%\%PROJECT_NAME%.sln /nologo /m:%IFCOS_NUM_BUILD_PROCS% /p:Platform=%VS_PLATFORM% ^ + /p:Configuration=%BUILD_CFG% %3 %4 %5 %6 %7 %8 %9 +IF NOT %ERRORLEVEL%==0 GOTO :Error + +echo. +call cecho.cmd 0 10 "%VS_PLATFORM% %BUILD_CFG% %PROJECT_NAME% build finished." +set IFCOS_SCRIPT_RET=0 +goto :End + +:Error +echo. +call %~dp0\utils\cecho.cmd 0 12 "%VS_PLATFORM% %BUILD_CFG% %PROJECT_NAME% build failed!" +set IFCOS_SCRIPT_RET=1 + +:End +exit /b %IFCOS_SCRIPT_RET% diff --git a/win/build-type-cfg.cmd b/win/build-type-cfg.cmd new file mode 100644 index 0000000000..acb75d64ad --- /dev/null +++ b/win/build-type-cfg.cmd @@ -0,0 +1,60 @@ +::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: +:: :: +:: 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 script initializes various CMake build configuration type related variables. +:: This batch file expects CMake build configuration type as %1. + +@echo off + +:: Set up variables depending on the used build configuration type. +set BUILD_CFG=%1 + +:: The default build types provided by CMake +set BUILD_CFG_MINSIZEREL=MinSizeRel +set BUILD_CFG_RELEASE=Release +set BUILD_CFG_RELWITHDEBINFO=RelWithDebInfo +set BUILD_CFG_DEBUG=Debug +set BUILD_CFG_DEFAULT=%BUILD_CFG_RELWITHDEBINFO% + +IF "!BUILD_CFG!"=="" ( + set BUILD_CFG=%BUILD_CFG_DEFAULT% + call utils\cecho.cmd 0 14 "%~nx0: Warning: BUILD_CFG not specified - using the default %BUILD_CFG_DEFAULT%" +) +IF NOT !BUILD_CFG!==%BUILD_CFG_MINSIZEREL% IF NOT !BUILD_CFG!==%BUILD_CFG_RELEASE% ( +IF NOT !BUILD_CFG!==%BUILD_CFG_RELWITHDEBINFO% IF NOT !BUILD_CFG!==%BUILD_CFG_DEBUG% ( + call utils\cecho.cmd 0 12 "%~nx0: Invalid or unsupported CMake build configuration type passed: !BUILD_CFG!. Cannot proceed." + exit /b 1 +)) + +:: DEBUG_OR_RELEASE and DEBUG_OR_RELEASE_LOWERCASE are "Debug" and "debug" for Debug build and "Release" and +:: "release" for all of the Release variants. +:: POSTFIX_D, POSTFIX_UNDERSCORE_D and POSTFIX_UNDERSCORE_DEBUG are helpers for performing file copies and +:: checking for existence of files. In release build these variables are empty. +set DEBUG_OR_RELEASE=Release +set DEBUG_OR_RELEASE_LOWERCASE=release +set POSTFIX_D= +set POSTFIX_UNDERSCORE_D= +set POSTFIX_UNDERSCORE_DEBUG= +IF %BUILD_CFG%==Debug ( + set DEBUG_OR_RELEASE=Debug + set DEBUG_OR_RELEASE_LOWERCASE=debug + set POSTFIX_D=d + set POSTFIX_UNDERSCORE_D=_d + set POSTFIX_UNDERSCORE_DEBUG=_debug +) diff --git a/win/install-ifcopenshell.cmd b/win/install-ifcopenshell.cmd new file mode 100644 index 0000000000..571461dd2b --- /dev/null +++ b/win/install-ifcopenshell.cmd @@ -0,0 +1,56 @@ +::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: +:: :: +:: 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 batch file expects CMake generator as %1 and build configuration type as %2. If not provided, +:: a deduced generator will be used for %1 and BUILD_CFG_DEFAULT for %2 (both set in vs-cfg.cmd) +:: Possible extra parameters are passed for the MSBuild call. + +@echo off +set PROJECT_NAME=IfcOpenShell +echo. + +:: Enable the delayed environment variable expansion needed in VSConfig.cmd. +setlocal EnableDelayedExpansion +call vs-cfg.cmd %1 +IF NOT %ERRORLEVEL%==0 GOTO :Error +call build-type-cfg.cmd %2 +IF NOT %ERRORLEVEL%==0 GOTO :Error + +echo. +IF "%IFCOS_NUM_BUILD_PROCS%"=="" set IFCOS_NUM_BUILD_PROCS=%NUMBER_OF_PROCESSORS% +call cecho.cmd 0 13 "* IFCOS_NUM_BUILD_PROCS`t= %IFCOS_NUM_BUILD_PROCS%" +echo. + +call cecho.cmd 0 13 "Installing %VS_PLATFORM% %BUILD_CFG% %PROJECT_NAME%" +MSBuild ..\%BUILD_DIR%\INSTALL.%VCPROJ_FILE_EXT% /nologo /m:%IFCOS_NUM_BUILD_PROCS% /p:Platform=%VS_PLATFORM% ^ + /p:Configuration=%BUILD_CFG% %3 %4 %5 %6 %7 %8 %9 +IF NOT %ERRORLEVEL%==0 GOTO :Error + +echo. +call cecho.cmd 0 10 "%VS_PLATFORM% %BUILD_CFG% %PROJECT_NAME% installation finished." +set IFCOS_SCRIPT_RET=0 +goto :End + +:Error +echo. +call %~dp0\utils\cecho.cmd 0 12 "%VS_PLATFORM% %BUILD_CFG% %PROJECT_NAME% installation failed!" +set IFCOS_SCRIPT_RET=1 + +:End +exit /b %IFCOS_SCRIPT_RET% diff --git a/win/patches/OpenCOLLADA_CMakeLists.txt.patch b/win/patches/OpenCOLLADA_CMakeLists.txt.patch new file mode 100644 index 0000000000..bdb33edbf4 --- /dev/null +++ b/win/patches/OpenCOLLADA_CMakeLists.txt.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 9e28557..7549c16 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -271,7 +271,7 @@ add_subdirectory(COLLADASaxFrameworkLoader) + add_subdirectory(COLLADAStreamWriter) + + # building COLLADAValidator app +-add_subdirectory(COLLADAValidator) ++#add_subdirectory(COLLADAValidator) + + + # Library export diff --git a/win/readme.md b/win/readme.md new file mode 100644 index 0000000000..80a044371a --- /dev/null +++ b/win/readme.md @@ -0,0 +1,87 @@ +Windows Build Tools and Scripts +=============================== +This folder contains build tools and script for automatic building and deployment of IfcOpenShell (IFCOS) +and its dependencies. + +As a general guideline, `.cmd` files are non-standalone batch files that need to be run from command +prompt or from another batch file, and/or while the Visual Studio environment variables set, and `.bat` files are +standalone batch files that can be run also e.g. from the File Explorer. + +Usage Instructions +------------------ +Execute `build-deps.cmd` to fetch, build and install the dependencies. The batch file will print +the requirements for a successful execution. The script allows a few user-configurable build options +which are listed in the usage instructions. Either edit the script file or set these values before +running the script. + +`build-deps.cmd` expects a CMake generator as `%1` and a build configuration type (`RelWithDebInfo/Release/MinSizeRel/Debug`, +defaults to `RelWithDebInfo`) as `%2`. If the generator is not provided, the generator is deduced from the Visual Studio +environment variables. User-friendly VS generator shorthands are supported, e.g. `vs2013-x86` or `vs2015-x64`, and these are +converted to the appropriate CMake ones by the scripts. A build type (`Build/Rebuild/Clean`, defaults to `Build`) can be +provided as `%3`. See `vs-cfg.cmd` if you wish to change the defaults. The batch file will create `deps\` and +`deps-vs--installed\` directories to the project root. Debug and release builds of the depedencies +can co-exist by simply running `build-deps.cmd Debug` and `build-deps.cmd `. + +After the dependencies are build, execute `run-cmake.bat`. The batch file expects always a CMake generator as `%1` +(if not provided, the same default value as above is used), and the rest of possible parameters are passed as is. +If passing build options for the script, the generator must be always passed as the first option: +``` +> run-cmake.bat vs2015-x64 -DUSE_IFC4=1 -DBUILD_IFCPYTHON=0 +``` + +**If you wish to use any library from a custom location, modify the paths in `run-cmake.bat` accordingly**. The batch +script will create a folder of form `build-vs-\` which will contain the solution and project +files for Visual Studio. + +Note that building IfcOpenShell as 64-bit is recommended as many of real life IFC files has been observed to take +easily more than 2 GBs of RAM while converting. + +After this, one can build the project using the `IfcOpenShell.sln` file in the build folder. Build the `INSTALL` project +if wanted. Convenience batch files `build-ifcopenshell.cmd` and `install-ifcopenshell.cmd` can also be used. The batch files +expect `%1` and `%2` in same fashion as above and possible extra parameters are passed for the `MSBuild` call. The project will +be installed to `installed-vs-\` folder in the project's root folder and the required IfcOpenShell-Python +parts are deployed to the `\Lib\site-packages\` folder. The 3ds Max plug-in, IfcMax.dli, needs to be copied manually +to the 3ds Max's `plugins` folder. + +**Note:** All of the dependencies are build as static libraries against the static run-time allowing the developer +to effortlessly deploy standalone IFCOS binaries. + +Using an already existing Python installation +--------------------------------------------- + +Let's say you have already installed 64-bit Python 3.5.1 to `C:\Python3`. +Before building the dependencies, disable the script from installing Python: +``` +> set IFCOS_INSTALL_PYTHON=FALSE +> buid-deps.cmd +``` + +After bulding the dependencies, create BuildDepsCache file to `IfcOpenShell\win` which tells the used Python version and intallation directory: +``` +> echo PY_VER_MAJOR_MINOR=35> BuildDepsCache-x64.txt +> echo PYTHONHOME=C:\Python3>> BuildDepsCache-x64.txt +``` + +After this you should be able to run `run-cmake.bat` normally. If using 32-bit Python, the name of the file must be `BuildDepsCache-x86.txt`. + +Directory Structure +------------------ +``` +.. ++---build-vs- - Created by run-cmake.bat, for a certain VS version and target architecture ++---deps - Created by build-deps.cmd, common for all VS versions and target architectures ++---deps-installed-vs- - Created by build-deps.cmd, for a certain VS version and target architecture ++---installed-vs- - Created by building the IFCOS's INSTALL project +\---win +| build-all.cmd - Runs all of the build scripts for IFCOS and it dependencies in a row without pauses +| build-deps.cmd - Fetches and builds all needed dependencies for IFCOS +| BuildDepsCache-.txt - Cache file created by build-deps.cmd +| build-ifcopenshell.cmd - Builds IFCOS +| build-type-cfg.cmd - Utility file used by the build scripts +| install-ifcopenshell.cmd - Builds IFCOS's INSTALL project +| readme.md - This file +| run-cmake.bat - Sets environment variables for the dependencies and runs CMake for IFCOS +| set-python-to-path.bat - Utility for setting PYTHONHOME (read from BuildDepsCache-.txt) to PATH +| vs-cfg.cmd - Utility file used by the build scripts +\---utils - Contains various utilities for the build scripts +``` diff --git a/win/run-cmake.bat b/win/run-cmake.bat new file mode 100644 index 0000000000..e29fd6dd65 --- /dev/null +++ b/win/run-cmake.bat @@ -0,0 +1,108 @@ +::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: +:: :: +:: 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 . :: +:: :: +::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: + +@echo off +echo. + +set PROJECT_NAME=IfcOpenShell + +setlocal EnableDelayedExpansion + +call vs-cfg.cmd %1 +IF NOT %ERRORLEVEL%==0 GOTO :Error +:: As CMake options are typically of format -DSOMETHING:BOOL=ON or -DSOMETHING=1, i.e. they contain an equal sign, +:: they will mess up the batch file argument parsing if the arguments are passed on by splitting them %2 %3 %4 %5 +:: %6 %7 %8 %9. Work around that, http://scripts.dragon-it.co.uk/scripts.nsf/docs/batch-search-replace-substitute +if not (%1)==() ( + set ARGUMENTS=%* + call set ARGUMENTS=%%ARGUMENTS:%1=%% +) + +:: Read Python related variables from BuildDepsCache.txt +for /f "delims== tokens=1,2" %%G in (BuildDepsCache-%TARGET_ARCH%.txt) do set %%G=%%H + +pushd .. +set CMAKE_INSTALL_PREFIX=%CD%\installed-vs%VS_VER%-%TARGET_ARCH% +popd + +IF NOT EXIST ..\%BUILD_DIR%. mkdir ..\%BUILD_DIR% +pushd ..\%BUILD_DIR% + +set BOOST_ROOT=%DEPS_DIR%\boost +set BOOST_LIBRARYDIR=%DEPS_DIR%\boost\stage\vs%VS_VER%-%VS_PLATFORM%\lib +set ICU_INCLUDE_DIR=%INSTALL_DIR%\icu\include +set ICU_LIBRARY_DIR=%INSTALL_DIR%\icu\lib +set OCC_INCLUDE_DIR=%INSTALL_DIR%\oce\include\oce +set OCC_LIBRARY_DIR=%INSTALL_DIR%\oce\Win%ARCH_BITS%\lib +set OPENCOLLADA_INCLUDE_DIR=%INSTALL_DIR%\OpenCOLLADA\include\opencollada +set OPENCOLLADA_LIBRARY_DIR=%INSTALL_DIR%\OpenCOLLADA\lib\opencollada +if not defined PY_VER_MAJOR_MINOR set PY_VER_MAJOR_MINOR=34 +if not defined PYTHONHOME set PYTHONHOME=%INSTALL_DIR%\Python%PY_VER_MAJOR_MINOR% +set PYTHON_INCLUDE_DIR=%PYTHONHOME%\include +set PYTHON_LIBRARY=%PYTHONHOME%\libs\python%PY_VER_MAJOR_MINOR%.lib +set PYTHON_EXECUTABLE=%PYTHONHOME%\python.exe +set SWIG_DIR=%INSTALL_DIR%\swigwin +set PATH=%PATH%;%SWIG_DIR%;%PYTHONHOME% +set THREEDS_MAX_SDK_HOME=C:\Program Files\Autodesk\3ds Max 2016 SDK\maxsdk + +echo. +call cecho.cmd 0 10 "Script configuration:" +echo Generator = %GENERATOR% +echo Arguments = %ARGUMENTS% +echo. +call cecho.cmd 0 10 "Dependency Environment Variables for %PROJECT_NAME%:" +echo BOOST_ROOT = %BOOST_ROOT% +echo BOOST_LIBRARYDIR = %BOOST_LIBRARYDIR% +echo ICU_INCLUDE_DIR = %ICU_INCLUDE_DIR% +echo ICU_LIBRARY_DIR = %ICU_LIBRARY_DIR% +echo OCC_INCLUDE_DIR = %OCC_INCLUDE_DIR% +echo OCC_LIBRARY_DIR = %OCC_LIBRARY_DIR% +echo OPENCOLLADA_INCLUDE_DIR = %OPENCOLLADA_INCLUDE_DIR% +echo OPENCOLLADA_LIBRARY_DIR = %OPENCOLLADA_LIBRARY_DIR% +echo PYTHONHOME = %PYTHONHOME% +echo PYTHON_INCLUDE_DIR = %PYTHON_INCLUDE_DIR% +echo PYTHON_LIBRARY = %PYTHON_LIBRARY% +echo PYTHON_EXECUTABLE = %PYTHON_EXECUTABLE% +echo SWIG_DIR = %SWIG_DIR% +echo THREEDS_MAX_SDK_HOME = %THREEDS_MAX_SDK_HOME% +echo. +echo CMAKE_INSTALL_PREFIX = %CMAKE_INSTALL_PREFIX% +echo. + +set CMAKELISTS_DIR=..\cmake +:: For now clear CMakeCache.txt always in order to assure that when changing build options everything goes smoothly. +IF EXIST CMakeCache.txt. del /Q CMakeCache.txt +call cecho.cmd 0 13 "Running CMake for %PROJECT_NAME%." +cmake.exe %CMAKELISTS_DIR% -G %GENERATOR% -DCMAKE_INSTALL_PREFIX="%CMAKE_INSTALL_PREFIX%" %ARGUMENTS% +IF NOT %ERRORLEVEL%==0 GOTO :Error + +echo. + +set IFCOS_SCRIPT_RET=0 +goto :Finish + +:Error +echo. +call %~dp0\utils\cecho.cmd 0 12 "An error occurred! Aborting!" +set IFCOS_SCRIPT_RET=1 +goto :Finish + +:Finish +popd +exit /b %IFCOS_SCRIPT_RET% diff --git a/win/set-python-to-path.bat b/win/set-python-to-path.bat new file mode 100644 index 0000000000..b9f225be7a --- /dev/null +++ b/win/set-python-to-path.bat @@ -0,0 +1,36 @@ +::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: +:: :: +:: 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 . :: +:: :: +::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: + +:: Pass x86 or x64 as %1, if not specified x64 assumed. + +@echo off +set TARGET_ARCH=%1 +if "%TARGET_ARCH%"=="" set TARGET_ARCH=x64 +if not exist BuildDepsCache-%TARGET_ARCH%.txt. ( + echo BuildDepsCache-%TARGET_ARCH%.txt does not exist + goto :EOF +) +for /f "delims== tokens=1,2" %%G in (BuildDepsCache-%TARGET_ARCH%.txt) do set %%G=%%H +if not defined PYTHONHOME ( + echo PYTHONHOME PYTHONHOME not defined + goto :EOF +) + +echo %PYTHONHOME% set to PATH +set PATH=%PYTHONHOME%;%PATH% diff --git a/win/utils/7za.exe b/win/utils/7za.exe new file mode 100644 index 0000000000..7f6bf86bc4 Binary files /dev/null and b/win/utils/7za.exe differ diff --git a/win/utils/cecho.cmd b/win/utils/cecho.cmd new file mode 100644 index 0000000000..2923fcb986 --- /dev/null +++ b/win/utils/cecho.cmd @@ -0,0 +1,4 @@ +:: Usage: call cecho.cmd background foreground "message here" +:: NOTES/TODOS 1) This is super slow 2) leading spaces are omitted 3) printing string with quotes doesn't work (quotes must be escaped awkwardly) +@powershell -command write-host -background %~1 -foreground "%~2" "%3" +@exit /b diff --git a/win/utils/license.txt b/win/utils/license.txt new file mode 100644 index 0000000000..530ff3684d --- /dev/null +++ b/win/utils/license.txt @@ -0,0 +1,29 @@ + 7-Zip Command line version + ~~~~~~~~~~~~~~~~~~~~~~~~~~ + License for use and distribution + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + 7-Zip Copyright (C) 1999-2010 Igor Pavlov. + + 7za.exe is distributed under the GNU LGPL license + + Notes: + You can use 7-Zip on any computer, including a computer in a commercial + organization. You don't need to register or pay for 7-Zip. + + + GNU LGPL information + -------------------- + + This library 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 2.1 of the License, or (at your option) any later version. + + This library 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 can receive a copy of the GNU Lesser General Public License from + http://www.gnu.org/ diff --git a/win/vs-cfg.cmd b/win/vs-cfg.cmd new file mode 100644 index 0000000000..92c0a1217d --- /dev/null +++ b/win/vs-cfg.cmd @@ -0,0 +1,168 @@ +::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: +:: :: +:: 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 script initializes various Visual Studio related environment variables needed for building. +:: the dependencies. This batch file expects a CMake generator as %1. If %1 is not provided, it is +:: deduced from the VisualStudioVersion environment variable and from the location of cl.exe. +:: User-friendly VS generators are allowed (e.g. "vs2013-x86") and converted to the appropriate CMake ones. + +:: NOTE This batch file expects the generator string to be CMake 3.0.0 and newer format, i.e. +:: "Visual Studio 10 2010" instead of "Visual Studio 10". However, one can use this batch file +:: also with CMake 2 as the generator will be converted into the older format if necessary. + +:: NOTE: The delayed environment variable expansion needs to be enabled before calling this. + +@echo off + +set GENERATOR=%1 + +:: Supported Visual Studio versions: +set GENERATORS[0]="Visual Studio 9 2008 Win64" +set GENERATORS[1]="Visual Studio 9 2008" +set GENERATORS[2]="Visual Studio 10 2010 Win64" +set GENERATORS[3]="Visual Studio 10 2010" +set GENERATORS[4]="Visual Studio 11 2012 Win64" +set GENERATORS[5]="Visual Studio 11 2012" +set GENERATORS[6]="Visual Studio 12 2013 Win64" +set GENERATORS[7]="Visual Studio 12 2013" +set GENERATORS[8]="Visual Studio 14 2015 Win64" +set GENERATORS[9]="Visual Studio 14 2015" +set LAST_GENERATOR_IDX=9 + +set STEP=2 +:: Is generator shorthand used? +set GEN_SHORTHAND=!GENERATOR:vs=! +if not "!GEN_SHORTHAND!"=="" if !GEN_SHORTHAND!==!GENERATOR! goto :GeneratorShorthandCheckDone +set START=%LAST_GENERATOR_IDX% +:: "echo if" trick from http://stackoverflow.com/a/8758579 +echo(!GEN_SHORTHAND! | findstr /c:"-x86" >nul && ( set START=1 ) +echo(!GEN_SHORTHAND! | findstr /c:"-x64" >nul && ( set START=0 ) +set VS_VER=!GEN_SHORTHAND:-x86=! +set VS_VER=!VS_VER:-x64=! +echo(!GENERATOR! | findstr /c:"vs20" >nul && ( + for /l %%i in (!START!,!STEP!,%LAST_GENERATOR_IDX%) do ( + echo(!GENERATORS[%%i]! | findstr /c:"!VS_VER!" >nul && ( + set GENERATOR=!GENERATORS[%%i]! + goto :GeneratorShorthandCheckDone + ) + ) +) +:GeneratorShorthandCheckDone + +:: Deduce desired architecture from the location of cl.exe +where cl.exe | findstr /c:"amd64" >nul +set START=%ERRORLEVEL% + +IF "!GENERATOR!"=="" IF NOT "%VisualStudioVersion%"=="" ( + set VC_VER=%VisualStudioVersion:.0=% + FOR /l %%i in (%START%,%STEP%,%LAST_GENERATOR_IDX%) DO ( + REM NOTE add space before VC_VER so that e.g. "12" doesn't match with "2012" + echo(!GENERATORS[%%i]! | findstr /c:" !VC_VER!" >nul && ( + set GENERATOR=!GENERATORS[%%i]! + call utils\cecho.cmd black cyan "Generator not passed, but VisualStudioVersion=%VisualStudioVersion% environment variable detected:" + call utils\cecho.cmd black cyan "using '`"!GENERATOR!`'" as the generator." + GOTO :GeneratorValid + ) + ) +) +:: Check that the used CMake version supports the chosen generator +set GENERATOR_CHECK=%GENERATOR: Win64=% +cmake --help | findstr /c:%GENERATOR_CHECK% >nul +if not %ERRORLEVEL%==0 ( +call utils\cecho.cmd 0 12 "%~nx0: The used CMake version does not support '`"!GENERATOR!`'"- cannot proceed." +exit /b 1 +) + +FOR /l %%i in (0,1,%LAST_GENERATOR_IDX%) DO ( + IF !GENERATOR!==!GENERATORS[%%i]! GOTO :GeneratorValid +) +call utils\cecho.cmd 0 12 "%~nx0: Invalid or unsupported CMake generator string passed: '`"!GENERATOR!`'"- cannot proceed." +echo Supported CMake generator strings: +FOR /l %%i in (0,1,%LAST_GENERATOR_IDX%) DO ( + echo !GENERATORS[%%i]! +) +exit /b 1 + +:GeneratorValid +:: Figure out the build configuration from the CMake generator string. +:: Are we building 32-bit or 64-bit version. +set ARCH_BITS=32 +set TARGET_ARCH=x86 +:: Visual Studio platform name, Win32 (i.e. x86) or x64. +set VS_PLATFORM=Win32 + +:: Find out VS version, VC versions and are we doing 64-bit or not. +:: VS_VER and VC_VER are convenience variables used f.ex. for filenames. +set GENERATOR_NO_DOUBLEQUOTES=%GENERATOR:"=% +set GENERATOR_SPLIT=%GENERATOR_NO_DOUBLEQUOTES: =,% +FOR %%i IN (%GENERATOR_SPLIT%) DO ( + call :StrLength LEN %%i + IF !LEN!==1 set VC_VER=%%i + IF !LEN!==2 set VC_VER=%%i + IF !LEN!==4 set VS_VER=%%i + REM Are going to perform a 64-bit build? + IF %%i==Win64 ( + set ARCH_BITS=64 + set TARGET_ARCH=x64 + set VS_PLATFORM=x64 + ) +) + +:: Check CMake version and convert possible new format (>= 3.0) generator names to the old versions if using older CMake for VS <= 2013, +:: see http://www.cmake.org/cmake/help/v3.0/release/3.0.0.html#other-changes +FOR /f "delims=" %%i in ('where cmake') DO set CMAKE_PATH=%%i +IF NOT "%CMAKE_PATH%"=="" ( + FOR /f "delims=" %%i in ('cmake --version ^| findstr /C:"cmake version 3"') DO GOTO :CMake3AndNewer +) +:: CMake older than 3.0.0: convert new format generators to the old format (simple brute force for simplicity) +set GENERATOR=%GENERATOR: 2013=% +set GENERATOR=%GENERATOR: 2012=% +set GENERATOR=%GENERATOR: 2010=% +:CMake3AndNewer + +:: VS project file extension is different on older VS versions +set VCPROJ_FILE_EXT=vcxproj +IF %VS_VER%==2008 set VCPROJ_FILE_EXT=vcproj + +:: Add utils to PATH +set ORIGINAL_PATH=%PATH% +set PATH=%PATH%;%~dp0utils + +:: Fetch and build the dependencies to a dedicated directory depending on the used VS version and target architecture. +:: NOTE For IfcOpenShell we can build all of our deps both x86 and x64 using different VS versions in the same directories +:: so no need for -%VS_VER%-%TARGET_ARCH% postfix. +:: set DEPS_DIR=%CD%\deps-%VS_VER%-%TARGET_ARCH% +pushd .. +set DEPS_DIR=%CD%\deps +set INSTALL_DIR=%CD%\deps-vs%VS_VER%-%TARGET_ARCH%-installed +REM set INSTALL_DIR=%CD%\deps-vs%VS_VER%-%TARGET_ARCH%-%DEBUG_OR_RELEASE_LOWERCASE%-installed +:: BUILD_DIR is a relative build directory used for CMake-based projects +set BUILD_DIR=build-vs%VS_VER%-%TARGET_ARCH% +popd + +GOTO :EOF +:: http://geekswithblogs.net/SoftwareDoneRight/archive/2010/01/30/useful-dos-batch-functions-substring-and-length.aspx +:StrLength +set #=%2% +set length=0 +:stringLengthLoop +if defined # (set #=%#:~1%&set /A length += 1&goto stringLengthLoop) +::echo the string is %length% characters long! +set "%~1=%length%" +GOTO :EOF \ No newline at end of file