浏览代码

Merge branch 'master' of https://github.com/assimp/assimp

Marco Di Benedetto 7 年之前
父节点
当前提交
55ca48e838
共有 100 个文件被更改,包括 672 次插入609 次删除
  1. 1 1
      Readme.md
  2. 1 1
      code/3DSConverter.cpp
  3. 1 1
      code/3DSExporter.cpp
  4. 1 1
      code/3DSExporter.h
  5. 4 4
      code/3DSHelper.h
  6. 2 2
      code/3DSLoader.cpp
  7. 2 2
      code/3DSLoader.h
  8. 4 4
      code/ACLoader.cpp
  9. 1 1
      code/ACLoader.h
  10. 1 1
      code/AMFImporter.cpp
  11. 2 2
      code/AMFImporter.hpp
  12. 2 2
      code/AMFImporter_Postprocess.cpp
  13. 3 3
      code/ASELoader.cpp
  14. 1 1
      code/ASELoader.h
  15. 1 1
      code/ASEParser.cpp
  16. 2 2
      code/ASEParser.h
  17. 1 1
      code/AssbinExporter.cpp
  18. 1 1
      code/AssbinLoader.cpp
  19. 1 1
      code/AssbinLoader.h
  20. 3 3
      code/Assimp.cpp
  21. 1 1
      code/B3DImporter.cpp
  22. 1 1
      code/B3DImporter.h
  23. 3 3
      code/BVHLoader.cpp
  24. 1 1
      code/BVHLoader.h
  25. 2 2
      code/BaseImporter.cpp
  26. 1 1
      code/BaseProcess.cpp
  27. 1 1
      code/BaseProcess.h
  28. 2 2
      code/Bitmap.cpp
  29. 1 1
      code/BlenderBMesh.h
  30. 3 3
      code/BlenderDNA.cpp
  31. 2 2
      code/BlenderDNA.h
  32. 1 1
      code/BlenderDNA.inl
  33. 4 4
      code/BlenderLoader.cpp
  34. 2 2
      code/BlenderLoader.h
  35. 1 1
      code/BlenderModifier.cpp
  36. 1 1
      code/BlenderModifier.h
  37. 1 1
      code/BlenderTessellator.h
  38. 1 1
      code/C4DImporter.cpp
  39. 2 2
      code/C4DImporter.h
  40. 54 48
      code/CMakeLists.txt
  41. 5 5
      code/COBLoader.cpp
  42. 2 2
      code/COBLoader.h
  43. 1 1
      code/COBScene.h
  44. 3 3
      code/CSMLoader.cpp
  45. 1 1
      code/CSMLoader.h
  46. 2 2
      code/CalcTangentsProcess.cpp
  47. 5 5
      code/ColladaExporter.cpp
  48. 1 1
      code/ColladaExporter.h
  49. 4 4
      code/ColladaLoader.cpp
  50. 1 1
      code/ColladaLoader.h
  51. 4 4
      code/ColladaParser.cpp
  52. 2 2
      code/ColladaParser.h
  53. 1 1
      code/ComputeUVMappingProcess.cpp
  54. 1 1
      code/CreateAnimMesh.cpp
  55. 1 1
      code/D3MFExporter.cpp
  56. 3 3
      code/D3MFImporter.cpp
  57. 1 1
      code/D3MFImporter.h
  58. 1 1
      code/D3MFOpcPackage.cpp
  59. 1 1
      code/D3MFOpcPackage.h
  60. 4 4
      code/DXFHelper.h
  61. 2 2
      code/DXFLoader.cpp
  62. 1 1
      code/DXFLoader.h
  63. 1 1
      code/DefaultIOSystem.cpp
  64. 1 1
      code/DefaultLogger.cpp
  65. 1 1
      code/EmbedTexturesProcess.cpp
  66. 2 2
      code/Exporter.cpp
  67. 2 2
      code/FBXBinaryTokenizer.cpp
  68. 93 32
      code/FBXConverter.cpp
  69. 2 2
      code/FBXImporter.cpp
  70. 2 2
      code/FBXImporter.h
  71. 1 1
      code/FBXMaterial.cpp
  72. 3 3
      code/FBXParser.cpp
  73. 2 2
      code/FBXParser.h
  74. 16 4
      code/FBXProperties.h
  75. 2 2
      code/FBXTokenizer.cpp
  76. 1 1
      code/FBXUtil.cpp
  77. 5 5
      code/FIReader.cpp
  78. 2 2
      code/FileSystemFilter.h
  79. 1 1
      code/FindDegenerates.cpp
  80. 3 3
      code/FindInvalidDataProcess.cpp
  81. 1 1
      code/FixNormalsStep.cpp
  82. 2 2
      code/GenFaceNormalsProcess.cpp
  83. 2 2
      code/GenVertexNormalsProcess.cpp
  84. 1 1
      code/HMPLoader.h
  85. 1 1
      code/IFF.h
  86. 5 5
      code/IRRLoader.cpp
  87. 1 1
      code/IRRLoader.h
  88. 3 3
      code/IRRMeshLoader.cpp
  89. 1 1
      code/IRRMeshLoader.h
  90. 2 2
      code/IRRShared.cpp
  91. 2 2
      code/IRRShared.h
  92. 7 7
      code/Importer.cpp
  93. 44 46
      code/Importer/IFC/IFCBoolean.cpp
  94. 34 35
      code/Importer/IFC/IFCCurve.cpp
  95. 93 93
      code/Importer/IFC/IFCGeometry.cpp
  96. 61 69
      code/Importer/IFC/IFCLoader.cpp
  97. 2 2
      code/Importer/IFC/IFCLoader.h
  98. 10 14
      code/Importer/IFC/IFCMaterial.cpp
  99. 47 47
      code/Importer/IFC/IFCOpenings.cpp
  100. 46 47
      code/Importer/IFC/IFCProfile.cpp

+ 1 - 1
Readme.md

@@ -43,7 +43,7 @@ __Importers__:
 - AMJ
 - ASE
 - ASK
-- B3D;
+- B3D
 - BLEND (Blender)
 - BVH
 - COB

+ 1 - 1
code/3DSConverter.cpp

@@ -50,7 +50,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include "TargetAnimation.h"
 #include <assimp/scene.h>
 #include <assimp/DefaultLogger.hpp>
-#include "StringComparison.h"
+#include <assimp/StringComparison.h>
 #include <memory>
 #include <cctype>
 

+ 1 - 1
code/3DSExporter.cpp

@@ -47,7 +47,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include "3DSHelper.h"
 #include <assimp/SceneCombiner.h>
 #include "SplitLargeMeshes.h"
-#include "StringComparison.h"
+#include <assimp/StringComparison.h>
 #include <assimp/IOSystem.hpp>
 #include <assimp/DefaultLogger.hpp>
 #include <assimp/Exporter.hpp>

+ 1 - 1
code/3DSExporter.h

@@ -48,7 +48,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include <map>
 #include <memory>
 
-#include "StreamWriter.h"
+#include <assimp/StreamWriter.h>
 #include <assimp/material.h>
 
 struct aiScene;

+ 4 - 4
code/3DSHelper.h

@@ -44,10 +44,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #ifndef AI_3DSFILEHELPER_H_INC
 #define AI_3DSFILEHELPER_H_INC
 
-#include "SpatialSort.h"
-#include "SmoothingGroups.h"
-#include "StringUtils.h"
-#include "qnan.h"
+#include <assimp/SpatialSort.h>
+#include <assimp/SmoothingGroups.h>
+#include <assimp/StringUtils.h>
+#include <assimp/qnan.h>
 #include <assimp/material.h>
 #include <assimp/camera.h>
 #include <assimp/light.h>

+ 2 - 2
code/3DSLoader.cpp

@@ -51,12 +51,12 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 // internal headers
 #include "3DSLoader.h"
-#include "Macros.h"
+#include <assimp/Macros.h>
 #include <assimp/IOSystem.hpp>
 #include <assimp/scene.h>
 #include <assimp/DefaultLogger.hpp>
 #include <assimp/importerdesc.h>
-#include "StringComparison.h"
+#include <assimp/StringComparison.h>
 
 using namespace Assimp;
 

+ 2 - 2
code/3DSLoader.h

@@ -46,13 +46,13 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #ifndef AI_3DSIMPORTER_H_INC
 #define AI_3DSIMPORTER_H_INC
 
-#include "BaseImporter.h"
+#include <assimp/BaseImporter.h>
 #include <assimp/types.h>
 
 #ifndef ASSIMP_BUILD_NO_3DS_IMPORTER
 
 #include "3DSHelper.h"
-#include "StreamReader.h"
+#include <assimp/StreamReader.h>
 
 struct aiNode;
 

+ 4 - 4
code/ACLoader.cpp

@@ -49,11 +49,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 // internal headers
 #include "ACLoader.h"
-#include "ParsingUtils.h"
-#include "fast_atof.h"
-#include "Subdivision.h"
+#include <assimp/ParsingUtils.h>
+#include <assimp/fast_atof.h>
+#include <assimp/Subdivision.h>
 #include "Importer.h"
-#include "BaseImporter.h"
+#include <assimp/BaseImporter.h>
 #include <assimp/Importer.hpp>
 #include <assimp/light.h>
 #include <assimp/DefaultLogger.hpp>

+ 1 - 1
code/ACLoader.h

@@ -47,7 +47,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 #include <vector>
 
-#include "BaseImporter.h"
+#include <assimp/BaseImporter.h>
 #include <assimp/types.h>
 
 struct aiNode;

+ 1 - 1
code/AMFImporter.cpp

@@ -51,7 +51,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include "AMFImporter.hpp"
 #include "AMFImporter_Macro.hpp"
 
-#include "fast_atof.h"
+#include <assimp/fast_atof.h>
 #include <assimp/DefaultIOSystem.h>
 
 // Header files, stdlib.

+ 2 - 2
code/AMFImporter.hpp

@@ -56,8 +56,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include <assimp/DefaultLogger.hpp>
 #include <assimp/importerdesc.h>
 #include "assimp/types.h"
-#include "BaseImporter.h"
-#include "irrXMLWrapper.h"
+#include <assimp/BaseImporter.h>
+#include <assimp/irrXMLWrapper.h>
 
 // Header files, stdlib.
 #include <set>

+ 2 - 2
code/AMFImporter_Postprocess.cpp

@@ -51,8 +51,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 // Header files, Assimp.
 #include <assimp/SceneCombiner.h>
-#include "StandardShapes.h"
-#include "StringUtils.h"
+#include <assimp/StandardShapes.h>
+#include <assimp/StringUtils.h>
 
 // Header files, stdlib.
 #include <iterator>

+ 3 - 3
code/ASELoader.cpp

@@ -50,8 +50,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 // internal headers
 #include "ASELoader.h"
-#include "StringComparison.h"
-#include "SkeletonMeshBuilder.h"
+#include <assimp/StringComparison.h>
+#include <assimp/SkeletonMeshBuilder.h>
 #include "TargetAnimation.h"
 #include <assimp/Importer.hpp>
 #include <assimp/IOSystem.hpp>
@@ -62,7 +62,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include <memory>
 
 // utilities
-#include "fast_atof.h"
+#include <assimp/fast_atof.h>
 
 using namespace Assimp;
 using namespace Assimp::ASE;

+ 1 - 1
code/ASELoader.h

@@ -45,7 +45,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #ifndef AI_ASELOADER_H_INCLUDED
 #define AI_ASELOADER_H_INCLUDED
 
-#include "BaseImporter.h"
+#include <assimp/BaseImporter.h>
 #include <assimp/types.h>
 #include "ASEParser.h"
 

+ 1 - 1
code/ASEParser.cpp

@@ -51,7 +51,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 // internal headers
 #include "TextureTransform.h"
 #include "ASELoader.h"
-#include "fast_atof.h"
+#include <assimp/fast_atof.h>
 #include <assimp/DefaultLogger.hpp>
 
 using namespace Assimp;

+ 2 - 2
code/ASEParser.h

@@ -52,8 +52,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #ifndef ASSIMP_BUILD_NO_3DS_IMPORTER
 
 // for some helper routines like IsSpace()
-#include "ParsingUtils.h"
-#include "qnan.h"
+#include <assimp/ParsingUtils.h>
+#include <assimp/qnan.h>
 
 // ASE is quite similar to 3ds. We can reuse some structures
 #include "3DSLoader.h"

+ 1 - 1
code/AssbinExporter.cpp

@@ -47,7 +47,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include <assimp/IOSystem.hpp>
 #include <assimp/Exporter.hpp>
 #include "ProcessHelper.h"
-#include "Exceptional.h"
+#include <assimp/Exceptional.h>
 
 #ifdef ASSIMP_BUILD_NO_OWN_ZLIB
 #   include <zlib.h>

+ 1 - 1
code/AssbinLoader.cpp

@@ -51,7 +51,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 // internal headers
 #include "AssbinLoader.h"
 #include "assbin_chunks.h"
-#include "MemoryIOWrapper.h"
+#include <assimp/MemoryIOWrapper.h>
 #include <assimp/mesh.h>
 #include <assimp/anim.h>
 #include <assimp/scene.h>

+ 1 - 1
code/AssbinLoader.h

@@ -46,7 +46,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #ifndef AI_ASSBINIMPORTER_H_INC
 #define AI_ASSBINIMPORTER_H_INC
 
-#include "BaseImporter.h"
+#include <assimp/BaseImporter.h>
 
 struct aiMesh;
 struct aiNode;

+ 3 - 3
code/Assimp.cpp

@@ -50,12 +50,12 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include <assimp/importerdesc.h>
 #include <assimp/scene.h>
 
-#include "GenericProperty.h"
+#include <assimp/GenericProperty.h>
 #include "CInterfaceIOWrapper.h"
 #include "Importer.h"
-#include "Exceptional.h"
+#include <assimp/Exceptional.h>
 #include "ScenePrivate.h"
-#include "BaseImporter.h"
+#include <assimp/BaseImporter.h>
 #include <list>
 
 // ------------------------------------------------------------------------------------------------

+ 1 - 1
code/B3DImporter.cpp

@@ -51,7 +51,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include "B3DImporter.h"
 #include "TextureTransform.h"
 #include "ConvertToLHProcess.h"
-#include "StringUtils.h"
+#include <assimp/StringUtils.h>
 #include <memory>
 #include <assimp/IOSystem.hpp>
 #include <assimp/anim.h>

+ 1 - 1
code/B3DImporter.h

@@ -47,7 +47,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include <assimp/types.h>
 #include <assimp/mesh.h>
 #include <assimp/material.h>
-#include "BaseImporter.h"
+#include <assimp/BaseImporter.h>
 
 #include <memory>
 #include <vector>

+ 3 - 3
code/BVHLoader.cpp

@@ -45,11 +45,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #ifndef ASSIMP_BUILD_NO_BVH_IMPORTER
 
 #include "BVHLoader.h"
-#include "fast_atof.h"
-#include "SkeletonMeshBuilder.h"
+#include <assimp/fast_atof.h>
+#include <assimp/SkeletonMeshBuilder.h>
 #include <assimp/Importer.hpp>
 #include <memory>
-#include "TinyFormatter.h"
+#include <assimp/TinyFormatter.h>
 #include <assimp/IOSystem.hpp>
 #include <assimp/scene.h>
 #include <assimp/importerdesc.h>

+ 1 - 1
code/BVHLoader.h

@@ -48,7 +48,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #ifndef AI_BVHLOADER_H_INC
 #define AI_BVHLOADER_H_INC
 
-#include "BaseImporter.h"
+#include <assimp/BaseImporter.h>
 
 struct aiNode;
 

+ 2 - 2
code/BaseImporter.cpp

@@ -44,10 +44,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *  @brief Implementation of BaseImporter
  */
 
-#include "BaseImporter.h"
+#include <assimp/BaseImporter.h>
 #include "FileSystemFilter.h"
 #include "Importer.h"
-#include "ByteSwapper.h"
+#include <assimp/ByteSwapper.h>
 #include <assimp/scene.h>
 #include <assimp/Importer.hpp>
 #include <assimp/postprocess.h>

+ 1 - 1
code/BaseProcess.cpp

@@ -42,7 +42,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 /** @file Implementation of BaseProcess */
 
-#include "BaseImporter.h"
+#include <assimp/BaseImporter.h>
 #include "BaseProcess.h"
 #include <assimp/DefaultLogger.hpp>
 #include <assimp/scene.h>

+ 1 - 1
code/BaseProcess.h

@@ -44,7 +44,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #define INCLUDED_AI_BASEPROCESS_H
 
 #include <map>
-#include "GenericProperty.h"
+#include <assimp/GenericProperty.h>
 
 struct aiScene;
 

+ 2 - 2
code/Bitmap.cpp

@@ -47,10 +47,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
 
-#include "Bitmap.h"
+#include <assimp/Bitmap.h>
 #include <assimp/texture.h>
 #include <assimp/IOStream.hpp>
-#include "ByteSwapper.h"
+#include <assimp/ByteSwapper.h>
 
 namespace Assimp {
 

+ 1 - 1
code/BlenderBMesh.h

@@ -44,7 +44,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #ifndef INCLUDED_AI_BLEND_BMESH_H
 #define INCLUDED_AI_BLEND_BMESH_H
 
-#include "LogAux.h"
+#include <assimp/LogAux.h>
 
 namespace Assimp
 {

+ 3 - 3
code/BlenderDNA.cpp

@@ -47,9 +47,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 #ifndef ASSIMP_BUILD_NO_BLEND_IMPORTER
 #include "BlenderDNA.h"
-#include "StreamReader.h"
-#include "fast_atof.h"
-#include "TinyFormatter.h"
+#include <assimp/StreamReader.h>
+#include <assimp/fast_atof.h>
+#include <assimp/TinyFormatter.h>
 
 using namespace Assimp;
 using namespace Assimp::Blender;

+ 2 - 2
code/BlenderDNA.h

@@ -46,8 +46,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #ifndef INCLUDED_AI_BLEND_DNA_H
 #define INCLUDED_AI_BLEND_DNA_H
 
-#include "BaseImporter.h"
-#include "StreamReader.h"
+#include <assimp/BaseImporter.h>
+#include <assimp/StreamReader.h>
 #include <assimp/DefaultLogger.hpp>
 #include <stdint.h>
 #include <memory>

+ 1 - 1
code/BlenderDNA.inl

@@ -47,7 +47,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #define INCLUDED_AI_BLEND_DNA_INL
 
 #include <memory>
-#include "TinyFormatter.h"
+#include <assimp/TinyFormatter.h>
 
 namespace Assimp {
 namespace Blender {

+ 4 - 4
code/BlenderLoader.cpp

@@ -53,13 +53,13 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include "BlenderIntermediate.h"
 #include "BlenderModifier.h"
 #include "BlenderBMesh.h"
-#include "StringUtils.h"
+#include <assimp/StringUtils.h>
 #include <assimp/scene.h>
 #include <assimp/importerdesc.h>
 
-#include "StringComparison.h"
-#include "StreamReader.h"
-#include "MemoryIOWrapper.h"
+#include <assimp/StringComparison.h>
+#include <assimp/StreamReader.h>
+#include <assimp/MemoryIOWrapper.h>
 
 #include <cctype>
 

+ 2 - 2
code/BlenderLoader.h

@@ -45,8 +45,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #ifndef INCLUDED_AI_BLEND_LOADER_H
 #define INCLUDED_AI_BLEND_LOADER_H
 
-#include "BaseImporter.h"
-#include "LogAux.h"
+#include <assimp/BaseImporter.h>
+#include <assimp/LogAux.h>
 #include <memory>
 
 struct aiNode;

+ 1 - 1
code/BlenderModifier.cpp

@@ -47,7 +47,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 #include "BlenderModifier.h"
 #include <assimp/SceneCombiner.h>
-#include "Subdivision.h"
+#include <assimp/Subdivision.h>
 #include <assimp/scene.h>
 #include <memory>
 

+ 1 - 1
code/BlenderModifier.h

@@ -46,7 +46,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #define INCLUDED_AI_BLEND_MODIFIER_H
 
 #include "BlenderIntermediate.h"
-#include "TinyFormatter.h"
+#include <assimp/TinyFormatter.h>
 
 namespace Assimp {
 namespace Blender {

+ 1 - 1
code/BlenderTessellator.h

@@ -58,7 +58,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #   define ASSIMP_BLEND_WITH_POLY_2_TRI 1
 #endif
 
-#include "LogAux.h"
+#include <assimp/LogAux.h>
 
 #if ASSIMP_BLEND_WITH_GLU_TESSELLATE
 

+ 1 - 1
code/C4DImporter.cpp

@@ -51,7 +51,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #endif
 
 #include "C4DImporter.h"
-#include "TinyFormatter.h"
+#include <assimp/TinyFormatter.h>
 #include <memory>
 #include <assimp/IOSystem.hpp>
 #include <assimp/scene.h>

+ 2 - 2
code/C4DImporter.h

@@ -44,8 +44,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #ifndef INCLUDED_AI_CINEMA_4D_LOADER_H
 #define INCLUDED_AI_CINEMA_4D_LOADER_H
 
-#include "BaseImporter.h"
-#include "LogAux.h"
+#include <assimp/BaseImporter.h>
+#include <assimp/LogAux.h>
 
 #include <map>
 struct aiNode;

+ 54 - 48
code/CMakeLists.txt

@@ -98,6 +98,40 @@ SET( PUBLIC_HEADERS
   ${HEADER_PATH}/DefaultIOStream.h
   ${HEADER_PATH}/DefaultIOSystem.h
   ${HEADER_PATH}/SceneCombiner.h
+  ${HEADER_PATH}/fast_atof.h
+  ${HEADER_PATH}/qnan.h
+  ${HEADER_PATH}/BaseImporter.h
+  ${HEADER_PATH}/Hash.h
+  ${HEADER_PATH}/MemoryIOWrapper.h
+  ${HEADER_PATH}/ParsingUtils.h
+  ${HEADER_PATH}/StreamReader.h
+  ${HEADER_PATH}/StreamWriter.h
+  ${HEADER_PATH}/StringComparison.h
+  ${HEADER_PATH}/StringUtils.h
+  ${HEADER_PATH}/SGSpatialSort.h
+  ${HEADER_PATH}/GenericProperty.h
+  ${HEADER_PATH}/SpatialSort.h
+  ${HEADER_PATH}/SkeletonMeshBuilder.h
+  ${HEADER_PATH}/SmoothingGroups.h
+  ${HEADER_PATH}/SmoothingGroups.inl
+  ${HEADER_PATH}/StandardShapes.h
+  ${HEADER_PATH}/RemoveComments.h
+  ${HEADER_PATH}/Subdivision.h
+  ${HEADER_PATH}/Vertex.h
+  ${HEADER_PATH}/LineSplitter.h
+  ${HEADER_PATH}/TinyFormatter.h
+  ${HEADER_PATH}/Profiler.h
+  ${HEADER_PATH}/LogAux.h
+  ${HEADER_PATH}/Bitmap.h
+  ${HEADER_PATH}/XMLTools.h
+  ${HEADER_PATH}/IOStreamBuffer.h
+  ${HEADER_PATH}/CreateAnimMesh.h
+  ${HEADER_PATH}/irrXMLWrapper.h
+  ${HEADER_PATH}/BlobIOSystem.h
+  ${HEADER_PATH}/MathFunctions.h
+  ${HEADER_PATH}/Macros.h
+  ${HEADER_PATH}/Exceptional.h
+  ${HEADER_PATH}/ByteSwapper.h
 )
 
 SET( Core_SRCS
@@ -117,68 +151,40 @@ SET( Logging_SRCS
 SOURCE_GROUP(Logging FILES ${Logging_SRCS})
 
 SET( Common_SRCS
-  fast_atof.h
-  qnan.h
   BaseImporter.cpp
-  BaseImporter.h
   BaseProcess.cpp
   BaseProcess.h
   Importer.h
   ScenePrivate.h
   PostStepRegistry.cpp
   ImporterRegistry.cpp
-  ByteSwapper.h
   DefaultProgressHandler.h
   DefaultIOStream.cpp
   DefaultIOSystem.cpp
   CInterfaceIOWrapper.cpp
   CInterfaceIOWrapper.h
-  Hash.h
   Importer.cpp
   IFF.h
-  MemoryIOWrapper.h
-  ParsingUtils.h
-  StreamReader.h
-  StreamWriter.h
-  StringComparison.h
-  StringUtils.h
   SGSpatialSort.cpp
-  SGSpatialSort.h
   VertexTriangleAdjacency.cpp
   VertexTriangleAdjacency.h
-  GenericProperty.h
   SpatialSort.cpp
-  SpatialSort.h
   SceneCombiner.cpp
   ScenePreprocessor.cpp
   ScenePreprocessor.h
   SkeletonMeshBuilder.cpp
-  SkeletonMeshBuilder.h
   SplitByBoneCountProcess.cpp
   SplitByBoneCountProcess.h
   ScaleProcess.cpp
   ScaleProcess.h
-  SmoothingGroups.h
   StandardShapes.cpp
-  StandardShapes.h
   TargetAnimation.cpp
   TargetAnimation.h
   RemoveComments.cpp
-  RemoveComments.h
   Subdivision.cpp
-  Subdivision.h
   scene.cpp
-  Vertex.h
-  LineSplitter.h
-  TinyFormatter.h
-  Profiler.h
-  LogAux.h
   Bitmap.cpp
-  Bitmap.h
-  XMLTools.h
   Version.cpp
-  IOStreamBuffer.h
-  CreateAnimMesh.h
   CreateAnimMesh.cpp
 )
 SOURCE_GROUP(Common FILES ${Common_SRCS})
@@ -457,24 +463,23 @@ ADD_ASSIMP_IMPORTER( BLEND
 )
 
 ADD_ASSIMP_IMPORTER( IFC
-  IFCLoader.cpp
-  IFCLoader.h
-  IFCReaderGen1.cpp
-  IFCReaderGen2.cpp
-  IFCReaderGen.h
-  IFCUtil.h
-  IFCUtil.cpp
-  IFCGeometry.cpp
-  IFCMaterial.cpp
-  IFCProfile.cpp
-  IFCCurve.cpp
-  IFCBoolean.cpp
-  IFCOpenings.cpp
-  STEPFile.h
-  STEPFileReader.h
-  STEPFileReader.cpp
-  STEPFileEncoding.cpp
-  STEPFileEncoding.h
+  Importer/IFC/IFCLoader.cpp
+  Importer/IFC/IFCLoader.h
+  Importer/IFC/IFCReaderGen1_2x3.cpp
+  Importer/IFC/IFCReaderGen2_2x3.cpp
+  Importer/IFC/IFCReaderGen_2x3.h
+  Importer/IFC/IFCUtil.h
+  Importer/IFC/IFCUtil.cpp
+  Importer/IFC/IFCGeometry.cpp
+  Importer/IFC/IFCMaterial.cpp
+  Importer/IFC/IFCProfile.cpp
+  Importer/IFC/IFCCurve.cpp
+  Importer/IFC/IFCBoolean.cpp
+  Importer/IFC/IFCOpenings.cpp
+  Importer/IFC/STEPFileReader.h
+  Importer/IFC/STEPFileReader.cpp
+  Importer/IFC/STEPFileEncoding.cpp
+  Importer/IFC/STEPFileEncoding.h
 )
 if (ASSIMP_BUILD_IFC_IMPORTER)
   if (MSVC)
@@ -575,7 +580,7 @@ SET( PostProcessing_SRCS
 )
 SOURCE_GROUP( PostProcessing FILES ${PostProcessing_SRCS})
 
-SET( IrrXML_SRCS irrXMLWrapper.h )
+SET( IrrXML_SRCS ${HEADER_PATH}/irrXMLWrapper.h )
 SOURCE_GROUP( IrrXML FILES ${IrrXML_SRCS})
 
 ADD_ASSIMP_IMPORTER( Q3D
@@ -697,6 +702,7 @@ ADD_ASSIMP_IMPORTER( MMD
 )
 
 SET( Step_SRCS
+  STEPFile.h
   StepExporter.h
   StepExporter.cpp
 )
@@ -705,7 +711,7 @@ SOURCE_GROUP( Step FILES ${Step_SRCS})
 SET( Exporter_SRCS
   Exporter.cpp
   AssimpCExport.cpp
-  BlobIOSystem.h
+  ${HEADER_PATH}/BlobIOSystem.h
 )
 SOURCE_GROUP( Exporter FILES ${Exporter_SRCS})
 

+ 5 - 5
code/COBLoader.cpp

@@ -47,12 +47,12 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include "COBLoader.h"
 #include "COBScene.h"
 
-#include "StreamReader.h"
-#include "ParsingUtils.h"
-#include "fast_atof.h"
+#include <assimp/StreamReader.h>
+#include <assimp/ParsingUtils.h>
+#include <assimp/fast_atof.h>
 
-#include "LineSplitter.h"
-#include "TinyFormatter.h"
+#include <assimp/LineSplitter.h>
+#include <assimp/TinyFormatter.h>
 #include <memory>
 #include <assimp/IOSystem.hpp>
 #include <assimp/DefaultLogger.hpp>

+ 2 - 2
code/COBLoader.h

@@ -45,8 +45,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #ifndef INCLUDED_AI_COB_LOADER_H
 #define INCLUDED_AI_COB_LOADER_H
 
-#include "BaseImporter.h"
-#include "StreamReader.h"
+#include <assimp/BaseImporter.h>
+#include <assimp/StreamReader.h>
 
 struct aiNode;
 

+ 1 - 1
code/COBScene.h

@@ -49,7 +49,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include <deque>
 #include <map>
 
-#include "BaseImporter.h"
+#include <assimp/BaseImporter.h>
 #include <assimp/material.h>
 
 namespace Assimp {

+ 3 - 3
code/CSMLoader.cpp

@@ -49,9 +49,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #ifndef ASSIMP_BUILD_NO_CSM_IMPORTER
 
 #include "CSMLoader.h"
-#include "SkeletonMeshBuilder.h"
-#include "ParsingUtils.h"
-#include "fast_atof.h"
+#include <assimp/SkeletonMeshBuilder.h>
+#include <assimp/ParsingUtils.h>
+#include <assimp/fast_atof.h>
 #include <assimp/Importer.hpp>
 #include <memory>
 #include <assimp/IOSystem.hpp>

+ 1 - 1
code/CSMLoader.h

@@ -45,7 +45,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #ifndef INCLUDED_AI_CSM_LOADER_H
 #define INCLUDED_AI_CSM_LOADER_H
 
-#include "BaseImporter.h"
+#include <assimp/BaseImporter.h>
 
 namespace Assimp    {
 

+ 2 - 2
code/CalcTangentsProcess.cpp

@@ -47,8 +47,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 // internal headers
 #include "CalcTangentsProcess.h"
 #include "ProcessHelper.h"
-#include "TinyFormatter.h"
-#include "qnan.h"
+#include <assimp/TinyFormatter.h>
+#include <assimp/qnan.h>
 
 using namespace Assimp;
 

+ 5 - 5
code/ColladaExporter.cpp

@@ -43,17 +43,17 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #ifndef ASSIMP_BUILD_NO_COLLADA_EXPORTER
 
 #include "ColladaExporter.h"
-#include "Bitmap.h"
-#include "fast_atof.h"
+#include <assimp/Bitmap.h>
+#include <assimp/fast_atof.h>
 #include <assimp/SceneCombiner.h>
-#include "StringUtils.h"
-#include "XMLTools.h"
+#include <assimp/StringUtils.h>
+#include <assimp/XMLTools.h>
 #include <assimp/DefaultIOSystem.h>
 #include <assimp/IOSystem.hpp>
 #include <assimp/Exporter.hpp>
 #include <assimp/scene.h>
 
-#include "Exceptional.h"
+#include <assimp/Exceptional.h>
 
 #include <memory>
 #include <ctime>

+ 1 - 1
code/ColladaExporter.h

@@ -54,7 +54,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include <vector>
 #include <map>
 
-#include "StringUtils.h"
+#include <assimp/StringUtils.h>
 
 struct aiScene;
 struct aiNode;

+ 4 - 4
code/ColladaLoader.cpp

@@ -53,10 +53,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include <assimp/importerdesc.h>
 
 #include "ColladaParser.h"
-#include "fast_atof.h"
-#include "ParsingUtils.h"
-#include "SkeletonMeshBuilder.h"
-#include "CreateAnimMesh.h"
+#include <assimp/fast_atof.h>
+#include <assimp/ParsingUtils.h>
+#include <assimp/SkeletonMeshBuilder.h>
+#include <assimp/CreateAnimMesh.h>
 
 #include "time.h"
 #include "math.h"

+ 1 - 1
code/ColladaLoader.h

@@ -44,7 +44,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #ifndef AI_COLLADALOADER_H_INC
 #define AI_COLLADALOADER_H_INC
 
-#include "BaseImporter.h"
+#include <assimp/BaseImporter.h>
 #include "ColladaParser.h"
 
 struct aiNode;

+ 4 - 4
code/ColladaParser.cpp

@@ -49,13 +49,13 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include <sstream>
 #include <stdarg.h>
 #include "ColladaParser.h"
-#include "fast_atof.h"
-#include "ParsingUtils.h"
-#include "StringUtils.h"
+#include <assimp/fast_atof.h>
+#include <assimp/ParsingUtils.h>
+#include <assimp/StringUtils.h>
 #include <assimp/DefaultLogger.hpp>
 #include <assimp/IOSystem.hpp>
 #include <assimp/light.h>
-#include "TinyFormatter.h"
+#include <assimp/TinyFormatter.h>
 
 #include <memory>
 

+ 2 - 2
code/ColladaParser.h

@@ -46,10 +46,10 @@
 #ifndef AI_COLLADAPARSER_H_INC
 #define AI_COLLADAPARSER_H_INC
 
-#include "irrXMLWrapper.h"
+#include <assimp/irrXMLWrapper.h>
 #include "ColladaHelper.h"
 #include <assimp/ai_assert.h>
-#include "TinyFormatter.h"
+#include <assimp/TinyFormatter.h>
 
 namespace Assimp
 {

+ 1 - 1
code/ComputeUVMappingProcess.cpp

@@ -44,7 +44,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 #include "ComputeUVMappingProcess.h"
 #include "ProcessHelper.h"
-#include "Exceptional.h"
+#include <assimp/Exceptional.h>
 
 using namespace Assimp;
 

+ 1 - 1
code/CreateAnimMesh.cpp

@@ -40,7 +40,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 ---------------------------------------------------------------------------
 */
 
-#include "CreateAnimMesh.h"
+#include <assimp/CreateAnimMesh.h>
 
 namespace Assimp    {
 

+ 1 - 1
code/D3MFExporter.cpp

@@ -49,7 +49,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include <assimp/Exporter.hpp>
 #include <assimp/DefaultLogger.hpp>
 
-#include "Exceptional.h"
+#include <assimp/Exceptional.h>
 #include "3MFXmlTags.h"
 #include "D3MFOpcPackage.h"
 

+ 3 - 3
code/D3MFImporter.cpp

@@ -47,8 +47,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include <assimp/IOSystem.hpp>
 #include <assimp/DefaultLogger.hpp>
 #include <assimp/importerdesc.h>
-#include "StringComparison.h"
-#include "StringUtils.h"
+#include <assimp/StringComparison.h>
+#include <assimp/StringUtils.h>
 
 #include <string>
 #include <vector>
@@ -58,7 +58,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 #include "D3MFOpcPackage.h"
 #include <contrib/unzip/unzip.h>
-#include "irrXMLWrapper.h"
+#include <assimp/irrXMLWrapper.h>
 #include "3MFXmlTags.h"
 
 namespace Assimp {

+ 1 - 1
code/D3MFImporter.h

@@ -42,7 +42,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #ifndef AI_D3MFLOADER_H_INCLUDED
 #define AI_D3MFLOADER_H_INCLUDED
 
-#include "BaseImporter.h"
+#include <assimp/BaseImporter.h>
 
 namespace Assimp {
 

+ 1 - 1
code/D3MFOpcPackage.cpp

@@ -42,7 +42,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #ifndef ASSIMP_BUILD_NO_3MF_IMPORTER
 
 #include "D3MFOpcPackage.h"
-#include "Exceptional.h"
+#include <assimp/Exceptional.h>
 
 #include <assimp/IOStream.hpp>
 #include <assimp/IOSystem.hpp>

+ 1 - 1
code/D3MFOpcPackage.h

@@ -45,7 +45,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include <memory>
 
 #include <assimp/IOSystem.hpp>
-#include "irrXMLWrapper.h"
+#include <assimp/irrXMLWrapper.h>
 
 namespace Assimp {
 namespace D3MF {

+ 4 - 4
code/DXFHelper.h

@@ -46,10 +46,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #ifndef INCLUDED_DXFHELPER_H
 #define INCLUDED_DXFHELPER_H
 
-#include "LineSplitter.h"
-#include "TinyFormatter.h"
-#include "StreamReader.h"
-#include "fast_atof.h"
+#include <assimp/LineSplitter.h>
+#include <assimp/TinyFormatter.h>
+#include <assimp/StreamReader.h>
+#include <assimp/fast_atof.h>
 #include <vector>
 #include <assimp/DefaultLogger.hpp>
 

+ 2 - 2
code/DXFLoader.cpp

@@ -48,9 +48,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #ifndef ASSIMP_BUILD_NO_DXF_IMPORTER
 
 #include "DXFLoader.h"
-#include "ParsingUtils.h"
+#include <assimp/ParsingUtils.h>
 #include "ConvertToLHProcess.h"
-#include "fast_atof.h"
+#include <assimp/fast_atof.h>
 
 #include "DXFHelper.h"
 #include <assimp/IOSystem.hpp>

+ 1 - 1
code/DXFLoader.h

@@ -45,7 +45,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #ifndef AI_DXFLOADER_H_INCLUDED
 #define AI_DXFLOADER_H_INCLUDED
 
-#include "BaseImporter.h"
+#include <assimp/BaseImporter.h>
 #include <map>
 
 namespace Assimp    {

+ 1 - 1
code/DefaultIOSystem.cpp

@@ -41,7 +41,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
 /** @file Default implementation of IOSystem using the standard C file functions */
 
-#include "StringComparison.h"
+#include <assimp/StringComparison.h>
 
 #include <assimp/DefaultIOSystem.h>
 #include <assimp/DefaultIOStream.h>

+ 1 - 1
code/DefaultLogger.cpp

@@ -49,7 +49,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include "Win32DebugLogStream.h"
 #include "StdOStreamLogStream.h"
 #include "FileLogStream.h"
-#include "StringUtils.h"
+#include <assimp/StringUtils.h>
 
 #include <assimp/DefaultIOSystem.h>
 #include <assimp/NullLogger.hpp>

+ 1 - 1
code/EmbedTexturesProcess.cpp

@@ -40,7 +40,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
 
 #include "EmbedTexturesProcess.h"
-#include "ParsingUtils.h"
+#include <assimp/ParsingUtils.h>
 #include "ProcessHelper.h"
 
 #include <fstream>

+ 2 - 2
code/Exporter.cpp

@@ -53,7 +53,7 @@ Here we implement only the C++ interface (Assimp::Exporter).
 
 #ifndef ASSIMP_BUILD_NO_EXPORT
 
-#include "BlobIOSystem.h"
+#include <assimp/BlobIOSystem.h>
 #include <assimp/SceneCombiner.h>
 #include "BaseProcess.h"
 #include "Importer.h" // need this for GetPostProcessingStepInstanceList()
@@ -61,7 +61,7 @@ Here we implement only the C++ interface (Assimp::Exporter).
 #include "JoinVerticesProcess.h"
 #include "MakeVerboseFormat.h"
 #include "ConvertToLHProcess.h"
-#include "Exceptional.h"
+#include <assimp/Exceptional.h>
 #include "ScenePrivate.h"
 #include <memory>
 

+ 2 - 2
code/FBXBinaryTokenizer.cpp

@@ -50,8 +50,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include "FBXUtil.h"
 #include <assimp/defs.h>
 #include <stdint.h>
-#include "Exceptional.h"
-#include "ByteSwapper.h"
+#include <assimp/Exceptional.h>
+#include <assimp/ByteSwapper.h>
 
 namespace Assimp {
 namespace FBX {

+ 93 - 32
code/FBXConverter.cpp

@@ -52,7 +52,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include "FBXUtil.h"
 #include "FBXProperties.h"
 #include "FBXImporter.h"
-#include "StringComparison.h"
+#include <assimp/StringComparison.h>
 
 #include <assimp/scene.h>
 
@@ -241,6 +241,10 @@ private:
     // ------------------------------------------------------------------------------------------------
     aiColor3D GetColorPropertyFromMaterial( const PropertyTable& props, const std::string& baseName,
         bool& result );
+    aiColor3D GetColorPropertyFactored( const PropertyTable& props, const std::string& colorName,
+        const std::string& factorName, bool& result, bool useTemplate=true );
+    aiColor3D GetColorProperty( const PropertyTable& props, const std::string& colorName,
+        bool& result, bool useTemplate=true );
 
     // ------------------------------------------------------------------------------------------------
     void SetShadingPropertiesCommon( aiMaterial* out_mat, const PropertyTable& props );
@@ -1716,7 +1720,7 @@ unsigned int Converter::ConvertMaterial( const Material& material, const MeshGeo
 
     aiString str;
 
-    // stip Material:: prefix
+    // strip Material:: prefix
     std::string name = material.Name();
     if ( name.substr( 0, 10 ) == "Material::" ) {
         name = name.substr( 10 );
@@ -2077,40 +2081,62 @@ void Converter::SetTextureProperties( aiMaterial* out_mat, const LayeredTextureM
     TrySetTextureProperties( out_mat, layeredTextures, "ShininessExponent", aiTextureType_SHININESS, mesh );
 }
 
-aiColor3D Converter::GetColorPropertyFromMaterial( const PropertyTable& props, const std::string& baseName,
-    bool& result )
+aiColor3D Converter::GetColorPropertyFactored( const PropertyTable& props, const std::string& colorName,
+    const std::string& factorName, bool& result, bool useTemplate )
 {
     result = true;
 
     bool ok;
-    const aiVector3D& Diffuse = PropertyGet<aiVector3D>( props, baseName, ok );
-    if ( ok ) {
-        return aiColor3D( Diffuse.x, Diffuse.y, Diffuse.z );
+    aiVector3D BaseColor = PropertyGet<aiVector3D>( props, colorName, ok, useTemplate );
+    if ( ! ok ) {
+        result = false;
+        return aiColor3D( 0.0f, 0.0f, 0.0f );
     }
-    else {
-        aiVector3D DiffuseColor = PropertyGet<aiVector3D>( props, baseName + "Color", ok );
-        if ( ok ) {
-            float DiffuseFactor = PropertyGet<float>( props, baseName + "Factor", ok );
-            if ( ok ) {
-                DiffuseColor *= DiffuseFactor;
-            }
 
-            return aiColor3D( DiffuseColor.x, DiffuseColor.y, DiffuseColor.z );
-        }
+    // if no factor name, return the colour as is
+    if ( factorName.empty() ) {
+        return aiColor3D( BaseColor.x, BaseColor.y, BaseColor.z );
+    }
+
+    // otherwise it should be multiplied by the factor, if found.
+    float factor = PropertyGet<float>( props, factorName, ok, useTemplate );
+    if ( ok ) {
+        BaseColor *= factor;
     }
-    result = false;
-    return aiColor3D( 0.0f, 0.0f, 0.0f );
+    return aiColor3D( BaseColor.x, BaseColor.y, BaseColor.z );
+}
+
+aiColor3D Converter::GetColorPropertyFromMaterial( const PropertyTable& props, const std::string& baseName,
+    bool& result )
+{
+    return GetColorPropertyFactored( props, baseName + "Color", baseName + "Factor", result, true );
 }
 
+aiColor3D Converter::GetColorProperty( const PropertyTable& props, const std::string& colorName,
+    bool& result, bool useTemplate )
+{
+    result = true;
+    bool ok;
+    const aiVector3D& ColorVec = PropertyGet<aiVector3D>( props, colorName, ok, useTemplate );
+    if ( ! ok ) {
+        result = false;
+        return aiColor3D( 0.0f, 0.0f, 0.0f );
+    }
+    return aiColor3D( ColorVec.x, ColorVec.y, ColorVec.z );
+}
 
 void Converter::SetShadingPropertiesCommon( aiMaterial* out_mat, const PropertyTable& props )
 {
-    // set shading properties. There are various, redundant ways in which FBX materials
-    // specify their shading settings (depending on shading models, prop
-    // template etc.). No idea which one is right in a particular context.
-    // Just try to make sense of it - there's no spec to verify this against,
-    // so why should we.
+    // Set shading properties.
+    // Modern FBX Files have two separate systems for defining these,
+    // with only the more comprehensive one described in the property template.
+    // Likely the other values are a legacy system,
+    // which is still always exported by the official FBX SDK.
+    //
+    // Blender's FBX import and export mostly ignore this legacy system,
+    // and as we only support recent versions of FBX anyway, we can do the same.
     bool ok;
+
     const aiColor3D& Diffuse = GetColorPropertyFromMaterial( props, "Diffuse", ok );
     if ( ok ) {
         out_mat->AddProperty( &Diffuse, 1, AI_MATKEY_COLOR_DIFFUSE );
@@ -2126,29 +2152,64 @@ void Converter::SetShadingPropertiesCommon( aiMaterial* out_mat, const PropertyT
         out_mat->AddProperty( &Ambient, 1, AI_MATKEY_COLOR_AMBIENT );
     }
 
-    const aiColor3D& Specular = GetColorPropertyFromMaterial( props, "Specular", ok );
+    // we store specular factor as SHININESS_STRENGTH, so just get the color
+    const aiColor3D& Specular = GetColorProperty( props, "SpecularColor", ok, true );
     if ( ok ) {
         out_mat->AddProperty( &Specular, 1, AI_MATKEY_COLOR_SPECULAR );
     }
 
-    const float Opacity = PropertyGet<float>( props, "Opacity", ok );
+    // and also try to get SHININESS_STRENGTH
+    const float SpecularFactor = PropertyGet<float>( props, "SpecularFactor", ok, true );
     if ( ok ) {
-        out_mat->AddProperty( &Opacity, 1, AI_MATKEY_OPACITY );
+        out_mat->AddProperty( &SpecularFactor, 1, AI_MATKEY_SHININESS_STRENGTH );
     }
 
-    const float Reflectivity = PropertyGet<float>( props, "Reflectivity", ok );
+    // and the specular exponent
+    const float ShininessExponent = PropertyGet<float>( props, "ShininessExponent", ok );
     if ( ok ) {
-        out_mat->AddProperty( &Reflectivity, 1, AI_MATKEY_REFLECTIVITY );
+        out_mat->AddProperty( &ShininessExponent, 1, AI_MATKEY_SHININESS );
     }
 
-    const float Shininess = PropertyGet<float>( props, "Shininess", ok );
+    // TransparentColor / TransparencyFactor... gee thanks FBX :rolleyes:
+    const aiColor3D& Transparent = GetColorPropertyFactored( props, "TransparentColor", "TransparencyFactor", ok );
+    float CalculatedOpacity = 1.0;
     if ( ok ) {
-        out_mat->AddProperty( &Shininess, 1, AI_MATKEY_SHININESS_STRENGTH );
+        out_mat->AddProperty( &Transparent, 1, AI_MATKEY_COLOR_TRANSPARENT );
+        // as calculated by FBX SDK 2017:
+        CalculatedOpacity = 1.0 - ((Transparent.r + Transparent.g + Transparent.b) / 3.0);
     }
 
-    const float ShininessExponent = PropertyGet<float>( props, "ShininessExponent", ok );
+    // use of TransparencyFactor is inconsistent.
+    // Maya always stores it as 1.0,
+    // so we can't use it to set AI_MATKEY_OPACITY.
+    // Blender is more sensible and stores it as the alpha value.
+    // However both the FBX SDK and Blender always write an additional
+    // legacy "Opacity" field, so we can try to use that.
+    //
+    // If we can't find it,
+    // we can fall back to the value which the FBX SDK calculates
+    // from transparency colour (RGB) and factor (F) as
+    // 1.0 - F*((R+G+B)/3).
+    //
+    // There's no consistent way to interpret this opacity value,
+    // so it's up to clients to do the correct thing.
+    const float Opacity = PropertyGet<float>( props, "Opacity", ok );
     if ( ok ) {
-        out_mat->AddProperty( &ShininessExponent, 1, AI_MATKEY_SHININESS );
+        out_mat->AddProperty( &Opacity, 1, AI_MATKEY_OPACITY );
+    }
+    else if ( CalculatedOpacity != 1.0 ) {
+        out_mat->AddProperty( &CalculatedOpacity, 1, AI_MATKEY_OPACITY );
+    }
+
+    // reflection color and factor are stored separately
+    const aiColor3D& Reflection = GetColorProperty( props, "ReflectionColor", ok, true );
+    if ( ok ) {
+        out_mat->AddProperty( &Reflection, 1, AI_MATKEY_COLOR_REFLECTIVE );
+    }
+
+    float ReflectionFactor = PropertyGet<float>( props, "ReflectionFactor", ok, true );
+    if ( ok ) {
+        out_mat->AddProperty( &ReflectionFactor, 1, AI_MATKEY_REFLECTIVITY );
     }
 
     const float BumpFactor = PropertyGet<float>(props, "BumpFactor", ok);

+ 2 - 2
code/FBXImporter.cpp

@@ -53,8 +53,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include "FBXDocument.h"
 #include "FBXConverter.h"
 
-#include "StreamReader.h"
-#include "MemoryIOWrapper.h"
+#include <assimp/StreamReader.h>
+#include <assimp/MemoryIOWrapper.h>
 #include <assimp/Importer.hpp>
 #include <assimp/importerdesc.h>
 

+ 2 - 2
code/FBXImporter.h

@@ -45,8 +45,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #ifndef INCLUDED_AI_FBX_IMPORTER_H
 #define INCLUDED_AI_FBX_IMPORTER_H
 
-#include "BaseImporter.h"
-#include "LogAux.h"
+#include <assimp/BaseImporter.h>
+#include <assimp/LogAux.h>
 
 #include "FBXImportSettings.h"
 

+ 1 - 1
code/FBXMaterial.cpp

@@ -51,7 +51,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include "FBXImportSettings.h"
 #include "FBXDocumentUtil.h"
 #include "FBXProperties.h"
-#include "ByteSwapper.h"
+#include <assimp/ByteSwapper.h>
 
 namespace Assimp {
 namespace FBX {

+ 3 - 3
code/FBXParser.cpp

@@ -56,9 +56,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include "FBXParser.h"
 #include "FBXUtil.h"
 
-#include "ParsingUtils.h"
-#include "fast_atof.h"
-#include "ByteSwapper.h"
+#include <assimp/ParsingUtils.h>
+#include <assimp/fast_atof.h>
+#include <assimp/ByteSwapper.h>
 
 #include <iostream>
 

+ 2 - 2
code/FBXParser.h

@@ -48,8 +48,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include <stdint.h>
 #include <map>
 #include <memory>
-#include "LogAux.h"
-#include "fast_atof.h"
+#include <assimp/LogAux.h>
+#include <assimp/fast_atof.h>
 
 #include "FBXCompileConfig.h"
 #include "FBXTokenizer.h"

+ 16 - 4
code/FBXProperties.h

@@ -148,11 +148,23 @@ T PropertyGet(const PropertyTable& in, const std::string& name, const T& default
 // ------------------------------------------------------------------------------------------------
 template <typename T>
 inline 
-T PropertyGet(const PropertyTable& in, const std::string& name, bool& result) {
-    const Property* const prop = in.Get(name);
+T PropertyGet(const PropertyTable& in, const std::string& name, bool& result, bool useTemplate=false ) {
+    const Property* prop = in.Get(name);
     if( nullptr == prop) {
-        result = false;
-        return T();
+        if ( ! useTemplate ) {
+            result = false;
+            return T();
+        }
+        const PropertyTable* templ = in.TemplateProps();
+        if ( nullptr == templ ) {
+            result = false;
+            return T();
+        }
+        prop = templ->Get(name);
+        if ( nullptr == prop ) {
+            result = false;
+            return T();
+        }
     }
 
     // strong typing, no need to be lenient

+ 2 - 2
code/FBXTokenizer.cpp

@@ -48,11 +48,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 // tab width for logging columns
 #define ASSIMP_FBX_TAB_WIDTH 4
 
-#include "ParsingUtils.h"
+#include <assimp/ParsingUtils.h>
 
 #include "FBXTokenizer.h"
 #include "FBXUtil.h"
-#include "Exceptional.h"
+#include <assimp/Exceptional.h>
 
 namespace Assimp {
 namespace FBX {

+ 1 - 1
code/FBXUtil.cpp

@@ -46,7 +46,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include "FBXUtil.h"
 #include "FBXTokenizer.h"
 
-#include "TinyFormatter.h"
+#include <assimp/TinyFormatter.h>
 #include <string>
 
 #ifndef ASSIMP_BUILD_NO_FBX_IMPORTER

+ 5 - 5
code/FIReader.cpp

@@ -46,7 +46,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #ifndef ASSIMP_BUILD_NO_X3D_IMPORTER
 
 #include "FIReader.hpp"
-#include "StringUtils.h"
+#include <assimp/StringUtils.h>
 
 // Workaround for issue #1361
 // https://github.com/assimp/assimp/issues/1361
@@ -54,13 +54,13 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #  define _GLIBCXX_USE_C99 1
 #endif
 
-#include "Exceptional.h"
+#include <assimp/Exceptional.h>
 #include <assimp/IOStream.hpp>
 #include <assimp/types.h>
-#include "MemoryIOWrapper.h"
-#include "irrXMLWrapper.h"
+#include <assimp/MemoryIOWrapper.h>
+#include <assimp/irrXMLWrapper.h>
 #include "../contrib/utf8cpp/source/utf8.h"
-#include "fast_atof.h"
+#include <assimp/fast_atof.h>
 #include <stack>
 #include <map>
 #include <iostream>

+ 2 - 2
code/FileSystemFilter.h

@@ -47,8 +47,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 #include "../include/assimp/IOSystem.hpp"
 #include "../include/assimp/DefaultLogger.hpp"
-#include "fast_atof.h"
-#include "ParsingUtils.h"
+#include "../include/assimp/fast_atof.h"
+#include "../include/assimp/ParsingUtils.h"
 
 namespace Assimp    {
 

+ 1 - 1
code/FindDegenerates.cpp

@@ -49,7 +49,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 // internal headers
 #include "ProcessHelper.h"
 #include "FindDegenerates.h"
-#include "Exceptional.h"
+#include <assimp/Exceptional.h>
 
 using namespace Assimp;
 

+ 3 - 3
code/FindInvalidDataProcess.cpp

@@ -50,9 +50,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 // internal headers
 #include "FindInvalidDataProcess.h"
 #include "ProcessHelper.h"
-#include "Macros.h"
-#include "Exceptional.h"
-#include "qnan.h"
+#include <assimp/Macros.h>
+#include <assimp/Exceptional.h>
+#include <assimp/qnan.h>
 
 using namespace Assimp;
 

+ 1 - 1
code/FixNormalsStep.cpp

@@ -46,7 +46,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 // internal headers
 #include "FixNormalsStep.h"
-#include "StringUtils.h"
+#include <assimp/StringUtils.h>
 #include <assimp/DefaultLogger.hpp>
 #include <assimp/postprocess.h>
 #include <assimp/scene.h>

+ 2 - 2
code/GenFaceNormalsProcess.cpp

@@ -49,8 +49,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include <assimp/postprocess.h>
 #include <assimp/scene.h>
 #include <assimp/DefaultLogger.hpp>
-#include "Exceptional.h"
-#include "qnan.h"
+#include <assimp/Exceptional.h>
+#include <assimp/qnan.h>
 
 
 using namespace Assimp;

+ 2 - 2
code/GenVertexNormalsProcess.cpp

@@ -49,8 +49,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 // internal headers
 #include "GenVertexNormalsProcess.h"
 #include "ProcessHelper.h"
-#include "Exceptional.h"
-#include "qnan.h"
+#include <assimp/Exceptional.h>
+#include <assimp/qnan.h>
 
 using namespace Assimp;
 

+ 1 - 1
code/HMPLoader.h

@@ -46,7 +46,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #define AI_HMPLOADER_H_INCLUDED
 
 // internal headers
-#include "BaseImporter.h"
+#include <assimp/BaseImporter.h>
 #include "MDLLoader.h"
 #include "HMPFileData.h"
 

+ 1 - 1
code/IFF.h

@@ -5,7 +5,7 @@
 #ifndef AI_IFF_H_INCLUDED
 #define AI_IFF_H_INCLUDED
 
-#include "ByteSwapper.h"
+#include <assimp/ByteSwapper.h>
 
 namespace Assimp    {
 namespace IFF       {

+ 5 - 5
code/IRRLoader.cpp

@@ -49,16 +49,16 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #ifndef ASSIMP_BUILD_NO_IRR_IMPORTER
 
 #include "IRRLoader.h"
-#include "ParsingUtils.h"
-#include "fast_atof.h"
-#include "GenericProperty.h"
+#include <assimp/ParsingUtils.h>
+#include <assimp/fast_atof.h>
+#include <assimp/GenericProperty.h>
 
 #include <assimp/SceneCombiner.h>
-#include "StandardShapes.h"
+#include <assimp/StandardShapes.h>
 #include "Importer.h"
 
 // We need MathFunctions.h to compute the lcm/gcd of a number
-#include "MathFunctions.h"
+#include <assimp/MathFunctions.h>
 #include <memory>
 #include <assimp/DefaultLogger.hpp>
 #include <assimp/mesh.h>

+ 1 - 1
code/IRRLoader.h

@@ -50,7 +50,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include "IRRShared.h"
 #include <assimp/SceneCombiner.h>
 #include "Importer.h"
-#include "StringUtils.h"
+#include <assimp/StringUtils.h>
 #include <assimp/anim.h>
 
 namespace Assimp    {

+ 3 - 3
code/IRRMeshLoader.cpp

@@ -47,8 +47,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #ifndef ASSIMP_BUILD_NO_IRRMESH_IMPORTER
 
 #include "IRRMeshLoader.h"
-#include "ParsingUtils.h"
-#include "fast_atof.h"
+#include <assimp/ParsingUtils.h>
+#include <assimp/fast_atof.h>
 #include <memory>
 #include <assimp/IOSystem.hpp>
 #include <assimp/mesh.h>
@@ -56,7 +56,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include <assimp/material.h>
 #include <assimp/scene.h>
 #include <assimp/importerdesc.h>
-#include "Macros.h"
+#include <assimp/Macros.h>
 
 using namespace Assimp;
 using namespace irr;

+ 1 - 1
code/IRRMeshLoader.h

@@ -46,7 +46,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #ifndef AI_IRRMESHLOADER_H_INCLUDED
 #define AI_IRRMESHLOADER_H_INCLUDED
 
-#include "BaseImporter.h"
+#include <assimp/BaseImporter.h>
 #include "IRRShared.h"
 
 #ifndef ASSIMP_BUILD_NO_IRRMESH_IMPORTER

+ 2 - 2
code/IRRShared.cpp

@@ -50,8 +50,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #if !(defined(ASSIMP_BUILD_NO_IRR_IMPORTER) && defined(ASSIMP_BUILD_NO_IRRMESH_IMPORTER))
 
 #include "IRRShared.h"
-#include "ParsingUtils.h"
-#include "fast_atof.h"
+#include <assimp/ParsingUtils.h>
+#include <assimp/fast_atof.h>
 #include <assimp/DefaultLogger.hpp>
 #include <assimp/material.h>
 

+ 2 - 2
code/IRRShared.h

@@ -7,8 +7,8 @@
 #ifndef INCLUDED_AI_IRRSHARED_H
 #define INCLUDED_AI_IRRSHARED_H
 
-#include "irrXMLWrapper.h"
-#include "BaseImporter.h"
+#include <assimp/irrXMLWrapper.h>
+#include <assimp/BaseImporter.h>
 #include <stdint.h>
 
 struct aiMaterial;

+ 7 - 7
code/Importer.cpp

@@ -64,19 +64,19 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 // Internal headers
 // ------------------------------------------------------------------------------------------------
 #include "Importer.h"
-#include "BaseImporter.h"
+#include <assimp/BaseImporter.h>
 #include "BaseProcess.h"
 
 #include "DefaultProgressHandler.h"
-#include "GenericProperty.h"
+#include <assimp/GenericProperty.h>
 #include "ProcessHelper.h"
 #include "ScenePreprocessor.h"
 #include "ScenePrivate.h"
-#include "MemoryIOWrapper.h"
-#include "Profiler.h"
-#include "TinyFormatter.h"
-#include "Exceptional.h"
-#include "Profiler.h"
+#include <assimp/MemoryIOWrapper.h>
+#include <assimp/Profiler.h>
+#include <assimp/TinyFormatter.h>
+#include <assimp/Exceptional.h>
+#include <assimp/Profiler.h>
 #include <set>
 #include <memory>
 #include <cctype>

+ 44 - 46
code/IFCBoolean.cpp → code/Importer/IFC/IFCBoolean.cpp

@@ -42,17 +42,15 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *  @brief Implements a subset of Ifc boolean operations
  */
 
-
 #ifndef ASSIMP_BUILD_NO_IFC_IMPORTER
-#include "IFCUtil.h"
-#include "PolyTools.h"
-#include "ProcessHelper.h"
+#include "code/Importer/IFC/IFCUtil.h"
+#include "code/PolyTools.h"
+#include "code/ProcessHelper.h"
 #include <assimp/Defines.h>
 
 #include <iterator>
 #include <tuple>
 
-
 namespace Assimp {
     namespace IFC {
 
@@ -61,7 +59,7 @@ namespace Assimp {
 // The function then generates a hit only if the end is beyond a certain margin in that direction, filtering out
 // "very close to plane" ghost hits as long as start and end stay directly on or within the given plane side.
 bool IntersectSegmentPlane(const IfcVector3& p,const IfcVector3& n, const IfcVector3& e0,
-    const IfcVector3& e1, bool assumeStartOnWhiteSide, IfcVector3& out)
+        const IfcVector3& e1, bool assumeStartOnWhiteSide, IfcVector3& out)
 {
     const IfcVector3 pdelta = e0 - p, seg = e1 - e0;
     const IfcFloat dotOne = n*seg, dotTwo = -(n*pdelta);
@@ -131,20 +129,20 @@ void WritePolygon(std::vector<IfcVector3>& resultpoly, TempMesh& result)
 
     if( resultpoly.size() > 2 )
     {
-        result.verts.insert(result.verts.end(), resultpoly.begin(), resultpoly.end());
-        result.vertcnt.push_back(static_cast<unsigned int>(resultpoly.size()));
+        result.mVerts.insert(result.mVerts.end(), resultpoly.begin(), resultpoly.end());
+        result.mVertcnt.push_back(static_cast<unsigned int>(resultpoly.size()));
     }
 }
 
 
 // ------------------------------------------------------------------------------------------------
-void ProcessBooleanHalfSpaceDifference(const IfcHalfSpaceSolid* hs, TempMesh& result,
+void ProcessBooleanHalfSpaceDifference(const Schema_2x3::IfcHalfSpaceSolid* hs, TempMesh& result,
     const TempMesh& first_operand,
     ConversionData& /*conv*/)
 {
     ai_assert(hs != NULL);
 
-    const IfcPlane* const plane = hs->BaseSurface->ToPtr<IfcPlane>();
+    const Schema_2x3::IfcPlane* const plane = hs->BaseSurface->ToPtr<Schema_2x3::IfcPlane>();
     if(!plane) {
         IFCImporter::LogError("expected IfcPlane as base surface for the IfcHalfSpaceSolid");
         return;
@@ -162,14 +160,14 @@ void ProcessBooleanHalfSpaceDifference(const IfcHalfSpaceSolid* hs, TempMesh& re
     }
 
     // clip the current contents of `meshout` against the plane we obtained from the second operand
-    const std::vector<IfcVector3>& in = first_operand.verts;
-    std::vector<IfcVector3>& outvert = result.verts;
+    const std::vector<IfcVector3>& in = first_operand.mVerts;
+    std::vector<IfcVector3>& outvert = result.mVerts;
 
-    std::vector<unsigned int>::const_iterator begin = first_operand.vertcnt.begin(),
-        end = first_operand.vertcnt.end(), iit;
+    std::vector<unsigned int>::const_iterator begin = first_operand.mVertcnt.begin(),
+        end = first_operand.mVertcnt.end(), iit;
 
     outvert.reserve(in.size());
-    result.vertcnt.reserve(first_operand.vertcnt.size());
+    result.mVertcnt.reserve(first_operand.mVertcnt.size());
 
     unsigned int vidx = 0;
     for(iit = begin; iit != end; vidx += *iit++) {
@@ -229,10 +227,10 @@ void ProcessBooleanHalfSpaceDifference(const IfcHalfSpaceSolid* hs, TempMesh& re
             --newcount;
         }
         if(newcount > 2) {
-            result.vertcnt.push_back(newcount);
+            result.mVertcnt.push_back(newcount);
         }
         else while(newcount-->0) {
-            result.verts.pop_back();
+            result.mVerts.pop_back();
         }
 
     }
@@ -386,13 +384,13 @@ bool PointInPoly(const IfcVector3& p, const std::vector<IfcVector3>& boundary)
 
 
 // ------------------------------------------------------------------------------------------------
-void ProcessPolygonalBoundedBooleanHalfSpaceDifference(const IfcPolygonalBoundedHalfSpace* hs, TempMesh& result,
+void ProcessPolygonalBoundedBooleanHalfSpaceDifference(const Schema_2x3::IfcPolygonalBoundedHalfSpace* hs, TempMesh& result,
                                                        const TempMesh& first_operand,
                                                        ConversionData& conv)
 {
     ai_assert(hs != NULL);
 
-    const IfcPlane* const plane = hs->BaseSurface->ToPtr<IfcPlane>();
+    const Schema_2x3::IfcPlane* const plane = hs->BaseSurface->ToPtr<Schema_2x3::IfcPlane>();
     if(!plane) {
         IFCImporter::LogError("expected IfcPlane as base surface for the IfcHalfSpaceSolid");
         return;
@@ -419,7 +417,7 @@ void ProcessPolygonalBoundedBooleanHalfSpaceDifference(const IfcPolygonalBounded
     }
 
     // determine winding order by calculating the normal.
-    IfcVector3 profileNormal = TempMesh::ComputePolygonNormal(profile->verts.data(), profile->verts.size());
+    IfcVector3 profileNormal = TempMesh::ComputePolygonNormal(profile->mVerts.data(), profile->mVerts.size());
 
     IfcMatrix4 proj_inv;
     ConvertAxisPlacement(proj_inv,hs->Position);
@@ -430,16 +428,16 @@ void ProcessPolygonalBoundedBooleanHalfSpaceDifference(const IfcPolygonalBounded
     proj.Inverse();
 
     // clip the current contents of `meshout` against the plane we obtained from the second operand
-    const std::vector<IfcVector3>& in = first_operand.verts;
-    std::vector<IfcVector3>& outvert = result.verts;
-    std::vector<unsigned int>& outvertcnt = result.vertcnt;
+    const std::vector<IfcVector3>& in = first_operand.mVerts;
+    std::vector<IfcVector3>& outvert = result.mVerts;
+    std::vector<unsigned int>& outvertcnt = result.mVertcnt;
 
     outvert.reserve(in.size());
-    outvertcnt.reserve(first_operand.vertcnt.size());
+    outvertcnt.reserve(first_operand.mVertcnt.size());
 
     unsigned int vidx = 0;
-    std::vector<unsigned int>::const_iterator begin = first_operand.vertcnt.begin();
-    std::vector<unsigned int>::const_iterator end = first_operand.vertcnt.end();
+    std::vector<unsigned int>::const_iterator begin = first_operand.mVertcnt.begin();
+    std::vector<unsigned int>::const_iterator end = first_operand.mVertcnt.end();
     std::vector<unsigned int>::const_iterator iit;
     for( iit = begin; iit != end; vidx += *iit++ )
     {
@@ -510,7 +508,7 @@ void ProcessPolygonalBoundedBooleanHalfSpaceDifference(const IfcPolygonalBounded
         {
             // poly edge index, intersection point, edge index in boundary poly
             std::vector<std::tuple<size_t, IfcVector3, size_t> > intersections;
-            bool startedInside = PointInPoly(proj * blackside.front(), profile->verts);
+            bool startedInside = PointInPoly(proj * blackside.front(), profile->mVerts);
             bool isCurrentlyInside = startedInside;
 
             std::vector<std::pair<size_t, IfcVector3> > intersected_boundary;
@@ -521,7 +519,7 @@ void ProcessPolygonalBoundedBooleanHalfSpaceDifference(const IfcPolygonalBounded
                 const IfcVector3 e1 = proj * blackside[(a + 1) % blackside.size()];
 
                 intersected_boundary.clear();
-                IntersectsBoundaryProfile(e0, e1, profile->verts, isCurrentlyInside, intersected_boundary);
+                IntersectsBoundaryProfile(e0, e1, profile->mVerts, isCurrentlyInside, intersected_boundary);
                 // sort the hits by distance from e0 to get the correct in/out/in sequence. Manually :-( I miss you, C++11.
                 if( intersected_boundary.size() > 1 )
                 {
@@ -634,17 +632,17 @@ void ProcessPolygonalBoundedBooleanHalfSpaceDifference(const IfcPolygonalBounded
 
                     // generate segments along the boundary polygon that lie in the poly's plane until we hit another intersection
                     IfcVector3 startingPoint = proj * std::get<1>(nextintsec);
-                    size_t currentBoundaryEdgeIdx = (std::get<2>(nextintsec) + (marchBackwardsOnBoundary ? 1 : 0)) % profile->verts.size();
+                    size_t currentBoundaryEdgeIdx = (std::get<2>(nextintsec) + (marchBackwardsOnBoundary ? 1 : 0)) % profile->mVerts.size();
                     size_t nextIntsecIdx = SIZE_MAX;
                     while( nextIntsecIdx == SIZE_MAX )
                     {
                         IfcFloat t = 1e10;
 
-                        size_t nextBoundaryEdgeIdx = marchBackwardsOnBoundary ? (currentBoundaryEdgeIdx + profile->verts.size() - 1) : currentBoundaryEdgeIdx + 1;
-                        nextBoundaryEdgeIdx %= profile->verts.size();
+                        size_t nextBoundaryEdgeIdx = marchBackwardsOnBoundary ? (currentBoundaryEdgeIdx + profile->mVerts.size() - 1) : currentBoundaryEdgeIdx + 1;
+                        nextBoundaryEdgeIdx %= profile->mVerts.size();
                         // vertices of the current boundary segments
-                        IfcVector3 currBoundaryPoint = profile->verts[currentBoundaryEdgeIdx];
-                        IfcVector3 nextBoundaryPoint = profile->verts[nextBoundaryEdgeIdx];
+                        IfcVector3 currBoundaryPoint = profile->mVerts[currentBoundaryEdgeIdx];
+                        IfcVector3 nextBoundaryPoint = profile->mVerts[nextBoundaryEdgeIdx];
                         // project the two onto the polygon
                         if( std::abs(polyNormal.z) > 1e-5 )
                         {
@@ -693,7 +691,7 @@ void ProcessPolygonalBoundedBooleanHalfSpaceDifference(const IfcPolygonalBounded
                         }
 
                         // quick endless loop check
-                        if( resultpoly.size() > blackside.size() + profile->verts.size() )
+                        if( resultpoly.size() > blackside.size() + profile->mVerts.size() )
                         {
                             IFCImporter::LogError("Encountered endless loop while clipping polygon against poly-bounded half space.");
                             break;
@@ -718,7 +716,7 @@ void ProcessPolygonalBoundedBooleanHalfSpaceDifference(const IfcPolygonalBounded
 }
 
 // ------------------------------------------------------------------------------------------------
-void ProcessBooleanExtrudedAreaSolidDifference(const IfcExtrudedAreaSolid* as, TempMesh& result,
+void ProcessBooleanExtrudedAreaSolidDifference(const Schema_2x3::IfcExtrudedAreaSolid* as, TempMesh& result,
                                                const TempMesh& first_operand,
                                                ConversionData& conv)
 {
@@ -738,12 +736,12 @@ void ProcessBooleanExtrudedAreaSolidDifference(const IfcExtrudedAreaSolid* as, T
 
     TempMesh temp;
 
-    std::vector<IfcVector3>::const_iterator vit = first_operand.verts.begin();
-    for(unsigned int pcount : first_operand.vertcnt) {
+    std::vector<IfcVector3>::const_iterator vit = first_operand.mVerts.begin();
+    for(unsigned int pcount : first_operand.mVertcnt) {
         temp.Clear();
 
-        temp.verts.insert(temp.verts.end(), vit, vit + pcount);
-        temp.vertcnt.push_back(pcount);
+        temp.mVerts.insert(temp.mVerts.end(), vit, vit + pcount);
+        temp.mVertcnt.push_back(pcount);
 
         // The algorithms used to generate mesh geometry sometimes
         // spit out lines or other degenerates which must be
@@ -767,11 +765,11 @@ void ProcessBooleanExtrudedAreaSolidDifference(const IfcExtrudedAreaSolid* as, T
 }
 
 // ------------------------------------------------------------------------------------------------
-void ProcessBoolean(const IfcBooleanResult& boolean, TempMesh& result, ConversionData& conv)
+void ProcessBoolean(const Schema_2x3::IfcBooleanResult& boolean, TempMesh& result, ConversionData& conv)
 {
     // supported CSG operations:
     //   DIFFERENCE
-    if(const IfcBooleanResult* const clip = boolean.ToPtr<IfcBooleanResult>()) {
+    if(const Schema_2x3::IfcBooleanResult* const clip = boolean.ToPtr<Schema_2x3::IfcBooleanResult>()) {
         if(clip->Operator != "DIFFERENCE") {
             IFCImporter::LogWarn("encountered unsupported boolean operator: " + (std::string)clip->Operator);
             return;
@@ -786,18 +784,18 @@ void ProcessBoolean(const IfcBooleanResult& boolean, TempMesh& result, Conversio
         //  IfcExtrudedAreaSolid -- reduce to an instance of the quadrify() algorithm
 
 
-        const IfcHalfSpaceSolid* const hs = clip->SecondOperand->ResolveSelectPtr<IfcHalfSpaceSolid>(conv.db);
-        const IfcExtrudedAreaSolid* const as = clip->SecondOperand->ResolveSelectPtr<IfcExtrudedAreaSolid>(conv.db);
+        const Schema_2x3::IfcHalfSpaceSolid* const hs = clip->SecondOperand->ResolveSelectPtr<Schema_2x3::IfcHalfSpaceSolid>(conv.db);
+        const Schema_2x3::IfcExtrudedAreaSolid* const as = clip->SecondOperand->ResolveSelectPtr<Schema_2x3::IfcExtrudedAreaSolid>(conv.db);
         if(!hs && !as) {
             IFCImporter::LogError("expected IfcHalfSpaceSolid or IfcExtrudedAreaSolid as second clipping operand");
             return;
         }
 
         TempMesh first_operand;
-        if(const IfcBooleanResult* const op0 = clip->FirstOperand->ResolveSelectPtr<IfcBooleanResult>(conv.db)) {
+        if(const Schema_2x3::IfcBooleanResult* const op0 = clip->FirstOperand->ResolveSelectPtr<Schema_2x3::IfcBooleanResult>(conv.db)) {
             ProcessBoolean(*op0,first_operand,conv);
         }
-        else if (const IfcSweptAreaSolid* const swept = clip->FirstOperand->ResolveSelectPtr<IfcSweptAreaSolid>(conv.db)) {
+        else if (const Schema_2x3::IfcSweptAreaSolid* const swept = clip->FirstOperand->ResolveSelectPtr<Schema_2x3::IfcSweptAreaSolid>(conv.db)) {
             ProcessSweptAreaSolid(*swept,first_operand,conv);
         }
         else {
@@ -807,7 +805,7 @@ void ProcessBoolean(const IfcBooleanResult& boolean, TempMesh& result, Conversio
 
         if(hs) {
 
-            const IfcPolygonalBoundedHalfSpace* const hs_bounded = clip->SecondOperand->ResolveSelectPtr<IfcPolygonalBoundedHalfSpace>(conv.db);
+            const Schema_2x3::IfcPolygonalBoundedHalfSpace* const hs_bounded = clip->SecondOperand->ResolveSelectPtr<Schema_2x3::IfcPolygonalBoundedHalfSpace>(conv.db);
             if (hs_bounded) {
                 ProcessPolygonalBoundedBooleanHalfSpaceDifference(hs_bounded, result, first_operand, conv);
             }

+ 34 - 35
code/IFCCurve.cpp → code/Importer/IFC/IFCCurve.cpp

@@ -57,7 +57,7 @@ namespace {
 class Conic : public Curve {
 public:
     // --------------------------------------------------
-    Conic(const IfcConic& entity, ConversionData& conv)
+    Conic(const Schema_2x3::IfcConic& entity, ConversionData& conv)
     : Curve(entity,conv) {
         IfcMatrix4 trafo;
         ConvertAxisPlacement(trafo,*entity.Position,conv);
@@ -103,7 +103,7 @@ protected:
 class Circle : public Conic {
 public:
     // --------------------------------------------------
-    Circle(const IfcCircle& entity, ConversionData& conv)
+    Circle(const Schema_2x3::IfcCircle& entity, ConversionData& conv)
         : Conic(entity,conv)
         , entity(entity)
     {
@@ -117,17 +117,16 @@ public:
     }
 
 private:
-    const IfcCircle& entity;
+    const Schema_2x3::IfcCircle& entity;
 };
 
-
 // --------------------------------------------------------------------------------
 // Ellipse
 // --------------------------------------------------------------------------------
 class Ellipse : public Conic {
 public:
     // --------------------------------------------------
-    Ellipse(const IfcEllipse& entity, ConversionData& conv)
+    Ellipse(const Schema_2x3::IfcEllipse& entity, ConversionData& conv)
     : Conic(entity,conv)
     , entity(entity) {
         // empty
@@ -141,7 +140,7 @@ public:
     }
 
 private:
-    const IfcEllipse& entity;
+    const Schema_2x3::IfcEllipse& entity;
 };
 
 // --------------------------------------------------------------------------------
@@ -150,7 +149,7 @@ private:
 class Line : public Curve {
 public:
     // --------------------------------------------------
-    Line(const IfcLine& entity, ConversionData& conv)
+    Line(const Schema_2x3::IfcLine& entity, ConversionData& conv)
     : Curve(entity,conv) {
         ConvertCartesianPoint(p,entity.Pnt);
         ConvertVector(v,entity.Dir);
@@ -181,12 +180,12 @@ public:
         ai_assert( InRange( b ) );
 
         if (a == b) {
-            out.verts.push_back(Eval(a));
+            out.mVerts.push_back(Eval(a));
             return;
         }
-        out.verts.reserve(out.verts.size()+2);
-        out.verts.push_back(Eval(a));
-        out.verts.push_back(Eval(b));
+        out.mVerts.reserve(out.mVerts.size()+2);
+        out.mVerts.push_back(Eval(a));
+        out.mVerts.push_back(Eval(b));
     }
 
     // --------------------------------------------------
@@ -208,11 +207,11 @@ class CompositeCurve : public BoundedCurve {
 
 public:
     // --------------------------------------------------
-    CompositeCurve(const IfcCompositeCurve& entity, ConversionData& conv)
+    CompositeCurve(const Schema_2x3::IfcCompositeCurve& entity, ConversionData& conv)
     : BoundedCurve(entity,conv)
     , total() {
         curves.reserve(entity.Segments.size());
-        for(const IfcCompositeCurveSegment& curveSegment :entity.Segments) {
+        for(const Schema_2x3::IfcCompositeCurveSegment& curveSegment :entity.Segments) {
             // according to the specification, this must be a bounded curve
             std::shared_ptr< Curve > cv(Curve::Convert(curveSegment.ParentCurve,conv));
             std::shared_ptr< BoundedCurve > bc = std::dynamic_pointer_cast<BoundedCurve>(cv);
@@ -282,14 +281,14 @@ public:
         ai_assert( InRange( b ) );
 
         const size_t cnt = EstimateSampleCount(a,b);
-        out.verts.reserve(out.verts.size() + cnt);
+        out.mVerts.reserve(out.mVerts.size() + cnt);
 
         for(const CurveEntry& entry : curves) {
-            const size_t cnt = out.verts.size();
+            const size_t cnt = out.mVerts.size();
             entry.first->SampleDiscrete(out);
 
-            if (!entry.second && cnt != out.verts.size()) {
-                std::reverse(out.verts.begin()+cnt,out.verts.end());
+            if (!entry.second && cnt != out.mVerts.size()) {
+                std::reverse(out.mVerts.begin()+cnt,out.mVerts.end());
             }
         }
     }
@@ -310,7 +309,7 @@ private:
 class TrimmedCurve : public BoundedCurve {
 public:
     // --------------------------------------------------
-    TrimmedCurve(const IfcTrimmedCurve& entity, ConversionData& conv)
+    TrimmedCurve(const Schema_2x3::IfcTrimmedCurve& entity, ConversionData& conv)
         : BoundedCurve(entity,conv)
     {
         base = std::shared_ptr<const Curve>(Curve::Convert(entity.BasisCurve,conv));
@@ -325,12 +324,12 @@ public:
         bool have_param = false, have_point = false;
         IfcVector3 point;
         for(const Entry sel :entity.Trim1) {
-            if (const EXPRESS::REAL* const r = sel->ToPtr<EXPRESS::REAL>()) {
+            if (const ::Assimp::STEP::EXPRESS::REAL* const r = sel->ToPtr<::Assimp::STEP::EXPRESS::REAL>()) {
                 range.first = *r;
                 have_param = true;
                 break;
             }
-            else if (const IfcCartesianPoint* const r = sel->ResolveSelectPtr<IfcCartesianPoint>(conv.db)) {
+            else if (const Schema_2x3::IfcCartesianPoint* const r = sel->ResolveSelectPtr<Schema_2x3::IfcCartesianPoint>(conv.db)) {
                 ConvertCartesianPoint(point,*r);
                 have_point = true;
             }
@@ -342,12 +341,12 @@ public:
         }
         have_param = false, have_point = false;
         for(const Entry sel :entity.Trim2) {
-            if (const EXPRESS::REAL* const r = sel->ToPtr<EXPRESS::REAL>()) {
+            if (const ::Assimp::STEP::EXPRESS::REAL* const r = sel->ToPtr<::Assimp::STEP::EXPRESS::REAL>()) {
                 range.second = *r;
                 have_param = true;
                 break;
             }
-            else if (const IfcCartesianPoint* const r = sel->ResolveSelectPtr<IfcCartesianPoint>(conv.db)) {
+            else if (const Schema_2x3::IfcCartesianPoint* const r = sel->ResolveSelectPtr<Schema_2x3::IfcCartesianPoint>(conv.db)) {
                 ConvertCartesianPoint(point,*r);
                 have_point = true;
             }
@@ -420,13 +419,13 @@ private:
 class PolyLine : public BoundedCurve {
 public:
     // --------------------------------------------------
-    PolyLine(const IfcPolyline& entity, ConversionData& conv)
+    PolyLine(const Schema_2x3::IfcPolyline& entity, ConversionData& conv)
         : BoundedCurve(entity,conv)
     {
         points.reserve(entity.Points.size());
 
         IfcVector3 t;
-        for(const IfcCartesianPoint& cp : entity.Points) {
+        for(const Schema_2x3::IfcCartesianPoint& cp : entity.Points) {
             ConvertCartesianPoint(t,cp);
             points.push_back(t);
         }
@@ -463,29 +462,29 @@ private:
 } // anon
 
 // ------------------------------------------------------------------------------------------------
-Curve* Curve::Convert(const IFC::IfcCurve& curve,ConversionData& conv) {
-    if(curve.ToPtr<IfcBoundedCurve>()) {
-        if(const IfcPolyline* c = curve.ToPtr<IfcPolyline>()) {
+Curve* Curve::Convert(const IFC::Schema_2x3::IfcCurve& curve,ConversionData& conv) {
+    if(curve.ToPtr<Schema_2x3::IfcBoundedCurve>()) {
+        if(const Schema_2x3::IfcPolyline* c = curve.ToPtr<Schema_2x3::IfcPolyline>()) {
             return new PolyLine(*c,conv);
         }
-        if(const IfcTrimmedCurve* c = curve.ToPtr<IfcTrimmedCurve>()) {
+        if(const Schema_2x3::IfcTrimmedCurve* c = curve.ToPtr<Schema_2x3::IfcTrimmedCurve>()) {
             return new TrimmedCurve(*c,conv);
         }
-        if(const IfcCompositeCurve* c = curve.ToPtr<IfcCompositeCurve>()) {
+        if(const Schema_2x3::IfcCompositeCurve* c = curve.ToPtr<Schema_2x3::IfcCompositeCurve>()) {
             return new CompositeCurve(*c,conv);
         }
     }
 
-    if(curve.ToPtr<IfcConic>()) {
-        if(const IfcCircle* c = curve.ToPtr<IfcCircle>()) {
+    if(curve.ToPtr<Schema_2x3::IfcConic>()) {
+        if(const Schema_2x3::IfcCircle* c = curve.ToPtr<Schema_2x3::IfcCircle>()) {
             return new Circle(*c,conv);
         }
-        if(const IfcEllipse* c = curve.ToPtr<IfcEllipse>()) {
+        if(const Schema_2x3::IfcEllipse* c = curve.ToPtr<Schema_2x3::IfcEllipse>()) {
             return new Ellipse(*c,conv);
         }
     }
 
-    if(const IfcLine* c = curve.ToPtr<IfcLine>()) {
+    if(const Schema_2x3::IfcLine* c = curve.ToPtr<Schema_2x3::IfcLine>()) {
         return new Line(*c,conv);
     }
 
@@ -589,11 +588,11 @@ void Curve::SampleDiscrete(TempMesh& out,IfcFloat a, IfcFloat b) const {
     ai_assert( InRange( b ) );
 
     const size_t cnt = std::max(static_cast<size_t>(0),EstimateSampleCount(a,b));
-    out.verts.reserve( out.verts.size() + cnt + 1);
+    out.mVerts.reserve( out.mVerts.size() + cnt + 1);
 
     IfcFloat p = a, delta = (b-a)/cnt;
     for(size_t i = 0; i <= cnt; ++i, p += delta) {
-        out.verts.push_back(Eval(p));
+        out.mVerts.push_back(Eval(p));
     }
 }
 

+ 93 - 93
code/IFCGeometry.cpp → code/Importer/IFC/IFCGeometry.cpp

@@ -46,8 +46,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 #ifndef ASSIMP_BUILD_NO_IFC_IMPORTER
 #include "IFCUtil.h"
-#include "PolyTools.h"
-#include "ProcessHelper.h"
+#include "code/PolyTools.h"
+#include "code/ProcessHelper.h"
 
 #include "../contrib/poly2tri/poly2tri/poly2tri.h"
 #include "../contrib/clipper/clipper.hpp"
@@ -59,27 +59,27 @@ namespace Assimp {
     namespace IFC {
 
 // ------------------------------------------------------------------------------------------------
-bool ProcessPolyloop(const IfcPolyLoop& loop, TempMesh& meshout, ConversionData& /*conv*/)
+bool ProcessPolyloop(const Schema_2x3::IfcPolyLoop& loop, TempMesh& meshout, ConversionData& /*conv*/)
 {
     size_t cnt = 0;
-    for(const IfcCartesianPoint& c : loop.Polygon) {
+    for(const Schema_2x3::IfcCartesianPoint& c : loop.Polygon) {
         IfcVector3 tmp;
         ConvertCartesianPoint(tmp,c);
 
-        meshout.verts.push_back(tmp);
+        meshout.mVerts.push_back(tmp);
         ++cnt;
     }
 
-    meshout.vertcnt.push_back(static_cast<unsigned int>(cnt));
+    meshout.mVertcnt.push_back(static_cast<unsigned int>(cnt));
 
     // zero- or one- vertex polyloops simply ignored
-    if (meshout.vertcnt.back() > 1) {
+    if (meshout.mVertcnt.back() > 1) {
         return true;
     }
 
-    if (meshout.vertcnt.back()==1) {
-        meshout.vertcnt.pop_back();
-        meshout.verts.pop_back();
+    if (meshout.mVertcnt.back()==1) {
+        meshout.mVertcnt.pop_back();
+        meshout.mVerts.pop_back();
     }
     return false;
 }
@@ -88,19 +88,19 @@ bool ProcessPolyloop(const IfcPolyLoop& loop, TempMesh& meshout, ConversionData&
 void ProcessPolygonBoundaries(TempMesh& result, const TempMesh& inmesh, size_t master_bounds = (size_t)-1)
 {
     // handle all trivial cases
-    if(inmesh.vertcnt.empty()) {
+    if(inmesh.mVertcnt.empty()) {
         return;
     }
-    if(inmesh.vertcnt.size() == 1) {
+    if(inmesh.mVertcnt.size() == 1) {
         result.Append(inmesh);
         return;
     }
 
-    ai_assert(std::count(inmesh.vertcnt.begin(), inmesh.vertcnt.end(), 0) == 0);
+    ai_assert(std::count(inmesh.mVertcnt.begin(), inmesh.mVertcnt.end(), 0) == 0);
 
     typedef std::vector<unsigned int>::const_iterator face_iter;
 
-    face_iter begin = inmesh.vertcnt.begin(), end = inmesh.vertcnt.end(), iit;
+    face_iter begin = inmesh.mVertcnt.begin(), end = inmesh.mVertcnt.end(), iit;
     std::vector<unsigned int>::const_iterator outer_polygon_it = end;
 
     // major task here: given a list of nested polygon boundaries (one of which
@@ -119,7 +119,7 @@ void ProcessPolygonBoundaries(TempMesh& result, const TempMesh& inmesh, size_t m
     // shall be of the type IfcFaceOuterBound'
     IfcFloat area_outer_polygon = 1e-10f;
     if (master_bounds != (size_t)-1) {
-        ai_assert(master_bounds < inmesh.vertcnt.size());
+        ai_assert(master_bounds < inmesh.mVertcnt.size());
         outer_polygon_it = begin + master_bounds;
     }
     else {
@@ -146,9 +146,9 @@ void ProcessPolygonBoundaries(TempMesh& result, const TempMesh& inmesh, size_t m
     // this is the plane onto which the quadrulate algorithm will
     // project the entire mesh.
     std::vector<TempOpening> fake_openings;
-    fake_openings.reserve(inmesh.vertcnt.size()-1);
+    fake_openings.reserve(inmesh.mVertcnt.size()-1);
 
-    std::vector<IfcVector3>::const_iterator vit = inmesh.verts.begin(), outer_vit;
+    std::vector<IfcVector3>::const_iterator vit = inmesh.mVerts.begin(), outer_vit;
 
     for(iit = begin; iit != end; vit += *iit++) {
         if (iit == outer_polygon_it) {
@@ -171,32 +171,32 @@ void ProcessPolygonBoundaries(TempMesh& result, const TempMesh& inmesh, size_t m
         opening.solid = NULL;
 
         opening.profileMesh = std::make_shared<TempMesh>();
-        opening.profileMesh->verts.reserve(*iit);
-        opening.profileMesh->vertcnt.push_back(*iit);
+        opening.profileMesh->mVerts.reserve(*iit);
+        opening.profileMesh->mVertcnt.push_back(*iit);
 
-        std::copy(vit, vit + *iit, std::back_inserter(opening.profileMesh->verts));
+        std::copy(vit, vit + *iit, std::back_inserter(opening.profileMesh->mVerts));
     }
 
     // fill a mesh with ONLY the main polygon
     TempMesh temp;
-    temp.verts.reserve(outer_polygon_size);
-    temp.vertcnt.push_back(static_cast<unsigned int>(outer_polygon_size));
+    temp.mVerts.reserve(outer_polygon_size);
+    temp.mVertcnt.push_back(static_cast<unsigned int>(outer_polygon_size));
     std::copy(outer_vit, outer_vit+outer_polygon_size,
-        std::back_inserter(temp.verts));
+        std::back_inserter(temp.mVerts));
 
     GenerateOpenings(fake_openings, normals, temp, false, false);
     result.Append(temp);
 }
 
 // ------------------------------------------------------------------------------------------------
-void ProcessConnectedFaceSet(const IfcConnectedFaceSet& fset, TempMesh& result, ConversionData& conv)
+void ProcessConnectedFaceSet(const Schema_2x3::IfcConnectedFaceSet& fset, TempMesh& result, ConversionData& conv)
 {
-    for(const IfcFace& face : fset.CfsFaces) {
+    for(const Schema_2x3::IfcFace& face : fset.CfsFaces) {
         // size_t ob = -1, cnt = 0;
         TempMesh meshout;
-        for(const IfcFaceBound& bound : face.Bounds) {
+        for(const Schema_2x3::IfcFaceBound& bound : face.Bounds) {
 
-            if(const IfcPolyLoop* const polyloop = bound.Bound->ToPtr<IfcPolyLoop>()) {
+            if(const Schema_2x3::IfcPolyLoop* const polyloop = bound.Bound->ToPtr<Schema_2x3::IfcPolyLoop>()) {
                 if(ProcessPolyloop(*polyloop, meshout,conv)) {
 
                     // The outer boundary is better determined by checking which
@@ -230,12 +230,12 @@ void ProcessConnectedFaceSet(const IfcConnectedFaceSet& fset, TempMesh& result,
 }
 
 // ------------------------------------------------------------------------------------------------
-void ProcessRevolvedAreaSolid(const IfcRevolvedAreaSolid& solid, TempMesh& result, ConversionData& conv)
+void ProcessRevolvedAreaSolid(const Schema_2x3::IfcRevolvedAreaSolid& solid, TempMesh& result, ConversionData& conv)
 {
     TempMesh meshout;
 
     // first read the profile description
-    if(!ProcessProfile(*solid.SweptArea,meshout,conv) || meshout.verts.size()<=1) {
+    if(!ProcessProfile(*solid.SweptArea,meshout,conv) || meshout.mVerts.size()<=1) {
         return;
     }
 
@@ -246,7 +246,7 @@ void ProcessRevolvedAreaSolid(const IfcRevolvedAreaSolid& solid, TempMesh& resul
     IfcMatrix4::Translation(pos,tb0);
     IfcMatrix4::Translation(-pos,tb1);
 
-    const std::vector<IfcVector3>& in = meshout.verts;
+    const std::vector<IfcVector3>& in = meshout.mVerts;
     const size_t size=in.size();
 
     bool has_area = solid.SweptArea->ProfileType == "AREA" && size>2;
@@ -263,14 +263,14 @@ void ProcessRevolvedAreaSolid(const IfcRevolvedAreaSolid& solid, TempMesh& resul
 
     has_area = has_area && std::fabs(max_angle) < AI_MATH_TWO_PI_F*0.99;
 
-    result.verts.reserve(size*((cnt_segments+1)*4+(has_area?2:0)));
-    result.vertcnt.reserve(size*cnt_segments+2);
+    result.mVerts.reserve(size*((cnt_segments+1)*4+(has_area?2:0)));
+    result.mVertcnt.reserve(size*cnt_segments+2);
 
     IfcMatrix4 rot;
     rot = tb0 * IfcMatrix4::Rotation(delta,axis,rot) * tb1;
 
     size_t base = 0;
-    std::vector<IfcVector3>& out = result.verts;
+    std::vector<IfcVector3>& out = result.mVerts;
 
     // dummy data to simplify later processing
     for(size_t i = 0; i < size; ++i) {
@@ -281,7 +281,7 @@ void ProcessRevolvedAreaSolid(const IfcRevolvedAreaSolid& solid, TempMesh& resul
         for(size_t i = 0; i < size; ++i) {
             const size_t next = (i+1)%size;
 
-            result.vertcnt.push_back(4);
+            result.mVertcnt.push_back(4);
             const IfcVector3 base_0 = out[base+i*4+3],base_1 = out[base+next*4+3];
 
             out.push_back(base_0);
@@ -305,8 +305,8 @@ void ProcessRevolvedAreaSolid(const IfcRevolvedAreaSolid& solid, TempMesh& resul
         for(size_t i = 0; i < size; ++i ) {
             out.push_back(out[i*4]);
         }
-        result.vertcnt.push_back(static_cast<unsigned int>(size));
-        result.vertcnt.push_back(static_cast<unsigned int>(size));
+        result.mVertcnt.push_back(static_cast<unsigned int>(size));
+        result.mVertcnt.push_back(static_cast<unsigned int>(size));
     }
 
     IfcMatrix4 trafo;
@@ -316,10 +316,8 @@ void ProcessRevolvedAreaSolid(const IfcRevolvedAreaSolid& solid, TempMesh& resul
     IFCImporter::LogDebug("generate mesh procedurally by radial extrusion (IfcRevolvedAreaSolid)");
 }
 
-
-
 // ------------------------------------------------------------------------------------------------
-void ProcessSweptDiskSolid(const IfcSweptDiskSolid solid, TempMesh& result, ConversionData& conv)
+void ProcessSweptDiskSolid(const Schema_2x3::IfcSweptDiskSolid solid, TempMesh& result, ConversionData& conv)
 {
     const Curve* const curve = Curve::Convert(*solid.Directrix, conv);
     if(!curve) {
@@ -332,12 +330,12 @@ void ProcessSweptDiskSolid(const IfcSweptDiskSolid solid, TempMesh& result, Conv
 
 	TempMesh temp;
 	curve->SampleDiscrete(temp, solid.StartParam, solid.EndParam);
-	const std::vector<IfcVector3>& curve_points = temp.verts;
+	const std::vector<IfcVector3>& curve_points = temp.mVerts;
 
     const size_t samples = curve_points.size();
 
-    result.verts.reserve(cnt_segments * samples * 4);
-    result.vertcnt.reserve((cnt_segments - 1) * samples);
+    result.mVerts.reserve(cnt_segments * samples * 4);
+    result.mVertcnt.reserve((cnt_segments - 1) * samples);
 
     std::vector<IfcVector3> points;
     points.reserve(cnt_segments * samples);
@@ -434,22 +432,22 @@ void ProcessSweptDiskSolid(const IfcSweptDiskSolid solid, TempMesh& result, Conv
 
         for (unsigned int seg = 0; seg < cnt_segments; ++seg) {
 
-            result.verts.push_back(points[ i * cnt_segments + (seg % cnt_segments)]);
-            result.verts.push_back(points[ i * cnt_segments + (seg + 1) % cnt_segments]);
-            result.verts.push_back(points[ (i+1) * cnt_segments + ((seg + 1 + best_pair_offset) % cnt_segments)]);
-            result.verts.push_back(points[ (i+1) * cnt_segments + ((seg + best_pair_offset) % cnt_segments)]);
+            result.mVerts.push_back(points[ i * cnt_segments + (seg % cnt_segments)]);
+            result.mVerts.push_back(points[ i * cnt_segments + (seg + 1) % cnt_segments]);
+            result.mVerts.push_back(points[ (i+1) * cnt_segments + ((seg + 1 + best_pair_offset) % cnt_segments)]);
+            result.mVerts.push_back(points[ (i+1) * cnt_segments + ((seg + best_pair_offset) % cnt_segments)]);
 
-            IfcVector3& v1 = *(result.verts.end()-1);
-            IfcVector3& v2 = *(result.verts.end()-2);
-            IfcVector3& v3 = *(result.verts.end()-3);
-            IfcVector3& v4 = *(result.verts.end()-4);
+            IfcVector3& v1 = *(result.mVerts.end()-1);
+            IfcVector3& v2 = *(result.mVerts.end()-2);
+            IfcVector3& v3 = *(result.mVerts.end()-3);
+            IfcVector3& v4 = *(result.mVerts.end()-4);
 
             if (((v4-v3) ^ (v4-v1)) * (v4 - curve_points[i]) < 0.0f) {
                 std::swap(v4, v1);
                 std::swap(v3, v2);
             }
 
-            result.vertcnt.push_back(4);
+            result.mVertcnt.push_back(4);
         }
     }
 
@@ -459,14 +457,15 @@ void ProcessSweptDiskSolid(const IfcSweptDiskSolid solid, TempMesh& result, Conv
 // ------------------------------------------------------------------------------------------------
 IfcMatrix3 DerivePlaneCoordinateSpace(const TempMesh& curmesh, bool& ok, IfcVector3& norOut)
 {
-    const std::vector<IfcVector3>& out = curmesh.verts;
+    const std::vector<IfcVector3>& out = curmesh.mVerts;
     IfcMatrix3 m;
 
     ok = true;
 
     // The input "mesh" must be a single polygon
     const size_t s = out.size();
-    assert(curmesh.vertcnt.size() == 1 && curmesh.vertcnt.back() == s);
+    ai_assert( curmesh.mVertcnt.size() == 1 );
+    ai_assert( curmesh.mVertcnt.back() == s);
 
     const IfcVector3 any_point = out[s-1];
     IfcVector3 nor;
@@ -477,9 +476,10 @@ IfcMatrix3 DerivePlaneCoordinateSpace(const TempMesh& curmesh, bool& ok, IfcVect
     // axis for the 2D coordinate space on the polygon plane, exploiting the
     // fact that the input polygon is nearly always a quad.
     bool done = false;
-    size_t i, j;
-    for (i = 0; !done && i < s-2; done || ++i) {
-        for (j = i+1; j < s-1; ++j) {
+    size_t idx( 0 );
+    for (size_t i = 0; !done && i < s-2; done || ++i) {
+        idx = i;
+        for (size_t j = i+1; j < s-1; ++j) {
             nor = -((out[i]-any_point)^(out[j]-any_point));
             if(std::fabs(nor.Length()) > 1e-8f) {
                 done = true;
@@ -496,7 +496,7 @@ IfcMatrix3 DerivePlaneCoordinateSpace(const TempMesh& curmesh, bool& ok, IfcVect
     nor.Normalize();
     norOut = nor;
 
-    IfcVector3 r = (out[i]-any_point);
+    IfcVector3 r = (out[idx]-any_point);
     r.Normalize();
 
     //if(d) {
@@ -524,12 +524,12 @@ IfcMatrix3 DerivePlaneCoordinateSpace(const TempMesh& curmesh, bool& ok, IfcVect
 }
 
 // Extrudes the given polygon along the direction, converts it into an opening or applies all openings as necessary.
-void ProcessExtrudedArea(const IfcExtrudedAreaSolid& solid, const TempMesh& curve,
+void ProcessExtrudedArea(const Schema_2x3::IfcExtrudedAreaSolid& solid, const TempMesh& curve,
     const IfcVector3& extrusionDir, TempMesh& result, ConversionData &conv, bool collect_openings)
 {
     // Outline: 'curve' is now a list of vertex points forming the underlying profile, extrude along the given axis,
     // forming new triangles.
-    const bool has_area = solid.SweptArea->ProfileType == "AREA" && curve.verts.size() > 2;
+    const bool has_area = solid.SweptArea->ProfileType == "AREA" && curve.mVerts.size() > 2;
     if( solid.Depth < 1e-6 ) {
         if( has_area ) {
             result.Append(curve);
@@ -537,9 +537,9 @@ void ProcessExtrudedArea(const IfcExtrudedAreaSolid& solid, const TempMesh& curv
         return;
     }
 
-    result.verts.reserve(curve.verts.size()*(has_area ? 4 : 2));
-    result.vertcnt.reserve(curve.verts.size() + 2);
-    std::vector<IfcVector3> in = curve.verts;
+    result.mVerts.reserve(curve.mVerts.size()*(has_area ? 4 : 2));
+    result.mVertcnt.reserve(curve.mVerts.size() + 2);
+    std::vector<IfcVector3> in = curve.mVerts;
 
     // First step: transform all vertices into the target coordinate space
     IfcMatrix4 trafo;
@@ -582,24 +582,24 @@ void ProcessExtrudedArea(const IfcExtrudedAreaSolid& solid, const TempMesh& curv
         for(TempOpening& t : *conv.apply_openings) {
             TempMesh& bounds = *t.profileMesh.get();
 
-            if( bounds.verts.size() <= 2 ) {
+            if( bounds.mVerts.size() <= 2 ) {
                 nors.push_back(IfcVector3());
                 continue;
             }
-            nors.push_back(((bounds.verts[2] - bounds.verts[0]) ^ (bounds.verts[1] - bounds.verts[0])).Normalize());
+            nors.push_back(((bounds.mVerts[2] - bounds.mVerts[0]) ^ (bounds.mVerts[1] - bounds.mVerts[0])).Normalize());
         }
     }
 
 
     TempMesh temp;
     TempMesh& curmesh = openings ? temp : result;
-    std::vector<IfcVector3>& out = curmesh.verts;
+    std::vector<IfcVector3>& out = curmesh.mVerts;
 
     size_t sides_with_openings = 0;
     for( size_t i = 0; i < in.size(); ++i ) {
         const size_t next = (i + 1) % in.size();
 
-        curmesh.vertcnt.push_back(4);
+        curmesh.mVertcnt.push_back(4);
 
         out.push_back(in[i]);
         out.push_back(in[next]);
@@ -638,7 +638,7 @@ void ProcessExtrudedArea(const IfcExtrudedAreaSolid& solid, const TempMesh& curv
                     out.push_back(in[i]);
             }
 
-            curmesh.vertcnt.push_back(static_cast<unsigned int>(in.size()));
+            curmesh.mVertcnt.push_back(static_cast<unsigned int>(in.size()));
             if( openings && in.size() > 2 ) {
                 if( GenerateOpenings(*conv.apply_openings, nors, temp, true, true, dir) ) {
                     ++sides_with_v_openings;
@@ -664,8 +664,8 @@ void ProcessExtrudedArea(const IfcExtrudedAreaSolid& solid, const TempMesh& curv
         profile->Swap(result);
 
         std::shared_ptr<TempMesh> profile2D = std::shared_ptr<TempMesh>(new TempMesh());
-        profile2D->verts.insert(profile2D->verts.end(), in.begin(), in.end());
-        profile2D->vertcnt.push_back(static_cast<unsigned int>(in.size()));
+        profile2D->mVerts.insert(profile2D->mVerts.end(), in.begin(), in.end());
+        profile2D->mVertcnt.push_back(static_cast<unsigned int>(in.size()));
         conv.collect_openings->push_back(TempOpening(&solid, dir, profile, profile2D));
 
         ai_assert(result.IsEmpty());
@@ -673,13 +673,13 @@ void ProcessExtrudedArea(const IfcExtrudedAreaSolid& solid, const TempMesh& curv
 }
 
 // ------------------------------------------------------------------------------------------------
-void ProcessExtrudedAreaSolid(const IfcExtrudedAreaSolid& solid, TempMesh& result,
+void ProcessExtrudedAreaSolid(const Schema_2x3::IfcExtrudedAreaSolid& solid, TempMesh& result,
     ConversionData& conv, bool collect_openings)
 {
     TempMesh meshout;
 
     // First read the profile description.
-    if(!ProcessProfile(*solid.SweptArea,meshout,conv) || meshout.verts.size()<=1) {
+    if(!ProcessProfile(*solid.SweptArea,meshout,conv) || meshout.mVerts.size()<=1) {
         return;
     }
 
@@ -691,13 +691,13 @@ void ProcessExtrudedAreaSolid(const IfcExtrudedAreaSolid& solid, TempMesh& resul
     // and there's still so many corner cases uncovered - we really need a generic solution to all of this hole carving.
     std::vector<TempOpening> fisherPriceMyFirstOpenings;
     std::vector<TempOpening>* oldApplyOpenings = conv.apply_openings;
-    if( const IfcArbitraryProfileDefWithVoids* const cprofile = solid.SweptArea->ToPtr<IfcArbitraryProfileDefWithVoids>() ) {
+    if( const Schema_2x3::IfcArbitraryProfileDefWithVoids* const cprofile = solid.SweptArea->ToPtr<Schema_2x3::IfcArbitraryProfileDefWithVoids>() ) {
         if( !cprofile->InnerCurves.empty() ) {
             // read all inner curves and extrude them to form proper openings.
             std::vector<TempOpening>* oldCollectOpenings = conv.collect_openings;
             conv.collect_openings = &fisherPriceMyFirstOpenings;
 
-            for(const IfcCurve* curve : cprofile->InnerCurves) {
+            for (const Schema_2x3::IfcCurve* curve : cprofile->InnerCurves) {
                 TempMesh curveMesh, tempMesh;
                 ProcessCurve(*curve, curveMesh, conv);
                 ProcessExtrudedArea(solid, curveMesh, dir, tempMesh, conv, true);
@@ -713,13 +713,13 @@ void ProcessExtrudedAreaSolid(const IfcExtrudedAreaSolid& solid, TempMesh& resul
 }
 
 // ------------------------------------------------------------------------------------------------
-void ProcessSweptAreaSolid(const IfcSweptAreaSolid& swept, TempMesh& meshout,
+void ProcessSweptAreaSolid(const Schema_2x3::IfcSweptAreaSolid& swept, TempMesh& meshout,
     ConversionData& conv)
 {
-    if(const IfcExtrudedAreaSolid* const solid = swept.ToPtr<IfcExtrudedAreaSolid>()) {
+    if(const Schema_2x3::IfcExtrudedAreaSolid* const solid = swept.ToPtr<Schema_2x3::IfcExtrudedAreaSolid>()) {
         ProcessExtrudedAreaSolid(*solid,meshout,conv, !!conv.collect_openings);
     }
-    else if(const IfcRevolvedAreaSolid* const rev = swept.ToPtr<IfcRevolvedAreaSolid>()) {
+    else if(const Schema_2x3::IfcRevolvedAreaSolid* const rev = swept.ToPtr<Schema_2x3::IfcRevolvedAreaSolid>()) {
         ProcessRevolvedAreaSolid(*rev,meshout,conv);
     }
     else {
@@ -728,16 +728,16 @@ void ProcessSweptAreaSolid(const IfcSweptAreaSolid& swept, TempMesh& meshout,
 }
 
 // ------------------------------------------------------------------------------------------------
-bool ProcessGeometricItem(const IfcRepresentationItem& geo, unsigned int matid, std::vector<unsigned int>& mesh_indices,
+bool ProcessGeometricItem(const Schema_2x3::IfcRepresentationItem& geo, unsigned int matid, std::vector<unsigned int>& mesh_indices,
     ConversionData& conv)
 {
     bool fix_orientation = false;
     std::shared_ptr< TempMesh > meshtmp = std::make_shared<TempMesh>();
-    if(const IfcShellBasedSurfaceModel* shellmod = geo.ToPtr<IfcShellBasedSurfaceModel>()) {
-        for(std::shared_ptr<const IfcShell> shell :shellmod->SbsmBoundary) {
+    if(const Schema_2x3::IfcShellBasedSurfaceModel* shellmod = geo.ToPtr<Schema_2x3::IfcShellBasedSurfaceModel>()) {
+        for(std::shared_ptr<const Schema_2x3::IfcShell> shell :shellmod->SbsmBoundary) {
             try {
-                const EXPRESS::ENTITY& e = shell->To<ENTITY>();
-                const IfcConnectedFaceSet& fs = conv.db.MustGetObject(e).To<IfcConnectedFaceSet>();
+                const ::Assimp::STEP::EXPRESS::ENTITY& e = shell->To<::Assimp::STEP::EXPRESS::ENTITY>();
+                const Schema_2x3::IfcConnectedFaceSet& fs = conv.db.MustGetObject(e).To<Schema_2x3::IfcConnectedFaceSet>();
 
                 ProcessConnectedFaceSet(fs,*meshtmp.get(),conv);
             }
@@ -747,30 +747,30 @@ bool ProcessGeometricItem(const IfcRepresentationItem& geo, unsigned int matid,
         }
         fix_orientation = true;
     }
-    else  if(const IfcConnectedFaceSet* fset = geo.ToPtr<IfcConnectedFaceSet>()) {
+    else  if(const Schema_2x3::IfcConnectedFaceSet* fset = geo.ToPtr<Schema_2x3::IfcConnectedFaceSet>()) {
         ProcessConnectedFaceSet(*fset,*meshtmp.get(),conv);
         fix_orientation = true;
     }
-    else  if(const IfcSweptAreaSolid* swept = geo.ToPtr<IfcSweptAreaSolid>()) {
+    else  if(const Schema_2x3::IfcSweptAreaSolid* swept = geo.ToPtr<Schema_2x3::IfcSweptAreaSolid>()) {
         ProcessSweptAreaSolid(*swept,*meshtmp.get(),conv);
     }
-    else  if(const IfcSweptDiskSolid* disk = geo.ToPtr<IfcSweptDiskSolid>()) {
+    else  if(const Schema_2x3::IfcSweptDiskSolid* disk = geo.ToPtr<Schema_2x3::IfcSweptDiskSolid>()) {
         ProcessSweptDiskSolid(*disk,*meshtmp.get(),conv);
     }
-    else if(const IfcManifoldSolidBrep* brep = geo.ToPtr<IfcManifoldSolidBrep>()) {
+    else if(const Schema_2x3::IfcManifoldSolidBrep* brep = geo.ToPtr<Schema_2x3::IfcManifoldSolidBrep>()) {
         ProcessConnectedFaceSet(brep->Outer,*meshtmp.get(),conv);
         fix_orientation = true;
     }
-    else if(const IfcFaceBasedSurfaceModel* surf = geo.ToPtr<IfcFaceBasedSurfaceModel>()) {
-        for(const IfcConnectedFaceSet& fc : surf->FbsmFaces) {
+    else if(const Schema_2x3::IfcFaceBasedSurfaceModel* surf = geo.ToPtr<Schema_2x3::IfcFaceBasedSurfaceModel>()) {
+        for(const Schema_2x3::IfcConnectedFaceSet& fc : surf->FbsmFaces) {
             ProcessConnectedFaceSet(fc,*meshtmp.get(),conv);
         }
         fix_orientation = true;
     }
-    else  if(const IfcBooleanResult* boolean = geo.ToPtr<IfcBooleanResult>()) {
+    else  if(const Schema_2x3::IfcBooleanResult* boolean = geo.ToPtr<Schema_2x3::IfcBooleanResult>()) {
         ProcessBoolean(*boolean,*meshtmp.get(),conv);
     }
-    else if(geo.ToPtr<IfcBoundingBox>()) {
+    else if(geo.ToPtr<Schema_2x3::IfcBoundingBox>()) {
         // silently skip over bounding boxes
         return false;
     }
@@ -788,7 +788,7 @@ bool ProcessGeometricItem(const IfcRepresentationItem& geo, unsigned int matid,
     // which returns an empty mesh.
     if(conv.collect_openings) {
         if (!meshtmp->IsEmpty()) {
-            conv.collect_openings->push_back(TempOpening(geo.ToPtr<IfcSolidModel>(),
+            conv.collect_openings->push_back(TempOpening(geo.ToPtr<Schema_2x3::IfcSolidModel>(),
                 IfcVector3(0,0,0),
                 meshtmp,
                 std::shared_ptr<TempMesh>()));
@@ -837,7 +837,7 @@ void AssignAddedMeshes(std::vector<unsigned int>& mesh_indices,aiNode* nd,
 }
 
 // ------------------------------------------------------------------------------------------------
-bool TryQueryMeshCache(const IfcRepresentationItem& item,
+bool TryQueryMeshCache(const Schema_2x3::IfcRepresentationItem& item,
     std::vector<unsigned int>& mesh_indices, unsigned int mat_index,
     ConversionData& conv)
 {
@@ -851,7 +851,7 @@ bool TryQueryMeshCache(const IfcRepresentationItem& item,
 }
 
 // ------------------------------------------------------------------------------------------------
-void PopulateMeshCache(const IfcRepresentationItem& item,
+void PopulateMeshCache(const Schema_2x3::IfcRepresentationItem& item,
     const std::vector<unsigned int>& mesh_indices, unsigned int mat_index,
     ConversionData& conv)
 {
@@ -860,7 +860,7 @@ void PopulateMeshCache(const IfcRepresentationItem& item,
 }
 
 // ------------------------------------------------------------------------------------------------
-bool ProcessRepresentationItem(const IfcRepresentationItem& item, unsigned int matid,
+bool ProcessRepresentationItem(const Schema_2x3::IfcRepresentationItem& item, unsigned int matid,
     std::vector<unsigned int>& mesh_indices,
     ConversionData& conv)
 {

+ 61 - 69
code/IFCLoader.cpp → code/Importer/IFC/IFCLoader.cpp

@@ -59,7 +59,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 #include "IFCUtil.h"
 
-#include "MemoryIOWrapper.h"
+#include <assimp/MemoryIOWrapper.h>
 #include <assimp/scene.h>
 #include <assimp/Importer.hpp>
 #include <assimp/importerdesc.h>
@@ -99,7 +99,7 @@ void SetUnits(ConversionData& conv);
 void SetCoordinateSpace(ConversionData& conv);
 void ProcessSpatialStructures(ConversionData& conv);
 void MakeTreeRelative(ConversionData& conv);
-void ConvertUnit(const EXPRESS::DataType& dt,ConversionData& conv);
+void ConvertUnit(const ::Assimp::STEP::EXPRESS::DataType& dt,ConversionData& conv);
 
 } // anon
 
@@ -152,7 +152,6 @@ const aiImporterDesc* IFCImporter::GetInfo () const
     return &desc;
 }
 
-
 // ------------------------------------------------------------------------------------------------
 // Setup configuration properties for the loader
 void IFCImporter::SetupProperties(const Importer* pImp)
@@ -167,8 +166,7 @@ void IFCImporter::SetupProperties(const Importer* pImp)
 
 // ------------------------------------------------------------------------------------------------
 // Imports the given file into the given scene structure.
-void IFCImporter::InternReadFile( const std::string& pFile,
-    aiScene* pScene, IOSystem* pIOHandler)
+void IFCImporter::InternReadFile( const std::string& pFile, aiScene* pScene, IOSystem* pIOHandler)
 {
     std::shared_ptr<IOStream> stream(pIOHandler->Open(pFile));
     if (!stream) {
@@ -253,8 +251,8 @@ void IFCImporter::InternReadFile( const std::string& pFile,
     }
 
     // obtain a copy of the machine-generated IFC scheme
-    EXPRESS::ConversionSchema schema;
-    GetSchema(schema);
+    ::Assimp::STEP::EXPRESS::ConversionSchema schema;
+    Schema_2x3::GetSchema(schema);
 
     // tell the reader which entity types to track with special care
     static const char* const types_to_track[] = {
@@ -273,7 +271,7 @@ void IFCImporter::InternReadFile( const std::string& pFile,
         ThrowException("missing IfcProject entity");
     }
 
-    ConversionData conv(*db,proj->To<IfcProject>(),pScene,settings);
+    ConversionData conv(*db,proj->To<Schema_2x3::IfcProject>(),pScene,settings);
     SetUnits(conv);
     SetCoordinateSpace(conv);
     ProcessSpatialStructures(conv);
@@ -323,10 +321,9 @@ namespace {
 
 
 // ------------------------------------------------------------------------------------------------
-void ConvertUnit(const IfcNamedUnit& unit,ConversionData& conv)
+void ConvertUnit(const Schema_2x3::IfcNamedUnit& unit,ConversionData& conv)
 {
-    if(const IfcSIUnit* const si = unit.ToPtr<IfcSIUnit>()) {
-
+    if(const Schema_2x3::IfcSIUnit* const si = unit.ToPtr<Schema_2x3::IfcSIUnit>()) {
         if(si->UnitType == "LENGTHUNIT") {
             conv.len_scale = si->Prefix ? ConvertSIPrefix(si->Prefix) : 1.f;
             IFCImporter::LogDebug("got units used for lengths");
@@ -337,11 +334,10 @@ void ConvertUnit(const IfcNamedUnit& unit,ConversionData& conv)
             }
         }
     }
-    else if(const IfcConversionBasedUnit* const convu = unit.ToPtr<IfcConversionBasedUnit>()) {
-
+    else if(const Schema_2x3::IfcConversionBasedUnit* const convu = unit.ToPtr<Schema_2x3::IfcConversionBasedUnit>()) {
         if(convu->UnitType == "PLANEANGLEUNIT") {
             try {
-                conv.angle_scale = convu->ConversionFactor->ValueComponent->To<EXPRESS::REAL>();
+                conv.angle_scale = convu->ConversionFactor->ValueComponent->To<::Assimp::STEP::EXPRESS::REAL>();
                 ConvertUnit(*convu->ConversionFactor->UnitComponent,conv);
                 IFCImporter::LogDebug("got units used for angles");
             }
@@ -353,12 +349,12 @@ void ConvertUnit(const IfcNamedUnit& unit,ConversionData& conv)
 }
 
 // ------------------------------------------------------------------------------------------------
-void ConvertUnit(const EXPRESS::DataType& dt,ConversionData& conv)
+void ConvertUnit(const ::Assimp::STEP::EXPRESS::DataType& dt,ConversionData& conv)
 {
     try {
-        const EXPRESS::ENTITY& e = dt.To<ENTITY>();
+        const ::Assimp::STEP::EXPRESS::ENTITY& e = dt.To<::Assimp::STEP::EXPRESS::ENTITY>();
 
-        const IfcNamedUnit& unit = e.ResolveSelect<IfcNamedUnit>(conv.db);
+        const Schema_2x3::IfcNamedUnit& unit = e.ResolveSelect<Schema_2x3::IfcNamedUnit>(conv.db);
         if(unit.UnitType != "LENGTHUNIT" && unit.UnitType != "PLANEANGLEUNIT") {
             return;
         }
@@ -384,8 +380,8 @@ void SetUnits(ConversionData& conv)
 // ------------------------------------------------------------------------------------------------
 void SetCoordinateSpace(ConversionData& conv)
 {
-    const IfcRepresentationContext* fav = NULL;
-    for(const IfcRepresentationContext& v : conv.proj.RepresentationContexts) {
+    const Schema_2x3::IfcRepresentationContext* fav = NULL;
+    for(const Schema_2x3::IfcRepresentationContext& v : conv.proj.RepresentationContexts) {
         fav = &v;
         // Model should be the most suitable type of context, hence ignore the others
         if (v.ContextType && v.ContextType.Get() == "Model") {
@@ -393,7 +389,7 @@ void SetCoordinateSpace(ConversionData& conv)
         }
     }
     if (fav) {
-        if(const IfcGeometricRepresentationContext* const geo = fav->ToPtr<IfcGeometricRepresentationContext>()) {
+        if(const Schema_2x3::IfcGeometricRepresentationContext* const geo = fav->ToPtr<Schema_2x3::IfcGeometricRepresentationContext>()) {
             ConvertAxisPlacement(conv.wcs, *geo->WorldCoordinateSystem, conv);
             IFCImporter::LogDebug("got world coordinate system");
         }
@@ -402,9 +398,9 @@ void SetCoordinateSpace(ConversionData& conv)
 
 
 // ------------------------------------------------------------------------------------------------
-void ResolveObjectPlacement(aiMatrix4x4& m, const IfcObjectPlacement& place, ConversionData& conv)
+void ResolveObjectPlacement(aiMatrix4x4& m, const Schema_2x3::IfcObjectPlacement& place, ConversionData& conv)
 {
-    if (const IfcLocalPlacement* const local = place.ToPtr<IfcLocalPlacement>()){
+    if (const Schema_2x3::IfcLocalPlacement* const local = place.ToPtr<Schema_2x3::IfcLocalPlacement>()){
         IfcMatrix4 tmp;
         ConvertAxisPlacement(tmp, *local->RelativePlacement, conv);
 
@@ -422,9 +418,9 @@ void ResolveObjectPlacement(aiMatrix4x4& m, const IfcObjectPlacement& place, Con
 }
 
 // ------------------------------------------------------------------------------------------------
-bool ProcessMappedItem(const IfcMappedItem& mapped, aiNode* nd_src, std::vector< aiNode* >& subnodes_src, unsigned int matid, ConversionData& conv)
+bool ProcessMappedItem(const Schema_2x3::IfcMappedItem& mapped, aiNode* nd_src, std::vector< aiNode* >& subnodes_src, unsigned int matid, ConversionData& conv)
 {
-    // insert a custom node here, the cartesian transform operator is simply a conventional transformation matrix
+    // insert a custom node here, the carthesian transform operator is simply a conventional transformation matrix
     std::unique_ptr<aiNode> nd(new aiNode());
     nd->mName.Set("IfcMappedItem");
 
@@ -448,10 +444,10 @@ bool ProcessMappedItem(const IfcMappedItem& mapped, aiNode* nd_src, std::vector<
     }
 
     unsigned int localmatid = ProcessMaterials(mapped.GetID(),matid,conv,false);
-    const IfcRepresentation& repr = mapped.MappingSource->MappedRepresentation;
+    const Schema_2x3::IfcRepresentation& repr = mapped.MappingSource->MappedRepresentation;
 
     bool got = false;
-    for(const IfcRepresentationItem& item : repr.Items) {
+    for(const Schema_2x3::IfcRepresentationItem& item : repr.Items) {
         if(!ProcessRepresentationItem(item,localmatid,meshes,conv)) {
             IFCImporter::LogWarn("skipping mapped entity of type " + item.GetClassName() + ", no representations could be generated");
         }
@@ -483,8 +479,7 @@ bool ProcessMappedItem(const IfcMappedItem& mapped, aiNode* nd_src, std::vector<
 
 // ------------------------------------------------------------------------------------------------
 struct RateRepresentationPredicate {
-
-    int Rate(const IfcRepresentation* r) const {
+    int Rate(const Schema_2x3::IfcRepresentation* r) const {
         // the smaller, the better
 
         if (! r->RepresentationIdentifier) {
@@ -497,7 +492,7 @@ struct RateRepresentationPredicate {
         if (name == "MappedRepresentation") {
             if (!r->Items.empty()) {
                 // take the first item and base our choice on it
-                const IfcMappedItem* const m = r->Items.front()->ToPtr<IfcMappedItem>();
+                const Schema_2x3::IfcMappedItem* const m = r->Items.front()->ToPtr<Schema_2x3::IfcMappedItem>();
                 if (m) {
                     return Rate(m->MappingSource->MappedRepresentation);
                 }
@@ -509,8 +504,6 @@ struct RateRepresentationPredicate {
     }
 
     int Rate(const std::string& r) const {
-
-
         if (r == "SolidModel") {
             return -3;
         }
@@ -541,13 +534,13 @@ struct RateRepresentationPredicate {
         return 0;
     }
 
-    bool operator() (const IfcRepresentation* a, const IfcRepresentation* b) const {
+    bool operator() (const Schema_2x3::IfcRepresentation* a, const Schema_2x3::IfcRepresentation* b) const {
         return Rate(a) < Rate(b);
     }
 };
 
 // ------------------------------------------------------------------------------------------------
-void ProcessProductRepresentation(const IfcProduct& el, aiNode* nd, std::vector< aiNode* >& subnodes, ConversionData& conv)
+void ProcessProductRepresentation(const Schema_2x3::IfcProduct& el, aiNode* nd, std::vector< aiNode* >& subnodes, ConversionData& conv)
 {
     if(!el.Representation) {
         return;
@@ -562,14 +555,14 @@ void ProcessProductRepresentation(const IfcProduct& el, aiNode* nd, std::vector<
     // representation is relatively generic and allows the concrete implementations
     // for the different representation types to make some sensible choices what
     // to load and what not to load.
-    const STEP::ListOf< STEP::Lazy< IfcRepresentation >, 1, 0 >& src = el.Representation.Get()->Representations;
-    std::vector<const IfcRepresentation*> repr_ordered(src.size());
+    const STEP::ListOf< STEP::Lazy< Schema_2x3::IfcRepresentation >, 1, 0 >& src = el.Representation.Get()->Representations;
+    std::vector<const Schema_2x3::IfcRepresentation*> repr_ordered(src.size());
     std::copy(src.begin(),src.end(),repr_ordered.begin());
     std::sort(repr_ordered.begin(),repr_ordered.end(),RateRepresentationPredicate());
-    for(const IfcRepresentation* repr : repr_ordered) {
+    for(const Schema_2x3::IfcRepresentation* repr : repr_ordered) {
         bool res = false;
-        for(const IfcRepresentationItem& item : repr->Items) {
-            if(const IfcMappedItem* const geo = item.ToPtr<IfcMappedItem>()) {
+        for(const Schema_2x3::IfcRepresentationItem& item : repr->Items) {
+            if(const Schema_2x3::IfcMappedItem* const geo = item.ToPtr<Schema_2x3::IfcMappedItem>()) {
                 res = ProcessMappedItem(*geo,nd,subnodes,matid,conv) || res;
             }
             else {
@@ -587,25 +580,25 @@ void ProcessProductRepresentation(const IfcProduct& el, aiNode* nd, std::vector<
 typedef std::map<std::string, std::string> Metadata;
 
 // ------------------------------------------------------------------------------------------------
-void ProcessMetadata(const ListOf< Lazy< IfcProperty >, 1, 0 >& set, ConversionData& conv, Metadata& properties,
+void ProcessMetadata(const Schema_2x3::ListOf< Schema_2x3::Lazy< Schema_2x3::IfcProperty >, 1, 0 >& set, ConversionData& conv, Metadata& properties,
     const std::string& prefix = "",
     unsigned int nest = 0)
 {
-    for(const IfcProperty& property : set) {
+    for(const Schema_2x3::IfcProperty& property : set) {
         const std::string& key = prefix.length() > 0 ? (prefix + "." + property.Name) : property.Name;
-        if (const IfcPropertySingleValue* const singleValue = property.ToPtr<IfcPropertySingleValue>()) {
+        if (const Schema_2x3::IfcPropertySingleValue* const singleValue = property.ToPtr<Schema_2x3::IfcPropertySingleValue>()) {
             if (singleValue->NominalValue) {
-                if (const EXPRESS::STRING* str = singleValue->NominalValue.Get()->ToPtr<EXPRESS::STRING>()) {
+                if (const ::Assimp::STEP::EXPRESS::STRING* str = singleValue->NominalValue.Get()->ToPtr<::Assimp::STEP::EXPRESS::STRING>()) {
                     std::string value = static_cast<std::string>(*str);
                     properties[key]=value;
                 }
-                else if (const EXPRESS::REAL* val = singleValue->NominalValue.Get()->ToPtr<EXPRESS::REAL>()) {
+                else if (const ::Assimp::STEP::EXPRESS::REAL* val = singleValue->NominalValue.Get()->ToPtr<::Assimp::STEP::EXPRESS::REAL>()) {
                     float value = static_cast<float>(*val);
                     std::stringstream s;
                     s << value;
                     properties[key]=s.str();
                 }
-                else if (const EXPRESS::INTEGER* val = singleValue->NominalValue.Get()->ToPtr<EXPRESS::INTEGER>()) {
+                else if (const ::Assimp::STEP::EXPRESS::INTEGER* val = singleValue->NominalValue.Get()->ToPtr<::Assimp::STEP::EXPRESS::INTEGER>()) {
                     int64_t value = static_cast<int64_t>(*val);
                     std::stringstream s;
                     s << value;
@@ -613,21 +606,21 @@ void ProcessMetadata(const ListOf< Lazy< IfcProperty >, 1, 0 >& set, ConversionD
                 }
             }
         }
-        else if (const IfcPropertyListValue* const listValue = property.ToPtr<IfcPropertyListValue>()) {
+        else if (const Schema_2x3::IfcPropertyListValue* const listValue = property.ToPtr<Schema_2x3::IfcPropertyListValue>()) {
             std::stringstream ss;
             ss << "[";
             unsigned index=0;
-            for(const IfcValue::Out& v : listValue->ListValues) {
+            for(const Schema_2x3::IfcValue::Out& v : listValue->ListValues) {
                 if (!v) continue;
-                if (const EXPRESS::STRING* str = v->ToPtr<EXPRESS::STRING>()) {
+                if (const ::Assimp::STEP::EXPRESS::STRING* str = v->ToPtr<::Assimp::STEP::EXPRESS::STRING>()) {
                     std::string value = static_cast<std::string>(*str);
                     ss << "'" << value << "'";
                 }
-                else if (const EXPRESS::REAL* val = v->ToPtr<EXPRESS::REAL>()) {
+                else if (const ::Assimp::STEP::EXPRESS::REAL* val = v->ToPtr<::Assimp::STEP::EXPRESS::REAL>()) {
                     float value = static_cast<float>(*val);
                     ss << value;
                 }
-                else if (const EXPRESS::INTEGER* val = v->ToPtr<EXPRESS::INTEGER>()) {
+                else if (const ::Assimp::STEP::EXPRESS::INTEGER* val = v->ToPtr<::Assimp::STEP::EXPRESS::INTEGER>()) {
                     int64_t value = static_cast<int64_t>(*val);
                     ss << value;
                 }
@@ -639,7 +632,7 @@ void ProcessMetadata(const ListOf< Lazy< IfcProperty >, 1, 0 >& set, ConversionD
             ss << "]";
             properties[key]=ss.str();
         }
-        else if (const IfcComplexProperty* const complexProp = property.ToPtr<IfcComplexProperty>()) {
+        else if (const Schema_2x3::IfcComplexProperty* const complexProp = property.ToPtr<Schema_2x3::IfcComplexProperty>()) {
             if(nest > 2) { // mostly arbitrary limit to prevent stack overflow vulnerabilities
                 IFCImporter::LogError("maximum nesting level for IfcComplexProperty reached, skipping this property.");
             }
@@ -657,29 +650,29 @@ void ProcessMetadata(const ListOf< Lazy< IfcProperty >, 1, 0 >& set, ConversionD
 // ------------------------------------------------------------------------------------------------
 void ProcessMetadata(uint64_t relDefinesByPropertiesID, ConversionData& conv, Metadata& properties)
 {
-    if (const IfcRelDefinesByProperties* const pset = conv.db.GetObject(relDefinesByPropertiesID)->ToPtr<IfcRelDefinesByProperties>()) {
-        if (const IfcPropertySet* const set = conv.db.GetObject(pset->RelatingPropertyDefinition->GetID())->ToPtr<IfcPropertySet>()) {
+    if (const Schema_2x3::IfcRelDefinesByProperties* const pset = conv.db.GetObject(relDefinesByPropertiesID)->ToPtr<Schema_2x3::IfcRelDefinesByProperties>()) {
+        if (const Schema_2x3::IfcPropertySet* const set = conv.db.GetObject(pset->RelatingPropertyDefinition->GetID())->ToPtr<Schema_2x3::IfcPropertySet>()) {
             ProcessMetadata(set->HasProperties, conv, properties);
         }
     }
 }
 
 // ------------------------------------------------------------------------------------------------
-aiNode* ProcessSpatialStructure(aiNode* parent, const IfcProduct& el, ConversionData& conv, std::vector<TempOpening>* collect_openings = NULL)
+aiNode* ProcessSpatialStructure(aiNode* parent, const Schema_2x3::IfcProduct& el, ConversionData& conv, std::vector<TempOpening>* collect_openings = NULL)
 {
     const STEP::DB::RefMap& refs = conv.db.GetRefs();
 
     // skip over space and annotation nodes - usually, these have no meaning in Assimp's context
     bool skipGeometry = false;
     if(conv.settings.skipSpaceRepresentations) {
-        if(el.ToPtr<IfcSpace>()) {
+        if(el.ToPtr<Schema_2x3::IfcSpace>()) {
             IFCImporter::LogDebug("skipping IfcSpace entity due to importer settings");
             skipGeometry = true;
         }
     }
 
     if(conv.settings.skipAnnotations) {
-        if(el.ToPtr<IfcAnnotation>()) {
+        if(el.ToPtr<Schema_2x3::IfcAnnotation>()) {
             IFCImporter::LogDebug("skipping IfcAnnotation entity due to importer settings");
             return NULL;
         }
@@ -745,12 +738,12 @@ aiNode* ProcessSpatialStructure(aiNode* parent, const IfcProduct& el, Conversion
             const STEP::LazyObject& obj = conv.db.MustGetObject((*range2.first).second);
 
             // handle regularly-contained elements
-            if(const IfcRelContainedInSpatialStructure* const cont = obj->ToPtr<IfcRelContainedInSpatialStructure>()) {
+            if(const Schema_2x3::IfcRelContainedInSpatialStructure* const cont = obj->ToPtr<Schema_2x3::IfcRelContainedInSpatialStructure>()) {
                 if(cont->RelatingStructure->GetID() != el.GetID()) {
                     continue;
                 }
-                for(const IfcProduct& pro : cont->RelatedElements) {
-                    if(pro.ToPtr<IfcOpeningElement>()) {
+                for(const Schema_2x3::IfcProduct& pro : cont->RelatedElements) {
+                    if(pro.ToPtr<Schema_2x3::IfcOpeningElement>()) {
                         // IfcOpeningElement is handled below. Sadly we can't use it here as is:
                         // The docs say that opening elements are USUALLY attached to building storey,
                         // but we want them for the building elements to which they belong.
@@ -764,9 +757,9 @@ aiNode* ProcessSpatialStructure(aiNode* parent, const IfcProduct& el, Conversion
                 }
             }
             // handle openings, which we collect in a list rather than adding them to the node graph
-            else if(const IfcRelVoidsElement* const fills = obj->ToPtr<IfcRelVoidsElement>()) {
+            else if(const Schema_2x3::IfcRelVoidsElement* const fills = obj->ToPtr<Schema_2x3::IfcRelVoidsElement>()) {
                 if(fills->RelatingBuildingElement->GetID() == el.GetID()) {
-                    const IfcFeatureElementSubtraction& open = fills->RelatedOpeningElement;
+                    const Schema_2x3::IfcFeatureElementSubtraction& open = fills->RelatedOpeningElement;
 
                     // move opening elements to a separate node since they are semantically different than elements that are just 'contained'
                     std::unique_ptr<aiNode> nd_aggr(new aiNode());
@@ -808,7 +801,7 @@ aiNode* ProcessSpatialStructure(aiNode* parent, const IfcProduct& el, Conversion
             if (conv.already_processed.find((*range.first).second) != conv.already_processed.end()) {
                 continue;
             }
-            if(const IfcRelAggregates* const aggr = conv.db.GetObject((*range.first).second)->ToPtr<IfcRelAggregates>()) {
+            if(const Schema_2x3::IfcRelAggregates* const aggr = conv.db.GetObject((*range.first).second)->ToPtr<Schema_2x3::IfcRelAggregates>()) {
                 if(aggr->RelatingObject->GetID() != el.GetID()) {
                     continue;
                 }
@@ -821,8 +814,8 @@ aiNode* ProcessSpatialStructure(aiNode* parent, const IfcProduct& el, Conversion
                 nd_aggr->mTransformation = nd->mTransformation;
 
                 nd_aggr->mChildren = new aiNode*[aggr->RelatedObjects.size()]();
-                for(const IfcObjectDefinition& def : aggr->RelatedObjects) {
-                    if(const IfcProduct* const prod = def.ToPtr<IfcProduct>()) {
+                for(const Schema_2x3::IfcObjectDefinition& def : aggr->RelatedObjects) {
+                    if(const Schema_2x3::IfcProduct* const prod = def.ToPtr<Schema_2x3::IfcProduct>()) {
 
                         aiNode* const ndnew = ProcessSpatialStructure(nd_aggr.get(),*prod,conv,NULL);
                         if(ndnew) {
@@ -889,7 +882,7 @@ void ProcessSpatialStructures(ConversionData& conv)
 	std::vector<aiNode*> nodes;
 
     for(const STEP::LazyObject* lz : *range) {
-        const IfcSpatialStructureElement* const prod = lz->ToPtr<IfcSpatialStructureElement>();
+        const Schema_2x3::IfcSpatialStructureElement* const prod = lz->ToPtr<Schema_2x3::IfcSpatialStructureElement>();
         if(!prod) {
             continue;
         }
@@ -899,9 +892,9 @@ void ProcessSpatialStructures(ConversionData& conv)
         const STEP::DB::RefMap& refs = conv.db.GetRefs();
         STEP::DB::RefMapRange ref_range = refs.equal_range(conv.proj.GetID());
         for(; ref_range.first != ref_range.second; ++ref_range.first) {
-            if(const IfcRelAggregates* const aggr = conv.db.GetObject((*ref_range.first).second)->ToPtr<IfcRelAggregates>()) {
+            if(const Schema_2x3::IfcRelAggregates* const aggr = conv.db.GetObject((*ref_range.first).second)->ToPtr<Schema_2x3::IfcRelAggregates>()) {
 
-                for(const IfcObjectDefinition& def : aggr->RelatedObjects) {
+                for(const Schema_2x3::IfcObjectDefinition& def : aggr->RelatedObjects) {
                     // comparing pointer values is not sufficient, we would need to cast them to the same type first
                     // as there is multiple inheritance in the game.
                     if (def.GetID() == prod->GetID()) {
@@ -910,7 +903,6 @@ void ProcessSpatialStructures(ConversionData& conv)
 						nodes.push_back(ProcessSpatialStructure(NULL, *prod, conv, NULL));
                     }
                 }
-
             }
         }
     }
@@ -920,7 +912,7 @@ void ProcessSpatialStructures(ConversionData& conv)
 	if (nb_nodes == 0) {
 		IFCImporter::LogWarn("failed to determine primary site element, taking all the IfcSite");
 		for (const STEP::LazyObject* lz : *range) {
-			const IfcSpatialStructureElement* const prod = lz->ToPtr<IfcSpatialStructureElement>();
+			const Schema_2x3::IfcSpatialStructureElement* const prod = lz->ToPtr<Schema_2x3::IfcSpatialStructureElement>();
 			if (!prod) {
 				continue;
 			}
@@ -939,7 +931,7 @@ void ProcessSpatialStructures(ConversionData& conv)
 		conv.out->mRootNode->mParent = NULL;
 		conv.out->mRootNode->mNumChildren = static_cast<unsigned int>(nb_nodes);
 		conv.out->mRootNode->mChildren = new aiNode*[conv.out->mRootNode->mNumChildren];
-		
+
 		for (size_t i = 0; i < nb_nodes; ++i) {
 			aiNode* node = nodes[i];
 

+ 2 - 2
code/IFCLoader.h → code/Importer/IFC/IFCLoader.h

@@ -45,8 +45,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #ifndef INCLUDED_AI_IFC_LOADER_H
 #define INCLUDED_AI_IFC_LOADER_H
 
-#include "BaseImporter.h"
-#include "LogAux.h"
+#include <assimp/BaseImporter.h>
+#include <assimp/LogAux.h>
 
 namespace Assimp    {
 

+ 10 - 14
code/IFCMaterial.cpp → code/Importer/IFC/IFCMaterial.cpp

@@ -68,20 +68,20 @@ static int ConvertShadingMode(const std::string& name) {
 }
 
 // ------------------------------------------------------------------------------------------------
-static void FillMaterial(aiMaterial* mat,const IFC::IfcSurfaceStyle* surf,ConversionData& conv) {
+static void FillMaterial(aiMaterial* mat,const IFC::Schema_2x3::IfcSurfaceStyle* surf,ConversionData& conv) {
     aiString name;
     name.Set((surf->Name? surf->Name.Get() : "IfcSurfaceStyle_Unnamed"));
     mat->AddProperty(&name,AI_MATKEY_NAME);
 
     // now see which kinds of surface information are present
-    for(std::shared_ptr< const IFC::IfcSurfaceStyleElementSelect > sel2 : surf->Styles) {
-        if (const IFC::IfcSurfaceStyleShading* shade = sel2->ResolveSelectPtr<IFC::IfcSurfaceStyleShading>(conv.db)) {
+    for(std::shared_ptr< const IFC::Schema_2x3::IfcSurfaceStyleElementSelect > sel2 : surf->Styles) {
+        if (const IFC::Schema_2x3::IfcSurfaceStyleShading* shade = sel2->ResolveSelectPtr<IFC::Schema_2x3::IfcSurfaceStyleShading>(conv.db)) {
             aiColor4D col_base,col;
 
             ConvertColor(col_base, shade->SurfaceColour);
             mat->AddProperty(&col_base,1, AI_MATKEY_COLOR_DIFFUSE);
 
-            if (const IFC::IfcSurfaceStyleRendering* ren = shade->ToPtr<IFC::IfcSurfaceStyleRendering>()) {
+            if (const IFC::Schema_2x3::IfcSurfaceStyleRendering* ren = shade->ToPtr<IFC::Schema_2x3::IfcSurfaceStyleRendering>()) {
 
                 if (ren->Transparency) {
                     const float t = 1.f-static_cast<float>(ren->Transparency.Get());
@@ -112,7 +112,7 @@ static void FillMaterial(aiMaterial* mat,const IFC::IfcSurfaceStyle* surf,Conver
                 mat->AddProperty(&shading,1, AI_MATKEY_SHADING_MODEL);
 
                 if (ren->SpecularHighlight) {
-                    if(const EXPRESS::REAL* rt = ren->SpecularHighlight.Get()->ToPtr<EXPRESS::REAL>()) {
+                    if(const ::Assimp::STEP::EXPRESS::REAL* rt = ren->SpecularHighlight.Get()->ToPtr<::Assimp::STEP::EXPRESS::REAL>()) {
                         // at this point we don't distinguish between the two distinct ways of
                         // specifying highlight intensities. leave this to the user.
                         const float e = static_cast<float>(*rt);
@@ -123,23 +123,19 @@ static void FillMaterial(aiMaterial* mat,const IFC::IfcSurfaceStyle* surf,Conver
                     }
                 }
             }
-        } /*
-        else if (const IFC::IfcSurfaceStyleWithTextures* tex = sel2->ResolveSelectPtr<IFC::IfcSurfaceStyleWithTextures>(conv.db)) {
-            // XXX
-        } */
+        } 
     }
-
 }
 
 // ------------------------------------------------------------------------------------------------
 unsigned int ProcessMaterials(uint64_t id, unsigned int prevMatId, ConversionData& conv, bool forceDefaultMat) {
     STEP::DB::RefMapRange range = conv.db.GetRefs().equal_range(id);
     for(;range.first != range.second; ++range.first) {
-        if(const IFC::IfcStyledItem* const styled = conv.db.GetObject((*range.first).second)->ToPtr<IFC::IfcStyledItem>()) {
-            for(const IFC::IfcPresentationStyleAssignment& as : styled->Styles) {
-                for(std::shared_ptr<const IFC::IfcPresentationStyleSelect> sel : as.Styles) {
+        if(const IFC::Schema_2x3::IfcStyledItem* const styled = conv.db.GetObject((*range.first).second)->ToPtr<IFC::Schema_2x3::IfcStyledItem>()) {
+            for(const IFC::Schema_2x3::IfcPresentationStyleAssignment& as : styled->Styles) {
+                for(std::shared_ptr<const IFC::Schema_2x3::IfcPresentationStyleSelect> sel : as.Styles) {
 
-                    if( const IFC::IfcSurfaceStyle* const surf = sel->ResolveSelectPtr<IFC::IfcSurfaceStyle>(conv.db) ) {
+                    if( const IFC::Schema_2x3::IfcSurfaceStyle* const surf = sel->ResolveSelectPtr<IFC::Schema_2x3::IfcSurfaceStyle>(conv.db) ) {
                         // try to satisfy from cache
                         ConversionData::MaterialCache::iterator mit = conv.cached_materials.find(surf);
                         if( mit != conv.cached_materials.end() )

+ 47 - 47
code/IFCOpenings.cpp → code/Importer/IFC/IFCOpenings.cpp

@@ -46,8 +46,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 #ifndef ASSIMP_BUILD_NO_IFC_IMPORTER
 #include "IFCUtil.h"
-#include "PolyTools.h"
-#include "ProcessHelper.h"
+#include "code/PolyTools.h"
+#include "code/ProcessHelper.h"
 
 #include "../contrib/poly2tri/poly2tri/poly2tri.h"
 #include "../contrib/clipper/clipper.hpp"
@@ -323,7 +323,7 @@ void InsertWindowContours(const ContourVector& contours,
             if (hit) {
                 if (last_hit != (size_t)-1) {
 
-                    const size_t old = curmesh.verts.size();
+                    const size_t old = curmesh.mVerts.size();
                     size_t cnt = last_hit > n ? size-(last_hit-n) : n-last_hit;
                     for(size_t a = last_hit, e = 0; e <= cnt; a=(a+1)%size, ++e) {
                         // hack: this is to fix cases where opening contours are self-intersecting.
@@ -335,7 +335,7 @@ void InsertWindowContours(const ContourVector& contours,
                         if ((contour[a] - edge).SquareLength() > diag*diag*0.7) {
                             continue;
                         }
-                        curmesh.verts.push_back(IfcVector3(contour[a].x, contour[a].y, 0.0f));
+                        curmesh.mVerts.push_back(IfcVector3(contour[a].x, contour[a].y, 0.0f));
                     }
 
                     if (edge != contour[last_hit]) {
@@ -356,16 +356,16 @@ void InsertWindowContours(const ContourVector& contours,
                             corner.y = bb.second.y;
                         }
 
-                        curmesh.verts.push_back(IfcVector3(corner.x, corner.y, 0.0f));
+                        curmesh.mVerts.push_back(IfcVector3(corner.x, corner.y, 0.0f));
                     }
                     else if (cnt == 1) {
                         // avoid degenerate polygons (also known as lines or points)
-                        curmesh.verts.erase(curmesh.verts.begin()+old,curmesh.verts.end());
+                        curmesh.mVerts.erase(curmesh.mVerts.begin()+old,curmesh.mVerts.end());
                     }
 
-                    if (const size_t d = curmesh.verts.size()-old) {
-                        curmesh.vertcnt.push_back(static_cast<unsigned int>(d));
-                        std::reverse(curmesh.verts.rbegin(),curmesh.verts.rbegin()+d);
+                    if (const size_t d = curmesh.mVerts.size()-old) {
+                        curmesh.mVertcnt.push_back(static_cast<unsigned int>(d));
+                        std::reverse(curmesh.mVerts.rbegin(),curmesh.mVerts.rbegin()+d);
                     }
                     if (n == very_first_hit) {
                         break;
@@ -504,8 +504,8 @@ void CleanupOuterContour(const std::vector<IfcVector2>& contour_flat, TempMesh&
     std::vector<IfcVector3> vold;
     std::vector<unsigned int> iold;
 
-    vold.reserve(curmesh.verts.size());
-    iold.reserve(curmesh.vertcnt.size());
+    vold.reserve(curmesh.mVerts.size());
+    iold.reserve(curmesh.mVertcnt.size());
 
     // Fix the outer contour using polyclipper
     try {
@@ -530,9 +530,9 @@ void CleanupOuterContour(const std::vector<IfcVector2>& contour_flat, TempMesh&
         subject.reserve(4);
         size_t index = 0;
         size_t countdown = 0;
-        for(const IfcVector3& pip : curmesh.verts) {
+        for(const IfcVector3& pip : curmesh.mVerts) {
             if (!countdown) {
-                countdown = curmesh.vertcnt[index++];
+                countdown = curmesh.mVertcnt[index++];
                 if (!countdown) {
                     continue;
                 }
@@ -572,8 +572,8 @@ void CleanupOuterContour(const std::vector<IfcVector2>& contour_flat, TempMesh&
     }
 
     // swap data arrays
-    std::swap(vold,curmesh.verts);
-    std::swap(iold,curmesh.vertcnt);
+    std::swap(vold,curmesh.mVerts);
+    std::swap(iold,curmesh.mVertcnt);
 }
 
 typedef std::vector<TempOpening*> OpeningRefs;
@@ -898,14 +898,14 @@ size_t CloseWindows(ContourVector& contours,
 
             SkipList::const_iterator skipbegin = (*it).skiplist.begin();
 
-            curmesh.verts.reserve(curmesh.verts.size() + (*it).contour.size() * 4);
-            curmesh.vertcnt.reserve(curmesh.vertcnt.size() + (*it).contour.size());
+            curmesh.mVerts.reserve(curmesh.mVerts.size() + (*it).contour.size() * 4);
+            curmesh.mVertcnt.reserve(curmesh.mVertcnt.size() + (*it).contour.size());
 
 			bool reverseCountourFaces = false;
 
             // compare base poly normal and contour normal to detect if we need to reverse the face winding
-			if(curmesh.vertcnt.size() > 0) {
-				IfcVector3 basePolyNormal = TempMesh::ComputePolygonNormal(curmesh.verts.data(), curmesh.vertcnt.front());
+			if(curmesh.mVertcnt.size() > 0) {
+				IfcVector3 basePolyNormal = TempMesh::ComputePolygonNormal(curmesh.mVerts.data(), curmesh.mVertcnt.front());
 				
 				std::vector<IfcVector3> worldSpaceContourVtx(it->contour.size());
 				
@@ -954,14 +954,14 @@ size_t CloseWindows(ContourVector& contours,
                 }
 
                 if (drop_this_edge) {
-                    curmesh.verts.pop_back();
-                    curmesh.verts.pop_back();
+                    curmesh.mVerts.pop_back();
+                    curmesh.mVerts.pop_back();
                 }
                 else {
-                    curmesh.verts.push_back(((cit == cbegin) != reverseCountourFaces) ? world_point : bestv);
-                    curmesh.verts.push_back(((cit == cbegin) != reverseCountourFaces) ? bestv : world_point);
+                    curmesh.mVerts.push_back(((cit == cbegin) != reverseCountourFaces) ? world_point : bestv);
+                    curmesh.mVerts.push_back(((cit == cbegin) != reverseCountourFaces) ? bestv : world_point);
 
-                    curmesh.vertcnt.push_back(4);
+                    curmesh.mVertcnt.push_back(4);
                     ++closed;
                 }
 
@@ -971,8 +971,8 @@ size_t CloseWindows(ContourVector& contours,
                     continue;
                 }
 
-                curmesh.verts.push_back(reverseCountourFaces ? bestv : world_point);
-                curmesh.verts.push_back(reverseCountourFaces ? world_point : bestv);
+                curmesh.mVerts.push_back(reverseCountourFaces ? bestv : world_point);
+                curmesh.mVerts.push_back(reverseCountourFaces ? world_point : bestv);
 
                 if (cit == cend - 1) {
                     drop_this_edge = *skipit;
@@ -981,13 +981,13 @@ size_t CloseWindows(ContourVector& contours,
                     // a border edge that needs to be dropped.
                     if (drop_this_edge) {
                         --closed;
-                        curmesh.vertcnt.pop_back();
-                        curmesh.verts.pop_back();
-                        curmesh.verts.pop_back();
+                        curmesh.mVertcnt.pop_back();
+                        curmesh.mVerts.pop_back();
+                        curmesh.mVerts.pop_back();
                     }
                     else {
-                        curmesh.verts.push_back(reverseCountourFaces ? start0 : start1);
-                        curmesh.verts.push_back(reverseCountourFaces ? start1 : start0);
+                        curmesh.mVerts.push_back(reverseCountourFaces ? start0 : start1);
+                        curmesh.mVerts.push_back(reverseCountourFaces ? start1 : start0);
                     }
                 }
             }
@@ -1029,10 +1029,10 @@ void Quadrify(const std::vector< BoundingBox >& bbs, TempMesh& curmesh)
     QuadrifyPart(IfcVector2(),one_vec,field,bbs,quads);
     ai_assert(!(quads.size() % 4));
 
-    curmesh.vertcnt.resize(quads.size()/4,4);
-    curmesh.verts.reserve(quads.size());
+    curmesh.mVertcnt.resize(quads.size()/4,4);
+    curmesh.mVerts.reserve(quads.size());
     for(const IfcVector2& v2 : quads) {
-        curmesh.verts.push_back(IfcVector3(v2.x, v2.y, static_cast<IfcFloat>(0.0)));
+        curmesh.mVerts.push_back(IfcVector3(v2.x, v2.y, static_cast<IfcFloat>(0.0)));
     }
 }
 
@@ -1053,7 +1053,7 @@ void Quadrify(const ContourVector& contours, TempMesh& curmesh)
 IfcMatrix4 ProjectOntoPlane(std::vector<IfcVector2>& out_contour, const TempMesh& in_mesh,
     bool &ok, IfcVector3& nor_out)
 {
-    const std::vector<IfcVector3>& in_verts = in_mesh.verts;
+    const std::vector<IfcVector3>& in_verts = in_mesh.mVerts;
     ok = true;
 
     IfcMatrix4 m = IfcMatrix4(DerivePlaneCoordinateSpace(in_mesh, ok, nor_out));
@@ -1200,8 +1200,8 @@ bool GenerateOpenings(std::vector<TempOpening>& openings,
                 }
             }
         }
-        std::vector<IfcVector3> profile_verts = profile_data->verts;
-        std::vector<unsigned int> profile_vertcnts = profile_data->vertcnt;
+        std::vector<IfcVector3> profile_verts = profile_data->mVerts;
+        std::vector<unsigned int> profile_vertcnts = profile_data->mVertcnt;
         if(profile_verts.size() <= 2) {
             continue;
         }
@@ -1421,7 +1421,7 @@ bool GenerateOpenings(std::vector<TempOpening>& openings,
     CleanupOuterContour(contour_flat, curmesh);
 
     // Undo the projection and get back to world (or local object) space
-    for(IfcVector3& v3 : curmesh.verts) {
+    for(IfcVector3& v3 : curmesh.mVerts) {
         v3 = minv * v3;
     }
 
@@ -1438,7 +1438,7 @@ bool TryAddOpenings_Poly2Tri(const std::vector<TempOpening>& openings,const std:
     TempMesh& curmesh)
 {
     IFCImporter::LogWarn("forced to use poly2tri fallback method to generate wall openings");
-    std::vector<IfcVector3>& out = curmesh.verts;
+    std::vector<IfcVector3>& out = curmesh.mVerts;
 
     bool result = false;
 
@@ -1513,14 +1513,14 @@ bool TryAddOpenings_Poly2Tri(const std::vector<TempOpening>& openings,const std:
                 continue;
             }
 
-            const std::vector<IfcVector3>& va = t.profileMesh->verts;
+            const std::vector<IfcVector3>& va = t.profileMesh->mVerts;
             if(va.size() <= 2) {
                 continue;
             }
 
             std::vector<IfcVector2> contour;
 
-            for(const IfcVector3& xx : t.profileMesh->verts) {
+            for(const IfcVector3& xx : t.profileMesh->mVerts) {
                 IfcVector3 vv = m *  xx, vv_extr = m * (xx + t.extrusionDir);
 
                 const bool is_extruded_side = std::fabs(vv.z - coord) > std::fabs(vv_extr.z - coord);
@@ -1603,8 +1603,8 @@ bool TryAddOpenings_Poly2Tri(const std::vector<TempOpening>& openings,const std:
     std::vector<IfcVector3> old_verts;
     std::vector<unsigned int> old_vertcnt;
 
-    old_verts.swap(curmesh.verts);
-    old_vertcnt.swap(curmesh.vertcnt);
+    old_verts.swap(curmesh.mVerts);
+    old_vertcnt.swap(curmesh.mVertcnt);
 
     std::vector< std::vector<p2t::Point*> > contours;
     for(ClipperLib::ExPolygon& clip : clipped) {
@@ -1669,9 +1669,9 @@ bool TryAddOpenings_Poly2Tri(const std::vector<TempOpening>& openings,const std:
                 ai_assert(v.x <= 1.0 && v.x >= 0.0 && v.y <= 1.0 && v.y >= 0.0);
                 const IfcVector3 v3 = minv * IfcVector3(vmin.x + v.x * vmax.x, vmin.y + v.y * vmax.y,coord) ;
 
-                curmesh.verts.push_back(v3);
+                curmesh.mVerts.push_back(v3);
             }
-            curmesh.vertcnt.push_back(3);
+            curmesh.mVertcnt.push_back(3);
         }
 
         result = true;
@@ -1679,8 +1679,8 @@ bool TryAddOpenings_Poly2Tri(const std::vector<TempOpening>& openings,const std:
 
     if (!result) {
         // revert -- it's a shame, but better than nothing
-        curmesh.verts.insert(curmesh.verts.end(),old_verts.begin(), old_verts.end());
-        curmesh.vertcnt.insert(curmesh.vertcnt.end(),old_vertcnt.begin(), old_vertcnt.end());
+        curmesh.mVerts.insert(curmesh.mVerts.end(),old_verts.begin(), old_verts.end());
+        curmesh.mVertcnt.insert(curmesh.mVertcnt.end(),old_vertcnt.begin(), old_vertcnt.end());
 
         IFCImporter::LogError("Ifc: revert, could not generate openings for this wall");
     }

+ 46 - 47
code/IFCProfile.cpp → code/Importer/IFC/IFCProfile.cpp

@@ -43,28 +43,27 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *  @brief Read profile and curves entities from IFC files
  */
 
-
-
 #ifndef ASSIMP_BUILD_NO_IFC_IMPORTER
+
 #include "IFCUtil.h"
 
 namespace Assimp {
-    namespace IFC {
+namespace IFC {
 
 // ------------------------------------------------------------------------------------------------
-void ProcessPolyLine(const IfcPolyline& def, TempMesh& meshout, ConversionData& /*conv*/)
+void ProcessPolyLine(const Schema_2x3::IfcPolyline& def, TempMesh& meshout, ConversionData& /*conv*/)
 {
     // this won't produce a valid mesh, it just spits out a list of vertices
     IfcVector3 t;
-    for(const IfcCartesianPoint& cp : def.Points) {
+    for(const Schema_2x3::IfcCartesianPoint& cp : def.Points) {
         ConvertCartesianPoint(t,cp);
-        meshout.verts.push_back(t);
+        meshout.mVerts.push_back(t);
     }
-    meshout.vertcnt.push_back(static_cast<unsigned int>(meshout.verts.size()));
+    meshout.mVertcnt.push_back(static_cast<unsigned int>(meshout.mVerts.size()));
 }
 
 // ------------------------------------------------------------------------------------------------
-bool ProcessCurve(const IfcCurve& curve,  TempMesh& meshout, ConversionData& conv)
+bool ProcessCurve(const Schema_2x3::IfcCurve& curve,  TempMesh& meshout, ConversionData& conv)
 {
     std::unique_ptr<const Curve> cv(Curve::Convert(curve,conv));
     if (!cv) {
@@ -78,10 +77,10 @@ bool ProcessCurve(const IfcCurve& curve,  TempMesh& meshout, ConversionData& con
             bc->SampleDiscrete(meshout);
         }
         catch(const  CurveError& cv) {
-            IFCImporter::LogError(cv.s+ " (error occurred while processing curve)");
+            IFCImporter::LogError(cv.mStr + " (error occurred while processing curve)");
             return false;
         }
-        meshout.vertcnt.push_back(static_cast<unsigned int>(meshout.verts.size()));
+        meshout.mVertcnt.push_back(static_cast<unsigned int>(meshout.mVerts.size()));
         return true;
     }
 
@@ -90,66 +89,66 @@ bool ProcessCurve(const IfcCurve& curve,  TempMesh& meshout, ConversionData& con
 }
 
 // ------------------------------------------------------------------------------------------------
-void ProcessClosedProfile(const IfcArbitraryClosedProfileDef& def, TempMesh& meshout, ConversionData& conv)
+void ProcessClosedProfile(const Schema_2x3::IfcArbitraryClosedProfileDef& def, TempMesh& meshout, ConversionData& conv)
 {
     ProcessCurve(def.OuterCurve,meshout,conv);
 }
 
 // ------------------------------------------------------------------------------------------------
-void ProcessOpenProfile(const IfcArbitraryOpenProfileDef& def, TempMesh& meshout, ConversionData& conv)
+void ProcessOpenProfile(const Schema_2x3::IfcArbitraryOpenProfileDef& def, TempMesh& meshout, ConversionData& conv)
 {
     ProcessCurve(def.Curve,meshout,conv);
 }
 
 // ------------------------------------------------------------------------------------------------
-void ProcessParametrizedProfile(const IfcParameterizedProfileDef& def, TempMesh& meshout, ConversionData& conv)
+void ProcessParametrizedProfile(const Schema_2x3::IfcParameterizedProfileDef& def, TempMesh& meshout, ConversionData& conv)
 {
-    if(const IfcRectangleProfileDef* const cprofile = def.ToPtr<IfcRectangleProfileDef>()) {
+    if(const Schema_2x3::IfcRectangleProfileDef* const cprofile = def.ToPtr<Schema_2x3::IfcRectangleProfileDef>()) {
         const IfcFloat x = cprofile->XDim*0.5f, y = cprofile->YDim*0.5f;
 
-        meshout.verts.reserve(meshout.verts.size()+4);
-        meshout.verts.push_back( IfcVector3( x, y, 0.f ));
-        meshout.verts.push_back( IfcVector3(-x, y, 0.f ));
-        meshout.verts.push_back( IfcVector3(-x,-y, 0.f ));
-        meshout.verts.push_back( IfcVector3( x,-y, 0.f ));
-        meshout.vertcnt.push_back(4);
+        meshout.mVerts.reserve(meshout.mVerts.size()+4);
+        meshout.mVerts.push_back( IfcVector3( x, y, 0.f ));
+        meshout.mVerts.push_back( IfcVector3(-x, y, 0.f ));
+        meshout.mVerts.push_back( IfcVector3(-x,-y, 0.f ));
+        meshout.mVerts.push_back( IfcVector3( x,-y, 0.f ));
+        meshout.mVertcnt.push_back(4);
     }
-    else if( const IfcCircleProfileDef* const circle = def.ToPtr<IfcCircleProfileDef>()) {
-        if(def.ToPtr<IfcCircleHollowProfileDef>()) {
+    else if( const Schema_2x3::IfcCircleProfileDef* const circle = def.ToPtr<Schema_2x3::IfcCircleProfileDef>()) {
+        if(def.ToPtr<Schema_2x3::IfcCircleHollowProfileDef>()) {
             // TODO
         }
         const size_t segments = conv.settings.cylindricalTessellation;
         const IfcFloat delta = AI_MATH_TWO_PI_F/segments, radius = circle->Radius;
 
-        meshout.verts.reserve(segments);
+        meshout.mVerts.reserve(segments);
 
         IfcFloat angle = 0.f;
         for(size_t i = 0; i < segments; ++i, angle += delta) {
-            meshout.verts.push_back( IfcVector3( std::cos(angle)*radius, std::sin(angle)*radius, 0.f ));
+            meshout.mVerts.push_back( IfcVector3( std::cos(angle)*radius, std::sin(angle)*radius, 0.f ));
         }
 
-        meshout.vertcnt.push_back(static_cast<unsigned int>(segments));
+        meshout.mVertcnt.push_back(static_cast<unsigned int>(segments));
     }
-    else if( const IfcIShapeProfileDef* const ishape = def.ToPtr<IfcIShapeProfileDef>()) {
+    else if( const Schema_2x3::IfcIShapeProfileDef* const ishape = def.ToPtr<Schema_2x3::IfcIShapeProfileDef>()) {
         // construct simplified IBeam shape
         const IfcFloat offset = (ishape->OverallWidth - ishape->WebThickness) / 2;
         const IfcFloat inner_height = ishape->OverallDepth - ishape->FlangeThickness * 2;
 
-        meshout.verts.reserve(12);
-        meshout.verts.push_back(IfcVector3(0,0,0));
-        meshout.verts.push_back(IfcVector3(0,ishape->FlangeThickness,0));
-        meshout.verts.push_back(IfcVector3(offset,ishape->FlangeThickness,0));
-        meshout.verts.push_back(IfcVector3(offset,ishape->FlangeThickness + inner_height,0));
-        meshout.verts.push_back(IfcVector3(0,ishape->FlangeThickness + inner_height,0));
-        meshout.verts.push_back(IfcVector3(0,ishape->OverallDepth,0));
-        meshout.verts.push_back(IfcVector3(ishape->OverallWidth,ishape->OverallDepth,0));
-        meshout.verts.push_back(IfcVector3(ishape->OverallWidth,ishape->FlangeThickness + inner_height,0));
-        meshout.verts.push_back(IfcVector3(offset+ishape->WebThickness,ishape->FlangeThickness + inner_height,0));
-        meshout.verts.push_back(IfcVector3(offset+ishape->WebThickness,ishape->FlangeThickness,0));
-        meshout.verts.push_back(IfcVector3(ishape->OverallWidth,ishape->FlangeThickness,0));
-        meshout.verts.push_back(IfcVector3(ishape->OverallWidth,0,0));
-
-        meshout.vertcnt.push_back(12);
+        meshout.mVerts.reserve(12);
+        meshout.mVerts.push_back(IfcVector3(0,0,0));
+        meshout.mVerts.push_back(IfcVector3(0,ishape->FlangeThickness,0));
+        meshout.mVerts.push_back(IfcVector3(offset,ishape->FlangeThickness,0));
+        meshout.mVerts.push_back(IfcVector3(offset,ishape->FlangeThickness + inner_height,0));
+        meshout.mVerts.push_back(IfcVector3(0,ishape->FlangeThickness + inner_height,0));
+        meshout.mVerts.push_back(IfcVector3(0,ishape->OverallDepth,0));
+        meshout.mVerts.push_back(IfcVector3(ishape->OverallWidth,ishape->OverallDepth,0));
+        meshout.mVerts.push_back(IfcVector3(ishape->OverallWidth,ishape->FlangeThickness + inner_height,0));
+        meshout.mVerts.push_back(IfcVector3(offset+ishape->WebThickness,ishape->FlangeThickness + inner_height,0));
+        meshout.mVerts.push_back(IfcVector3(offset+ishape->WebThickness,ishape->FlangeThickness,0));
+        meshout.mVerts.push_back(IfcVector3(ishape->OverallWidth,ishape->FlangeThickness,0));
+        meshout.mVerts.push_back(IfcVector3(ishape->OverallWidth,0,0));
+
+        meshout.mVertcnt.push_back(12);
     }
     else {
         IFCImporter::LogWarn("skipping unknown IfcParameterizedProfileDef entity, type is " + def.GetClassName());
@@ -162,15 +161,15 @@ void ProcessParametrizedProfile(const IfcParameterizedProfileDef& def, TempMesh&
 }
 
 // ------------------------------------------------------------------------------------------------
-bool ProcessProfile(const IfcProfileDef& prof, TempMesh& meshout, ConversionData& conv)
+bool ProcessProfile(const Schema_2x3::IfcProfileDef& prof, TempMesh& meshout, ConversionData& conv)
 {
-    if(const IfcArbitraryClosedProfileDef* const cprofile = prof.ToPtr<IfcArbitraryClosedProfileDef>()) {
+    if(const Schema_2x3::IfcArbitraryClosedProfileDef* const cprofile = prof.ToPtr<Schema_2x3::IfcArbitraryClosedProfileDef>()) {
         ProcessClosedProfile(*cprofile,meshout,conv);
     }
-    else if(const IfcArbitraryOpenProfileDef* const copen = prof.ToPtr<IfcArbitraryOpenProfileDef>()) {
+    else if(const Schema_2x3::IfcArbitraryOpenProfileDef* const copen = prof.ToPtr<Schema_2x3::IfcArbitraryOpenProfileDef>()) {
         ProcessOpenProfile(*copen,meshout,conv);
     }
-    else if(const IfcParameterizedProfileDef* const cparam = prof.ToPtr<IfcParameterizedProfileDef>()) {
+    else if(const Schema_2x3::IfcParameterizedProfileDef* const cparam = prof.ToPtr<Schema_2x3::IfcParameterizedProfileDef>()) {
         ProcessParametrizedProfile(*cparam,meshout,conv);
     }
     else {
@@ -178,7 +177,7 @@ bool ProcessProfile(const IfcProfileDef& prof, TempMesh& meshout, ConversionData
         return false;
     }
     meshout.RemoveAdjacentDuplicates();
-    if (!meshout.vertcnt.size() || meshout.vertcnt.front() <= 1) {
+    if (!meshout.mVertcnt.size() || meshout.mVertcnt.front() <= 1) {
         return false;
     }
     return true;
@@ -187,4 +186,4 @@ bool ProcessProfile(const IfcProfileDef& prof, TempMesh& meshout, ConversionData
 } // ! IFC
 } // ! Assimp
 
-#endif
+#endif // ASSIMP_BUILD_NO_IFC_IMPORTER

部分文件因为文件数量过多而无法显示