소스 검색

Switched to Open Asset Import Library svn revision 1062.

Lasse Öörni 14 년 전
부모
커밋
bf2b9ded9a
100개의 변경된 파일16974개의 추가작업 그리고 1506개의 파일을 삭제
  1. 1 1
      Docs/Urho3D.dox
  2. 6 11
      Engine/Graphics/Batch.cpp
  3. 1 1
      Engine/Graphics/Direct3D9/D3D9Graphics.cpp
  4. 1 1
      Engine/Graphics/Geometry.h
  5. 4 8
      Engine/Graphics/Renderer.cpp
  6. 1 1
      Engine/Graphics/View.cpp
  7. 1 1
      Readme.txt
  8. 231 339
      ThirdParty/Assimp/CMakeLists.txt
  9. 25 0
      ThirdParty/Assimp/CREDITS
  10. 23 34
      ThirdParty/Assimp/INSTALL
  11. 83 43
      ThirdParty/Assimp/README
  12. 6 4
      ThirdParty/Assimp/code/3DSConverter.cpp
  13. 2 1
      ThirdParty/Assimp/code/3DSLoader.cpp
  14. 1 5
      ThirdParty/Assimp/code/3DSLoader.h
  15. 8 8
      ThirdParty/Assimp/code/ACLoader.cpp
  16. 2 6
      ThirdParty/Assimp/code/ACLoader.h
  17. 2 6
      ThirdParty/Assimp/code/ASELoader.h
  18. 11 11
      ThirdParty/Assimp/code/ASEParser.cpp
  19. 3 106
      ThirdParty/Assimp/code/Assimp.cpp
  20. 115 0
      ThirdParty/Assimp/code/AssimpCExport.cpp
  21. 62 0
      ThirdParty/Assimp/code/AssimpPCH.cpp
  22. 16 4
      ThirdParty/Assimp/code/AssimpPCH.h
  23. 1 1
      ThirdParty/Assimp/code/B3DImporter.cpp
  24. 1 1
      ThirdParty/Assimp/code/BVHLoader.cpp
  25. 2 5
      ThirdParty/Assimp/code/BVHLoader.h
  26. 4 2
      ThirdParty/Assimp/code/BaseImporter.cpp
  27. 1 145
      ThirdParty/Assimp/code/BaseImporter.h
  28. 10 1
      ThirdParty/Assimp/code/BaseProcess.cpp
  29. 5 0
      ThirdParty/Assimp/code/BaseProcess.h
  30. 3 3
      ThirdParty/Assimp/code/BlenderDNA.cpp
  31. 6 6
      ThirdParty/Assimp/code/BlenderDNA.h
  32. 2 2
      ThirdParty/Assimp/code/BlenderDNA.inl
  33. 21 41
      ThirdParty/Assimp/code/BlenderLoader.cpp
  34. 5 18
      ThirdParty/Assimp/code/BlenderLoader.h
  35. 4 2
      ThirdParty/Assimp/code/BlenderModifier.cpp
  36. 5 5
      ThirdParty/Assimp/code/BlenderModifier.h
  37. 6 5
      ThirdParty/Assimp/code/BlenderScene.cpp
  38. 2 1
      ThirdParty/Assimp/code/BlenderScene.h
  39. 326 0
      ThirdParty/Assimp/code/BlobIOSystem.h
  40. 10 4
      ThirdParty/Assimp/code/BoostWorkaround/boost/foreach.hpp
  41. 1 1
      ThirdParty/Assimp/code/BoostWorkaround/boost/format.hpp
  42. 2 1
      ThirdParty/Assimp/code/BoostWorkaround/boost/lexical_cast.hpp
  43. 57 0
      ThirdParty/Assimp/code/BoostWorkaround/boost/make_shared.hpp
  44. 36 0
      ThirdParty/Assimp/code/BoostWorkaround/boost/noncopyable.hpp
  45. 1 1
      ThirdParty/Assimp/code/BoostWorkaround/boost/shared_ptr.hpp
  46. 1 1
      ThirdParty/Assimp/code/BoostWorkaround/boost/static_assert.hpp
  47. 7 9
      ThirdParty/Assimp/code/BoostWorkaround/boost/tuple/tuple.hpp
  48. 42 2
      ThirdParty/Assimp/code/ByteSwap.h
  49. 159 0
      ThirdParty/Assimp/code/CInterfaceIOWrapper.h
  50. 21 21
      ThirdParty/Assimp/code/COBLoader.cpp
  51. 2 7
      ThirdParty/Assimp/code/COBLoader.h
  52. 2 2
      ThirdParty/Assimp/code/COBScene.h
  53. 4 4
      ThirdParty/Assimp/code/CSMLoader.cpp
  54. 2 5
      ThirdParty/Assimp/code/CSMLoader.h
  55. 18 9
      ThirdParty/Assimp/code/CalcTangentsProcess.cpp
  56. 2 5
      ThirdParty/Assimp/code/CalcTangentsProcess.h
  57. 374 0
      ThirdParty/Assimp/code/ColladaExporter.cpp
  58. 112 0
      ThirdParty/Assimp/code/ColladaExporter.h
  59. 2 2
      ThirdParty/Assimp/code/ColladaHelper.h
  60. 8 17
      ThirdParty/Assimp/code/ColladaLoader.cpp
  61. 2 6
      ThirdParty/Assimp/code/ColladaLoader.h
  62. 9 9
      ThirdParty/Assimp/code/ColladaParser.cpp
  63. 3 3
      ThirdParty/Assimp/code/ComputeUVMappingProcess.cpp
  64. 2 7
      ThirdParty/Assimp/code/ComputeUVMappingProcess.h
  65. 1 4
      ThirdParty/Assimp/code/ConvertToLHProcess.h
  66. 230 0
      ThirdParty/Assimp/code/DXFHelper.h
  67. 631 342
      ThirdParty/Assimp/code/DXFLoader.cpp
  68. 57 89
      ThirdParty/Assimp/code/DXFLoader.h
  69. 464 0
      ThirdParty/Assimp/code/DeboneProcess.cpp
  70. 132 0
      ThirdParty/Assimp/code/DeboneProcess.h
  71. 1 1
      ThirdParty/Assimp/code/DefaultIOStream.cpp
  72. 2 2
      ThirdParty/Assimp/code/DefaultIOStream.h
  73. 28 24
      ThirdParty/Assimp/code/DefaultLogger.cpp
  74. 1 1
      ThirdParty/Assimp/code/DefaultProgressHandler.h
  75. 2 0
      ThirdParty/Assimp/code/Exceptional.h
  76. 400 0
      ThirdParty/Assimp/code/Exporter.cpp
  77. 9 3
      ThirdParty/Assimp/code/FileSystemFilter.h
  78. 1 6
      ThirdParty/Assimp/code/FindDegenerates.h
  79. 20 31
      ThirdParty/Assimp/code/FindInstancesProcess.cpp
  80. 2 7
      ThirdParty/Assimp/code/FindInstancesProcess.h
  81. 2 2
      ThirdParty/Assimp/code/FindInvalidDataProcess.cpp
  82. 1 7
      ThirdParty/Assimp/code/FindInvalidDataProcess.h
  83. 3 7
      ThirdParty/Assimp/code/FixNormalsStep.h
  84. 1 5
      ThirdParty/Assimp/code/GenFaceNormalsProcess.h
  85. 1 6
      ThirdParty/Assimp/code/GenVertexNormalsProcess.h
  86. 2 6
      ThirdParty/Assimp/code/HMPLoader.h
  87. 10 5
      ThirdParty/Assimp/code/Hash.h
  88. 663 0
      ThirdParty/Assimp/code/IFCCurve.cpp
  89. 1371 0
      ThirdParty/Assimp/code/IFCGeometry.cpp
  90. 758 0
      ThirdParty/Assimp/code/IFCLoader.cpp
  91. 132 0
      ThirdParty/Assimp/code/IFCLoader.h
  92. 179 0
      ThirdParty/Assimp/code/IFCMaterial.cpp
  93. 168 0
      ThirdParty/Assimp/code/IFCProfile.cpp
  94. 4800 0
      ThirdParty/Assimp/code/IFCReaderGen.cpp
  95. 4259 0
      ThirdParty/Assimp/code/IFCReaderGen.h
  96. 448 0
      ThirdParty/Assimp/code/IFCUtil.cpp
  97. 298 0
      ThirdParty/Assimp/code/IFCUtil.h
  98. 4 4
      ThirdParty/Assimp/code/IRRLoader.cpp
  99. 3 7
      ThirdParty/Assimp/code/IRRLoader.h
  100. 2 2
      ThirdParty/Assimp/code/IRRMeshLoader.cpp

+ 1 - 1
Docs/Urho3D.dox

@@ -62,7 +62,7 @@ Urho3D uses the following third-party libraries:
 - GLee 5.4 (http://elf-stone.com/)
 - GLee 5.4 (http://elf-stone.com/)
 - GLFW 3.0 WIP (http://www.glfw.org/)
 - GLFW 3.0 WIP (http://www.glfw.org/)
 - kNet (https://bitbucket.org/clb/knet)
 - kNet (https://bitbucket.org/clb/knet)
-- Open Asset Import Library 2.0.863 (http://assimp.sourceforge.net/)
+- Open Asset Import Library, svn rev 1062 (http://assimp.sourceforge.net/)
 - Open Dynamics %Engine, svn rev 1806 (http://www.ode.org/)
 - Open Dynamics %Engine, svn rev 1806 (http://www.ode.org/)
 - PortAudio V19 (http://www.portaudio.com/)
 - PortAudio V19 (http://www.portaudio.com/)
 - StanHull (http://codesuppository.blogspot.com/2006/03/john-ratcliffs-code-suppository-blog.html)
 - StanHull (http://codesuppository.blogspot.com/2006/03/john-ratcliffs-code-suppository-blog.html)

+ 6 - 11
Engine/Graphics/Batch.cpp

@@ -156,8 +156,9 @@ void Batch::Prepare(Graphics* graphics, const HashMap<StringHash, Vector4>& shad
         {
         {
             const Matrix3x4& transform = light_->GetWorldTransform();
             const Matrix3x4& transform = light_->GetWorldTransform();
             Matrix3x4 spotView(transform.Translation(), transform.Rotation(), 1.0f);
             Matrix3x4 spotView(transform.Translation(), transform.Rotation(), 1.0f);
-            
             Matrix4 spotProj(Matrix4::ZERO);
             Matrix4 spotProj(Matrix4::ZERO);
+            Matrix4 texAdjust(Matrix4::IDENTITY);
+            
             // Make the projected light slightly smaller than the shadow map to prevent light spill
             // Make the projected light slightly smaller than the shadow map to prevent light spill
             float h = 1.005f / tanf(light_->GetFov() * M_DEGTORAD * 0.5f);
             float h = 1.005f / tanf(light_->GetFov() * M_DEGTORAD * 0.5f);
             float w = h / light_->GetAspectRatio();
             float w = h / light_->GetAspectRatio();
@@ -166,7 +167,6 @@ void Batch::Prepare(Graphics* graphics, const HashMap<StringHash, Vector4>& shad
             spotProj.m22_ = 1.0f / Max(light_->GetRange(), M_EPSILON);
             spotProj.m22_ = 1.0f / Max(light_->GetRange(), M_EPSILON);
             spotProj.m32_ = 1.0f;
             spotProj.m32_ = 1.0f;
             
             
-            Matrix4 texAdjust(Matrix4::IDENTITY);
             #ifdef USE_OPENGL
             #ifdef USE_OPENGL
             texAdjust.SetTranslation(Vector3(0.5f, 0.5f, 0.5f));
             texAdjust.SetTranslation(Vector3(0.5f, 0.5f, 0.5f));
             texAdjust.SetScale(Vector3(0.5f, -0.5f, 0.5f));
             texAdjust.SetScale(Vector3(0.5f, -0.5f, 0.5f));
@@ -231,8 +231,10 @@ void Batch::Prepare(Graphics* graphics, const HashMap<StringHash, Vector4>& shad
         
         
         if (graphics->NeedParameterUpdate(PSP_SPOTPROJ, light_))
         if (graphics->NeedParameterUpdate(PSP_SPOTPROJ, light_))
         {
         {
+            Matrix3x4 viewPos(camera_->GetWorldPosition(), Quaternion::IDENTITY, Vector3::UNITY);
             Matrix3x4 spotView(light_->GetWorldPosition(), light_->GetWorldRotation(), 1.0f);
             Matrix3x4 spotView(light_->GetWorldPosition(), light_->GetWorldRotation(), 1.0f);
             Matrix4 spotProj(Matrix4::IDENTITY);
             Matrix4 spotProj(Matrix4::IDENTITY);
+            Matrix4 texAdjust(Matrix4::IDENTITY);
             
             
             // Make the projected light slightly smaller than the shadow map to prevent light spill
             // Make the projected light slightly smaller than the shadow map to prevent light spill
             float h = 1.005f / tanf(light_->GetFov() * M_DEGTORAD * 0.5f);
             float h = 1.005f / tanf(light_->GetFov() * M_DEGTORAD * 0.5f);
@@ -242,10 +244,6 @@ void Batch::Prepare(Graphics* graphics, const HashMap<StringHash, Vector4>& shad
             spotProj.m22_ = 1.0f / Max(light_->GetRange(), M_EPSILON);
             spotProj.m22_ = 1.0f / Max(light_->GetRange(), M_EPSILON);
             spotProj.m32_ = 1.0f;
             spotProj.m32_ = 1.0f;
             
             
-            Matrix3x4 viewPos(Matrix3x4::IDENTITY);
-            viewPos.SetTranslation(camera_->GetWorldPosition());
-            
-            Matrix4 texAdjust(Matrix4::IDENTITY);
             #ifdef USE_OPENGL
             #ifdef USE_OPENGL
             texAdjust.SetTranslation(Vector3(0.5f, 0.5f, 0.5f));
             texAdjust.SetTranslation(Vector3(0.5f, 0.5f, 0.5f));
             texAdjust.SetScale(Vector3(0.5f, -0.5f, 0.5f));
             texAdjust.SetScale(Vector3(0.5f, -0.5f, 0.5f));
@@ -270,7 +268,6 @@ void Batch::Prepare(Graphics* graphics, const HashMap<StringHash, Vector4>& shad
             Camera* shadowCamera = light_->GetShadowCamera();
             Camera* shadowCamera = light_->GetShadowCamera();
             Matrix3x4 shadowView(shadowCamera->GetInverseWorldTransform());
             Matrix3x4 shadowView(shadowCamera->GetInverseWorldTransform());
             Matrix4 shadowProj(shadowCamera->GetProjection());
             Matrix4 shadowProj(shadowCamera->GetProjection());
-            
             Matrix4 texAdjust(Matrix4::IDENTITY);
             Matrix4 texAdjust(Matrix4::IDENTITY);
             
             
             #ifdef USE_OPENGL
             #ifdef USE_OPENGL
@@ -305,13 +302,11 @@ void Batch::Prepare(Graphics* graphics, const HashMap<StringHash, Vector4>& shad
         if (graphics->NeedParameterUpdate(PSP_SHADOWPROJ, light_))
         if (graphics->NeedParameterUpdate(PSP_SHADOWPROJ, light_))
         {
         {
             Camera* shadowCamera = light_->GetShadowCamera();
             Camera* shadowCamera = light_->GetShadowCamera();
+            Matrix3x4 viewPos(camera_->GetWorldPosition(), Quaternion::IDENTITY, Vector3::UNITY);
             Matrix3x4 shadowView(shadowCamera->GetInverseWorldTransform());
             Matrix3x4 shadowView(shadowCamera->GetInverseWorldTransform());
             Matrix4 shadowProj(shadowCamera->GetProjection());
             Matrix4 shadowProj(shadowCamera->GetProjection());
-            
-            Matrix3x4 viewPos(Matrix3x4::IDENTITY);
-            viewPos.SetTranslation(camera_->GetWorldPosition());
-            
             Matrix4 texAdjust(Matrix4::IDENTITY);
             Matrix4 texAdjust(Matrix4::IDENTITY);
+            
             #ifdef USE_OPENGL
             #ifdef USE_OPENGL
             texAdjust.SetTranslation(Vector3(0.5f, 0.5f, 0.5f));
             texAdjust.SetTranslation(Vector3(0.5f, 0.5f, 0.5f));
             texAdjust.SetScale(Vector3(0.5f, 0.5f, 0.5f));
             texAdjust.SetScale(Vector3(0.5f, 0.5f, 0.5f));

+ 1 - 1
Engine/Graphics/Direct3D9/D3D9Graphics.cpp

@@ -1101,7 +1101,7 @@ bool Graphics::NeedParameterUpdate(StringHash param, const void* source)
     HashMap<StringHash, ShaderParameterInfo>::Iterator i = shaderParameters_.Find(param);
     HashMap<StringHash, ShaderParameterInfo>::Iterator i = shaderParameters_.Find(param);
     if (i == shaderParameters_.End())
     if (i == shaderParameters_.End())
         return false;
         return false;
-        
+    
     if (i->second_.type_ == VS)
     if (i->second_.type_ == VS)
     {
     {
         if (vertexShader_ && vertexShader_->HasParameter(param) && i->second_.lastSource_ != source)
         if (vertexShader_ && vertexShader_->HasParameter(param) && i->second_.lastSource_ != source)

+ 1 - 1
Engine/Graphics/Geometry.h

@@ -55,7 +55,7 @@ public:
     bool SetDrawRange(PrimitiveType type, unsigned indexStart, unsigned indexCount, unsigned vertexStart, unsigned vertexCount);
     bool SetDrawRange(PrimitiveType type, unsigned indexStart, unsigned indexCount, unsigned vertexStart, unsigned vertexCount);
     /// %Set the LOD distance to report
     /// %Set the LOD distance to report
     void SetLodDistance(float distance);
     void SetLodDistance(float distance);
-    /// %Set vertex and index raw data. Vertex raw data should contain positions only
+    /// %Set vertex and index raw data for CPU access. Vertex raw data should contain positions only
     void SetRawData(const SharedArrayPtr<unsigned char>& vertexData, const SharedArrayPtr<unsigned char>& indexData);
     void SetRawData(const SharedArrayPtr<unsigned char>& vertexData, const SharedArrayPtr<unsigned char>& indexData);
     /// Draw
     /// Draw
     void Draw(Graphics* graphics);
     void Draw(Graphics* graphics);

+ 4 - 8
Engine/Graphics/Renderer.cpp

@@ -1269,7 +1269,6 @@ bool Renderer::CreateShadowMaps()
     }
     }
     
     
     #ifdef USE_OPENGL
     #ifdef USE_OPENGL
-    
     // Create shadow maps only. Color rendertargets are not needed
     // Create shadow maps only. Color rendertargets are not needed
     unsigned size = shadowMapSize_;
     unsigned size = shadowMapSize_;
     for (unsigned i = 0; i < NUM_SHADOWMAP_RESOLUTIONS; ++i)
     for (unsigned i = 0; i < NUM_SHADOWMAP_RESOLUTIONS; ++i)
@@ -1285,9 +1284,7 @@ bool Renderer::CreateShadowMaps()
         }
         }
         size >>= 1;
         size >>= 1;
     }
     }
-    
     #else
     #else
-    
     // Create shadow maps and dummy color rendertargets
     // Create shadow maps and dummy color rendertargets
     unsigned size = shadowMapSize_;
     unsigned size = shadowMapSize_;
     for (unsigned i = 0; i < NUM_SHADOWMAP_RESOLUTIONS; ++i)
     for (unsigned i = 0; i < NUM_SHADOWMAP_RESOLUTIONS; ++i)
@@ -1310,7 +1307,6 @@ bool Renderer::CreateShadowMaps()
         }
         }
         size >>= 1;
         size >>= 1;
     }
     }
-    
     #endif
     #endif
     
     
     return true;
     return true;
@@ -1370,7 +1366,7 @@ void Renderer::SetupLightBatch(Batch& batch)
         if (light->GetNearSplit() <= batch.camera_->GetNearClip())
         if (light->GetNearSplit() <= batch.camera_->GetNearClip())
         {
         {
             graphics_->SetCullMode(CULL_NONE);
             graphics_->SetCullMode(CULL_NONE);
-            graphics_->SetDepthTest(CMP_GREATER);
+            graphics_->SetDepthTest(CMP_GREATEREQUAL);
             graphics_->SetStencilTest(false);
             graphics_->SetStencilTest(false);
         }
         }
         else
         else
@@ -1392,7 +1388,7 @@ void Renderer::SetupLightBatch(Batch& batch)
             
             
             // Re-enable color write, set test for rendering the actual light
             // Re-enable color write, set test for rendering the actual light
             graphics_->SetColorWrite(true);
             graphics_->SetColorWrite(true);
-            graphics_->SetDepthTest(CMP_GREATER);
+            graphics_->SetDepthTest(CMP_GREATEREQUAL);
             graphics_->SetStencilTest(true, CMP_EQUAL, OP_ZERO, OP_KEEP, OP_ZERO, 1);
             graphics_->SetStencilTest(true, CMP_EQUAL, OP_ZERO, OP_KEEP, OP_ZERO, 1);
         }
         }
     }
     }
@@ -1408,7 +1404,7 @@ void Renderer::SetupLightBatch(Batch& batch)
             bool drawBackFaces = lightViewDist < (lightExtent + batch.camera_->GetNearClip());
             bool drawBackFaces = lightViewDist < (lightExtent + batch.camera_->GetNearClip());
             graphics_->SetColorWrite(false);
             graphics_->SetColorWrite(false);
             graphics_->SetCullMode(drawBackFaces ? CULL_CCW : CULL_CW);
             graphics_->SetCullMode(drawBackFaces ? CULL_CCW : CULL_CW);
-            graphics_->SetDepthTest(drawBackFaces ? CMP_GREATER : CMP_LESS);
+            graphics_->SetDepthTest(drawBackFaces ? CMP_GREATEREQUAL : CMP_LESSEQUAL);
             graphics_->SetStencilTest(true, CMP_EQUAL, OP_INCR, OP_KEEP, OP_KEEP, 0);
             graphics_->SetStencilTest(true, CMP_EQUAL, OP_INCR, OP_KEEP, OP_KEEP, 0);
             graphics_->SetShaders(stencilVS_, stencilPS_);
             graphics_->SetShaders(stencilVS_, stencilPS_);
             graphics_->SetShaderParameter(VSP_VIEWPROJ, projection * view);
             graphics_->SetShaderParameter(VSP_VIEWPROJ, projection * view);
@@ -1428,7 +1424,7 @@ void Renderer::SetupLightBatch(Batch& batch)
             {
             {
                 // In this case reverse cull mode & depth test and render back faces
                 // In this case reverse cull mode & depth test and render back faces
                 graphics_->SetCullMode(CULL_CW);
                 graphics_->SetCullMode(CULL_CW);
-                graphics_->SetDepthTest(CMP_GREATER);
+                graphics_->SetDepthTest(CMP_GREATEREQUAL);
                 graphics_->SetStencilTest(false);
                 graphics_->SetStencilTest(false);
             }
             }
             else
             else

+ 1 - 1
Engine/Graphics/View.cpp

@@ -1976,7 +1976,7 @@ void View::DrawSplitLightToStencil(Camera& camera, Light* light, bool clear)
             graphics_->SetColorWrite(false);
             graphics_->SetColorWrite(false);
             graphics_->SetDepthWrite(false);
             graphics_->SetDepthWrite(false);
             graphics_->SetCullMode(drawBackFaces ? CULL_CW : CULL_CCW);
             graphics_->SetCullMode(drawBackFaces ? CULL_CW : CULL_CCW);
-            graphics_->SetDepthTest(drawBackFaces ? CMP_GREATER : CMP_LESS);
+            graphics_->SetDepthTest(drawBackFaces ? CMP_GREATEREQUAL : CMP_LESSEQUAL);
             graphics_->SetShaders(renderer_->stencilVS_, renderer_->stencilPS_);
             graphics_->SetShaders(renderer_->stencilVS_, renderer_->stencilPS_);
             graphics_->SetShaderParameter(VSP_MODEL, model);
             graphics_->SetShaderParameter(VSP_MODEL, model);
             graphics_->SetShaderParameter(VSP_VIEWPROJ, projection * view);
             graphics_->SetShaderParameter(VSP_VIEWPROJ, projection * view);

+ 1 - 1
Readme.txt

@@ -41,7 +41,7 @@ Urho3D uses the following third-party libraries:
 - GLee 5.4 (http://elf-stone.com/)
 - GLee 5.4 (http://elf-stone.com/)
 - GLFW 3.0 WIP (http://www.glfw.org/)
 - GLFW 3.0 WIP (http://www.glfw.org/)
 - kNet (https://bitbucket.org/clb/knet)
 - kNet (https://bitbucket.org/clb/knet)
-- Open Asset Import Library 2.0.863 (http://assimp.sourceforge.net/)
+- Open Asset Import Library, svn rev 1062 (http://assimp.sourceforge.net/)
 - Open Dynamics Engine, svn rev 1806 (http://www.ode.org/)
 - Open Dynamics Engine, svn rev 1806 (http://www.ode.org/)
 - PortAudio V19 (http://www.portaudio.com/)
 - PortAudio V19 (http://www.portaudio.com/)
 - StanHull (http://codesuppository.blogspot.com/2006/03/
 - StanHull (http://codesuppository.blogspot.com/2006/03/

+ 231 - 339
ThirdParty/Assimp/CMakeLists.txt

@@ -1,10 +1,16 @@
-INCLUDE_DIRECTORIES( code/BoostWorkaround )
-ADD_DEFINITIONS( -DASSIMP_BUILD_BOOST_WORKAROUND )
-
 #
 #
-# Listing and grouping of all the source files for use with IDE project
-# generators.
+# Listing and grouping of all the source files.
+# 1) Set the file lists for each component
+# 2) Create a Source Group for each component, for IDE project orginization
+# 3) Add libassimp using the file lists (eliminates duplication of file names between
+#    source groups and library command)
 #
 #
+
+INCLUDE_DIRECTORIES( include )
+INCLUDE_DIRECTORIES( code/BoostWorkaround )
+INCLUDE_DIRECTORIES( contrib/unzip )
+ADD_DEFINITIONS( -DASSIMP_BUILD_BOOST_WORKAROUND )
+	
 SET( HEADER_PATH include )
 SET( HEADER_PATH include )
 
 
 SET( COMPILER_HEADERS
 SET( COMPILER_HEADERS
@@ -12,6 +18,7 @@ SET( COMPILER_HEADERS
 	${HEADER_PATH}/Compiler/poppack1.h
 	${HEADER_PATH}/Compiler/poppack1.h
 	code/pstdint.h
 	code/pstdint.h
 )
 )
+SOURCE_GROUP( Compiler FILES ${COMPILER_HEADERS})
 
 
 SET( PUBLIC_HEADERS
 SET( PUBLIC_HEADERS
 	${HEADER_PATH}/aiAnim.h
 	${HEADER_PATH}/aiAnim.h
@@ -48,13 +55,17 @@ SET( PUBLIC_HEADERS
 	${HEADER_PATH}/Logger.h
 	${HEADER_PATH}/Logger.h
 	${HEADER_PATH}/LogStream.h
 	${HEADER_PATH}/LogStream.h
 	${HEADER_PATH}/NullLogger.h
 	${HEADER_PATH}/NullLogger.h
+	${HEADER_PATH}/export.h
+	${HEADER_PATH}/export.hpp
 )
 )
 
 
-SOURCE_GROUP( Compiler FILES	${HEADER_PATH}/Compiler/pushpack1.h
-	${HEADER_PATH}/Compiler/poppack1.h
+SET( Core_SRCS
+	code/Assimp.cpp
+	code/AssimpPCH.cpp
+	code/AssimpPCH.h
 )
 )
 
 
-SOURCE_GROUP( Boost FILES
+SET( Boost_SRCS
 	code/BoostWorkaround/boost/math/common_factor_rt.hpp
 	code/BoostWorkaround/boost/math/common_factor_rt.hpp
 	code/BoostWorkaround/boost/foreach.hpp
 	code/BoostWorkaround/boost/foreach.hpp
 	code/BoostWorkaround/boost/format.hpp
 	code/BoostWorkaround/boost/format.hpp
@@ -62,11 +73,13 @@ SOURCE_GROUP( Boost FILES
 	code/BoostWorkaround/boost/scoped_ptr.hpp
 	code/BoostWorkaround/boost/scoped_ptr.hpp
 	code/BoostWorkaround/boost/shared_array.hpp
 	code/BoostWorkaround/boost/shared_array.hpp
 	code/BoostWorkaround/boost/shared_ptr.hpp
 	code/BoostWorkaround/boost/shared_ptr.hpp
+	code/BoostWorkaround/boost/make_shared.hpp
 	code/BoostWorkaround/boost/static_assert.hpp
 	code/BoostWorkaround/boost/static_assert.hpp
 	code/BoostWorkaround/boost/tuple/tuple.hpp
 	code/BoostWorkaround/boost/tuple/tuple.hpp
 )
 )
+SOURCE_GROUP(Boost FILES ${Boost_SRCS})
 
 
-SOURCE_GROUP( Logging FILES
+SET( Logging_SRCS
 	${HEADER_PATH}/DefaultLogger.h
 	${HEADER_PATH}/DefaultLogger.h
 	${HEADER_PATH}/IOStream.h
 	${HEADER_PATH}/IOStream.h
 	${HEADER_PATH}/LogStream.h
 	${HEADER_PATH}/LogStream.h
@@ -76,22 +89,26 @@ SOURCE_GROUP( Logging FILES
 	code/DefaultLogger.cpp
 	code/DefaultLogger.cpp
 	code/FileLogStream.h
 	code/FileLogStream.h
 )
 )
+SOURCE_GROUP(Logging FILES ${Logging_SRCS})
 
 
-SOURCE_GROUP( Common FILES
-	code/aiAssert.cpp
+SET( Common_SRCS
 	code/fast_atof.h
 	code/fast_atof.h
 	code/qnan.h
 	code/qnan.h
 	code/BaseImporter.cpp
 	code/BaseImporter.cpp
 	code/BaseImporter.h
 	code/BaseImporter.h
 	code/BaseProcess.cpp
 	code/BaseProcess.cpp
 	code/BaseProcess.h
 	code/BaseProcess.h
+	code/Importer.h
+	code/ScenePrivate.h
+	code/PostStepRegistry.cpp
+	code/ImporterRegistry.cpp
 	code/ByteSwap.h
 	code/ByteSwap.h
-	code/ProcessHelper.h
 	code/DefaultProgressHandler.h
 	code/DefaultProgressHandler.h
 	code/DefaultIOStream.cpp
 	code/DefaultIOStream.cpp
 	code/DefaultIOStream.h
 	code/DefaultIOStream.h
 	code/DefaultIOSystem.cpp
 	code/DefaultIOSystem.cpp
 	code/DefaultIOSystem.h
 	code/DefaultIOSystem.h
+	code/CInterfaceIOWrapper.h
 	code/Hash.h
 	code/Hash.h
 	code/Importer.cpp
 	code/Importer.cpp
 	code/IFF.h
 	code/IFF.h
@@ -112,6 +129,8 @@ SOURCE_GROUP( Common FILES
 	code/ScenePreprocessor.h
 	code/ScenePreprocessor.h
 	code/SkeletonMeshBuilder.cpp
 	code/SkeletonMeshBuilder.cpp
 	code/SkeletonMeshBuilder.h
 	code/SkeletonMeshBuilder.h
+	code/SplitByBoneCountProcess.cpp
+	code/SplitByBoneCountProcess.h
 	code/SmoothingGroups.h
 	code/SmoothingGroups.h
 	code/StandardShapes.cpp
 	code/StandardShapes.cpp
 	code/StandardShapes.h
 	code/StandardShapes.h
@@ -125,62 +144,77 @@ SOURCE_GROUP( Common FILES
 	code/LineSplitter.h
 	code/LineSplitter.h
 	code/TinyFormatter.h
 	code/TinyFormatter.h
 	code/Profiler.h
 	code/Profiler.h
+	code/LogAux.h
 )
 )
+SOURCE_GROUP(Common FILES ${Common_SRCS})
 
 
-SOURCE_GROUP( 3DS FILES
+SET( 3DS_SRCS
 	code/3DSConverter.cpp
 	code/3DSConverter.cpp
 	code/3DSHelper.h
 	code/3DSHelper.h
 	code/3DSLoader.cpp
 	code/3DSLoader.cpp
 	code/3DSLoader.h
 	code/3DSLoader.h
 )
 )
+SOURCE_GROUP(3DS FILES ${3DS_SRCS})
 
 
-SOURCE_GROUP( AC FILES
+SET( AC_SRCS
 	code/ACLoader.cpp
 	code/ACLoader.cpp
 	code/ACLoader.h
 	code/ACLoader.h
 )
 )
+SOURCE_GROUP( AC FILES ${AC_SRCS})
 
 
-SOURCE_GROUP( ASE FILES
+SET( ASE_SRCS
 	code/ASELoader.cpp
 	code/ASELoader.cpp
 	code/ASELoader.h
 	code/ASELoader.h
 	code/ASEParser.cpp
 	code/ASEParser.cpp
 	code/ASEParser.h
 	code/ASEParser.h
 )
 )
-SOURCE_GROUP( B3D FILES
+SOURCE_GROUP( ASE FILES ${ASE_SRCS})
+
+SET( B3D_SRCS
 	code/B3DImporter.cpp
 	code/B3DImporter.cpp
 	code/B3DImporter.h
 	code/B3DImporter.h
 )
 )
+SOURCE_GROUP( B3D FILES ${B3D_SRCS})
 
 
-SOURCE_GROUP( BVH FILES
+SET( BVH_SRCS
 	code/BVHLoader.cpp
 	code/BVHLoader.cpp
 	code/BVHLoader.h
 	code/BVHLoader.h
 )
 )
+SOURCE_GROUP( BVH FILES ${BVH_SRCS})
 
 
-SOURCE_GROUP( Collada FILES
+SET( Collada_SRCS
 	code/ColladaHelper.h
 	code/ColladaHelper.h
 	code/ColladaLoader.cpp
 	code/ColladaLoader.cpp
 	code/ColladaLoader.h
 	code/ColladaLoader.h
 	code/ColladaParser.cpp
 	code/ColladaParser.cpp
 	code/ColladaParser.h
 	code/ColladaParser.h
+	code/ColladaExporter.h
+	code/ColladaExporter.cpp
 )
 )
+SOURCE_GROUP( Collada FILES ${Collada_SRCS})
 
 
-SOURCE_GROUP( DXF FILES
+SET( DXF_SRCS
 	code/DXFLoader.cpp
 	code/DXFLoader.cpp
 	code/DXFLoader.h
 	code/DXFLoader.h
+	code/DXFHelper.h
 )
 )
+SOURCE_GROUP( DXF FILES ${DXF_SRCS})
 
 
-SOURCE_GROUP( CSM FILES
+SET( CSM_SRCS
 	code/CSMLoader.cpp
 	code/CSMLoader.cpp
 	code/CSMLoader.h
 	code/CSMLoader.h
 )
 )
+SOURCE_GROUP( CSM FILES ${CSM_SRCS})
 
 
-SOURCE_GROUP( HMP FILES
+SET( HMP_SRCS
 	code/HMPFileData.h
 	code/HMPFileData.h
 	code/HMPLoader.cpp
 	code/HMPLoader.cpp
 	code/HMPLoader.h
 	code/HMPLoader.h
 	code/HalfLifeFileData.h
 	code/HalfLifeFileData.h
 )
 )
+SOURCE_GROUP( HMP FILES ${HMP_SRCS})
 
 
-SOURCE_GROUP( Irr FILES
+SET( Irr_SRCS
 	code/IRRLoader.cpp
 	code/IRRLoader.cpp
 	code/IRRLoader.h
 	code/IRRLoader.h
 	code/IRRMeshLoader.cpp
 	code/IRRMeshLoader.cpp
@@ -188,8 +222,9 @@ SOURCE_GROUP( Irr FILES
 	code/IRRShared.cpp
 	code/IRRShared.cpp
 	code/IRRShared.h
 	code/IRRShared.h
 )
 )
+SOURCE_GROUP( Irr FILES ${Irr_SRCS})
 
 
-SOURCE_GROUP( LWO FILES
+SET( LWO_SRCS
 	code/LWOAnimation.cpp
 	code/LWOAnimation.cpp
 	code/LWOAnimation.h
 	code/LWOAnimation.h
 	code/LWOBLoader.cpp
 	code/LWOBLoader.cpp
@@ -198,68 +233,85 @@ SOURCE_GROUP( LWO FILES
 	code/LWOLoader.h
 	code/LWOLoader.h
 	code/LWOMaterial.cpp
 	code/LWOMaterial.cpp
 )
 )
+SOURCE_GROUP( LWO FILES ${LWO_SRCS})
 
 
-SOURCE_GROUP( LWS FILES
+SET( LWS_SRCS
 	code/LWSLoader.cpp
 	code/LWSLoader.cpp
 	code/LWSLoader.h
 	code/LWSLoader.h
 )
 )
+SOURCE_GROUP( LWS FILES ${LWS_SRCS})
 
 
-SOURCE_GROUP( MD2 FILES
+SET ( M3_SRCS
+	code/M3Importer.cpp
+	code/M3Importer.h
+)
+SOURCE_GROUP( M3 FILES ${M3_SRCS} )
+
+SET( MD2_SRCS
 	code/MD2FileData.h
 	code/MD2FileData.h
 	code/MD2Loader.cpp
 	code/MD2Loader.cpp
 	code/MD2Loader.h
 	code/MD2Loader.h
 	code/MD2NormalTable.h
 	code/MD2NormalTable.h
 )
 )
+SOURCE_GROUP( MD2 FILES ${MD2_SRCS})
 
 
-SOURCE_GROUP( MD3 FILES
+SET( MD3_SRCS
 	code/MD3FileData.h
 	code/MD3FileData.h
 	code/MD3Loader.cpp
 	code/MD3Loader.cpp
 	code/MD3Loader.h
 	code/MD3Loader.h
 )
 )
+SOURCE_GROUP( MD3 FILES ${MD3_SRCS})
 
 
-SOURCE_GROUP( MD5 FILES
+SET( MD5_SRCS
 	code/MD5Loader.cpp
 	code/MD5Loader.cpp
 	code/MD5Loader.h
 	code/MD5Loader.h
 	code/MD5Parser.cpp
 	code/MD5Parser.cpp
 	code/MD5Parser.h
 	code/MD5Parser.h
 )
 )
+SOURCE_GROUP( MD5 FILES ${MD5_SRCS})
 
 
-SOURCE_GROUP( MDC FILES
+SET( MDC_SRCS
 	code/MDCFileData.h
 	code/MDCFileData.h
 	code/MDCLoader.cpp
 	code/MDCLoader.cpp
 	code/MDCLoader.h
 	code/MDCLoader.h
 	code/MDCNormalTable.h
 	code/MDCNormalTable.h
 )
 )
+SOURCE_GROUP( MDC FILES ${MDC_SRCS})
 
 
-SOURCE_GROUP( MDL FILES
+SET( MDL_SRCS
 	code/MDLDefaultColorMap.h
 	code/MDLDefaultColorMap.h
 	code/MDLFileData.h
 	code/MDLFileData.h
 	code/MDLLoader.cpp
 	code/MDLLoader.cpp
 	code/MDLLoader.h
 	code/MDLLoader.h
 	code/MDLMaterialLoader.cpp
 	code/MDLMaterialLoader.cpp
 )
 )
+SOURCE_GROUP( MDL FILES ${MDL_SRCS})
 
 
-SOURCE_GROUP( MaterialSystem FILES
+SET( MaterialSystem_SRCS
 	code/MaterialSystem.cpp
 	code/MaterialSystem.cpp
 	code/MaterialSystem.h
 	code/MaterialSystem.h
 )
 )
+SOURCE_GROUP( MaterialSystem FILES ${MaterialSystem_SRCS})
 
 
-SOURCE_GROUP( NFF FILES
+SET( NFF_SRCS
 	code/NFFLoader.cpp
 	code/NFFLoader.cpp
 	code/NFFLoader.h
 	code/NFFLoader.h
 )
 )
+SOURCE_GROUP( NFF FILES ${NFF_SRCS})
 
 
-SOURCE_GROUP( NDO FILES
+SET( NDO_SRCS
 	code/NDOLoader.cpp
 	code/NDOLoader.cpp
 	code/NDOLoader.h
 	code/NDOLoader.h
 )
 )
+SOURCE_GROUP( NDO FILES ${NDO_SRCS})
 
 
-SOURCE_GROUP( OFFFormat FILES
+SET( OFFFormat_SRCS
 	code/OFFLoader.cpp
 	code/OFFLoader.cpp
 	code/OFFLoader.h
 	code/OFFLoader.h
 )
 )
+SOURCE_GROUP( OFFFormat FILES ${OFFFormat_SRCS})
 
 
-SOURCE_GROUP( Obj FILES
+SET( Obj_SRCS
 	code/ObjFileData.h
 	code/ObjFileData.h
 	code/ObjFileImporter.cpp
 	code/ObjFileImporter.cpp
 	code/ObjFileImporter.h
 	code/ObjFileImporter.h
@@ -268,33 +320,40 @@ SOURCE_GROUP( Obj FILES
 	code/ObjFileParser.cpp
 	code/ObjFileParser.cpp
 	code/ObjFileParser.h
 	code/ObjFileParser.h
 	code/ObjTools.h
 	code/ObjTools.h
+	code/ObjExporter.h
+	code/ObjExporter.cpp
 )
 )
+SOURCE_GROUP( Obj FILES ${Obj_SRCS})
 
 
-SOURCE_GROUP( Ogre FILES
+SET( Ogre_SRCS
 	code/OgreImporter.h
 	code/OgreImporter.h
 	code/OgreImporter.cpp
 	code/OgreImporter.cpp
 	code/OgreImporterMaterial.cpp
 	code/OgreImporterMaterial.cpp
 )
 )
+SOURCE_GROUP( Ogre FILES ${Ogre_SRCS})
 
 
-SOURCE_GROUP( Ply FILES
+SET( Ply_SRCS
 	code/PlyLoader.cpp
 	code/PlyLoader.cpp
 	code/PlyLoader.h
 	code/PlyLoader.h
 	code/PlyParser.cpp
 	code/PlyParser.cpp
 	code/PlyParser.h
 	code/PlyParser.h
 )
 )
+SOURCE_GROUP( Ply FILES ${Ply_SRCS})
 
 
-SOURCE_GROUP(MS3D FILES
+SET(MS3D_SRCS
 	code/MS3DLoader.cpp
 	code/MS3DLoader.cpp
 	code/MS3DLoader.h
 	code/MS3DLoader.h
 )
 )
+SOURCE_GROUP( MS3D FILES ${MS3D_SRCS})
 
 
-SOURCE_GROUP(COB FILES
+SET(COB_SRCS
 	code/COBLoader.cpp
 	code/COBLoader.cpp
 	code/COBLoader.h
 	code/COBLoader.h
 	code/COBScene.h
 	code/COBScene.h
 )
 )
+SOURCE_GROUP( COB FILES ${COB_SRCS})
 
 
-SOURCE_GROUP(BLENDER FILES
+SET(BLENDER_SRCS
 	code/BlenderLoader.cpp
 	code/BlenderLoader.cpp
 	code/BlenderLoader.h
 	code/BlenderLoader.h
 	code/BlenderDNA.cpp
 	code/BlenderDNA.cpp
@@ -307,8 +366,26 @@ SOURCE_GROUP(BLENDER FILES
 	code/BlenderModifier.h
 	code/BlenderModifier.h
 	code/BlenderModifier.cpp
 	code/BlenderModifier.cpp
 )
 )
-
-SOURCE_GROUP( PostProcessing FILES
+SOURCE_GROUP( BLENDER FILES ${BLENDER_SRCS})
+
+SET(IFC_SRCS
+	code/IFCLoader.cpp
+	code/IFCLoader.h
+	code/IFCReaderGen.cpp
+	code/IFCReaderGen.h
+	code/IFCUtil.h
+	code/IFCUtil.cpp
+	code/IFCGeometry.cpp
+	code/IFCMaterial.cpp
+	code/IFCProfile.cpp
+	code/IFCCurve.cpp
+	code/STEPFile.h
+	code/STEPFileReader.h
+	code/STEPFileReader.cpp
+)
+SOURCE_GROUP( IFC FILES ${IFC_SRCS})
+
+SET( PostProcessing_SRCS
 	code/CalcTangentsProcess.cpp
 	code/CalcTangentsProcess.cpp
 	code/CalcTangentsProcess.h
 	code/CalcTangentsProcess.h
 	code/ComputeUVMappingProcess.cpp
 	code/ComputeUVMappingProcess.cpp
@@ -355,14 +432,23 @@ SOURCE_GROUP( PostProcessing FILES
 	code/OptimizeGraph.h
 	code/OptimizeGraph.h
 	code/OptimizeMeshes.cpp
 	code/OptimizeMeshes.cpp
 	code/OptimizeMeshes.h
 	code/OptimizeMeshes.h
+	code/DeboneProcess.cpp
+	code/DeboneProcess.h
+	code/ProcessHelper.h
+	code/ProcessHelper.cpp
+	code/PolyTools.h
+	code/MakeVerboseFormat.cpp
+	code/MakeVerboseFormat.h
 )
 )
+SOURCE_GROUP( PostProcessing FILES ${PostProcessing_SRCS})
 
 
-SOURCE_GROUP( Q3D FILES
+SET( Q3D_SRCS
 	code/Q3DLoader.cpp
 	code/Q3DLoader.cpp
 	code/Q3DLoader.h
 	code/Q3DLoader.h
 )
 )
+SOURCE_GROUP( Q3D FILES ${Q3D_SRCS})
 
 
-SOURCE_GROUP( Q3BSP FILES
+SET( Q3BSP_SRCS
 	code/Q3BSPFileData.h
 	code/Q3BSPFileData.h
 	code/Q3BSPFileParser.h
 	code/Q3BSPFileParser.h
 	code/Q3BSPFileParser.cpp
 	code/Q3BSPFileParser.cpp
@@ -371,43 +457,57 @@ SOURCE_GROUP( Q3BSP FILES
 	code/Q3BSPZipArchive.h
 	code/Q3BSPZipArchive.h
 	code/Q3BSPZipArchive.cpp
 	code/Q3BSPZipArchive.cpp
 )
 )
+SOURCE_GROUP( Q3BSP FILES ${Q3BSP_SRCS})
 
 
-SOURCE_GROUP( Raw FILES
+SET( Raw_SRCS
 	code/RawLoader.cpp
 	code/RawLoader.cpp
 	code/RawLoader.h
 	code/RawLoader.h
 )
 )
+SOURCE_GROUP( Raw FILES ${Raw_SRCS})
 
 
-SOURCE_GROUP( SMD FILES
+SET( SMD_SRCS
 	code/SMDLoader.cpp
 	code/SMDLoader.cpp
 	code/SMDLoader.h
 	code/SMDLoader.h
 )
 )
+SOURCE_GROUP( SMD FILES ${SMD_SRCS})
 
 
-SOURCE_GROUP( STL FILES
+SET( STL_SRCS
 	code/STLLoader.cpp
 	code/STLLoader.cpp
 	code/STLLoader.h
 	code/STLLoader.h
+	code/STLExporter.h
+	code/STLExporter.cpp
 )
 )
+SOURCE_GROUP( STL FILES ${STL_SRCS})
 
 
-SOURCE_GROUP( Unreal FILES
+SET( Unreal_SRCS
 	code/UnrealLoader.cpp
 	code/UnrealLoader.cpp
 	code/UnrealLoader.h
 	code/UnrealLoader.h
 )
 )
+SOURCE_GROUP( Unreal FILES ${Unreal_SRCS})
 
 
-SOURCE_GROUP( XFile FILES
+SET( XFile_SRCS
 	code/XFileHelper.h
 	code/XFileHelper.h
 	code/XFileImporter.cpp
 	code/XFileImporter.cpp
 	code/XFileImporter.h
 	code/XFileImporter.h
 	code/XFileParser.cpp
 	code/XFileParser.cpp
 	code/XFileParser.h
 	code/XFileParser.h
 )
 )
+SOURCE_GROUP( XFile FILES ${XFile_SRCS})
 
 
-SOURCE_GROUP( Extra FILES
-	code/MakeVerboseFormat.cpp
-	code/MakeVerboseFormat.h
+SET( Exporter_SRCS
+	code/Exporter.cpp
+	code/AssimpCExport.cpp
+	code/BlobIOSystem.h
+)
+SOURCE_GROUP( Exporter FILES ${Exporter_SRCS})
+
+SET( Extra_SRCS
 	code/MD4FileData.h
 	code/MD4FileData.h
 )
 )
+SOURCE_GROUP( Extra FILES ${Extra_SRCS})
 
 
-SOURCE_GROUP( IrrXML FILES
-	irrXMLWrapper.h
+SET( IrrXML_SRCS
+	code/irrXMLWrapper.h
 	contrib/irrXML/CXMLReaderImpl.h
 	contrib/irrXML/CXMLReaderImpl.h
 	contrib/irrXML/heapsort.h
 	contrib/irrXML/heapsort.h
 	contrib/irrXML/irrArray.h
 	contrib/irrXML/irrArray.h
@@ -416,294 +516,24 @@ SOURCE_GROUP( IrrXML FILES
 	contrib/irrXML/irrXML.cpp
 	contrib/irrXML/irrXML.cpp
 	contrib/irrXML/irrXML.h
 	contrib/irrXML/irrXML.h
 )
 )
+SOURCE_GROUP( IrrXML FILES ${IrrXML_SRCS})
 
 
-SOURCE_GROUP( ConvertUTF FILES
+SET( ConvertUTF_SRCS
 	contrib/ConvertUTF/ConvertUTF.h
 	contrib/ConvertUTF/ConvertUTF.h
 	contrib/ConvertUTF/ConvertUTF.c
 	contrib/ConvertUTF/ConvertUTF.c
 )
 )
+SOURCE_GROUP( ConvertUTF FILES ${ConvertUTF_SRCS})
 
 
-SOURCE_GROUP( zlib FILES
-	contrib/zlib/adler32.c
-	contrib/zlib/compress.c
-	contrib/zlib/crc32.c
-	contrib/zlib/crc32.h
-	contrib/zlib/deflate.c
-	contrib/zlib/deflate.h
-	contrib/zlib/inffast.c
-	contrib/zlib/inffast.h
-	contrib/zlib/inffixed.h
-	contrib/zlib/inflate.c
-	contrib/zlib/inflate.h
-	contrib/zlib/inftrees.c
-	contrib/zlib/inftrees.h
-	contrib/zlib/trees.c
-	contrib/zlib/trees.h
-	contrib/zlib/zconf.h
-	contrib/zlib/zconf.in.h
-	contrib/zlib/zlib.h
-	contrib/zlib/zutil.c
-	contrib/zlib/zutil.h
-)
-
-SOURCE_GROUP( unzip FILES
+SET( unzip_SRCS
 	contrib/unzip/crypt.h
 	contrib/unzip/crypt.h
 	contrib/unzip/ioapi.c
 	contrib/unzip/ioapi.c
 	contrib/unzip/ioapi.h
 	contrib/unzip/ioapi.h
 	contrib/unzip/unzip.c
 	contrib/unzip/unzip.c
 	contrib/unzip/unzip.h
 	contrib/unzip/unzip.h
 )
 )
+SOURCE_GROUP( unzip FILES ${unzip_SRCS})
 
 
-SET (HEADER_FILES
-	code/3DSHelper.h
-	code/3DSLoader.h
-	code/ACLoader.h
-	code/ASELoader.h
-	code/ASEParser.h
-	code/AssimpPCH.h
-	code/B3DImporter.h
-	code/BVHLoader.h
-	code/BaseImporter.h
-	code/BaseProcess.h
-	code/BlenderScene.h
-	code/BlenderSceneGen.h
-	code/BlenderIntermediate.h
-	code/BlenderLoader.h
-	code/BlenderModifier.h
-	code/BlenderDNA.h
-	code/BlenderDNA.inl
-	code/ByteSwap.h
-	code/CalcTangentsProcess.h
-	code/COBLoader.h
-	code/COBScene.h
-	code/ColladaHelper.h
-	code/ColladaLoader.h
-	code/ColladaParser.h
-	code/ComputeUVMappingProcess.h
-	code/ConvertToLHProcess.h
-	code/DXFLoader.h
-	code/CSMLoader.h
-	code/DefaultIOStream.h
-	code/DefaultIOSystem.h
-	code/DefaultProgressHandler.h
-	code/FileLogStream.h
-    code/FindDegenerates.h
-	code/FindInstancesProcess.h
-	code/FindInvalidDataProcess.h
-	code/FixNormalsStep.h
-	code/GenFaceNormalsProcess.h
-	code/GenVertexNormalsProcess.h
-	code/GenericProperty.h
-	code/HMPFileData.h
-	code/HMPLoader.h
-	code/HalfLifeFileData.h
-	code/Hash.h
-	code/IFF.h
-	code/IRRLoader.h
-	code/IRRMeshLoader.h
-	code/IRRShared.h
-	code/ImproveCacheLocality.h
-	code/JoinVerticesProcess.h
-	code/LimitBoneWeightsProcess.h
-	code/LineSplitter.h
-    code/LWOAnimation.h
-	code/LWOFileData.h
- 	code/LWOLoader.h
-	code/LWSLoader.h
-	code/MakeVerboseFormat.h
-	code/MD2FileData.h
-	code/MD2Loader.h
-	code/MD2NormalTable.h
-	code/MD3FileData.h
-    code/MD3Loader.h
-	code/MD4FileData.h
-	code/MDCLoader.h
-	code/MDCNormalTable.h
-	code/MDLDefaultColorMap.h
-	code/MDLFileData.h
-	code/MaterialSystem.h
-	code/MD5Loader.h
-	code/MD5Parser.h
-	code/MDCFileData.h
-	code/MDLLoader.h
-	code/MS3DLoader.h
-	code/NDOLoader.h
-	code/NFFLoader.h
-	code/OFFLoader.h
-	code/ObjFileData.h
-	code/ObjFileImporter.h
-	code/ObjFileMtlImporter.h
-	code/ObjFileParser.h
-	code/ObjTools.h
-	code/OgreImporter.h
-	code/OptimizeGraph.h
-	code/OptimizeMeshes.h
-	code/ParsingUtils.h
-	code/PlyLoader.h
-	code/PlyParser.h
-	code/PretransformVertices.h
-	code/ProcessHelper.h
-	code/Profiler.h
-	code/RawLoader.h
-	code/RemoveComments.h
-	code/RemoveRedundantMaterials.h
-	code/Q3DLoader.h
-	code/Q3BSPFileData.h
-	code/Q3BSPFileParser.h
-	code/Q3BSPFileImporter.h
-	code/Q3BSPZipArchive.h
-	code/RemoveVCProcess.h
-	code/SGSpatialSort.h
-	code/SMDLoader.h
-	code/STLLoader.h
-	code/SceneCombiner.h
-	code/ScenePreprocessor.h
-	code/SkeletonMeshBuilder.h
-	code/SmoothingGroups.h
-	code/SortByPTypeProcess.h
-	code/SpatialSort.h
-	code/SplitLargeMeshes.h
-	code/StandardShapes.h
-	code/StdOStreamLogStream.h
-	code/StreamReader.h
-	code/StringComparison.h
-	code/Subdivision.h
-	code/TargetAnimation.h
-	code/TerragenLoader.h
-	code/TextureTransform.h
-	code/TinyFormatter.h
-	code/TriangulateProcess.h
-	code/UnrealLoader.h
-	code/ValidateDataStructure.h
-	code/Vertex.h
-	code/VertexTriangleAdjacency.h
-	code/Win32DebugLogStream.h
-	code/XFileHelper.h
-	code/XFileImporter.h
-	code/XFileParser.h
-	code/fast_atof.h
-	code/irrXMLWrapper.h
-	code/qnan.h
-	code/BoostWorkaround/boost/math/common_factor_rt.hpp
-	code/BoostWorkaround/boost/foreach.hpp
-	code/BoostWorkaround/boost/format.hpp
-	code/BoostWorkaround/boost/scoped_array.hpp
-	code/BoostWorkaround/boost/scoped_ptr.hpp
-	code/BoostWorkaround/boost/shared_array.hpp
-	code/BoostWorkaround/boost/shared_ptr.hpp
-	code/BoostWorkaround/boost/static_assert.hpp
-	code/BoostWorkaround/boost/tuple/tuple.hpp
-	${PUBLIC_HEADERS}
-	${COMPILER_HEADERS}
-)
-
-SET (SOURCE_FILES
-	code/3DSConverter.cpp
-	code/3DSLoader.cpp
-	code/ACLoader.cpp
-	code/ASELoader.cpp
-	code/ASEParser.cpp
-	code/Assimp.cpp
-	code/AssimpPCH.cpp
-	code/B3DImporter.cpp
-	code/BVHLoader.cpp
-	code/BaseImporter.cpp
-	code/BaseProcess.cpp
-	code/BlenderLoader.cpp
-	code/BlenderDNA.cpp
-	code/BlenderScene.cpp
-	code/BlenderModifier.cpp
-	code/CalcTangentsProcess.cpp
-	code/COBLoader.cpp
-	code/ColladaLoader.cpp
-	code/ColladaParser.cpp
-	code/ComputeUVMappingProcess.cpp
-	code/ConvertToLHProcess.cpp
-	code/DXFLoader.cpp
-	code/CSMLoader.cpp
-	code/DefaultIOStream.cpp
-	code/DefaultIOSystem.cpp
-	code/DefaultLogger.cpp
-	code/FindDegenerates.cpp
-	code/FindInstancesProcess.cpp
-	code/FindInvalidDataProcess.cpp
-	code/FixNormalsStep.cpp
-	code/GenFaceNormalsProcess.cpp
-	code/GenVertexNormalsProcess.cpp
-	code/HMPLoader.cpp
-	code/IRRLoader.cpp
-	code/IRRMeshLoader.cpp
-	code/IRRShared.cpp
-	code/Importer.cpp
-	code/ImproveCacheLocality.cpp
-	code/JoinVerticesProcess.cpp
-	code/LWOAnimation.cpp
-	code/LWOBLoader.cpp
-	code/LWOLoader.cpp
-	code/LWOMaterial.cpp
-	code/LWSLoader.cpp
-	code/LimitBoneWeightsProcess.cpp
-	code/MakeVerboseFormat.cpp
-	code/MD2Loader.cpp
-	code/MD3Loader.cpp
-	code/MD5Loader.cpp
-	code/MD5Parser.cpp
-	code/MDCLoader.cpp
-	code/MDLLoader.cpp
-	code/MDLMaterialLoader.cpp
-	code/MS3DLoader.cpp
-	code/MaterialSystem.cpp
-	code/NDOLoader.cpp
-	code/NFFLoader.cpp
-	code/OFFLoader.cpp
-	code/ObjFileImporter.cpp
-	code/ObjFileMtlImporter.cpp
-	code/ObjFileParser.cpp
-	code/OgreImporter.cpp
-	code/OgreImporterMaterial.cpp
-	code/OptimizeGraph.cpp
-	code/OptimizeMeshes.cpp
-	code/PlyLoader.cpp
-	code/PlyParser.cpp
-	code/PretransformVertices.cpp
-	code/Q3DLoader.cpp
-	code/Q3BSPFileParser.cpp
-	code/Q3BSPFileImporter.cpp
-	code/Q3BSPZipArchive.cpp
-	code/RawLoader.cpp
-	code/RemoveComments.cpp
-	code/RemoveRedundantMaterials.cpp
-	code/RemoveVCProcess.cpp
-	code/SGSpatialSort.cpp
-	code/SMDLoader.cpp
-	code/STLLoader.cpp
-	code/SceneCombiner.cpp
-	code/ScenePreprocessor.cpp
-	code/SkeletonMeshBuilder.cpp
-	code/SortByPTypeProcess.cpp
-	code/SpatialSort.cpp
-	code/SplitLargeMeshes.cpp
-	code/StandardShapes.cpp
-	code/Subdivision.cpp
-	code/TargetAnimation.cpp
-	code/TerragenLoader.cpp
-	code/TextureTransform.cpp
-	code/TriangulateProcess.cpp
-	code/UnrealLoader.cpp
-	code/ValidateDataStructure.cpp
-	code/VertexTriangleAdjacency.cpp
-	code/XFileImporter.cpp
-	code/XFileParser.cpp
-	code/aiAssert.cpp
-)
-
-SET (CONTRIB_FILES
-	contrib/irrXML/CXMLReaderImpl.h
-	contrib/irrXML/heapsort.h
-	contrib/irrXML/irrArray.h
-	contrib/irrXML/irrString.h
-	contrib/irrXML/irrTypes.h
-	contrib/irrXML/irrXML.cpp
-	contrib/irrXML/irrXML.h
+SET( zlib_SRCS
 	contrib/zlib/adler32.c
 	contrib/zlib/adler32.c
 	contrib/zlib/compress.c
 	contrib/zlib/compress.c
 	contrib/zlib/crc32.c
 	contrib/zlib/crc32.c
@@ -720,19 +550,81 @@ SET (CONTRIB_FILES
 	contrib/zlib/trees.c
 	contrib/zlib/trees.c
 	contrib/zlib/trees.h
 	contrib/zlib/trees.h
 	contrib/zlib/zconf.h
 	contrib/zlib/zconf.h
-	contrib/zlib/zconf.in.h
 	contrib/zlib/zlib.h
 	contrib/zlib/zlib.h
 	contrib/zlib/zutil.c
 	contrib/zlib/zutil.c
 	contrib/zlib/zutil.h
 	contrib/zlib/zutil.h
-	contrib/ConvertUTF/ConvertUTF.c
-	contrib/unzip/crypt.h
-	contrib/unzip/ioapi.c
-	contrib/unzip/ioapi.h
-	contrib/unzip/unzip.c
-	contrib/unzip/unzip.h
 )
 )
-
-ADD_LIBRARY ( Assimp STATIC ${HEADER_FILES} ${SOURCE_FILES} ${CONTRIB_FILES} )
+SOURCE_GROUP( zlib FILES ${zlib_SRCS})
+
+if ( MSVC80 OR MSVC90 OR MSVC10 )
+	ADD_DEFINITIONS( -D_SCL_SECURE_NO_WARNINGS )
+	ADD_DEFINITIONS( -D_CRT_SECURE_NO_WARNINGS )
+endif ( MSVC80 OR MSVC90 OR MSVC10 )
+
+SET ( SOURCE_FILES
+	# Assimp Files
+	${Core_SRCS}
+	${Common_SRCS}
+	${Logging_SRCS}
+	${Exporter_SRCS}
+	${PostProcessing_SRCS}
+
+	# Model Support
+	${3DS_SRCS}
+	${AC_SRCS}
+	${ASE_SRCS}
+	${B3D_SRCS}
+	${BVH_SRCS}
+	${Collada_SRCS}
+	${DXF_SRCS}
+	${CSM_SRCS}
+	${HMP_SRCS}
+	${Irr_SRCS}
+	${LWO_SRCS}
+	${LWS_SRCS}
+	${M3_SRCS}
+	${MD2_SRCS}
+	${MD3_SRCS}
+	${MD5_SRCS}
+	${MDC_SRCS}
+	${MDL_SRCS}
+	${MaterialSystem_SRCS}
+	${NFF_SRCS}
+	${OFFFormat_SRCS}
+	${Obj_SRCS}
+	${Ogre_SRCS}
+	${Ply_SRCS}
+	${Q3D_SRCS}
+	${Q3BSP_SRCS}
+	${Raw_SRCS}
+	${SMD_SRCS}
+	${STL_SRCS}
+	${Unreal_SRCS}
+	${XFile_SRCS}
+	${Extra_SRCS}
+	${MS3D_SRCS}
+	${COB_SRCS}
+	${BLENDER_SRCS}
+	${NDO_SRCS}
+	${IFC_SRCS}
+)
+
+SET ( CONTRIB_FILES	
+	# Third-party libraries
+	${IrrXML_SRCS}
+	${ConvertUTF_SRCS}
+	${unzip_SRCS}
+	${zlib_SRCS}
+	# Necessary to show the headers in the project when using the VC++ generator:
+	${Boost_SRCS}
+)
+
+ADD_LIBRARY( Assimp STATIC
+    ${SOURCE_FILES}
+    ${CONTRIB_FILES}
+	${PUBLIC_HEADERS}
+	${COMPILER_HEADERS}
+)
 
 
 if (MSVC)
 if (MSVC)
     foreach(FILE ${SOURCE_FILES})
     foreach(FILE ${SOURCE_FILES})
@@ -742,4 +634,4 @@ if (MSVC)
             set_source_files_properties(${FILE} PROPERTIES COMPILE_FLAGS "/YuAssimpPCH.h")
             set_source_files_properties(${FILE} PROPERTIES COMPILE_FLAGS "/YuAssimpPCH.h")
         endif()
         endif()
     endforeach ()
     endforeach ()
-endif ()
+endif ()

+ 25 - 0
ThirdParty/Assimp/CREDITS

@@ -97,3 +97,28 @@ Contributed updated and improved xcode workspaces
 
 
 - drparallax
 - drparallax
 Contributed the /samples/SimpleAssimpViewX sample
 Contributed the /samples/SimpleAssimpViewX sample
+
+- Carsten Fuchs
+Contributed a fix for the Normalize method in aiQuaternion.
+
+- dbburgess
+Contributes a Android-specific build issue: log the hardware architecture for ARM.
+
+- alfiereinre7
+Contributes a obj-fileparser fix: missing tokens in the obj-token list.
+
+- Roman Kharitonov
+Contributes a fix for the configure script environment.
+
+- Ed Diana
+Contributed AssimpDelphi (/port/AssimpDelphi).
+
+- rdb 
+Contributes a bundle of fixes and improvments for the bsp-importer.
+
+- Mick P
+For contributing the De-bone postprocessing step and filing various bug reports.
+
+- Rosen Diankov
+Contributed patches to build assimp debian packages using cmake.
+

+ 23 - 34
ThirdParty/Assimp/INSTALL

@@ -1,12 +1,12 @@
 	
 	
+========================================================================
+Open Asset Import Library (assimp) INSTALL 
+========================================================================
 
 
-Open Asset Import Library (Assimp) Install
-------------------------------------------------
 
 
-
-=======================================================================
-Please refer to the doxygen documentation for full install instructions
-=======================================================================
+------------------------------
+Getting the documentation
+------------------------------
 
 
 A regularly-updated copy is available at 
 A regularly-updated copy is available at 
 http://assimp.sourceforge.net/lib_html/index.html
 http://assimp.sourceforge.net/lib_html/index.html
@@ -20,38 +20,27 @@ c) navigate to ./doc
 d) and run 'doxygen'
 d) and run 'doxygen'
 
 
 Open the generated HTML (AssimpDoc_Html/index.html) in the browser of your choice.
 Open the generated HTML (AssimpDoc_Html/index.html) in the browser of your choice.
-Windows only: To generate the CHM doc install the 'Microsoft HTML Workshop'
-and configure the path to it in the DOXYFILE. Run doxygen again.
-
-=======================================================================
-For the inpatient:
-
-Windows: go to ./workspaces/vc8 or ./workspaces/vc9, open the
-VS Solution and build for your preferred build target ...
-release-dll is usually the best choice. Adjust the runtime library to
-your needs, multithreaded-dll is preconfigured by default.
-
-These solutions are currently hand-maintained, they copy all
-the resulting binaries to ./bin/config-name at the moment. 
-
-Unix & Family:
-
-CMake is now our preferred build tool. Run cmake with your
-favourite build script generator from *here* and have fun.
-If you use cmake only to get a makefile, run 
-'make' and 'make install' afterwards. 
-
-NOTE: in order to use the assimp command line tools, you may
-need to run ldconfig as root to make the so loader find
-the assimp shared library --
-
-Note that running make from ./code is deprecated, although there
-is still a suitable makefile in it.
-
+Windows only: To generate the CHM doc, install 'Microsoft HTML Workshop'
+and configure the path to it in the DOXYFILE first. 
 
 
+------------------------------
+Building Assimp 
+------------------------------
 
 
+More detailed build instructions can be found in the documentation,
+this section is just for the inpatient among you.
 
 
+CMake is the preferred build system for Assimp. The minimum required version 
+is 2.6. If you don't have it yet, downloads for CMake can be found on
+http://www.cmake.org/. 
 
 
+Building Assimp with CMake is 'business as usual' if you've used CMake
+before. All steps can be done either on the command line / shell or
+by using the CMake GUI tool, the choice is up to you. 
 
 
+First, invoke CMake to generate build files for a particular
+toolchain (for standard GNU makefiles: cmake -G 'Unix Makefiles').
+Afterwards, use the generated build files to perform the actual
+build. 
 
 
 
 

+ 83 - 43
ThirdParty/Assimp/README

@@ -1,22 +1,40 @@
-	Open Asset Import Library (Assimp) Readme
-	-----------------------------------------
-
-Here you can find information regarding Open Asset Import Library:
-
+
+========================================================================
+Open Asset Import Library (assimp) README
+========================================================================
+
+
+Table of Contents
+
 	1.		Overview
 	1.		Overview
-	1.1		Supported file formats
-	1.2		File structure
-	2.		Build the Asset Import Library
+	 1.1		Supported file formats
+	 1.2		File structure
+	2.		Build the library
 	3. 		Help
 	3. 		Help
 	4.		License
 	4.		License
 
 
-
-
+
+------------------------------
 1.	Overview
 1.	Overview
-1.1	Supported file formats
-
-The Asset Import Library provides a lot of model formats:
+------------------------------
+
+Open Asset Import Library is a Open Source library designed to load various 3d file
+formats and convert them into a shared, in-memory format. It supports more than
+30 file formats. Basically, it is like DevIL for 3D models.
+
+Its short name is 'assimp', which is an unintended joke (the abbreviation is derived 
+from 'Asset Importer'). 
+
+
+----------------
+ 1.1	Supported file formats
+----------------
+
+The library provides importers for a lot of file formats, including:
 	- 3DS
 	- 3DS
+	- BLEND
+	- Collada
+	- IFC-STEP
 	- ASE
 	- ASE
 	- DXF
 	- DXF
 	- HMP
 	- HMP
@@ -32,48 +50,70 @@ The Asset Import Library provides a lot of model formats:
 	- LWO
 	- LWO
 	- OBJ
 	- OBJ
 	- SMD
 	- SMD
-	
-	- Collada
-	
 	- LWO
 	- LWO
-	
 	- Ogre XML
 	- Ogre XML
 	
 	
-	- partly LWS
-	
-	- .. + many more, see http://assimp.sourceforge.net/main_features_formats.html for a full list.
+	
+ .. plus many more, see 
+http://assimp.sourceforge.net/main_features_formats.html for a more exhaustive list.
 
 
 
 
+----------------
 1.2 Repository structure
 1.2 Repository structure
-
-Open Asset Import Library is implemented in C++ and provides a C-interface. The directory structure is:
-
-	/bin			Binaries of the Asset Import Library.
-	/code			Code of the Asset Import Library.
-	/contrib		Third-party-libraries used by the Asset Import Library.
-	/doc			Documentation (doxygen generated and data structure as a xml file)
-	/include		Public headers.
-	/lib			Static library location for Windows.
-	/obj			Object file location for Windows.
-	/port			Ports to other languages. 
+----------------
+
+Open Asset Import Library is implemented in C++ (but provides both a C and a C++ish interface). 
+The directory structure is:
+
+	/bin		Binaries, onyl used on Windows.
+	/code		Source code.
+	/contrib	Third-party-libraries used by the Asset Import Library.
+	/doc		Documentation (doxygen generated and data structure draft)
+	/include	Public headers for you to #include.
+	/lib		Static library location for Windows.
+	/obj		Object file location for Windows.
+	/port		Ports to other languages and scripts therefor. 
 	
 	
-	/test			Unit- and regression tests, model test suite.
-	/tools			Tools (viewer, command line `assimp`).
-	/workspaces		Build enviroments for vc,xcode,...
+	/test		Unit- and regression tests, test suite of models.
+	/tools		Tools (viewer, command line `assimp`).
+	/samples	A small number of samples to illustrate possible use-cases.
+	/workspaces	Build enviroments for vc,xcode,... (deprecated,
+			CMake has superseeded all legacy build options)
 
 
 
 
-
-2. Build the Asset Import Library
+------------------------------
+2. Build the library
+------------------------------
 
 
 Take a look into the INSTALL file.
 Take a look into the INSTALL file.
 
 
 
 
-
+------------------------------
 3. Help
 3. Help
-
-For more help go to http://assimp.sourceforge.net/ (or, for germans, http://www.zfx.info). Or take a look into the doc-folder, which contains the doxygen-generated documentation in HTMl format (CHMs for Windows are as well contained in some distributions and located right here in the root folder).
-
-
+------------------------------
+
+For more information go to http://assimp.sourceforge.net/. Or have a look into the ./doc-
+folder, which contains the Doxygen-generated documentation in HTML format (CHMs for
+ Windows are also included in some distributions and should be located right here in
+ the root folder).
+
+If reading the documentation doesn't solve your problems, try our forums at SF.net 
+  Open Discussion: http://sourceforge.net/projects/assimp/forums/forum/817653) 
+  Help: http://sourceforge.net/projects/assimp/forums/forum/817654
+
+or our  mailing list, assimp-discussions 
+  archive: http://sourceforge.net/mailarchive/forum.php?forum_name=assimp-discussions,
+  subscribe: https://lists.sourceforge.net/lists/listinfo/assimp-discussions 
+
+
+------------------------------
 4. License
 4. License
-
-The license of the Asset Import Library is based on the BSD-License. It is contained in the LICENSE file.
+------------------------------
+
+The license of the Asset Import Library is based on the modified, 3-clause BSD-License,
+which is a very liberal license. An _informal_ summary of the license is: do whatever 
+you want, but include Assimp's license text with your product - and don't sue us
+if it doesn't work.
+
+For the formal details, see the LICENSE file. 
+

+ 6 - 4
ThirdParty/Assimp/code/3DSConverter.cpp

@@ -433,7 +433,7 @@ void Discreet3DSImporter::ConvertMeshes(aiScene* pcOut)
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
 // Add a node to the scenegraph and setup its final transformation
 // Add a node to the scenegraph and setup its final transformation
 void Discreet3DSImporter::AddNodeToGraph(aiScene* pcSOut,aiNode* pcOut,
 void Discreet3DSImporter::AddNodeToGraph(aiScene* pcSOut,aiNode* pcOut,
-	D3DS::Node* pcIn, aiMatrix4x4& absTrafo)
+	D3DS::Node* pcIn, aiMatrix4x4& /*absTrafo*/)
 {
 {
 	std::vector<unsigned int> iArray;
 	std::vector<unsigned int> iArray;
 	iArray.reserve(3);
 	iArray.reserve(3);
@@ -788,9 +788,11 @@ void Discreet3DSImporter::GenerateNodeGraph(aiScene* pcOut)
 	for (unsigned int a = 0; a < pcOut->mNumMeshes;++a)
 	for (unsigned int a = 0; a < pcOut->mNumMeshes;++a)
 		pcOut->mMeshes[a]->mColors[0] = NULL;
 		pcOut->mMeshes[a]->mColors[0] = NULL;
 
 
-	// Now rotate the whole scene 90 degrees around the x axis to convert to internal coordinate system
-	pcOut->mRootNode->mTransformation = aiMatrix4x4(1.f,0.f,0.f,0.f,
-		0.f,0.f,1.f,0.f,0.f,-1.f,0.f,0.f,0.f,0.f,0.f,1.f) * pcOut->mRootNode->mTransformation;
+	pcOut->mRootNode->mTransformation = aiMatrix4x4(
+		1.f,0.f,0.f,0.f,
+		0.f,0.f,1.f,0.f,
+		0.f,-1.f,0.f,0.f,
+		0.f,0.f,0.f,1.f) * pcOut->mRootNode->mTransformation;
 
 
 	// If the root node is unnamed name it "<3DSRoot>"
 	// If the root node is unnamed name it "<3DSRoot>"
 	if (::strstr( pcOut->mRootNode->mName.data, "UNNAMED" ) ||
 	if (::strstr( pcOut->mRootNode->mName.data, "UNNAMED" ) ||

+ 2 - 1
ThirdParty/Assimp/code/3DSLoader.cpp

@@ -117,7 +117,7 @@ void Discreet3DSImporter::GetExtensionList(std::set<std::string>& extensions)
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
 // Setup configuration properties
 // Setup configuration properties
-void Discreet3DSImporter::SetupProperties(const Importer* pImp)
+void Discreet3DSImporter::SetupProperties(const Importer* /*pImp*/)
 {
 {
 	// nothing to be done for the moment
 	// nothing to be done for the moment
 }
 }
@@ -1373,6 +1373,7 @@ void Discreet3DSImporter::ParseColorChunk(aiColor3D* out,
 		// Skip unknown chunks, hope this won't cause any problems.
 		// Skip unknown chunks, hope this won't cause any problems.
 		return ParseColorChunk(out,acceptPercent);
 		return ParseColorChunk(out,acceptPercent);
 	};
 	};
+	(void)bGamma;
 }
 }
 
 
 #endif // !! ASSIMP_BUILD_NO_3DS_IMPORTER
 #endif // !! ASSIMP_BUILD_NO_3DS_IMPORTER

+ 1 - 5
ThirdParty/Assimp/code/3DSLoader.h

@@ -61,13 +61,9 @@ using namespace D3DS;
  */
  */
 class Discreet3DSImporter : public BaseImporter
 class Discreet3DSImporter : public BaseImporter
 {
 {
-	friend class Importer;
+public:
 
 
-protected:
-	/** Constructor to be privately used by Importer */
 	Discreet3DSImporter();
 	Discreet3DSImporter();
-
-	/** Destructor, private as well */
 	~Discreet3DSImporter();
 	~Discreet3DSImporter();
 
 
 public:
 public:

+ 8 - 8
ThirdParty/Assimp/code/ACLoader.cpp

@@ -199,7 +199,7 @@ void AC3DImporter::LoadObjectSection(std::vector<Object>& objects)
 		if (TokenMatch(buffer,"kids",4))
 		if (TokenMatch(buffer,"kids",4))
 		{
 		{
 			SkipSpaces(&buffer);
 			SkipSpaces(&buffer);
-			unsigned int num = strtol10(buffer,&buffer);
+			unsigned int num = strtoul10(buffer,&buffer);
 			GetNextLine();
 			GetNextLine();
 			if (num)
 			if (num)
 			{
 			{
@@ -252,7 +252,7 @@ void AC3DImporter::LoadObjectSection(std::vector<Object>& objects)
 		else if (TokenMatch(buffer,"subdiv",6))
 		else if (TokenMatch(buffer,"subdiv",6))
 		{
 		{
 			SkipSpaces(&buffer);
 			SkipSpaces(&buffer);
-			obj.subDiv = strtol10(buffer,&buffer);
+			obj.subDiv = strtoul10(buffer,&buffer);
 		}
 		}
 		else if (TokenMatch(buffer,"crease",6))
 		else if (TokenMatch(buffer,"crease",6))
 		{
 		{
@@ -263,7 +263,7 @@ void AC3DImporter::LoadObjectSection(std::vector<Object>& objects)
 		{
 		{
 			SkipSpaces(&buffer);
 			SkipSpaces(&buffer);
 
 
-			unsigned int t = strtol10(buffer,&buffer);
+			unsigned int t = strtoul10(buffer,&buffer);
 			obj.vertices.reserve(t);
 			obj.vertices.reserve(t);
 			for (unsigned int i = 0; i < t;++i)
 			for (unsigned int i = 0; i < t;++i)
 			{
 			{
@@ -289,7 +289,7 @@ void AC3DImporter::LoadObjectSection(std::vector<Object>& objects)
 			
 			
 			bool Q3DWorkAround = false;
 			bool Q3DWorkAround = false;
 
 
-			const unsigned int t = strtol10(buffer,&buffer);
+			const unsigned int t = strtoul10(buffer,&buffer);
 			obj.surfaces.reserve(t);
 			obj.surfaces.reserve(t);
 			for (unsigned int i = 0; i < t;++i)
 			for (unsigned int i = 0; i < t;++i)
 			{
 			{
@@ -311,7 +311,7 @@ void AC3DImporter::LoadObjectSection(std::vector<Object>& objects)
 				SkipSpaces(&buffer);
 				SkipSpaces(&buffer);
 				obj.surfaces.push_back(Surface());
 				obj.surfaces.push_back(Surface());
 				Surface& surf = obj.surfaces.back();
 				Surface& surf = obj.surfaces.back();
-				surf.flags = strtol_cppstyle(buffer);
+				surf.flags = strtoul_cppstyle(buffer);
 			
 			
 				while (1)
 				while (1)
 				{
 				{
@@ -323,7 +323,7 @@ void AC3DImporter::LoadObjectSection(std::vector<Object>& objects)
 					if (TokenMatch(buffer,"mat",3))
 					if (TokenMatch(buffer,"mat",3))
 					{
 					{
 						SkipSpaces(&buffer);
 						SkipSpaces(&buffer);
-						surf.mat = strtol10(buffer);
+						surf.mat = strtoul10(buffer);
 					}
 					}
 					else if (TokenMatch(buffer,"refs",4))
 					else if (TokenMatch(buffer,"refs",4))
 					{
 					{
@@ -338,7 +338,7 @@ void AC3DImporter::LoadObjectSection(std::vector<Object>& objects)
 						}
 						}
 
 
 						SkipSpaces(&buffer);
 						SkipSpaces(&buffer);
-						const unsigned int m = strtol10(buffer);
+						const unsigned int m = strtoul10(buffer);
 						surf.entries.reserve(m);
 						surf.entries.reserve(m);
 
 
 						obj.numRefs += m;
 						obj.numRefs += m;
@@ -353,7 +353,7 @@ void AC3DImporter::LoadObjectSection(std::vector<Object>& objects)
 							surf.entries.push_back(Surface::SurfaceEntry());
 							surf.entries.push_back(Surface::SurfaceEntry());
 							Surface::SurfaceEntry& entry = surf.entries.back();
 							Surface::SurfaceEntry& entry = surf.entries.back();
 
 
-							entry.first = strtol10(buffer,&buffer);
+							entry.first = strtoul10(buffer,&buffer);
 							SkipSpaces(&buffer);
 							SkipSpaces(&buffer);
 							AI_AC_CHECKED_LOAD_FLOAT_ARRAY("",0,2,&entry.second);
 							AI_AC_CHECKED_LOAD_FLOAT_ARRAY("",0,2,&entry.second);
 						}
 						}

+ 2 - 6
ThirdParty/Assimp/code/ACLoader.h

@@ -56,16 +56,12 @@ namespace Assimp	{
 */
 */
 class AC3DImporter : public BaseImporter
 class AC3DImporter : public BaseImporter
 {
 {
-	friend class Importer;
-
-protected:
-	/** Constructor to be privately used by Importer */
+public:
 	AC3DImporter();
 	AC3DImporter();
-
-	/** Destructor, private as well */
 	~AC3DImporter();
 	~AC3DImporter();
 
 
 
 
+
 	// Represents an AC3D material
 	// Represents an AC3D material
 	struct Material
 	struct Material
 	{
 	{

+ 2 - 6
ThirdParty/Assimp/code/ASELoader.h

@@ -58,15 +58,11 @@ class MaterialHelper;
  *
  *
  */
  */
 class ASEImporter : public BaseImporter	{
 class ASEImporter : public BaseImporter	{
-	friend class Importer;
-
-protected:
-	/** Constructor to be privately used by Importer */
+public:
 	ASEImporter();
 	ASEImporter();
-
-	/** Destructor, private as well */
 	~ASEImporter();
 	~ASEImporter();
 
 
+
 public:
 public:
 
 
 	// -------------------------------------------------------------------
 	// -------------------------------------------------------------------

+ 11 - 11
ThirdParty/Assimp/code/ASEParser.cpp

@@ -751,7 +751,7 @@ void Parser::ParseLV3MapBlock(Texture& map)
 				std::string temp;
 				std::string temp;
 				if(!ParseString(temp,"*MAP_CLASS"))
 				if(!ParseString(temp,"*MAP_CLASS"))
 					SkipToNextToken();
 					SkipToNextToken();
-				if (temp != "Bitmap")
+				if (temp != "Bitmap" && temp != "Normal Bump")
 				{
 				{
 					DefaultLogger::get()->warn("ASE: Skipping unknown map type: " + temp);
 					DefaultLogger::get()->warn("ASE: Skipping unknown map type: " + temp);
 					parsePath = false; 
 					parsePath = false; 
@@ -1563,7 +1563,7 @@ void Parser::ParseLV4MeshBones(unsigned int iNumBones,ASE::Mesh& mesh)
 				// parse an index ...
 				// parse an index ...
 				if(SkipSpaces(&filePtr))
 				if(SkipSpaces(&filePtr))
 				{
 				{
-					unsigned int iIndex = strtol10(filePtr,&filePtr);
+					unsigned int iIndex = strtoul10(filePtr,&filePtr);
 					if (iIndex >= iNumBones)
 					if (iIndex >= iNumBones)
 					{
 					{
 						continue;
 						continue;
@@ -1593,7 +1593,7 @@ void Parser::ParseLV4MeshBonesVertices(unsigned int iNumVertices,ASE::Mesh& mesh
 			if (TokenMatch(filePtr,"MESH_BONE_VERTEX" ,16))
 			if (TokenMatch(filePtr,"MESH_BONE_VERTEX" ,16))
 			{
 			{
 				// read the vertex index
 				// read the vertex index
-				unsigned int iIndex = strtol10(filePtr,&filePtr);
+				unsigned int iIndex = strtoul10(filePtr,&filePtr);
 				if (iIndex >= mesh.mPositions.size())
 				if (iIndex >= mesh.mPositions.size())
 				{
 				{
 					iIndex = (unsigned int)mesh.mPositions.size()-1;
 					iIndex = (unsigned int)mesh.mPositions.size()-1;
@@ -1610,7 +1610,7 @@ void Parser::ParseLV4MeshBonesVertices(unsigned int iNumVertices,ASE::Mesh& mesh
 				{
 				{
 					// first parse the bone index ...
 					// first parse the bone index ...
 					if (!SkipSpaces(&filePtr))break;
 					if (!SkipSpaces(&filePtr))break;
-					pairOut.first = strtol10(filePtr,&filePtr);
+					pairOut.first = strtoul10(filePtr,&filePtr);
 
 
 					// then parse the vertex weight
 					// then parse the vertex weight
 					if (!SkipSpaces(&filePtr))break;
 					if (!SkipSpaces(&filePtr))break;
@@ -1887,7 +1887,7 @@ void Parser::ParseLV3MeshNormalListBlock(ASE::Mesh& sMesh)
 
 
 	// Allocate enough storage for the normals
 	// Allocate enough storage for the normals
 	sMesh.mNormals.resize(sMesh.mFaces.size()*3,aiVector3D( 0.f, 0.f, 0.f ));
 	sMesh.mNormals.resize(sMesh.mFaces.size()*3,aiVector3D( 0.f, 0.f, 0.f ));
-	unsigned int index, faceIdx = 0xffffffff;
+	unsigned int index, faceIdx = UINT_MAX;
 
 
 	// FIXME: rewrite this and find out how to interpret the normals
 	// FIXME: rewrite this and find out how to interpret the normals
 	// correctly. This is crap.
 	// correctly. This is crap.
@@ -1897,7 +1897,7 @@ void Parser::ParseLV3MeshNormalListBlock(ASE::Mesh& sMesh)
 	while (true)	{
 	while (true)	{
 		if ('*' == *filePtr)	{
 		if ('*' == *filePtr)	{
 			++filePtr;
 			++filePtr;
-			if (faceIdx != 0xffffffff && TokenMatch(filePtr,"MESH_VERTEXNORMAL",17))	{
+			if (faceIdx != UINT_MAX && TokenMatch(filePtr,"MESH_VERTEXNORMAL",17))	{
 				aiVector3D vNormal;
 				aiVector3D vNormal;
 				ParseLV4MeshFloatTriple(&vNormal.x,index);
 				ParseLV4MeshFloatTriple(&vNormal.x,index);
 				if (faceIdx >=  sMesh.mFaces.size())
 				if (faceIdx >=  sMesh.mFaces.size())
@@ -1951,7 +1951,7 @@ void Parser::ParseLV4MeshFace(ASE::Face& out)
 	}
 	}
 
 
 	// parse the face index
 	// parse the face index
-	out.iFace = strtol10(filePtr,&filePtr);
+	out.iFace = strtoul10(filePtr,&filePtr);
 
 
 	// next character should be ':'
 	// next character should be ':'
 	if(!SkipSpaces(&filePtr))
 	if(!SkipSpaces(&filePtr))
@@ -2012,7 +2012,7 @@ void Parser::ParseLV4MeshFace(ASE::Face& out)
 			SkipToNextToken();
 			SkipToNextToken();
 			return;
 			return;
 		}
 		}
-		out.mIndices[iIndex] = strtol10(filePtr,&filePtr);
+		out.mIndices[iIndex] = strtoul10(filePtr,&filePtr);
 	}
 	}
 
 
 	// now we need to skip the AB, BC, CA blocks. 
 	// now we need to skip the AB, BC, CA blocks. 
@@ -2044,7 +2044,7 @@ void Parser::ParseLV4MeshFace(ASE::Face& out)
 		{
 		{
 			if (*filePtr < '9' && *filePtr >= '0')
 			if (*filePtr < '9' && *filePtr >= '0')
 			{
 			{
-				out.iSmoothGroup |= (1 << strtol10(filePtr,&filePtr));
+				out.iSmoothGroup |= (1 << strtoul10(filePtr,&filePtr));
 			}
 			}
 			SkipSpaces(&filePtr);
 			SkipSpaces(&filePtr);
 			if (',' != *filePtr)
 			if (',' != *filePtr)
@@ -2076,7 +2076,7 @@ void Parser::ParseLV4MeshFace(ASE::Face& out)
 			SkipToNextToken();
 			SkipToNextToken();
 			return;
 			return;
 		}
 		}
-		out.iMaterial = strtol10(filePtr,&filePtr);
+		out.iMaterial = strtoul10(filePtr,&filePtr);
 	}
 	}
 	return;
 	return;
 }
 }
@@ -2146,5 +2146,5 @@ void Parser::ParseLV4MeshLong(unsigned int& iOut)
 		return;
 		return;
 	}
 	}
 	// parse the value
 	// parse the value
-	iOut = strtol10(filePtr,&filePtr);
+	iOut = strtoul10(filePtr,&filePtr);
 }
 }

+ 3 - 106
ThirdParty/Assimp/code/Assimp.cpp

@@ -44,9 +44,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
 #include "AssimpPCH.h"
 #include "AssimpPCH.h"
 #include "../include/assimp.h"
 #include "../include/assimp.h"
-#include "../include/aiFileIO.h"
 
 
 #include "GenericProperty.h"
 #include "GenericProperty.h"
+#include "CInterfaceIOWrapper.h"
+#include "Importer.h"
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
 #ifdef AI_C_THREADSAFE
 #ifdef AI_C_THREADSAFE
@@ -58,6 +59,7 @@ using namespace Assimp;
 
 
 namespace Assimp
 namespace Assimp
 {
 {
+
 	/** Stores the importer objects for all active import processes */
 	/** Stores the importer objects for all active import processes */
 	typedef std::map<const aiScene*, Assimp::Importer*> ImporterMap;
 	typedef std::map<const aiScene*, Assimp::Importer*> ImporterMap;
 
 
@@ -101,113 +103,8 @@ static boost::mutex gMutex;
 static boost::mutex gLogStreamMutex;
 static boost::mutex gLogStreamMutex;
 #endif
 #endif
 
 
-class CIOSystemWrapper;
-class CIOStreamWrapper;
-
-// ------------------------------------------------------------------------------------------------
-// Custom IOStream implementation for the C-API
-class CIOStreamWrapper : public IOStream
-{
-	friend class CIOSystemWrapper;
-public:
-
-	CIOStreamWrapper(aiFile* pFile)
-		: mFile(pFile)
-	{}
-
-	// ...................................................................
-	size_t Read(void* pvBuffer, 
-		size_t pSize, 
-		size_t pCount
-	){
-		// need to typecast here as C has no void*
-		return mFile->ReadProc(mFile,(char*)pvBuffer,pSize,pCount);
-	}
-
-	// ...................................................................
-	size_t Write(const void* pvBuffer, 
-		size_t pSize,
-		size_t pCount
-	){
-		// need to typecast here as C has no void*
-		return mFile->WriteProc(mFile,(const char*)pvBuffer,pSize,pCount);
-	}
-
-	// ...................................................................
-	aiReturn Seek(size_t pOffset,
-		aiOrigin pOrigin
-	){
-		return mFile->SeekProc(mFile,pOffset,pOrigin);
-	}
 
 
-	// ...................................................................
-	size_t Tell(void) const {
-		return mFile->TellProc(mFile);
-	}
-
-	// ...................................................................
-	size_t	FileSize() const {
-		return mFile->FileSizeProc(mFile);
-	}
 
 
-	// ...................................................................
-	void Flush () {
-		return mFile->FlushProc(mFile);
-	}
-
-private:
-	aiFile* mFile;
-};
-
-// ------------------------------------------------------------------------------------------------
-// Custom IOStream implementation for the C-API
-class CIOSystemWrapper : public IOSystem
-{
-public:
-	CIOSystemWrapper(aiFileIO* pFile)
-		: mFileSystem(pFile)
-	{}
-
-	// ...................................................................
-	bool Exists( const char* pFile) const {
-		CIOSystemWrapper* pip = const_cast<CIOSystemWrapper*>(this);
-		IOStream* p = pip->Open(pFile);
-		if (p){
-			pip->Close(p);
-			return true;
-		}
-		return false;
-	}
-
-	// ...................................................................
-	char getOsSeparator() const {
-#ifndef _WIN32
-		return '/';
-#else
-		return '\\';
-#endif
-	}
-
-	// ...................................................................
-	IOStream* Open(const char* pFile,const char* pMode = "rb") {
-		aiFile* p = mFileSystem->OpenProc(mFileSystem,pFile,pMode);
-		if (!p) {
-			return NULL;
-		}
-		return new CIOStreamWrapper(p);
-	}
-
-	// ...................................................................
-	void Close( IOStream* pFile) {
-		if (!pFile) {
-			return;
-		}
-		mFileSystem->CloseProc(mFileSystem,((CIOStreamWrapper*) pFile)->mFile);
-		delete pFile;
-	}
-private:
-	aiFileIO* mFileSystem;
-};
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
 // Custom LogStream implementation for the C-API
 // Custom LogStream implementation for the C-API

+ 115 - 0
ThirdParty/Assimp/code/AssimpCExport.cpp

@@ -0,0 +1,115 @@
+/*
+---------------------------------------------------------------------------
+Open Asset Import Library (ASSIMP)
+---------------------------------------------------------------------------
+
+Copyright (c) 2006-2010, ASSIMP Development Team
+
+All rights reserved.
+
+Redistribution and use of this software in source and binary forms, 
+with or without modification, are permitted provided that the following 
+conditions are met:
+
+* Redistributions of source code must retain the above
+  copyright notice, this list of conditions and the
+  following disclaimer.
+
+* Redistributions in binary form must reproduce the above
+  copyright notice, this list of conditions and the
+  following disclaimer in the documentation and/or other
+  materials provided with the distribution.
+
+* Neither the name of the ASSIMP team, nor the names of its
+  contributors may be used to endorse or promote products
+  derived from this software without specific prior
+  written permission of the ASSIMP Development Team.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+---------------------------------------------------------------------------
+*/
+
+/** @file AssimpCExport.cpp
+Assimp C export interface. See Exporter.cpp for some notes.
+*/
+
+#include "AssimpPCH.h"
+
+#ifndef ASSIMP_BUILD_NO_EXPORT
+#include "CInterfaceIOWrapper.h" 
+#include "SceneCombiner.h"
+
+using namespace Assimp;
+
+// ------------------------------------------------------------------------------------------------
+ASSIMP_API size_t aiGetExportFormatCount(void)
+{
+	return Exporter().GetExportFormatCount();
+}
+
+
+// ------------------------------------------------------------------------------------------------
+ASSIMP_API const aiExportFormatDesc* aiGetExportFormatDescription( size_t pIndex)
+{
+	return Exporter().GetExportFormatDescription(pIndex);
+}
+
+// ------------------------------------------------------------------------------------------------
+ASSIMP_API void aiCopyScene(const aiScene* pIn, aiScene** pOut)
+{
+	if (!pOut || !pIn) {
+		return;
+	}
+
+	SceneCombiner::CopyScene(pOut,pIn,false);
+}
+
+// ------------------------------------------------------------------------------------------------
+ASSIMP_API aiReturn aiExportScene( const aiScene* pScene, const char* pFormatId, const char* pFileName, unsigned int pPreprocessing )
+{
+	return ::aiExportSceneEx(pScene,pFormatId,pFileName,NULL,pPreprocessing);
+}
+
+
+// ------------------------------------------------------------------------------------------------
+ASSIMP_API aiReturn aiExportSceneEx( const aiScene* pScene, const char* pFormatId, const char* pFileName, aiFileIO* pIO, unsigned int pPreprocessing )
+{
+	Exporter exp;
+
+	if (pIO) {
+		exp.SetIOHandler(new CIOSystemWrapper(pIO));
+	}
+	return exp.Export(pScene,pFormatId,pFileName,pPreprocessing);
+}
+
+
+// ------------------------------------------------------------------------------------------------
+ASSIMP_API const C_STRUCT aiExportDataBlob* aiExportSceneToBlob( const aiScene* pScene, const char* pFormatId, unsigned int pPreprocessing  )
+{
+	Exporter exp;
+	if (!exp.ExportToBlob(pScene,pFormatId,pPreprocessing)) {
+		return NULL;
+	}
+	const aiExportDataBlob* blob = exp.GetOrphanedBlob();
+	ai_assert(blob);
+
+	return blob;
+}
+
+// ------------------------------------------------------------------------------------------------
+ASSIMP_API C_STRUCT void aiReleaseExportBlob( const aiExportDataBlob* pData )
+{
+	delete pData;
+}
+
+#endif // !ASSIMP_BUILD_NO_EXPORT

+ 62 - 0
ThirdParty/Assimp/code/AssimpPCH.cpp

@@ -68,3 +68,65 @@ ASSIMP_API unsigned int aiGetVersionRevision ()
 	return SVNRevision;
 	return SVNRevision;
 }
 }
 
 
+// ------------------------------------------------------------------------------------------------
+aiScene::aiScene()
+	: mFlags()
+	, mRootNode()
+	, mNumMeshes()
+	, mMeshes()
+	, mNumMaterials()
+	, mMaterials()
+	, mNumAnimations()
+	, mAnimations()
+	, mNumTextures()
+	, mTextures()
+	, mNumLights()
+	, mLights()
+	, mNumCameras()
+	, mCameras()
+	, mPrivate(new Assimp::ScenePrivateData())
+	{
+	}
+
+// ------------------------------------------------------------------------------------------------
+aiScene::~aiScene()
+{
+	// delete all sub-objects recursively
+	delete mRootNode;
+
+	// To make sure we won't crash if the data is invalid it's
+	// much better to check whether both mNumXXX and mXXX are
+	// valid instead of relying on just one of them.
+	if (mNumMeshes && mMeshes) 
+		for( unsigned int a = 0; a < mNumMeshes; a++)
+			delete mMeshes[a];
+	delete [] mMeshes;
+
+	if (mNumMaterials && mMaterials) 
+		for( unsigned int a = 0; a < mNumMaterials; a++)
+			delete mMaterials[a];
+	delete [] mMaterials;
+
+	if (mNumAnimations && mAnimations) 
+		for( unsigned int a = 0; a < mNumAnimations; a++)
+			delete mAnimations[a];
+	delete [] mAnimations;
+
+	if (mNumTextures && mTextures) 
+		for( unsigned int a = 0; a < mNumTextures; a++)
+			delete mTextures[a];
+	delete [] mTextures;
+
+	if (mNumLights && mLights) 
+		for( unsigned int a = 0; a < mNumLights; a++)
+			delete mLights[a];
+	delete [] mLights;
+
+	if (mNumCameras && mCameras) 
+		for( unsigned int a = 0; a < mNumCameras; a++)
+			delete mCameras[a];
+	delete [] mCameras;
+
+	delete static_cast<Assimp::ScenePrivateData*>( mPrivate );
+}
+

+ 16 - 4
ThirdParty/Assimp/code/AssimpPCH.h

@@ -54,9 +54,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
  */
 #include "../include/aiDefines.h"
 #include "../include/aiDefines.h"
 
 
-/* Include our stdint.h replacement header for MSVC, take the global header for gcc/mingw
- */
-#ifdef _MSC_VER
+// Include our stdint.h replacement header for MSVC, take the global header for gcc/mingw
+#if defined( _MSC_VER) && (_MSC_VER < 1600)
 #	include "pstdint.h"
 #	include "pstdint.h"
 #else
 #else
 #	include <stdint.h>
 #	include <stdint.h>
@@ -117,6 +116,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include <numeric>
 #include <numeric>
 #include <new>
 #include <new>
 #include <cstdio>
 #include <cstdio>
+#include <limits.h>
 
 
 // Boost headers
 // Boost headers
 #include <boost/pointer_cast.hpp>
 #include <boost/pointer_cast.hpp>
@@ -124,7 +124,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include <boost/scoped_array.hpp>
 #include <boost/scoped_array.hpp>
 #include <boost/shared_ptr.hpp>
 #include <boost/shared_ptr.hpp>
 #include <boost/shared_array.hpp>
 #include <boost/shared_array.hpp>
-//#include <boost/make_shared.hpp>
+#include <boost/make_shared.hpp>
 #include <boost/format.hpp>
 #include <boost/format.hpp>
 #include <boost/foreach.hpp>
 #include <boost/foreach.hpp>
 #include <boost/static_assert.hpp>
 #include <boost/static_assert.hpp>
@@ -137,6 +137,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include "../include/aiScene.h"
 #include "../include/aiScene.h"
 #include "../include/aiPostProcess.h"
 #include "../include/aiPostProcess.h"
 #include "../include/assimp.hpp"
 #include "../include/assimp.hpp"
+#include "../include/export.hpp"
 
 
 // Internal utility headers
 // Internal utility headers
 #include "BaseImporter.h"
 #include "BaseImporter.h"
@@ -144,6 +145,17 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include "StringComparison.h"
 #include "StringComparison.h"
 #include "StreamReader.h"
 #include "StreamReader.h"
 #include "qnan.h"
 #include "qnan.h"
+#include "ScenePrivate.h" 
+
+
+// We need those constants, workaround for any platforms where nobody defined them yet
+#if (!defined SIZE_MAX)
+#	define SIZE_MAX (~((size_t)0))
+#endif
+
+#if (!defined UINT_MAX)
+#	define UINT_MAX (~((unsigned int)0))
+#endif
 
 
 
 
 #endif // !! ASSIMP_PCH_INCLUDED
 #endif // !! ASSIMP_PCH_INCLUDED

+ 1 - 1
ThirdParty/Assimp/code/B3DImporter.cpp

@@ -62,7 +62,7 @@ using namespace std;
 //#define DEBUG_B3D
 //#define DEBUG_B3D
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
-bool B3DImporter::CanRead( const std::string& pFile, IOSystem* pIOHandler, bool checkSig) const{
+bool B3DImporter::CanRead( const std::string& pFile, IOSystem* /*pIOHandler*/, bool /*checkSig*/) const{
 
 
 	size_t pos=pFile.find_last_of( '.' );
 	size_t pos=pFile.find_last_of( '.' );
 	if( pos==string::npos ) return false;
 	if( pos==string::npos ) return false;

+ 1 - 1
ThirdParty/Assimp/code/BVHLoader.cpp

@@ -290,7 +290,7 @@ void BVHLoader::ReadNodeChannels( BVHLoader::Node& pNode)
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
 // Reads the motion data
 // Reads the motion data
-void BVHLoader::ReadMotion( aiScene* pScene)
+void BVHLoader::ReadMotion( aiScene* /*pScene*/)
 {
 {
 	// Read number of frames
 	// Read number of frames
 	std::string tokenFrames = GetNextToken();
 	std::string tokenFrames = GetNextToken();

+ 2 - 5
ThirdParty/Assimp/code/BVHLoader.h

@@ -61,7 +61,6 @@ namespace Assimp
 */
 */
 class BVHLoader : public BaseImporter
 class BVHLoader : public BaseImporter
 {
 {
-	friend class Importer;
 
 
 	/** Possible animation channels for which the motion data holds the values */
 	/** Possible animation channels for which the motion data holds the values */
 	enum ChannelType
 	enum ChannelType
@@ -85,11 +84,9 @@ class BVHLoader : public BaseImporter
 		Node( const aiNode* pNode) : mNode( pNode) { }
 		Node( const aiNode* pNode) : mNode( pNode) { }
 	};
 	};
 
 
-protected:
-	/** Constructor to be privately used by Importer */
-	BVHLoader();
+public:
 
 
-	/** Destructor, private as well */
+	BVHLoader();
 	~BVHLoader();
 	~BVHLoader();
 
 
 public:
 public:

+ 4 - 2
ThirdParty/Assimp/code/BaseImporter.cpp

@@ -47,6 +47,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include "BaseImporter.h"
 #include "BaseImporter.h"
 #include "FileSystemFilter.h"
 #include "FileSystemFilter.h"
 
 
+#include "Importer.h"
+
 using namespace Assimp;
 using namespace Assimp;
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
@@ -98,7 +100,7 @@ aiScene* BaseImporter::ReadFile(const Importer* pImp, const std::string& pFile,
 }
 }
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
-void BaseImporter::SetupProperties(const Importer* pImp)
+void BaseImporter::SetupProperties(const Importer* /*pImp*/)
 {
 {
 	// the default implementation does nothing
 	// the default implementation does nothing
 }
 }
@@ -328,7 +330,7 @@ void BaseImporter::ConvertToUTF8(std::vector<char>& data)
 	if(*((uint16_t*)&data.front()) == 0xFEFF) {
 	if(*((uint16_t*)&data.front()) == 0xFEFF) {
 		DefaultLogger::get()->debug("Found UTF-16 BOM ...");
 		DefaultLogger::get()->debug("Found UTF-16 BOM ...");
 
 
-		const uint16_t* sstart = (uint16_t*)&data.front()+1, *send = (uint16_t*)&data.back()+1;
+		const uint16_t* sstart = (uint16_t*)&data.front()+1, *send = (uint16_t*)(&data.back()+1);
 		char* dstart,*dend;
 		char* dstart,*dend;
 		std::vector<char> output;
 		std::vector<char> output;
 		do {
 		do {

+ 1 - 145
ThirdParty/Assimp/code/BaseImporter.h

@@ -94,66 +94,7 @@ private:
 	bool mdismiss;
 	bool mdismiss;
 };
 };
 
 
-//! @cond never
-// ---------------------------------------------------------------------------
-/** @brief Internal PIMPL implementation for Assimp::Importer
- *
- *  Using this idiom here allows us to drop the dependency from
- *  std::vector and std::map in the public headers. Furthermore we are dropping
- *  any STL interface problems caused by mismatching STL settings. All
- *  size calculation are now done by us, not the app heap. */
-class ASSIMP_API ImporterPimpl 
-{
-public:
-
-	// Data type to store the key hash
-	typedef unsigned int KeyType;
-	
-	// typedefs for our three configuration maps.
-	// We don't need more, so there is no need for a generic solution
-	typedef std::map<KeyType, int> IntPropertyMap;
-	typedef std::map<KeyType, float> FloatPropertyMap;
-	typedef std::map<KeyType, std::string> StringPropertyMap;
-
-public:
-
-	/** IO handler to use for all file accesses. */
-	IOSystem* mIOHandler;
-	bool mIsDefaultHandler;
-
-	/** Progress handler for feedback. */
-	ProgressHandler* mProgressHandler;
-	bool mIsDefaultProgressHandler;
-
-	/** Format-specific importer worker objects - one for each format we can read.*/
-	std::vector<BaseImporter*> mImporter;
-
-	/** Post processing steps we can apply at the imported data. */
-	std::vector<BaseProcess*> mPostProcessingSteps;
-
-	/** The imported data, if ReadFile() was successful, NULL otherwise. */
-	aiScene* mScene;
-
-	/** The error description, if there was one. */
-	std::string mErrorString;
 
 
-	/** List of integer properties */
-	IntPropertyMap mIntProperties;
-
-	/** List of floating-point properties */
-	FloatPropertyMap mFloatProperties;
-
-	/** List of string properties */
-	StringPropertyMap mStringProperties;
-
-	/** Used for testing - extra verbose mode causes the ValidateDataStructure-Step
-	 *  to be executed before and after every single postprocess step */
-	bool bExtraVerbose;
-
-	/** Used by post-process steps to share data */
-	SharedPostProcessInfo* mPPShared;
-};
-//! @endcond
 
 
 // ---------------------------------------------------------------------------
 // ---------------------------------------------------------------------------
 /** FOR IMPORTER PLUGINS ONLY: The BaseImporter defines a common interface 
 /** FOR IMPORTER PLUGINS ONLY: The BaseImporter defines a common interface 
@@ -169,7 +110,7 @@ class ASSIMP_API BaseImporter
 {
 {
 	friend class Importer;
 	friend class Importer;
 
 
-protected:
+public:
 
 
 	/** Constructor to be privately used by #Importer */
 	/** Constructor to be privately used by #Importer */
 	BaseImporter();
 	BaseImporter();
@@ -407,92 +348,7 @@ protected:
 	ProgressHandler* progress;
 	ProgressHandler* progress;
 };
 };
 
 
-struct BatchData;
 
 
-// ---------------------------------------------------------------------------
-/** FOR IMPORTER PLUGINS ONLY: A helper class for the pleasure of importers 
- *  which need to load many extern meshes recursively.
- *
- *  The class uses several threads to load these meshes (or at least it
- *  could, this has not yet been implemented at the moment).
- *
- *  @note The class may not be used by more than one thread*/
-class ASSIMP_API BatchLoader 
-{
-	// friend of Importer
-
-public:
-
-	//! @cond never
-	// -------------------------------------------------------------------
-	/** Wraps a full list of configuration properties for an importer.
-	 *  Properties can be set using SetGenericProperty */
-	struct PropertyMap
-	{
-		ImporterPimpl::IntPropertyMap     ints;
-		ImporterPimpl::FloatPropertyMap   floats;
-		ImporterPimpl::StringPropertyMap  strings;
-
-		bool operator == (const PropertyMap& prop) const {
-			// fixme: really isocpp? gcc complains
-			return ints == prop.ints && floats == prop.floats && strings == prop.strings; 
-		}
-
-		bool empty () const {
-			return ints.empty() && floats.empty() && strings.empty();
-		}
-	};
-	//! @endcond
-
-public:
-	
-
-	// -------------------------------------------------------------------
-	/** Construct a batch loader from a given IO system to be used 
-	 *  to acess external files */
-	BatchLoader(IOSystem* pIO);
-	~BatchLoader();
-
-
-	// -------------------------------------------------------------------
-	/** Add a new file to the list of files to be loaded.
-	 *  @param file File to be loaded
-	 *  @param steps Post-processing steps to be executed on the file
-	 *  @param map Optional configuration properties
-	 *  @return 'Load request channel' - an unique ID that can later
-	 *    be used to access the imported file data.
-	 *  @see GetImport */
-	unsigned int AddLoadRequest	(
-		const std::string& file,
-		unsigned int steps = 0, 
-		const PropertyMap* map = NULL
-		);
-
-
-	// -------------------------------------------------------------------
-	/** Get an imported scene.
-	 *  This polls the import from the internal request list.
-	 *  If an import is requested several times, this function
-	 *  can be called several times, too.
-	 *
-	 *  @param which LRWC returned by AddLoadRequest().
-	 *  @return NULL if there is no scene with this file name
-	 *  in the queue of the scene hasn't been loaded yet. */
-	aiScene* GetImport(
-		unsigned int which
-		);
-
-
-	// -------------------------------------------------------------------
-	/** Waits until all scenes have been loaded. This returns
-	 *  immediately if no scenes are queued.*/
-	void LoadAll();
-
-private:
-
-	// No need to have that in the public API ...
-	BatchData* data;
-};
 
 
 } // end of namespace Assimp
 } // end of namespace Assimp
 
 

+ 10 - 1
ThirdParty/Assimp/code/BaseProcess.cpp

@@ -45,6 +45,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include "BaseImporter.h"
 #include "BaseImporter.h"
 #include "BaseProcess.h"
 #include "BaseProcess.h"
 
 
+#include "Importer.h"
+
 using namespace Assimp;
 using namespace Assimp;
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
@@ -90,7 +92,14 @@ void BaseProcess::ExecuteOnScene( Importer* pImp)
 }
 }
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
-void BaseProcess::SetupProperties(const Importer* pImp)
+void BaseProcess::SetupProperties(const Importer* /*pImp*/)
 {
 {
 	// the default implementation does nothing
 	// the default implementation does nothing
 }
 }
+
+// ------------------------------------------------------------------------------------------------
+bool BaseProcess::RequireVerboseFormat() const
+{
+	return true;
+}
+

+ 5 - 0
ThirdParty/Assimp/code/BaseProcess.h

@@ -234,6 +234,11 @@ public:
 	*/
 	*/
 	virtual bool IsActive( unsigned int pFlags) const = 0;
 	virtual bool IsActive( unsigned int pFlags) const = 0;
 
 
+	// -------------------------------------------------------------------
+	/** Check whether this step expects its input vertex data to be 
+	 *  in verbose format. */
+	virtual bool RequireVerboseFormat() const;
+
 	// -------------------------------------------------------------------
 	// -------------------------------------------------------------------
 	/** Executes the post processing step on the given imported data.
 	/** Executes the post processing step on the given imported data.
 	* The function deletes the scene if the postprocess step fails (
 	* The function deletes the scene if the postprocess step fails (

+ 3 - 3
ThirdParty/Assimp/code/BlenderDNA.cpp

@@ -259,13 +259,13 @@ void DNA :: DumpToFile()
 	if (pos++ == std::string::npos) {
 	if (pos++ == std::string::npos) {
 		return;
 		return;
 	}
 	}
-	array_sizes[0] = strtol10(&out[pos]);
+	array_sizes[0] = strtoul10(&out[pos]);
 
 
 	pos = out.find('[',pos);
 	pos = out.find('[',pos);
 	if (pos++ == std::string::npos) {
 	if (pos++ == std::string::npos) {
 		return;
 		return;
 	}
 	}
-	array_sizes[1] = strtol10(&out[pos]);
+	array_sizes[1] = strtoul10(&out[pos]);
 }
 }
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
@@ -288,7 +288,7 @@ boost::shared_ptr< ElemBase > DNA :: ConvertBlobToStructure(
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
 DNA::FactoryPair DNA :: GetBlobToStructureConverter(
 DNA::FactoryPair DNA :: GetBlobToStructureConverter(
 	const Structure& structure,
 	const Structure& structure,
-	const FileDatabase& db
+	const FileDatabase& /*db*/
 ) const 
 ) const 
 {
 {
 	std::map<std::string,  FactoryPair>::const_iterator it = converters.find(structure.name);
 	std::map<std::string,  FactoryPair>::const_iterator it = converters.find(structure.name);

+ 6 - 6
ThirdParty/Assimp/code/BlenderDNA.h

@@ -376,7 +376,7 @@ template <>  struct Structure :: _defaultInitializer<ErrorPolicy_Warn> {
 template <> struct Structure :: _defaultInitializer<ErrorPolicy_Fail> {
 template <> struct Structure :: _defaultInitializer<ErrorPolicy_Fail> {
 
 
 	template <typename T>
 	template <typename T>
-	void operator ()(T& out,const char* = "") {
+	void operator ()(T& /*out*/,const char* = "") {
 		// obviously, it is crucial that _DefaultInitializer is used 
 		// obviously, it is crucial that _DefaultInitializer is used 
 		// only from within a catch clause.
 		// only from within a catch clause.
 		throw;
 		throw;
@@ -681,7 +681,7 @@ public:
 
 
 	ObjectCache(const FileDatabase&) {}
 	ObjectCache(const FileDatabase&) {}
 
 
-	template <typename T> void get(const Structure&, vector<T>&t, const Pointer&) {}
+	template <typename T> void get(const Structure&, vector<T>&, const Pointer&) {}
 	template <typename T> void set(const Structure&, const vector<T>&, const Pointer&) {}
 	template <typename T> void set(const Structure&, const vector<T>&, const Pointer&) {}
 };
 };
 
 
@@ -701,9 +701,9 @@ public:
 
 
 
 
 	FileDatabase()
 	FileDatabase()
-		: next_cache_idx()
-		, _cacheArrays(*this)
+		: _cacheArrays(*this)
 		, _cache(*this)
 		, _cache(*this)
+		, next_cache_idx()
 	{} 
 	{} 
 
 
 public:
 public:
@@ -727,12 +727,12 @@ public:
 	// arrays of objects are never cached because we can't easily 
 	// arrays of objects are never cached because we can't easily 
 	// ensure their proper destruction.
 	// ensure their proper destruction.
 	template <typename T>
 	template <typename T>
-	ObjectCache<boost::shared_ptr>& cache(boost::shared_ptr<T>& in) const {
+	ObjectCache<boost::shared_ptr>& cache(boost::shared_ptr<T>& /*in*/) const {
 		return _cache;
 		return _cache;
 	}
 	}
 
 
 	template <typename T>
 	template <typename T>
-	ObjectCache<vector>& cache(vector<T>& in) const {
+	ObjectCache<vector>& cache(vector<T>& /*in*/) const {
 		return _cacheArrays;
 		return _cacheArrays;
 	}
 	}
 
 

+ 2 - 2
ThirdParty/Assimp/code/BlenderDNA.inl

@@ -348,7 +348,7 @@ void Structure :: ResolvePointer(TOUT<T>& out, const Pointer & ptrval, const Fil
 }
 }
 
 
 //--------------------------------------------------------------------------------
 //--------------------------------------------------------------------------------
-inline void Structure :: ResolvePointer( boost::shared_ptr< FileOffset >& out, const Pointer & ptrval, const FileDatabase& db, const Field& f) const
+inline void Structure :: ResolvePointer( boost::shared_ptr< FileOffset >& out, const Pointer & ptrval, const FileDatabase& db, const Field& /*f*/) const
 {
 {
 	// Currently used exclusively by PackedFile::data to represent
 	// Currently used exclusively by PackedFile::data to represent
 	// a simple offset into the mapped BLEND file. 
 	// a simple offset into the mapped BLEND file. 
@@ -402,7 +402,7 @@ void Structure :: ResolvePointer(vector< TOUT<T> >& out, const Pointer & ptrval,
 template <> void Structure :: ResolvePointer<boost::shared_ptr,ElemBase>(boost::shared_ptr<ElemBase>& out, 
 template <> void Structure :: ResolvePointer<boost::shared_ptr,ElemBase>(boost::shared_ptr<ElemBase>& out, 
 	const Pointer & ptrval, 
 	const Pointer & ptrval, 
 	const FileDatabase& db, 
 	const FileDatabase& db, 
-	const Field& f
+	const Field& /*f*/
 ) const 
 ) const 
 {
 {
 	// Special case when the data type needs to be determined at runtime.
 	// Special case when the data type needs to be determined at runtime.

+ 21 - 41
ThirdParty/Assimp/code/BlenderLoader.cpp

@@ -52,7 +52,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include "BlenderModifier.h"
 #include "BlenderModifier.h"
 
 
 #include "StreamReader.h"
 #include "StreamReader.h"
-#include "TinyFormatter.h"
 #include "MemoryIOWrapper.h"
 #include "MemoryIOWrapper.h"
 
 
 // zlib is needed for compressed blend files 
 // zlib is needed for compressed blend files 
@@ -68,7 +67,7 @@ using namespace Assimp;
 using namespace Assimp::Blender;
 using namespace Assimp::Blender;
 using namespace Assimp::Formatter;
 using namespace Assimp::Formatter;
 
 
-
+template<> const std::string LogFunctions<BlenderImporter>::log_prefix = "BLEND: ";
 static const aiLoaderDesc blenderDesc = {
 static const aiLoaderDesc blenderDesc = {
 	"Blender 3D Importer \nhttp://www.blender3d.org",
 	"Blender 3D Importer \nhttp://www.blender3d.org",
 	"Assimp Team",
 	"Assimp Team",
@@ -128,7 +127,7 @@ const aiLoaderDesc& BlenderImporter::GetInfo () const
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
 // Setup configuration properties for the loader
 // Setup configuration properties for the loader
-void BlenderImporter::SetupProperties(const Importer* pImp)
+void BlenderImporter::SetupProperties(const Importer* /*pImp*/)
 {
 {
 	// nothing to be done for the moment
 	// nothing to be done for the moment
 }
 }
@@ -401,7 +400,7 @@ void BlenderImporter::ConvertBlendFile(aiScene* out, const Scene& in,const FileD
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
 void BlenderImporter::ResolveImage(MaterialHelper* out, const Material* mat, const MTex* tex, const Image* img, ConversionData& conv_data)
 void BlenderImporter::ResolveImage(MaterialHelper* out, const Material* mat, const MTex* tex, const Image* img, ConversionData& conv_data)
 {
 {
-	mat; tex; conv_data;
+	(void)mat; (void)tex; (void)conv_data;
 	aiString name;
 	aiString name;
 
 
 	// check if the file contents are bundled with the BLEND file
 	// check if the file contents are bundled with the BLEND file
@@ -419,9 +418,9 @@ void BlenderImporter::ResolveImage(MaterialHelper* out, const Material* mat, con
 
 
 		while (s >= img->name && *s != '.')--s;
 		while (s >= img->name && *s != '.')--s;
 
 
-		tex->achFormatHint[0] = s+1>e ? '\0' : s[1];
-		tex->achFormatHint[1] = s+2>e ? '\0' : s[2];
-		tex->achFormatHint[2] = s+3>e ? '\0' : s[3];
+		tex->achFormatHint[0] = s+1>e ? '\0' : ::tolower( s[1] );
+		tex->achFormatHint[1] = s+2>e ? '\0' : ::tolower( s[2] );
+		tex->achFormatHint[2] = s+3>e ? '\0' : ::tolower( s[3] );
 		tex->achFormatHint[3] = '\0';
 		tex->achFormatHint[3] = '\0';
 
 
 		// tex->mHeight = 0;
 		// tex->mHeight = 0;
@@ -446,7 +445,7 @@ void BlenderImporter::ResolveImage(MaterialHelper* out, const Material* mat, con
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
 void BlenderImporter::AddSentinelTexture(MaterialHelper* out, const Material* mat, const MTex* tex, ConversionData& conv_data)
 void BlenderImporter::AddSentinelTexture(MaterialHelper* out, const Material* mat, const MTex* tex, ConversionData& conv_data)
 {
 {
-	mat; tex; conv_data;
+	(void)mat; (void)tex; (void)conv_data;
 
 
 	aiString name;
 	aiString name;
 	name.length = sprintf(name.data, "Procedural,num=%i,type=%s",conv_data.sentinel_cnt++,
 	name.length = sprintf(name.data, "Procedural,num=%i,type=%s",conv_data.sentinel_cnt++,
@@ -523,7 +522,7 @@ void BlenderImporter::BuildMaterials(ConversionData& conv_data)
 
 
 				p->r = p->g = p->b = 0.6f;
 				p->r = p->g = p->b = 0.6f;
 				p->specr = p->specg = p->specb = 0.6f;
 				p->specr = p->specg = p->specb = 0.6f;
-				p->ambir = p->ambig = p->ambib = 0.0f;
+				p->ambr = p->ambg = p->ambb = 0.0f;
 				p->mirr = p->mirg = p->mirb = 0.0f;
 				p->mirr = p->mirg = p->mirb = 0.0f;
 				p->emit = 0.f;
 				p->emit = 0.f;
 				p->alpha = 0.f;
 				p->alpha = 0.f;
@@ -558,15 +557,21 @@ void BlenderImporter::BuildMaterials(ConversionData& conv_data)
 		aiColor3D col(mat->r,mat->g,mat->b);
 		aiColor3D col(mat->r,mat->g,mat->b);
 		if (mat->r || mat->g || mat->b ) {
 		if (mat->r || mat->g || mat->b ) {
 			
 			
-			// Usually, zero diffuse color means no diffuse color at all in the equation - seemingly.
-			// So we ommit this member to express this intent.
+			// Usually, zero diffuse color means no diffuse color at all in the equation.
+			// So we omit this member to express this intent.
 			mout->AddProperty(&col,1,AI_MATKEY_COLOR_DIFFUSE);
 			mout->AddProperty(&col,1,AI_MATKEY_COLOR_DIFFUSE);
 		}
 		}
 
 
 		col = aiColor3D(mat->specr,mat->specg,mat->specb);
 		col = aiColor3D(mat->specr,mat->specg,mat->specb);
 		mout->AddProperty(&col,1,AI_MATKEY_COLOR_SPECULAR);
 		mout->AddProperty(&col,1,AI_MATKEY_COLOR_SPECULAR);
 
 
-		col = aiColor3D(mat->ambir,mat->ambig,mat->ambib);
+		// is hardness/shininess set?
+		if( mat->har ) {
+			const float har = mat->har;
+			mout->AddProperty(&har,1,AI_MATKEY_SHININESS);
+		}
+
+		col = aiColor3D(mat->ambr,mat->ambg,mat->ambb);
 		mout->AddProperty(&col,1,AI_MATKEY_COLOR_AMBIENT);
 		mout->AddProperty(&col,1,AI_MATKEY_COLOR_AMBIENT);
 
 
 		col = aiColor3D(mat->mirr,mat->mirg,mat->mirb);
 		col = aiColor3D(mat->mirr,mat->mirg,mat->mirb);
@@ -601,7 +606,7 @@ void BlenderImporter::NotSupportedObjectType(const Object* obj, const char* type
 }
 }
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
-void BlenderImporter::ConvertMesh(const Scene& in, const Object* obj, const Mesh* mesh, 
+void BlenderImporter::ConvertMesh(const Scene& /*in*/, const Object* /*obj*/, const Mesh* mesh,
 	ConversionData& conv_data, TempArray<std::vector,aiMesh>&  temp
 	ConversionData& conv_data, TempArray<std::vector,aiMesh>&  temp
 	) 
 	) 
 {
 {
@@ -790,7 +795,7 @@ void BlenderImporter::ConvertMesh(const Scene& in, const Object* obj, const Mesh
 
 
 	// collect texture coordinates, old-style (marked as deprecated in current blender sources)
 	// collect texture coordinates, old-style (marked as deprecated in current blender sources)
 	if (mesh->tface) {
 	if (mesh->tface) {
-		if (mesh->totface > static_cast<int> ( mesh->mtface.size())) {
+		if (mesh->totface > static_cast<int> ( mesh->tface.size())) {
 			ThrowException("Number of faces is larger than the corresponding UV face array (#2)");
 			ThrowException("Number of faces is larger than the corresponding UV face array (#2)");
 		}
 		}
 		for (std::vector<aiMesh*>::iterator it = temp->begin()+old; it != temp->end(); ++it) {
 		for (std::vector<aiMesh*>::iterator it = temp->begin()+old; it != temp->end(); ++it) {
@@ -848,7 +853,7 @@ void BlenderImporter::ConvertMesh(const Scene& in, const Object* obj, const Mesh
 }
 }
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
-aiCamera* BlenderImporter::ConvertCamera(const Scene& in, const Object* obj, const Camera* mesh, ConversionData& conv_data) 
+aiCamera* BlenderImporter::ConvertCamera(const Scene& /*in*/, const Object* /*obj*/, const Camera* /*mesh*/, ConversionData& /*conv_data*/)
 {
 {
 	ScopeGuard<aiCamera> out(new aiCamera());
 	ScopeGuard<aiCamera> out(new aiCamera());
 
 
@@ -856,7 +861,7 @@ aiCamera* BlenderImporter::ConvertCamera(const Scene& in, const Object* obj, con
 }
 }
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
-aiLight* BlenderImporter::ConvertLight(const Scene& in, const Object* obj, const Lamp* mesh, ConversionData& conv_data) 
+aiLight* BlenderImporter::ConvertLight(const Scene& /*in*/, const Object* /*obj*/, const Lamp* /*mesh*/, ConversionData& /*conv_data*/)
 {
 {
 	ScopeGuard<aiLight> out(new aiLight());
 	ScopeGuard<aiLight> out(new aiLight());
 
 
@@ -976,30 +981,5 @@ aiNode* BlenderImporter::ConvertNode(const Scene& in, const Object* obj, Convers
 	return node.dismiss();
 	return node.dismiss();
 }
 }
 
 
-// ------------------------------------------------------------------------------------------------
-/*static*/ void BlenderImporter::ThrowException(const std::string& msg)
-{
-	throw DeadlyImportError("BLEND: "+msg);
-}
-
-// ------------------------------------------------------------------------------------------------
-/*static*/ void BlenderImporter::LogWarn(const Formatter::format& message)	{
-	DefaultLogger::get()->warn(std::string("BLEND: ")+=message);
-}
-
-// ------------------------------------------------------------------------------------------------
-/*static*/ void BlenderImporter::LogError(const Formatter::format& message)	{
-	DefaultLogger::get()->error(std::string("BLEND: ")+=message);
-}
-
-// ------------------------------------------------------------------------------------------------
-/*static*/ void BlenderImporter::LogInfo(const Formatter::format& message)	{
-	DefaultLogger::get()->info(std::string("BLEND: ")+=message);
-}
-
-// ------------------------------------------------------------------------------------------------
-/*static*/ void BlenderImporter::LogDebug(const Formatter::format& message)	{
-	DefaultLogger::get()->debug(std::string("BLEND: ")+=message);
-}
 
 
 #endif
 #endif

+ 5 - 18
ThirdParty/Assimp/code/BlenderLoader.h

@@ -45,6 +45,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #define INCLUDED_AI_BLEND_LOADER_H
 #define INCLUDED_AI_BLEND_LOADER_H
 
 
 #include "BaseImporter.h"
 #include "BaseImporter.h"
+#include "LogAux.h"
+
 namespace Assimp	{
 namespace Assimp	{
 	
 	
 	// TinyFormatter.h
 	// TinyFormatter.h
@@ -116,18 +118,13 @@ struct aiLoaderDesc
  *  call it is outsourced to BlenderDNA.cpp/BlenderDNA.h. This class only performs the
  *  call it is outsourced to BlenderDNA.cpp/BlenderDNA.h. This class only performs the
  *  conversion from intermediate format to aiScene. */
  *  conversion from intermediate format to aiScene. */
 // -------------------------------------------------------------------------------------------
 // -------------------------------------------------------------------------------------------
-class BlenderImporter : public BaseImporter
+class BlenderImporter : public BaseImporter, public LogFunctions<BlenderImporter>
 {
 {
-	friend class Importer;
-
-protected:
-
-	/** Constructor to be privately used by Importer */
+public:
 	BlenderImporter();
 	BlenderImporter();
-
-	/** Destructor, private as well */
 	~BlenderImporter();
 	~BlenderImporter();
 
 
+
 public:
 public:
 
 
 	// --------------------
 	// --------------------
@@ -240,16 +237,6 @@ private: // static stuff, mostly logging and error reporting.
 		const char* type
 		const char* type
 	);
 	);
 
 
-	// -------------------------------------------------------------------
-	/** Prepend 'BLEND: ' and throw msg.*/
-	static void ThrowException(const std::string& msg);
-
-	// -------------------------------------------------------------------
-	/** @defgroup blog Prepend 'BLEND: ' and write @c message to log.*/
-	static void LogWarn  (const Formatter::format& message); //! @ingroup blog
-	static void LogError (const Formatter::format& message); //! @ingroup blog
-	static void LogInfo  (const Formatter::format& message); //! @ingroup blog
-	static void LogDebug (const Formatter::format& message); //! @ingroup blog
 
 
 private:
 private:
 
 

+ 4 - 2
ThirdParty/Assimp/code/BlenderModifier.cpp

@@ -178,13 +178,15 @@ bool BlenderModifier_Mirror :: IsActive (const ModifierData& modin)
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
 void  BlenderModifier_Mirror :: DoIt(aiNode& out, ConversionData& conv_data,  const ElemBase& orig_modifier, 
 void  BlenderModifier_Mirror :: DoIt(aiNode& out, ConversionData& conv_data,  const ElemBase& orig_modifier, 
-	const Scene& in,
+	const Scene& /*in*/,
 	const Object& orig_object ) 
 	const Object& orig_object ) 
 {
 {
 	// hijacking the ABI, see the big note in BlenderModifierShowcase::ApplyModifiers()
 	// hijacking the ABI, see the big note in BlenderModifierShowcase::ApplyModifiers()
 	const MirrorModifierData& mir = static_cast<const MirrorModifierData&>(orig_modifier);
 	const MirrorModifierData& mir = static_cast<const MirrorModifierData&>(orig_modifier);
 	ai_assert(mir.modifier.type == ModifierData::eModifierType_Mirror);
 	ai_assert(mir.modifier.type == ModifierData::eModifierType_Mirror);
 
 
+	conv_data.meshes->reserve(conv_data.meshes->size() + out.mNumMeshes);
+
 	// XXX not entirely correct, mirroring on two axes results in 4 distinct objects in blender ...
 	// XXX not entirely correct, mirroring on two axes results in 4 distinct objects in blender ...
 
 
 	// take all input meshes and clone them
 	// take all input meshes and clone them
@@ -271,7 +273,7 @@ bool BlenderModifier_Subdivision :: IsActive (const ModifierData& modin)
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
 void  BlenderModifier_Subdivision :: DoIt(aiNode& out, ConversionData& conv_data,  const ElemBase& orig_modifier, 
 void  BlenderModifier_Subdivision :: DoIt(aiNode& out, ConversionData& conv_data,  const ElemBase& orig_modifier, 
-	const Scene& in,
+	const Scene& /*in*/,
 	const Object& orig_object ) 
 	const Object& orig_object ) 
 {
 {
 	// hijacking the ABI, see the big note in BlenderModifierShowcase::ApplyModifiers()
 	// hijacking the ABI, see the big note in BlenderModifierShowcase::ApplyModifiers()

+ 5 - 5
ThirdParty/Assimp/code/BlenderModifier.h

@@ -64,7 +64,7 @@ public:
 
 
 	// --------------------
 	// --------------------
 	/** Check if *this* modifier is active, given a ModifierData& block.*/
 	/** Check if *this* modifier is active, given a ModifierData& block.*/
-	virtual bool IsActive( const ModifierData& modin) {
+	virtual bool IsActive( const ModifierData& /*modin*/) {
 		return false;
 		return false;
 	}
 	}
 
 
@@ -72,11 +72,11 @@ public:
 	/** Apply the modifier to a given output node. The original data used
 	/** Apply the modifier to a given output node. The original data used
 	 *  to construct the node is given as well. Not called unless IsActive()
 	 *  to construct the node is given as well. Not called unless IsActive()
 	 *  was called and gave positive response. */
 	 *  was called and gave positive response. */
-	virtual void DoIt(aiNode& out, 
-		ConversionData& conv_data,  
+	virtual void DoIt(aiNode& /*out*/,
+		ConversionData& /*conv_data*/,
 		const ElemBase& orig_modifier, 
 		const ElemBase& orig_modifier, 
-		const Scene& in, 
-		const Object& orig_object 
+		const Scene& /*in*/,
+		const Object& /*orig_object*/
 	) {
 	) {
 		DefaultLogger::get()->warn((Formatter::format("This modifier is not supported, skipping: "),orig_modifier.dna_type));
 		DefaultLogger::get()->warn((Formatter::format("This modifier is not supported, skipping: "),orig_modifier.dna_type));
 		return;
 		return;

+ 6 - 5
ThirdParty/Assimp/code/BlenderScene.cpp

@@ -151,8 +151,8 @@ template <> void Structure :: Convert<SubsurfModifierData> (
 { 
 { 
 
 
     ReadField<ErrorPolicy_Fail>(dest.modifier,"modifier",db);
     ReadField<ErrorPolicy_Fail>(dest.modifier,"modifier",db);
-    ReadField<ErrorPolicy_Igno>(dest.subdivType,"subdivType",db);
-    ReadField<ErrorPolicy_Igno>(dest.levels,"levels",db);
+    ReadField<ErrorPolicy_Warn>(dest.subdivType,"subdivType",db);
+    ReadField<ErrorPolicy_Fail>(dest.levels,"levels",db);
     ReadField<ErrorPolicy_Igno>(dest.renderLevels,"renderLevels",db);
     ReadField<ErrorPolicy_Igno>(dest.renderLevels,"renderLevels",db);
     ReadField<ErrorPolicy_Igno>(dest.flags,"flags",db);
     ReadField<ErrorPolicy_Igno>(dest.flags,"flags",db);
 
 
@@ -275,9 +275,10 @@ template <> void Structure :: Convert<Material> (
     ReadField<ErrorPolicy_Warn>(dest.specr,"specr",db);
     ReadField<ErrorPolicy_Warn>(dest.specr,"specr",db);
     ReadField<ErrorPolicy_Warn>(dest.specg,"specg",db);
     ReadField<ErrorPolicy_Warn>(dest.specg,"specg",db);
     ReadField<ErrorPolicy_Warn>(dest.specb,"specb",db);
     ReadField<ErrorPolicy_Warn>(dest.specb,"specb",db);
-    ReadField<ErrorPolicy_Warn>(dest.ambir,"ambir",db);
-    ReadField<ErrorPolicy_Warn>(dest.ambig,"ambig",db);
-    ReadField<ErrorPolicy_Warn>(dest.ambib,"ambib",db);
+    ReadField<ErrorPolicy_Igno>(dest.har,"har",db);
+    ReadField<ErrorPolicy_Warn>(dest.ambr,"ambr",db);
+    ReadField<ErrorPolicy_Warn>(dest.ambg,"ambg",db);
+    ReadField<ErrorPolicy_Warn>(dest.ambb,"ambb",db);
     ReadField<ErrorPolicy_Igno>(dest.mirr,"mirr",db);
     ReadField<ErrorPolicy_Igno>(dest.mirr,"mirr",db);
     ReadField<ErrorPolicy_Igno>(dest.mirg,"mirg",db);
     ReadField<ErrorPolicy_Igno>(dest.mirg,"mirg",db);
     ReadField<ErrorPolicy_Igno>(dest.mirb,"mirb",db);
     ReadField<ErrorPolicy_Igno>(dest.mirb,"mirb",db);

+ 2 - 1
ThirdParty/Assimp/code/BlenderScene.h

@@ -208,7 +208,8 @@ struct Material : ElemBase {
 
 
 	float r,g,b WARN;
 	float r,g,b WARN;
 	float specr,specg,specb WARN;
 	float specr,specg,specb WARN;
-	float ambir,ambig,ambib WARN;
+	short har;
+	float ambr,ambg,ambb WARN;
 	float mirr,mirg,mirb;
 	float mirr,mirg,mirb;
 	float emit WARN;
 	float emit WARN;
 	float alpha WARN;
 	float alpha WARN;

+ 326 - 0
ThirdParty/Assimp/code/BlobIOSystem.h

@@ -0,0 +1,326 @@
+/*
+---------------------------------------------------------------------------
+Open Asset Import Library (ASSIMP)
+---------------------------------------------------------------------------
+
+Copyright (c) 2006-2010, ASSIMP Development Team
+
+All rights reserved.
+
+Redistribution and use of this software in source and binary forms, 
+with or without modification, are permitted provided that the following 
+conditions are met:
+
+* Redistributions of source code must retain the above
+  copyright notice, this list of conditions and the
+  following disclaimer.
+
+* Redistributions in binary form must reproduce the above
+  copyright notice, this list of conditions and the
+  following disclaimer in the documentation and/or other
+  materials provided with the distribution.
+
+* Neither the name of the ASSIMP team, nor the names of its
+  contributors may be used to endorse or promote products
+  derived from this software without specific prior
+  written permission of the ASSIMP Development Team.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+---------------------------------------------------------------------------
+*/
+
+/** @file Provides cheat implementations for IOSystem and IOStream to
+ *  redirect exporter output to a blob chain.*/
+
+#ifndef AI_BLOBIOSYSTEM_H_INCLUDED
+#define AI_BLOBIOSYSTEM_H_INCLUDED
+
+namespace Assimp	{
+	class BlobIOSystem;
+
+// --------------------------------------------------------------------------------------------
+/** Redirect IOStream to a blob */
+// --------------------------------------------------------------------------------------------
+class BlobIOStream : public IOStream
+{
+public:
+
+	BlobIOStream(BlobIOSystem* creator, const std::string& file, size_t initial = 4096)
+		: buffer()
+		, cur_size()
+		, file_size()
+		, cursor()
+		, initial(initial)
+		, file(file)
+		, creator(creator)
+	{
+	}
+
+
+	virtual ~BlobIOStream();
+
+public:
+
+	// -------------------------------------------------------------------
+	aiExportDataBlob* GetBlob()
+	{
+		aiExportDataBlob* blob = new aiExportDataBlob();
+		blob->size = file_size;
+		blob->data = buffer;
+
+		buffer = NULL;
+
+		return blob;
+	}
+
+
+public:
+
+
+	// -------------------------------------------------------------------
+    virtual size_t Read(void* pvBuffer, 
+		size_t pSize, 
+		size_t pCount) 
+	{
+		return 0;
+	}
+
+	// -------------------------------------------------------------------
+    virtual size_t Write(const void* pvBuffer, 
+		size_t pSize,
+		size_t pCount) 
+	{
+		pSize *= pCount;
+		if (cursor + pSize > cur_size) {
+			Grow(cursor + pSize);
+		}
+
+		memcpy(buffer+cursor, pvBuffer, pSize);
+		cursor += pSize;
+
+		file_size = std::max(file_size,cursor);
+		return pCount; 
+	}
+
+	// -------------------------------------------------------------------
+	virtual aiReturn Seek(size_t pOffset,
+		aiOrigin pOrigin)
+	{
+		switch(pOrigin) 
+		{
+		case aiOrigin_CUR:
+			cursor += pOffset;
+
+		case aiOrigin_END:
+			cursor = file_size - pOffset;
+
+		case aiOrigin_SET:
+			cursor = pOffset;
+			break;
+
+		default:
+			return AI_FAILURE;
+		}
+
+		if (cursor > file_size) {
+			Grow(cursor);
+		}
+
+		file_size = std::max(cursor,file_size);
+		return AI_SUCCESS;
+	}
+
+	// -------------------------------------------------------------------
+    virtual size_t Tell() const
+	{
+		return cursor;
+	}
+
+	// -------------------------------------------------------------------
+	virtual size_t FileSize() const
+	{
+		return file_size;
+	}
+
+	// -------------------------------------------------------------------
+	virtual void Flush() 
+	{
+		// ignore
+	}
+
+
+
+private:
+
+	// -------------------------------------------------------------------
+	void Grow(size_t need = 0) 
+	{
+		// 1.5 and phi are very heap-friendly growth factors (the first
+		// allows for frequent re-use of heap blocks, the second
+		// forms a fibonacci sequence with similar characteristics -
+		// since this heavily depends on the heap implementation 
+		// and other factors as well, i'll just go with 1.5 since
+		// it is quicker to compute).
+		size_t new_size = std::max(initial, std::max( need, cur_size+(cur_size>>1) ));
+
+		const uint8_t* const old = buffer;
+		buffer = new uint8_t[new_size];
+
+		if (old) {
+			memcpy(buffer,old,cur_size);
+			delete[] old;
+		}
+
+		cur_size = new_size;
+	}
+
+private:
+
+	uint8_t* buffer;
+	size_t cur_size,file_size, cursor, initial;
+
+	const std::string file;
+	BlobIOSystem* const creator;
+};
+
+
+#define AI_BLOBIO_MAGIC "$blobfile"
+
+// --------------------------------------------------------------------------------------------
+/** Redirect IOSystem to a blob */
+// --------------------------------------------------------------------------------------------
+class BlobIOSystem : public IOSystem
+{
+
+	friend class BlobIOStream;
+	typedef std::pair<std::string, aiExportDataBlob*> BlobEntry;
+
+public:
+
+	BlobIOSystem()
+	{
+	}
+
+	virtual ~BlobIOSystem()
+	{
+		BOOST_FOREACH(BlobEntry& blobby, blobs) {
+			delete blobby.second;
+		}
+	}
+
+public:
+
+	// -------------------------------------------------------------------
+	const char* GetMagicFileName() const 
+	{
+		return AI_BLOBIO_MAGIC;
+	}
+
+
+	// -------------------------------------------------------------------
+	aiExportDataBlob* GetBlobChain()
+	{
+		// one must be the master
+		aiExportDataBlob* master = NULL, *cur;
+		BOOST_FOREACH(const BlobEntry& blobby, blobs) {
+			if (blobby.first == AI_BLOBIO_MAGIC) {
+				master = blobby.second;
+				break;
+			}
+		}
+		if (!master) {
+			DefaultLogger::get()->error("BlobIOSystem: no data written or master file was not closed properly.");
+			return NULL;
+		}
+
+		master->name.Set("");
+
+		cur = master;
+		BOOST_FOREACH(const BlobEntry& blobby, blobs) {
+			if (blobby.second == master) {
+				continue;
+			}
+
+			cur->next = blobby.second;
+			cur = cur->next;
+
+			// extract the file extension from the file written
+			const std::string::size_type s = blobby.first.find_first_of('.');
+			cur->name.Set(s == std::string::npos ? blobby.first : blobby.first.substr(s+1));
+		}
+
+		// give up blob ownership
+		blobs.clear();
+		return master;
+	}
+
+public:
+
+	// -------------------------------------------------------------------
+	virtual bool Exists( const char* pFile) const {
+		return created.find(std::string(pFile)) != created.end();
+	}
+
+
+	// -------------------------------------------------------------------
+	virtual char getOsSeparator() const {
+		return '/';
+	}
+
+
+	// -------------------------------------------------------------------
+	virtual IOStream* Open(const char* pFile,
+		const char* pMode)
+	{
+		if (pMode[0] != 'w') {
+			return NULL;
+		}
+
+		created.insert(std::string(pFile));
+		return new BlobIOStream(this,std::string(pFile));
+	}
+
+	// -------------------------------------------------------------------
+	virtual void Close( IOStream* pFile) 
+	{
+		delete pFile;
+	}
+
+private:
+
+	// -------------------------------------------------------------------
+	void OnDestruct(const std::string& filename, BlobIOStream* child) 
+	{	
+		// we don't know in which the files are closed, so we
+		// can't reliably say that the first must be the master 
+		// file ...
+		blobs.push_back( BlobEntry(filename,child->GetBlob()) );
+	}
+
+private:
+	std::set<std::string> created;
+	std::vector< BlobEntry > blobs;
+};
+
+
+// --------------------------------------------------------------------------------------------
+BlobIOStream :: ~BlobIOStream() 
+{
+	creator->OnDestruct(file,this);
+	delete[] buffer;
+}
+
+	
+} // end Assimp
+
+#endif

+ 10 - 4
ThirdParty/Assimp/code/BoostWorkaround/boost/foreach.hpp

@@ -76,17 +76,23 @@ typename T::reference deref(auto_any_base const& cur, T&)
     return *auto_any_cast<typename T::iterator>(cur);
     return *auto_any_cast<typename T::iterator>(cur);
 }
 }
 
 
+template<typename T>
+typename T::const_reference deref(auto_any_base const& cur, const T&)
+{
+    return *auto_any_cast<typename T::iterator>(cur);
+}
+
 } // end foreach_detail
 } // end foreach_detail
 
 
 ///////////////////////////////////////////////////////////////////////////////
 ///////////////////////////////////////////////////////////////////////////////
 // FOREACH
 // FOREACH
 
 
 #define BOOST_FOREACH(item, container)                      \
 #define BOOST_FOREACH(item, container)                      \
-	if(boost::foreach_detail::auto_any_base const& b = boost::foreach_detail::begin(container)) {} else       \
-    if(boost::foreach_detail::auto_any_base const& e = boost::foreach_detail::end(container))   {} else       \
-    for(;!boost::foreach_detail::done(b,e,container);  boost::foreach_detail::next(b,container))   \
+	if(boost::foreach_detail::auto_any_base const& foreach_magic_b = boost::foreach_detail::begin(container)) {} else       \
+    if(boost::foreach_detail::auto_any_base const& foreach_magic_e = boost::foreach_detail::end(container))   {} else       \
+    for(;!boost::foreach_detail::done(foreach_magic_b,foreach_magic_e,container);  boost::foreach_detail::next(foreach_magic_b,container))   \
         if (bool ugly_and_unique_break = false) {} else							\
         if (bool ugly_and_unique_break = false) {} else							\
-        for(item = boost::foreach_detail::deref(b,container); !ugly_and_unique_break; ugly_and_unique_break = true)
+        for(item = boost::foreach_detail::deref(foreach_magic_b,container); !ugly_and_unique_break; ugly_and_unique_break = true)
 
 
 } // end boost
 } // end boost
 
 

+ 1 - 1
ThirdParty/Assimp/code/BoostWorkaround/boost/format.hpp

@@ -31,7 +31,7 @@ namespace boost
 		{
 		{
 			// XXX add replacement for boost::lexical_cast?
 			// XXX add replacement for boost::lexical_cast?
 			
 			
-			std::stringstream ss;
+			std::ostringstream ss;
 			ss << in; // note: ss cannot be an rvalue, or  the global operator << (const char*) is not called for T == const char*.
 			ss << in; // note: ss cannot be an rvalue, or  the global operator << (const char*) is not called for T == const char*.
 			chunks.push_back( ss.str());
 			chunks.push_back( ss.str());
 			return *this;
 			return *this;

+ 2 - 1
ThirdParty/Assimp/code/BoostWorkaround/boost/lexical_cast.hpp

@@ -20,4 +20,5 @@ namespace boost
 
 
 } // namespace boost
 } // namespace boost
 
 
-#endif // __AI_BOOST_WORKAROUND_LEXICAL_CAST
+#endif // __AI_BOOST_WORKAROUND_LEXICAL_CAST
+

+ 57 - 0
ThirdParty/Assimp/code/BoostWorkaround/boost/make_shared.hpp

@@ -0,0 +1,57 @@
+
+// please note that this replacement implementation does not
+// provide the performance benefit of the original, which
+// makes only one allocation as opposed to two allocations
+// (smart pointer counter and payload) which are usually
+// required if object and smart pointer are constructed
+// independently.
+
+#ifndef INCLUDED_AI_BOOST_MAKE_SHARED
+#define INCLUDED_AI_BOOST_MAKE_SHARED
+
+
+namespace boost {
+
+	template <typename T>
+	shared_ptr<T> make_shared() {
+		return shared_ptr<T>(new T());
+	}
+
+	template <typename T, typename T0>
+	shared_ptr<T> make_shared(const T0& t0) {
+		return shared_ptr<T>(new T(t0));
+	}
+
+	template <typename T, typename T0,typename T1>
+	shared_ptr<T> make_shared(const T0& t0, const T1& t1) {
+		return shared_ptr<T>(new T(t0,t1));
+	}
+
+	template <typename T, typename T0,typename T1,typename T2>
+	shared_ptr<T> make_shared(const T0& t0, const T1& t1, const T2& t2) {
+		return shared_ptr<T>(new T(t0,t1,t2));
+	}
+
+	template <typename T, typename T0,typename T1,typename T2,typename T3>
+	shared_ptr<T> make_shared(const T0& t0, const T1& t1, const T2& t2, const T3& t3) {
+		return shared_ptr<T>(new T(t0,t1,t2,t3));
+	}
+
+	template <typename T, typename T0,typename T1,typename T2,typename T3, typename T4>
+	shared_ptr<T> make_shared(const T0& t0, const T1& t1, const T2& t2, const T3& t3, const T4& t4) {
+		return shared_ptr<T>(new T(t0,t1,t2,t3,t4));
+	}
+
+	template <typename T, typename T0,typename T1,typename T2,typename T3, typename T4, typename T5>
+	shared_ptr<T> make_shared(const T0& t0, const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5) {
+		return shared_ptr<T>(new T(t0,t1,t2,t3,t4,t5));
+	}
+
+	template <typename T, typename T0,typename T1,typename T2,typename T3, typename T4, typename T5, typename T6>
+	shared_ptr<T> make_shared(const T0& t0, const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6) {
+		return shared_ptr<T>(new T(t0,t1,t2,t3,t4,t5,t6));
+	}
+}
+
+
+#endif 

+ 36 - 0
ThirdParty/Assimp/code/BoostWorkaround/boost/noncopyable.hpp

@@ -0,0 +1,36 @@
+//  Boost noncopyable.hpp header file  --------------------------------------//
+
+//  (C) Copyright Beman Dawes 1999-2003. Distributed under the Boost
+//  Software License, Version 1.0. (See accompanying file
+//  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/libs/utility for documentation.
+
+#ifndef BOOST_NONCOPYABLE_HPP_INCLUDED
+#define BOOST_NONCOPYABLE_HPP_INCLUDED
+
+namespace boost {
+
+//  Private copy constructor and copy assignment ensure classes derived from
+//  class noncopyable cannot be copied.
+
+//  Contributed by Dave Abrahams
+
+namespace noncopyable_  // protection from unintended ADL
+{
+  class noncopyable
+  {
+   protected:
+      noncopyable() {}
+      ~noncopyable() {}
+   private:  // emphasize the following members are private
+      noncopyable( const noncopyable& );
+      const noncopyable& operator=( const noncopyable& );
+  };
+}
+
+typedef noncopyable_::noncopyable noncopyable;
+
+} // namespace boost
+
+#endif  // BOOST_NONCOPYABLE_HPP_INCLUDED

+ 1 - 1
ThirdParty/Assimp/code/BoostWorkaround/boost/shared_ptr.hpp

@@ -147,7 +147,7 @@ public:
 	}
 	}
 
 
 	// pointer access
 	// pointer access
-	inline operator T*()	{
+	inline operator T*() const {
 		return ptr;
 		return ptr;
 	}
 	}
 
 

+ 1 - 1
ThirdParty/Assimp/code/BoostWorkaround/boost/static_assert.hpp

@@ -14,7 +14,7 @@ namespace boost {
 
 
 
 
 #define BOOST_STATIC_ASSERT(eval) \
 #define BOOST_STATIC_ASSERT(eval) \
-{boost::detail::static_assertion_failure<(eval)> assert_dummy;assert_dummy;}
+{boost::detail::static_assertion_failure<(eval)> assert_dummy;(void)assert_dummy;}
 
 
 #endif
 #endif
 #endif // !! AI_BOOST_STATIC_ASSERT_INCLUDED
 #endif // !! AI_BOOST_STATIC_ASSERT_INCLUDED

+ 7 - 9
ThirdParty/Assimp/code/BoostWorkaround/boost/tuple/tuple.hpp

@@ -180,7 +180,7 @@ namespace boost	{
 
 
 		// ... and the const version
 		// ... and the const version
 		template <unsigned N>
 		template <unsigned N>
-		typename const detail::type_getter<T0,0,typename very_long::next_type, N>::type& get () const	{
+		const typename detail::type_getter<T0,0,typename very_long::next_type, N>::type& get () const	{
 			return m.get<N>();
 			return m.get<N>();
 		}
 		}
 
 
@@ -196,26 +196,24 @@ namespace boost	{
 		}
 		}
 
 
 		// cast to another tuple - all single elements must be convertible
 		// cast to another tuple - all single elements must be convertible
-		template <	typename T0, typename T1,typename T2,
-					typename T3, typename T4>
-
-		operator tuple <T0,T1,T2,T3,T4> () const {
-			tuple <T0,T1,T2,T3,T4> s;
-			s.m = (tuple <T0,T1,T2,T3,T4>::very_long)m;
+		template <typename T0b, typename T1b,typename T2b,typename T3b, typename T4b>
+		operator tuple <T0b,T1b,T2b,T3b,T4b> () const {
+			tuple <T0b,T1b,T2b,T3b,T4b> s;
+			s.m = (typename tuple <T0b,T1b,T2b,T3b,T4b>::very_long)m;
 			return s;
 			return s;
 		}
 		}
 	};
 	};
 
 
 	// Another way to access an element ...
 	// Another way to access an element ...
 	template <unsigned N,typename T0,typename T1,typename T2,typename T3,typename T4>
 	template <unsigned N,typename T0,typename T1,typename T2,typename T3,typename T4>
-	inline typename tuple<T0,T1,T2,T3,T4>::very_long::type_getter<N>::type& get (
+	inline typename tuple<T0,T1,T2,T3,T4>::very_long::template type_getter<N>::type& get (
 			tuple<T0,T1,T2,T3,T4>& m)	{
 			tuple<T0,T1,T2,T3,T4>& m)	{
 			return m.get<N>();
 			return m.get<N>();
 		}
 		}
 
 
 	// ... and the const version
 	// ... and the const version
 	template <unsigned N,typename T0,typename T1,typename T2,typename T3,typename T4>
 	template <unsigned N,typename T0,typename T1,typename T2,typename T3,typename T4>
-	inline const typename tuple<T0,T1,T2,T3,T4>::very_long::type_getter<N>::type& get (
+	inline const typename tuple<T0,T1,T2,T3,T4>::very_long::template type_getter<N>::type& get (
 			const tuple<T0,T1,T2,T3,T4>& m)	{
 			const tuple<T0,T1,T2,T3,T4>& m)	{
 			return m.get<N>();
 			return m.get<N>();
 		}
 		}

+ 42 - 2
ThirdParty/Assimp/code/ByteSwap.h

@@ -198,8 +198,6 @@ template <typename T> struct ByteSwap::_swapper<T,8> {
 	}
 	}
 };
 };
 
 
-} // Namespace Assimp
-
 
 
 // --------------------------------------------------------------------------------------
 // --------------------------------------------------------------------------------------
 // ByteSwap macros for BigEndian/LittleEndian support 
 // ByteSwap macros for BigEndian/LittleEndian support 
@@ -241,5 +239,47 @@ template <typename T> struct ByteSwap::_swapper<T,8> {
 #endif
 #endif
 
 
 
 
+namespace Intern {
+
+// --------------------------------------------------------------------------------------------
+template <typename T, bool doit>
+struct ByteSwapper	{
+	void operator() (T* inout) {
+		ByteSwap::Swap(inout);
+	}
+};
+
+template <typename T> 
+struct ByteSwapper<T,false>	{
+	void operator() (T*) {
+	}
+};
+
+// --------------------------------------------------------------------------------------------
+template <bool SwapEndianess, typename T, bool RuntimeSwitch>
+struct Getter {
+	void operator() (T* inout, bool le) {
+#ifdef AI_BUILD_BIG_ENDIAN
+		le =  le;
+#else
+		le =  !le;
+#endif
+		if (le) {
+			ByteSwapper<T,(sizeof(T)>1?true:false)> () (inout);
+		}
+		else ByteSwapper<T,false> () (inout);
+	}
+};
+
+template <bool SwapEndianess, typename T> 
+struct Getter<SwapEndianess,T,false> {
+
+	void operator() (T* inout, bool /*le*/) {
+		// static branch
+		ByteSwapper<T,(SwapEndianess && sizeof(T)>1)> () (inout);
+	}
+};
+} // end Intern
+} // end Assimp
 
 
 #endif //!! AI_BYTESWAP_H_INC
 #endif //!! AI_BYTESWAP_H_INC

+ 159 - 0
ThirdParty/Assimp/code/CInterfaceIOWrapper.h

@@ -0,0 +1,159 @@
+/*
+---------------------------------------------------------------------------
+Open Asset Import Library (ASSIMP)
+---------------------------------------------------------------------------
+
+Copyright (c) 2006-2010, ASSIMP Development Team
+
+All rights reserved.
+
+Redistribution and use of this software in source and binary forms, 
+with or without modification, are permitted provided that the following 
+conditions are met:
+
+* Redistributions of source code must retain the above
+  copyright notice, this list of conditions and the
+  following disclaimer.
+
+* Redistributions in binary form must reproduce the above
+  copyright notice, this list of conditions and the
+  following disclaimer in the documentation and/or other
+  materials provided with the distribution.
+
+* Neither the name of the ASSIMP team, nor the names of its
+  contributors may be used to endorse or promote products
+  derived from this software without specific prior
+  written permission of the ASSIMP Development Team.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+---------------------------------------------------------------------------
+*/
+
+/** @file aiFileIO -> IOSystem wrapper*/
+
+#ifndef AI_CIOSYSTEM_H_INCLUDED
+#define AI_CIOSYSTEM_H_INCLUDED
+
+#include "../include/aiFileIO.h"
+
+namespace Assimp	{
+	
+// ------------------------------------------------------------------------------------------------
+// Custom IOStream implementation for the C-API
+class CIOStreamWrapper : public IOStream
+{
+	friend class CIOSystemWrapper;
+public:
+
+	CIOStreamWrapper(aiFile* pFile)
+		: mFile(pFile)
+	{}
+
+	// ...................................................................
+	size_t Read(void* pvBuffer, 
+		size_t pSize, 
+		size_t pCount
+	){
+		// need to typecast here as C has no void*
+		return mFile->ReadProc(mFile,(char*)pvBuffer,pSize,pCount);
+	}
+
+	// ...................................................................
+	size_t Write(const void* pvBuffer, 
+		size_t pSize,
+		size_t pCount
+	){
+		// need to typecast here as C has no void*
+		return mFile->WriteProc(mFile,(const char*)pvBuffer,pSize,pCount);
+	}
+
+	// ...................................................................
+	aiReturn Seek(size_t pOffset,
+		aiOrigin pOrigin
+	){
+		return mFile->SeekProc(mFile,pOffset,pOrigin);
+	}
+
+	// ...................................................................
+	size_t Tell(void) const {
+		return mFile->TellProc(mFile);
+	}
+
+	// ...................................................................
+	size_t	FileSize() const {
+		return mFile->FileSizeProc(mFile);
+	}
+
+	// ...................................................................
+	void Flush () {
+		return mFile->FlushProc(mFile);
+	}
+
+private:
+	aiFile* mFile;
+};
+
+// ------------------------------------------------------------------------------------------------
+// Custom IOStream implementation for the C-API
+class CIOSystemWrapper : public IOSystem
+{
+public:
+	CIOSystemWrapper(aiFileIO* pFile)
+		: mFileSystem(pFile)
+	{}
+
+	// ...................................................................
+	bool Exists( const char* pFile) const {
+		CIOSystemWrapper* pip = const_cast<CIOSystemWrapper*>(this);
+		IOStream* p = pip->Open(pFile);
+		if (p){
+			pip->Close(p);
+			return true;
+		}
+		return false;
+	}
+
+	// ...................................................................
+	char getOsSeparator() const {
+#ifndef _WIN32
+		return '/';
+#else
+		return '\\';
+#endif
+	}
+
+	// ...................................................................
+	IOStream* Open(const char* pFile,const char* pMode = "rb") {
+		aiFile* p = mFileSystem->OpenProc(mFileSystem,pFile,pMode);
+		if (!p) {
+			return NULL;
+		}
+		return new CIOStreamWrapper(p);
+	}
+
+	// ...................................................................
+	void Close( IOStream* pFile) {
+		if (!pFile) {
+			return;
+		}
+		mFileSystem->CloseProc(mFileSystem,((CIOStreamWrapper*) pFile)->mFile);
+		delete pFile;
+	}
+private:
+	aiFileIO* mFileSystem;
+};
+
+}
+
+#endif
+

+ 21 - 21
ThirdParty/Assimp/code/COBLoader.cpp

@@ -108,7 +108,7 @@ void COBImporter::GetExtensionList(std::set<std::string>& app)
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
 // Setup configuration properties for the loader
 // Setup configuration properties for the loader
-void COBImporter::SetupProperties(const Importer* pImp)
+void COBImporter::SetupProperties(const Importer* /*pImp*/)
 {
 {
 	// nothing to be done for the moment
 	// nothing to be done for the moment
 }
 }
@@ -439,9 +439,9 @@ void COBImporter::ReadChunkInfo_Ascii(ChunkInfo& out, const LineSplitter& splitt
 	splitter.get_tokens(all_tokens);
 	splitter.get_tokens(all_tokens);
 
 
 	out.version = (all_tokens[1][1]-'0')*100+(all_tokens[1][3]-'0')*10+(all_tokens[1][4]-'0');
 	out.version = (all_tokens[1][1]-'0')*100+(all_tokens[1][3]-'0')*10+(all_tokens[1][4]-'0');
-	out.id	= strtol10(all_tokens[3]);
-	out.parent_id = strtol10(all_tokens[5]);
-	out.size = strtol10s(all_tokens[7]);
+	out.id	= strtoul10(all_tokens[3]);
+	out.parent_id = strtoul10(all_tokens[5]);
+	out.size = strtol10(all_tokens[7]);
 }
 }
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
@@ -505,7 +505,7 @@ void COBImporter::LogDebug_Ascii(const Formatter::format& message)	{
 }
 }
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
-void COBImporter::ReadBasicNodeInfo_Ascii(Node& msh, LineSplitter& splitter, const ChunkInfo& nfo)
+void COBImporter::ReadBasicNodeInfo_Ascii(Node& msh, LineSplitter& splitter, const ChunkInfo& /*nfo*/)
 {
 {
 	for(;splitter;++splitter) {
 	for(;splitter;++splitter) {
 		if (splitter.match_start("Name")) {
 		if (splitter.match_start("Name")) {
@@ -562,7 +562,7 @@ void COBImporter::ReadMat1_Ascii(Scene& out, LineSplitter& splitter, const Chunk
 	Material& mat = out.materials.back();
 	Material& mat = out.materials.back();
 	mat = nfo;
 	mat = nfo;
 
 
-	mat.matnum = strtol10(splitter[1]);
+	mat.matnum = strtoul10(splitter[1]);
 	++splitter;
 	++splitter;
 
 
 	if (!splitter.match_start("shader: ")) {
 	if (!splitter.match_start("shader: ")) {
@@ -626,7 +626,7 @@ void COBImporter::ReadUnit_Ascii(Scene& out, LineSplitter& splitter, const Chunk
 	// corresponding chunk already.
 	// corresponding chunk already.
 	for_each(boost::shared_ptr< Node >& nd, out.nodes) {
 	for_each(boost::shared_ptr< Node >& nd, out.nodes) {
 		if (nd->id == nfo.parent_id) {
 		if (nd->id == nfo.parent_id) {
-			const unsigned int t=strtol10(splitter[1]);
+			const unsigned int t=strtoul10(splitter[1]);
 		
 		
 			nd->unit_scale = t>=sizeof(units)/sizeof(units[0])?(
 			nd->unit_scale = t>=sizeof(units)/sizeof(units[0])?(
 				LogWarn_Ascii(splitter,format()<<t<<" is not a valid value for `Units` attribute in `Unit chunk` "<<nfo.id)
 				LogWarn_Ascii(splitter,format()<<t<<" is not a valid value for `Units` attribute in `Unit chunk` "<<nfo.id)
@@ -639,7 +639,7 @@ void COBImporter::ReadUnit_Ascii(Scene& out, LineSplitter& splitter, const Chunk
 }
 }
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
-void COBImporter::ReadChan_Ascii(Scene& out, LineSplitter& splitter, const ChunkInfo& nfo)
+void COBImporter::ReadChan_Ascii(Scene& /*out*/, LineSplitter& splitter, const ChunkInfo& nfo)
 {
 {
 	if(nfo.version > 8) {
 	if(nfo.version > 8) {
 		return UnsupportedChunk_Ascii(splitter,nfo,"Chan");
 		return UnsupportedChunk_Ascii(splitter,nfo,"Chan");
@@ -768,7 +768,7 @@ void COBImporter::ReadPolH_Ascii(Scene& out, LineSplitter& splitter, const Chunk
 	// either the last `Face` or the `DrawFlags` attribute, depending on the format ver.
 	// either the last `Face` or the `DrawFlags` attribute, depending on the format ver.
 	for(;splitter;++splitter) {
 	for(;splitter;++splitter) {
 		if (splitter.match_start("World Vertices")) {
 		if (splitter.match_start("World Vertices")) {
-			const unsigned int cnt = strtol10(splitter[2]);
+			const unsigned int cnt = strtoul10(splitter[2]);
 			msh.vertex_positions.resize(cnt);
 			msh.vertex_positions.resize(cnt);
 
 
 			for(unsigned int cur = 0;cur < cnt && ++splitter;++cur) {
 			for(unsigned int cur = 0;cur < cnt && ++splitter;++cur) {
@@ -785,7 +785,7 @@ void COBImporter::ReadPolH_Ascii(Scene& out, LineSplitter& splitter, const Chunk
 			}
 			}
 		}
 		}
 		else if (splitter.match_start("Texture Vertices")) {
 		else if (splitter.match_start("Texture Vertices")) {
-			const unsigned int cnt = strtol10(splitter[2]);
+			const unsigned int cnt = strtoul10(splitter[2]);
 			msh.texture_coords.resize(cnt);
 			msh.texture_coords.resize(cnt);
 
 
 			for(unsigned int cur = 0;cur < cnt && ++splitter;++cur) {
 			for(unsigned int cur = 0;cur < cnt && ++splitter;++cur) {
@@ -800,7 +800,7 @@ void COBImporter::ReadPolH_Ascii(Scene& out, LineSplitter& splitter, const Chunk
 			}
 			}
 		}
 		}
 		else if (splitter.match_start("Faces")) {
 		else if (splitter.match_start("Faces")) {
-			const unsigned int cnt = strtol10(splitter[1]);
+			const unsigned int cnt = strtoul10(splitter[1]);
 			msh.faces.reserve(cnt);
 			msh.faces.reserve(cnt);
 
 
 			for(unsigned int cur = 0; cur < cnt && ++splitter ;++cur) {
 			for(unsigned int cur = 0; cur < cnt && ++splitter ;++cur) {
@@ -816,9 +816,9 @@ void COBImporter::ReadPolH_Ascii(Scene& out, LineSplitter& splitter, const Chunk
 				msh.faces.push_back(Face());
 				msh.faces.push_back(Face());
 				Face& face = msh.faces.back();
 				Face& face = msh.faces.back();
 
 
-				face.indices.resize(strtol10(splitter[2]));
-				face.flags = strtol10(splitter[4]);
-				face.material = strtol10(splitter[6]);
+				face.indices.resize(strtoul10(splitter[2]));
+				face.flags = strtoul10(splitter[4]);
+				face.material = strtoul10(splitter[6]);
 
 
 				const char* s = (++splitter)->c_str();
 				const char* s = (++splitter)->c_str();
 				for(size_t i = 0; i < face.indices.size(); ++i) {
 				for(size_t i = 0; i < face.indices.size(); ++i) {
@@ -828,11 +828,11 @@ void COBImporter::ReadPolH_Ascii(Scene& out, LineSplitter& splitter, const Chunk
 					if ('<' != *s++) {
 					if ('<' != *s++) {
 						ThrowException("Expected < token in Face entry");
 						ThrowException("Expected < token in Face entry");
 					}
 					}
-					face.indices[i].pos_idx = strtol10(s,&s);
+					face.indices[i].pos_idx = strtoul10(s,&s);
 					if (',' != *s++) {
 					if (',' != *s++) {
 						ThrowException("Expected , token in Face entry");
 						ThrowException("Expected , token in Face entry");
 					}
 					}
-					face.indices[i].uv_idx = strtol10(s,&s);
+					face.indices[i].uv_idx = strtoul10(s,&s);
 					if ('>' != *s++) {
 					if ('>' != *s++) {
 						ThrowException("Expected < token in Face entry");
 						ThrowException("Expected < token in Face entry");
 					}
 					}
@@ -843,14 +843,14 @@ void COBImporter::ReadPolH_Ascii(Scene& out, LineSplitter& splitter, const Chunk
 			}
 			}
 		}
 		}
 		else if (splitter.match_start("DrawFlags")) {
 		else if (splitter.match_start("DrawFlags")) {
-			msh.draw_flags = strtol10(splitter[1]);
+			msh.draw_flags = strtoul10(splitter[1]);
 			break;
 			break;
 		}
 		}
 	}
 	}
 }
 }
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
-void COBImporter::ReadBitM_Ascii(Scene& out, LineSplitter& splitter, const ChunkInfo& nfo)
+void COBImporter::ReadBitM_Ascii(Scene& /*out*/, LineSplitter& splitter, const ChunkInfo& nfo)
 {
 {
 	if(nfo.version > 1) {
 	if(nfo.version > 1) {
 		return UnsupportedChunk_Ascii(splitter,nfo,"BitM");
 		return UnsupportedChunk_Ascii(splitter,nfo,"BitM");
@@ -863,7 +863,7 @@ void COBImporter::ReadBitM_Ascii(Scene& out, LineSplitter& splitter, const Chunk
 	"\nZippedThumbnail: %02hx 02hx %02hx "
 	"\nZippedThumbnail: %02hx 02hx %02hx "
 */
 */
 
 
-	const unsigned int head = strtol10((++splitter)[1]);
+	const unsigned int head = strtoul10((++splitter)[1]);
 	if (head != sizeof(Bitmap::BitmapHeader)) {
 	if (head != sizeof(Bitmap::BitmapHeader)) {
 		LogWarn_Ascii(splitter,"Unexpected ThumbNailHdrSize, skipping this chunk");
 		LogWarn_Ascii(splitter,"Unexpected ThumbNailHdrSize, skipping this chunk");
 		return;
 		return;
@@ -886,7 +886,7 @@ void COBImporter::ReadString_Binary(std::string& out, StreamReaderLE& reader)
 }
 }
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
-void COBImporter::ReadBasicNodeInfo_Binary(Node& msh, StreamReaderLE& reader, const ChunkInfo& nfo)
+void COBImporter::ReadBasicNodeInfo_Binary(Node& msh, StreamReaderLE& reader, const ChunkInfo& /*nfo*/)
 {
 {
 	const unsigned int dupes = reader.GetI2();
 	const unsigned int dupes = reader.GetI2();
 	ReadString_Binary(msh.name,reader);
 	ReadString_Binary(msh.name,reader);
@@ -1077,7 +1077,7 @@ void COBImporter::ReadPolH_Binary(COB::Scene& out, StreamReaderLE& reader, const
 }
 }
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
-void COBImporter::ReadBitM_Binary(COB::Scene& out, StreamReaderLE& reader, const ChunkInfo& nfo)
+void COBImporter::ReadBitM_Binary(COB::Scene& /*out*/, StreamReaderLE& reader, const ChunkInfo& nfo)
 {
 {
 	if(nfo.version > 1) {
 	if(nfo.version > 1) {
 		return UnsupportedChunk_Binary(reader,nfo,"BitM");
 		return UnsupportedChunk_Binary(reader,nfo,"BitM");

+ 2 - 7
ThirdParty/Assimp/code/COBLoader.h

@@ -68,16 +68,11 @@ namespace Assimp	{
 // -------------------------------------------------------------------------------------------
 // -------------------------------------------------------------------------------------------
 class COBImporter : public BaseImporter
 class COBImporter : public BaseImporter
 {
 {
-	friend class Importer;
-
-protected:
-
-	/** Constructor to be privately used by Importer */
+public:
 	COBImporter();
 	COBImporter();
-
-	/** Destructor, private as well */
 	~COBImporter();
 	~COBImporter();
 
 
+
 public:
 public:
 
 
 	// --------------------
 	// --------------------

+ 2 - 2
ThirdParty/Assimp/code/COBScene.h

@@ -71,7 +71,7 @@ struct Face
 /** COB chunk header information */
 /** COB chunk header information */
 struct ChunkInfo
 struct ChunkInfo
 {
 {
-	enum {NO_SIZE=0xffffffff};
+	enum {NO_SIZE=UINT_MAX};
 
 
 	ChunkInfo ()
 	ChunkInfo ()
 		:	id        (0)
 		:	id        (0)
@@ -218,7 +218,7 @@ struct Material : ChunkInfo
 	};
 	};
 
 
 	Material() : alpha(),exp(),ior(),ka(),ks(1.f),
 	Material() : alpha(),exp(),ior(),ka(),ks(1.f),
-		matnum(0xffffffff),
+		matnum(UINT_MAX),
 		shader(FLAT),autofacet(FACETED),
 		shader(FLAT),autofacet(FACETED),
 		autofacet_angle()
 		autofacet_angle()
 	{}
 	{}

+ 4 - 4
ThirdParty/Assimp/code/CSMLoader.cpp

@@ -90,7 +90,7 @@ void CSMImporter::GetExtensionList(std::set<std::string>& extensions)
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
 // Setup configuration properties for the loader
 // Setup configuration properties for the loader
-void CSMImporter::SetupProperties(const Importer* pImp)
+void CSMImporter::SetupProperties(const Importer* /*pImp*/)
 {
 {
 	// nothing to be done for the moment
 	// nothing to be done for the moment
 }
 }
@@ -125,11 +125,11 @@ void CSMImporter::InternReadFile( const std::string& pFile,
 			++buffer;
 			++buffer;
 			if (TokenMatchI(buffer,"firstframe",10))	{
 			if (TokenMatchI(buffer,"firstframe",10))	{
 				SkipSpaces(&buffer);
 				SkipSpaces(&buffer);
-				first = strtol10s(buffer,&buffer);
+				first = strtol10(buffer,&buffer);
 			}
 			}
 			else if (TokenMatchI(buffer,"lastframe",9))		{
 			else if (TokenMatchI(buffer,"lastframe",9))		{
 				SkipSpaces(&buffer);
 				SkipSpaces(&buffer);
-				last = strtol10s(buffer,&buffer);
+				last = strtol10(buffer,&buffer);
 			}
 			}
 			else if (TokenMatchI(buffer,"rate",4))	{
 			else if (TokenMatchI(buffer,"rate",4))	{
 				SkipSpaces(&buffer);
 				SkipSpaces(&buffer);
@@ -189,7 +189,7 @@ void CSMImporter::InternReadFile( const std::string& pFile,
 					}
 					}
 
 
 					// read frame
 					// read frame
-					const int frame = ::strtol10(buffer,&buffer);
+					const int frame = ::strtoul10(buffer,&buffer);
 					last  = std::max(frame,last);
 					last  = std::max(frame,last);
 					first = std::min(frame,last);
 					first = std::min(frame,last);
 					for (unsigned int i = 0; i < anim->mNumChannels;++i)	{
 					for (unsigned int i = 0; i < anim->mNumChannels;++i)	{

+ 2 - 5
ThirdParty/Assimp/code/CSMLoader.h

@@ -56,14 +56,11 @@ namespace Assimp	{
 */
 */
 class CSMImporter : public BaseImporter
 class CSMImporter : public BaseImporter
 {
 {
-	friend class Importer;
-protected:
-	/** Constructor to be privately used by Importer */
+public:
 	CSMImporter();
 	CSMImporter();
-
-	/** Destructor, private as well */
 	~CSMImporter();
 	~CSMImporter();
 
 
+
 public:
 public:
 	// -------------------------------------------------------------------
 	// -------------------------------------------------------------------
 	bool CanRead( const std::string& pFile, IOSystem* pIOHandler, 
 	bool CanRead( const std::string& pFile, IOSystem* pIOHandler, 

+ 18 - 9
ThirdParty/Assimp/code/CalcTangentsProcess.cpp

@@ -48,6 +48,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 // internal headers
 // internal headers
 #include "CalcTangentsProcess.h"
 #include "CalcTangentsProcess.h"
 #include "ProcessHelper.h"
 #include "ProcessHelper.h"
+#include "TinyFormatter.h"
 
 
 using namespace Assimp;
 using namespace Assimp;
 
 
@@ -77,9 +78,11 @@ bool CalcTangentsProcess::IsActive( unsigned int pFlags) const
 void CalcTangentsProcess::SetupProperties(const Importer* pImp)
 void CalcTangentsProcess::SetupProperties(const Importer* pImp)
 {
 {
 	// get the current value of the property
 	// get the current value of the property
-	this->configMaxAngle = pImp->GetPropertyFloat(AI_CONFIG_PP_CT_MAX_SMOOTHING_ANGLE,45.f);
-	this->configMaxAngle = std::max(std::min(this->configMaxAngle,45.0f),0.0f);
-	this->configMaxAngle = AI_DEG_TO_RAD(this->configMaxAngle);
+	configMaxAngle = pImp->GetPropertyFloat(AI_CONFIG_PP_CT_MAX_SMOOTHING_ANGLE,45.f);
+	configMaxAngle = std::max(std::min(configMaxAngle,45.0f),0.0f);
+	configMaxAngle = AI_DEG_TO_RAD(configMaxAngle);
+
+	configSourceUV = pImp->GetPropertyInteger(AI_CONFIG_PP_CT_TEXTURE_CHANNEL_INDEX,0);
 }
 }
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
@@ -92,7 +95,7 @@ void CalcTangentsProcess::Execute( aiScene* pScene)
 	for( unsigned int a = 0; a < pScene->mNumMeshes; a++)
 	for( unsigned int a = 0; a < pScene->mNumMeshes; a++)
 		if(ProcessMesh( pScene->mMeshes[a],a))bHas = true;
 		if(ProcessMesh( pScene->mMeshes[a],a))bHas = true;
 
 
-	if (bHas)DefaultLogger::get()->debug("CalcTangentsProcess finished. Tangents have been calculated");
+	if (bHas)DefaultLogger::get()->info("CalcTangentsProcess finished. Tangents have been calculated");
 	else DefaultLogger::get()->debug("CalcTangentsProcess finished");
 	else DefaultLogger::get()->debug("CalcTangentsProcess finished");
 }
 }
 
 
@@ -117,12 +120,18 @@ bool CalcTangentsProcess::ProcessMesh( aiMesh* pMesh, unsigned int meshIndex)
 		return false;
 		return false;
 	}
 	}
 
 
-	// what we can check, though, is if the mesh has normals and texture coord. That's a requirement
-	if( pMesh->mNormals == NULL || pMesh->mTextureCoords[0] == NULL)
+	// what we can check, though, is if the mesh has normals and texture coordinates. That's a requirement
+	if( pMesh->mNormals == NULL)
+	{
+		DefaultLogger::get()->error("Failed to compute tangents; need normals");
+		return false;
+	}
+	if( configSourceUV >= AI_MAX_NUMBER_OF_TEXTURECOORDS || !pMesh->mTextureCoords[configSourceUV] )
 	{
 	{
-		DefaultLogger::get()->error("Unable to compute tangents: UV0 and normals must be there ");
+		DefaultLogger::get()->error((Formatter::format("Failed to compute tangents; need UV data in channel"),configSourceUV));
 		return false;
 		return false;
 	}
 	}
+	 
 	const float angleEpsilon = 0.9999f;
 	const float angleEpsilon = 0.9999f;
 
 
 	std::vector<bool> vertexDone( pMesh->mNumVertices, false);
 	std::vector<bool> vertexDone( pMesh->mNumVertices, false);
@@ -134,7 +143,7 @@ bool CalcTangentsProcess::ProcessMesh( aiMesh* pMesh, unsigned int meshIndex)
 
 
 	const aiVector3D* meshPos = pMesh->mVertices;
 	const aiVector3D* meshPos = pMesh->mVertices;
 	const aiVector3D* meshNorm = pMesh->mNormals;
 	const aiVector3D* meshNorm = pMesh->mNormals;
-	const aiVector3D* meshTex = pMesh->mTextureCoords[0];
+	const aiVector3D* meshTex = pMesh->mTextureCoords[configSourceUV];
 	aiVector3D* meshTang = pMesh->mTangents;
 	aiVector3D* meshTang = pMesh->mTangents;
 	aiVector3D* meshBitang = pMesh->mBitangents;
 	aiVector3D* meshBitang = pMesh->mBitangents;
 	
 	
@@ -222,7 +231,7 @@ bool CalcTangentsProcess::ProcessMesh( aiMesh* pMesh, unsigned int meshIndex)
 	}
 	}
 	std::vector<unsigned int> verticesFound;
 	std::vector<unsigned int> verticesFound;
 
 
-	const float fLimit = cosf(this->configMaxAngle); 
+	const float fLimit = cosf(configMaxAngle); 
 	std::vector<unsigned int> closeVertices;
 	std::vector<unsigned int> closeVertices;
 
 
 	// in the second pass we now smooth out all tangents and bitangents at the same local position 
 	// in the second pass we now smooth out all tangents and bitangents at the same local position 

+ 2 - 5
ThirdParty/Assimp/code/CalcTangentsProcess.h

@@ -59,13 +59,9 @@ namespace Assimp
  */
  */
 class ASSIMP_API CalcTangentsProcess : public BaseProcess
 class ASSIMP_API CalcTangentsProcess : public BaseProcess
 {
 {
-	friend class Importer;
+public:
 
 
-protected:
-	/** Constructor to be privately used by Importer */
 	CalcTangentsProcess();
 	CalcTangentsProcess();
-
-	/** Destructor, private as well */
 	~CalcTangentsProcess();
 	~CalcTangentsProcess();
 
 
 public:
 public:
@@ -111,6 +107,7 @@ private:
 
 
 	/** Configuration option: maximum smoothing angle, in radians*/
 	/** Configuration option: maximum smoothing angle, in radians*/
 	float configMaxAngle;
 	float configMaxAngle;
+	unsigned int configSourceUV;
 };
 };
 
 
 } // end of namespace Assimp
 } // end of namespace Assimp

+ 374 - 0
ThirdParty/Assimp/code/ColladaExporter.cpp

@@ -0,0 +1,374 @@
+/*
+Open Asset Import Library (ASSIMP)
+----------------------------------------------------------------------
+
+Copyright (c) 2006-2010, ASSIMP Development Team
+All rights reserved.
+
+Redistribution and use of this software in source and binary forms, 
+with or without modification, are permitted provided that the 
+following conditions are met:
+
+* Redistributions of source code must retain the above
+  copyright notice, this list of conditions and the
+  following disclaimer.
+
+* Redistributions in binary form must reproduce the above
+  copyright notice, this list of conditions and the
+  following disclaimer in the documentation and/or other
+  materials provided with the distribution.
+
+* Neither the name of the ASSIMP team, nor the names of its
+  contributors may be used to endorse or promote products
+  derived from this software without specific prior
+  written permission of the ASSIMP Development Team.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+----------------------------------------------------------------------
+*/
+
+#include "AssimpPCH.h"
+
+#ifndef ASSIMP_BUILD_NO_EXPORT
+#ifndef ASSIMP_BUILD_NO_COLLADA_EXPORTER
+#include "ColladaExporter.h"
+
+using namespace Assimp;
+
+namespace Assimp
+{
+
+// ------------------------------------------------------------------------------------------------
+// Worker function for exporting a scene to Collada. Prototyped and registered in Exporter.cpp
+void ExportSceneCollada(const char* pFile,IOSystem* pIOSystem, const aiScene* pScene)
+{
+	// invoke the exporter 
+	ColladaExporter iDoTheExportThing( pScene);
+
+	// we're still here - export successfully completed. Write result to the given IOSYstem
+	boost::scoped_ptr<IOStream> outfile (pIOSystem->Open(pFile,"wt"));
+
+	// XXX maybe use a small wrapper around IOStream that behaves like std::stringstream in order to avoid the extra copy.
+	outfile->Write( iDoTheExportThing.mOutput.str().c_str(), static_cast<size_t>(iDoTheExportThing.mOutput.tellp()),1);
+}
+
+} // end of namespace Assimp
+
+
+// ------------------------------------------------------------------------------------------------
+// Constructor for a specific scene to export
+ColladaExporter::ColladaExporter( const aiScene* pScene)
+{
+	// make sure that all formatting happens using the standard, C locale and not the user's current locale
+	mOutput.imbue( std::locale("C") );
+
+	mScene = pScene;
+
+	// set up strings
+	endstr = "\n"; 
+
+	// start writing
+	WriteFile();
+}
+
+// ------------------------------------------------------------------------------------------------
+// Starts writing the contents
+void ColladaExporter::WriteFile()
+{
+	// write the DTD
+	mOutput << "<?xml version=\"1.0\"?>" << endstr;
+	// COLLADA element start
+	mOutput << "<COLLADA xmlns=\"http://www.collada.org/2005/11/COLLADASchema\" version=\"1.4.1\">" << endstr;
+	PushTag();
+
+	WriteHeader();
+
+	WriteGeometryLibrary();
+
+	WriteSceneLibrary();
+
+	// useless Collada bullshit at the end, just in case we haven't had enough indirections, yet. 
+	mOutput << startstr << "<scene>" << endstr;
+	PushTag();
+	mOutput << startstr << "<instance_visual_scene url=\"#myScene\" />" << endstr;
+	PopTag();
+	mOutput << startstr << "</scene>" << endstr;
+	PopTag();
+	mOutput << "</COLLADA>" << endstr;
+}
+
+// ------------------------------------------------------------------------------------------------
+// Writes the asset header
+void ColladaExporter::WriteHeader()
+{
+	// Dummy stuff. Nobody actually cares for it anyways
+	mOutput << startstr << "<asset>" << endstr;
+	PushTag();
+	mOutput << startstr << "<contributor>" << endstr;
+	PushTag();
+	mOutput << startstr << "<author>Someone</author>" << endstr;
+	mOutput << startstr << "<authoring_tool>Assimp Collada Exporter</authoring_tool>" << endstr;
+	PopTag();
+	mOutput << startstr << "</contributor>" << endstr;
+	mOutput << startstr << "<unit meter=\"1.0\" name=\"meter\" />" << endstr;
+	mOutput << startstr << "<up_axis>Y_UP</up_axis>" << endstr;
+	PopTag();
+	mOutput << startstr << "</asset>" << endstr;
+}
+
+// ------------------------------------------------------------------------------------------------
+// Writes the geometry library
+void ColladaExporter::WriteGeometryLibrary()
+{
+	mOutput << startstr << "<library_geometries>" << endstr;
+	PushTag();
+
+	for( size_t a = 0; a < mScene->mNumMeshes; ++a)
+		WriteGeometry( a);
+
+	PopTag();
+	mOutput << startstr << "</library_geometries>" << endstr;
+}
+
+// ------------------------------------------------------------------------------------------------
+// Writes the given mesh
+void ColladaExporter::WriteGeometry( size_t pIndex)
+{
+	const aiMesh* mesh = mScene->mMeshes[pIndex];
+	std::string idstr = GetMeshId( pIndex);
+
+	// opening tag
+	mOutput << startstr << "<geometry id=\"" << idstr << "\" name=\"" << idstr << "_name\" >" << endstr;
+	PushTag();
+
+	mOutput << startstr << "<mesh>" << endstr;
+	PushTag();
+
+	// Positions
+	WriteFloatArray( idstr + "-positions", FloatType_Vector, (float*) mesh->mVertices, mesh->mNumVertices);
+	// Normals, if any
+	if( mesh->HasNormals() )
+		WriteFloatArray( idstr + "-normals", FloatType_Vector, (float*) mesh->mNormals, mesh->mNumVertices);
+
+	// texture coords
+	for( size_t a = 0; a < AI_MAX_NUMBER_OF_TEXTURECOORDS; ++a)
+	{
+		if( mesh->HasTextureCoords( a) )
+		{
+			WriteFloatArray( idstr + "-tex" + boost::lexical_cast<std::string> (a), mesh->mNumUVComponents[a] == 3 ? FloatType_TexCoord3 : FloatType_TexCoord2,
+				(float*) mesh->mTextureCoords[a], mesh->mNumVertices);
+		}
+	}
+
+	// vertex colors
+	for( size_t a = 0; a < AI_MAX_NUMBER_OF_TEXTURECOORDS; ++a)
+	{
+		if( mesh->HasVertexColors( a) )
+			WriteFloatArray( idstr + "-color" + boost::lexical_cast<std::string> (a), FloatType_Color, (float*) mesh->mColors[a], mesh->mNumVertices);
+	}
+
+	// assemble vertex structure
+	mOutput << startstr << "<vertices id=\"" << idstr << "-vertices" << "\">" << endstr;
+	PushTag();
+	mOutput << startstr << "<input semantic=\"POSITION\" source=\"#" << idstr << "-positions\" />" << endstr;
+	if( mesh->HasNormals() )
+		mOutput << startstr << "<input semantic=\"NORMAL\" source=\"#" << idstr << "-normals\" />" << endstr;
+	for( size_t a = 0; a < AI_MAX_NUMBER_OF_TEXTURECOORDS; ++a )
+	{
+		if( mesh->HasTextureCoords( a) )
+			mOutput << startstr << "<input semantic=\"TEXCOORD\" source=\"#" << idstr << "-tex" << a << "\" set=\"" << a << "\" />" << endstr;
+	}
+	for( size_t a = 0; a < AI_MAX_NUMBER_OF_COLOR_SETS; ++a )
+	{
+		if( mesh->HasVertexColors( a) )
+			mOutput << startstr << "<input semantic=\"COLOR\" source=\"#" << idstr << "-color" << a << "\" set=\"" << a << "\" />" << endstr;
+	}
+	
+	PopTag();
+	mOutput << startstr << "</vertices>" << endstr;
+
+	// write face setup
+	mOutput << startstr << "<polylist count=\"" << mesh->mNumFaces << "\" material=\"tellme\">" << endstr;
+	PushTag();
+	mOutput << startstr << "<input offset=\"0\" semantic=\"VERTEX\" source=\"#" << idstr << "-vertices\" />" << endstr;
+	
+	mOutput << startstr << "<vcount>";
+	for( size_t a = 0; a < mesh->mNumFaces; ++a )
+		mOutput << mesh->mFaces[a].mNumIndices << " ";
+	mOutput << "</vcount>" << endstr;
+	
+	mOutput << startstr << "<p>";
+	for( size_t a = 0; a < mesh->mNumFaces; ++a )
+	{
+		const aiFace& face = mesh->mFaces[a];
+		for( size_t b = 0; b < face.mNumIndices; ++b )
+			mOutput << face.mIndices[b] << " ";
+	}
+	mOutput << "</p>" << endstr;
+	PopTag();
+	mOutput << startstr << "</polylist>" << endstr;
+
+	// closing tags
+	PopTag();
+	mOutput << startstr << "</mesh>" << endstr;
+	PopTag();
+	mOutput << startstr << "</geometry>" << endstr;
+}
+
+// ------------------------------------------------------------------------------------------------
+// Writes a float array of the given type
+void ColladaExporter::WriteFloatArray( const std::string& pIdString, FloatDataType pType, const float* pData, size_t pElementCount)
+{
+	size_t floatsPerElement = 0;
+	switch( pType )
+	{
+		case FloatType_Vector: floatsPerElement = 3; break;
+		case FloatType_TexCoord2: floatsPerElement = 2; break;
+		case FloatType_TexCoord3: floatsPerElement = 3; break;
+		case FloatType_Color: floatsPerElement = 3; break;
+		default:
+			return;
+	}
+
+	std::string arrayId = pIdString + "-array";
+
+	mOutput << startstr << "<source id=\"" << pIdString << "\" name=\"" << pIdString << "\">" << endstr;
+	PushTag();
+
+	// source array
+	mOutput << startstr << "<float_array id=\"" << arrayId << "\" count=\"" << pElementCount * floatsPerElement << "\"> ";
+	PushTag();
+
+	if( pType == FloatType_TexCoord2 )
+	{
+		for( size_t a = 0; a < pElementCount; ++a )
+		{
+			mOutput << pData[a*3+0] << " ";
+			mOutput << pData[a*3+1] << " ";
+		}
+	} 
+	else if( pType == FloatType_Color )
+	{
+		for( size_t a = 0; a < pElementCount; ++a )
+		{
+			mOutput << pData[a*4+0] << " ";
+			mOutput << pData[a*4+1] << " ";
+			mOutput << pData[a*4+2] << " ";
+		}
+	}
+	else
+	{
+		for( size_t a = 0; a < pElementCount * floatsPerElement; ++a )
+			mOutput << pData[a] << " ";
+	}
+	mOutput << "</float_array>" << endstr; 
+	PopTag();
+
+	// the usual Collada bullshit. Let's bloat it even more!
+	mOutput << startstr << "<technique_common>" << endstr;
+	PushTag();
+	mOutput << startstr << "<accessor count=\"" << pElementCount << "\" offset=\"0\" source=\"#" << arrayId << "\" stride=\"" << floatsPerElement << "\">" << endstr;
+	PushTag();
+
+	switch( pType )
+	{
+		case FloatType_Vector:
+			mOutput << startstr << "<param name=\"X\" type=\"float\" />" << endstr;
+			mOutput << startstr << "<param name=\"Y\" type=\"float\" />" << endstr;
+			mOutput << startstr << "<param name=\"Z\" type=\"float\" />" << endstr;
+			break;
+
+		case FloatType_TexCoord2:
+			mOutput << startstr << "<param name=\"S\" type=\"float\" />" << endstr;
+			mOutput << startstr << "<param name=\"T\" type=\"float\" />" << endstr;
+			break;
+
+		case FloatType_TexCoord3:
+			mOutput << startstr << "<param name=\"S\" type=\"float\" />" << endstr;
+			mOutput << startstr << "<param name=\"T\" type=\"float\" />" << endstr;
+			mOutput << startstr << "<param name=\"P\" type=\"float\" />" << endstr;
+			break;
+
+		case FloatType_Color:
+			mOutput << startstr << "<param name=\"R\" type=\"float\" />" << endstr;
+			mOutput << startstr << "<param name=\"G\" type=\"float\" />" << endstr;
+			mOutput << startstr << "<param name=\"B\" type=\"float\" />" << endstr;
+			break;
+	}
+
+	PopTag();
+	mOutput << startstr << "</accessor>" << endstr;
+	PopTag();
+	mOutput << startstr << "</technique_common>" << endstr;
+	PopTag();
+	mOutput << startstr << "</source>" << endstr;
+}
+
+// ------------------------------------------------------------------------------------------------
+// Writes the scene library
+void ColladaExporter::WriteSceneLibrary()
+{
+	mOutput << startstr << "<library_visual_scenes>" << endstr;
+	PushTag();
+	mOutput << startstr << "<visual_scene id=\"myScene\" name=\"myScene\">" << endstr;
+	PushTag();
+
+	// start recursive write at the root node
+	WriteNode( mScene->mRootNode);
+
+	PopTag();
+	mOutput << startstr << "</visual_scene>" << endstr;
+	PopTag();
+	mOutput << startstr << "</library_visual_scenes>" << endstr;
+}
+
+// ------------------------------------------------------------------------------------------------
+// Recursively writes the given node
+void ColladaExporter::WriteNode( const aiNode* pNode)
+{
+	mOutput << startstr << "<node id=\"" << pNode->mName.data << "\" name=\"" << pNode->mName.data << "\">" << endstr;
+	PushTag();
+
+	// write transformation - we can directly put the matrix there
+	// TODO: (thom) decompose into scale - rot - quad to allow adressing it by animations afterwards
+	const aiMatrix4x4& mat = pNode->mTransformation;
+	mOutput << startstr << "<matrix>";
+	mOutput << mat.a1 << " " << mat.a2 << " " << mat.a3 << " " << mat.a4 << " ";
+	mOutput << mat.b1 << " " << mat.b2 << " " << mat.b3 << " " << mat.b4 << " ";
+	mOutput << mat.c1 << " " << mat.c2 << " " << mat.c3 << " " << mat.c4 << " ";
+	mOutput << mat.d1 << " " << mat.d2 << " " << mat.d3 << " " << mat.d4;
+	mOutput << "</matrix>" << endstr;
+
+	// instance every geometry
+	for( size_t a = 0; a < pNode->mNumMeshes; ++a )
+	{
+		// const aiMesh* mesh = mScene->mMeshes[pNode->mMeshes[a]];
+		mOutput << startstr << "<instance_geometry url=\"#" << GetMeshId( a) << "\">" << endstr;
+		PushTag();
+
+		PopTag();
+		mOutput << startstr << "</instance_geometry>" << endstr;
+	}
+
+	// recurse into subnodes
+	for( size_t a = 0; a < pNode->mNumChildren; ++a )
+		WriteNode( pNode->mChildren[a]);
+
+	PopTag();
+	mOutput << startstr << "</node>" << endstr;
+}
+
+#endif
+#endif
+

+ 112 - 0
ThirdParty/Assimp/code/ColladaExporter.h

@@ -0,0 +1,112 @@
+/*
+Open Asset Import Library (ASSIMP)
+----------------------------------------------------------------------
+
+Copyright (c) 2006-2010, ASSIMP Development Team
+All rights reserved.
+
+Redistribution and use of this software in source and binary forms, 
+with or without modification, are permitted provided that the 
+following conditions are met:
+
+* Redistributions of source code must retain the above
+  copyright notice, this list of conditions and the
+  following disclaimer.
+
+* Redistributions in binary form must reproduce the above
+  copyright notice, this list of conditions and the
+  following disclaimer in the documentation and/or other
+  materials provided with the distribution.
+
+* Neither the name of the ASSIMP team, nor the names of its
+  contributors may be used to endorse or promote products
+  derived from this software without specific prior
+  written permission of the ASSIMP Development Team.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+----------------------------------------------------------------------
+*/
+
+/** @file ColladaExporter.h
+ * Declares the exporter class to write a scene to a Collada file
+ */
+#ifndef AI_COLLADAEXPORTER_H_INC
+#define AI_COLLADAEXPORTER_H_INC
+
+#include "../include/aiAssert.h"
+#include <sstream>
+
+struct aiScene;
+struct aiNode;
+
+namespace Assimp	
+{
+
+/// Helper class to export a given scene to a Collada file. Just for my personal
+/// comfort when implementing it.
+class ASSIMP_API ColladaExporter
+{
+public:
+	/// Constructor for a specific scene to export
+	ColladaExporter( const aiScene* pScene);
+
+protected:
+	/// Starts writing the contents
+	void WriteFile();
+
+	/// Writes the asset header
+	void WriteHeader();
+
+	/// Writes the geometry library
+	void WriteGeometryLibrary();
+
+	/// Writes the given mesh
+	void WriteGeometry( size_t pIndex);
+
+	enum FloatDataType { FloatType_Vector, FloatType_TexCoord2, FloatType_TexCoord3, FloatType_Color };
+
+	/// Writes a float array of the given type
+	void WriteFloatArray( const std::string& pIdString, FloatDataType pType, const float* pData, size_t pElementCount);
+
+	/// Writes the scene library
+	void WriteSceneLibrary();
+
+	/// Recursively writes the given node
+	void WriteNode( const aiNode* pNode);
+
+	/// Enters a new xml element, which increases the indentation
+	void PushTag() { startstr.append( "  "); }
+	/// Leaves an element, decreasing the indentation
+	void PopTag() { ai_assert( startstr.length() > 1); startstr.erase( startstr.length() - 2); }
+
+	/// Creates a mesh ID for the given mesh
+	std::string GetMeshId( size_t pIndex) const { return std::string( "meshId" ) + boost::lexical_cast<std::string> (pIndex); }
+
+public:
+	/// Stringstream to write all output into
+	std::stringstream mOutput;
+
+protected:
+	/// The scene to be written
+	const aiScene* mScene;
+
+	/// current line start string, contains the current indentation for simple stream insertion
+	std::string startstr;
+	/// current line end string for simple stream insertion
+	std::string endstr;
+};
+
+}
+
+#endif // !! AI_COLLADAEXPORTER_H_INC

+ 2 - 2
ThirdParty/Assimp/code/ColladaHelper.h

@@ -429,7 +429,7 @@ struct Sampler
 		,	mMirrorU	()
 		,	mMirrorU	()
 		,	mMirrorV	()
 		,	mMirrorV	()
 		,	mOp			(aiTextureOp_Multiply)
 		,	mOp			(aiTextureOp_Multiply)
-		,	mUVId		(0xffffffff)
+		,	mUVId		(UINT_MAX)
 		,	mWeighting  (1.f)
 		,	mWeighting  (1.f)
 		,	mMixWithPrevious (1.f)
 		,	mMixWithPrevious (1.f)
 	{}
 	{}
@@ -466,7 +466,7 @@ struct Sampler
 	 */
 	 */
 	std::string mUVChannel;
 	std::string mUVChannel;
 
 
-	/** Resolved UV channel index or 0xffffffff if not known
+	/** Resolved UV channel index or UINT_MAX if not known
 	 */
 	 */
 	unsigned int mUVId;
 	unsigned int mUVId;
 
 

+ 8 - 17
ThirdParty/Assimp/code/ColladaLoader.cpp

@@ -948,13 +948,14 @@ void ColladaLoader::CreateAnimation( aiScene* pScene, const ColladaParser& pPars
 			}
 			}
 
 
 			// determine which transform step is affected by this channel
 			// determine which transform step is affected by this channel
-			entry.mTransformIndex = 0xffffffff;
+			entry.mTransformIndex = SIZE_MAX;
 			for( size_t a = 0; a < srcNode->mTransforms.size(); ++a)
 			for( size_t a = 0; a < srcNode->mTransforms.size(); ++a)
 				if( srcNode->mTransforms[a].mID == entry.mTransformId)
 				if( srcNode->mTransforms[a].mID == entry.mTransformId)
 					entry.mTransformIndex = a;
 					entry.mTransformIndex = a;
 
 
-			if( entry.mTransformIndex == 0xffffffff)
+			if( entry.mTransformIndex == SIZE_MAX) {
 				continue;
 				continue;
+			}
 
 
 			entry.mChannel = &(*cit);
 			entry.mChannel = &(*cit);
 			entries.push_back( entry);
 			entries.push_back( entry);
@@ -1154,18 +1155,18 @@ void ColladaLoader::AddTexture ( Assimp::MaterialHelper& mat, const ColladaParse
 	mat.AddProperty((float*)&sampler.mWeighting , 1,
 	mat.AddProperty((float*)&sampler.mWeighting , 1,
 		_AI_MATKEY_TEXBLEND_BASE, type, idx);
 		_AI_MATKEY_TEXBLEND_BASE, type, idx);
 
 
-	// UV source index ... if we didn't resolve the mapping it is actually just 
+	// UV source index ... if we didn't resolve the mapping, it is actually just 
 	// a guess but it works in most cases. We search for the frst occurence of a
 	// a guess but it works in most cases. We search for the frst occurence of a
 	// number in the channel name. We assume it is the zero-based index into the
 	// number in the channel name. We assume it is the zero-based index into the
 	// UV channel array of all corresponding meshes. It could also be one-based
 	// UV channel array of all corresponding meshes. It could also be one-based
 	// for some exporters, but we won't care of it unless someone complains about.
 	// for some exporters, but we won't care of it unless someone complains about.
-	if (sampler.mUVId != 0xffffffff)
+	if (sampler.mUVId != UINT_MAX)
 		map = sampler.mUVId;
 		map = sampler.mUVId;
 	else {
 	else {
 		map = -1;
 		map = -1;
 		for (std::string::const_iterator it = sampler.mUVChannel.begin();it != sampler.mUVChannel.end(); ++it){
 		for (std::string::const_iterator it = sampler.mUVChannel.begin();it != sampler.mUVChannel.end(); ++it){
 			if (IsNumeric(*it)) {
 			if (IsNumeric(*it)) {
-				map = strtol10(&(*it));
+				map = strtoul10(&(*it));
 				break;
 				break;
 			}
 			}
 		}
 		}
@@ -1179,7 +1180,7 @@ void ColladaLoader::AddTexture ( Assimp::MaterialHelper& mat, const ColladaParse
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
 // Fills materials from the collada material definitions
 // Fills materials from the collada material definitions
-void ColladaLoader::FillMaterials( const ColladaParser& pParser, aiScene* pScene)
+void ColladaLoader::FillMaterials( const ColladaParser& pParser, aiScene* /*pScene*/)
 {
 {
 	for (std::vector<std::pair<Collada::Effect*, aiMaterial*> >::iterator it = newMats.begin(),
 	for (std::vector<std::pair<Collada::Effect*, aiMaterial*> >::iterator it = newMats.begin(),
 		end = newMats.end(); it != end; ++it)
 		end = newMats.end(); it != end; ++it)
@@ -1271,7 +1272,7 @@ void ColladaLoader::FillMaterials( const ColladaParser& pParser, aiScene* pScene
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
 // Constructs materials from the collada material definitions
 // Constructs materials from the collada material definitions
-void ColladaLoader::BuildMaterials( const ColladaParser& pParser, aiScene* pScene)
+void ColladaLoader::BuildMaterials( const ColladaParser& pParser, aiScene* /*pScene*/)
 {
 {
 	newMats.reserve(pParser.mMaterialLibrary.size());
 	newMats.reserve(pParser.mMaterialLibrary.size());
 
 
@@ -1289,16 +1290,6 @@ void ColladaLoader::BuildMaterials( const ColladaParser& pParser, aiScene* pScen
 		aiString name( matIt->first);
 		aiString name( matIt->first);
 		mat->AddProperty(&name,AI_MATKEY_NAME);
 		mat->AddProperty(&name,AI_MATKEY_NAME);
 
 
-		// MEGA SUPER MONSTER HACK by Alex ... It's all my fault, yes.
-		// We store the reference to the effect in the material and
-		// return ... we'll add the actual material properties later
-		// after we processed all meshes. During mesh processing,
-		// we evaluate vertex input mappings. Afterwards we should be
-		// able to correctly setup source UV channels for textures.
-
-		// ... moved to ColladaLoader::FillMaterials()
-		// *duck*
-
 		// store the material
 		// store the material
 		mMaterialIndexByName[matIt->first] = newMats.size();
 		mMaterialIndexByName[matIt->first] = newMats.size();
 		newMats.push_back( std::pair<Collada::Effect*, aiMaterial*>(const_cast<Collada::Effect*>(&effect),mat) );
 		newMats.push_back( std::pair<Collada::Effect*, aiMaterial*>(const_cast<Collada::Effect*>(&effect),mat) );

+ 2 - 6
ThirdParty/Assimp/code/ColladaLoader.h

@@ -78,15 +78,11 @@ struct ColladaMeshIndex
 */
 */
 class ColladaLoader : public BaseImporter
 class ColladaLoader : public BaseImporter
 {
 {
-	friend class Importer;
-
-protected:
-	/** Constructor to be privately used by Importer */
+public:
 	ColladaLoader();
 	ColladaLoader();
-
-	/** Destructor, private as well */
 	~ColladaLoader();
 	~ColladaLoader();
 
 
+
 public:
 public:
 	/** Returns whether the class can handle the format of the given file. 
 	/** Returns whether the class can handle the format of the given file. 
 	 * See BaseImporter::CanRead() for details.	*/
 	 * See BaseImporter::CanRead() for details.	*/

+ 9 - 9
ThirdParty/Assimp/code/ColladaParser.cpp

@@ -638,7 +638,7 @@ void ColladaParser::ReadControllerWeights( Collada::Controller& pController)
 					if( *text == 0)
 					if( *text == 0)
 						ThrowException( "Out of data while reading vcount");
 						ThrowException( "Out of data while reading vcount");
 
 
-					*it = strtol10( text, &text);
+					*it = strtoul10( text, &text);
 					numWeights += *it;
 					numWeights += *it;
 					SkipSpacesAndLineEnd( &text);
 					SkipSpacesAndLineEnd( &text);
 				}
 				}
@@ -657,11 +657,11 @@ void ColladaParser::ReadControllerWeights( Collada::Controller& pController)
 				{
 				{
 					if( *text == 0)
 					if( *text == 0)
 						ThrowException( "Out of data while reading vertex_weights");
 						ThrowException( "Out of data while reading vertex_weights");
-					it->first = strtol10( text, &text);
+					it->first = strtoul10( text, &text);
 					SkipSpacesAndLineEnd( &text);
 					SkipSpacesAndLineEnd( &text);
 					if( *text == 0)
 					if( *text == 0)
 						ThrowException( "Out of data while reading vertex_weights");
 						ThrowException( "Out of data while reading vertex_weights");
-					it->second = strtol10( text, &text);
+					it->second = strtoul10( text, &text);
 					SkipSpacesAndLineEnd( &text);
 					SkipSpacesAndLineEnd( &text);
 				}
 				}
 
 
@@ -1250,7 +1250,7 @@ void ColladaParser::ReadSamplerProperties( Sampler& out )
 				TestClosing( "wrapU");
 				TestClosing( "wrapU");
 			}
 			}
 			else if( IsElement( "wrapV"))	{
 			else if( IsElement( "wrapV"))	{
-				out.mWrapU = ReadBoolFromTextContent();
+				out.mWrapV = ReadBoolFromTextContent();
 				TestClosing( "wrapV");
 				TestClosing( "wrapV");
 			}
 			}
 			else if( IsElement( "mirrorU"))		{
 			else if( IsElement( "mirrorU"))		{
@@ -1258,7 +1258,7 @@ void ColladaParser::ReadSamplerProperties( Sampler& out )
 				TestClosing( "mirrorU");
 				TestClosing( "mirrorU");
 			}
 			}
 			else if( IsElement( "mirrorV"))	{
 			else if( IsElement( "mirrorV"))	{
-				out.mMirrorU = ReadBoolFromTextContent();
+				out.mMirrorV = ReadBoolFromTextContent();
 				TestClosing( "mirrorV");
 				TestClosing( "mirrorV");
 			}
 			}
 			else if( IsElement( "repeatU"))	{
 			else if( IsElement( "repeatU"))	{
@@ -1274,7 +1274,7 @@ void ColladaParser::ReadSamplerProperties( Sampler& out )
 				TestClosing( "offsetU");
 				TestClosing( "offsetU");
 			}
 			}
 			else if( IsElement( "offsetV"))	{
 			else if( IsElement( "offsetV"))	{
-				out.mTransform.mTranslation.x = ReadFloatFromTextContent();
+				out.mTransform.mTranslation.y = ReadFloatFromTextContent();
 				TestClosing( "offsetV");
 				TestClosing( "offsetV");
 			}
 			}
 			else if( IsElement( "rotateUV"))	{
 			else if( IsElement( "rotateUV"))	{
@@ -1887,7 +1887,7 @@ void ColladaParser::ReadIndexData( Mesh* pMesh)
 						if( *content == 0)
 						if( *content == 0)
 							ThrowException( "Expected more values while reading vcount contents.");
 							ThrowException( "Expected more values while reading vcount contents.");
 						// read a number
 						// read a number
-						vcount.push_back( (size_t) strtol10( content, &content));
+						vcount.push_back( (size_t) strtoul10( content, &content));
 						// skip whitespace after it
 						// skip whitespace after it
 						SkipSpacesAndLineEnd( &content);
 						SkipSpacesAndLineEnd( &content);
 					}
 					}
@@ -1968,7 +1968,7 @@ void ColladaParser::ReadPrimitives( Mesh* pMesh, std::vector<InputChannel>& pPer
 	// determine number of indices coming per vertex 
 	// determine number of indices coming per vertex 
 	// find the offset index for all per-vertex channels
 	// find the offset index for all per-vertex channels
 	size_t numOffsets = 1;
 	size_t numOffsets = 1;
-	size_t perVertexOffset = 0xffffffff; // invalid value
+	size_t perVertexOffset = SIZE_MAX; // invalid value
 	BOOST_FOREACH( const InputChannel& channel, pPerIndexChannels)
 	BOOST_FOREACH( const InputChannel& channel, pPerIndexChannels)
 	{
 	{
 		numOffsets = std::max( numOffsets, channel.mOffset+1);
 		numOffsets = std::max( numOffsets, channel.mOffset+1);
@@ -2007,7 +2007,7 @@ void ColladaParser::ReadPrimitives( Mesh* pMesh, std::vector<InputChannel>& pPer
 	{
 	{
 		// read a value. 
 		// read a value. 
     // Hack: (thom) Some exporters put negative indices sometimes. We just try to carry on anyways.
     // Hack: (thom) Some exporters put negative indices sometimes. We just try to carry on anyways.
-    int value = std::max( 0, strtol10s( content, &content));
+    int value = std::max( 0, strtol10( content, &content));
 		indices.push_back( size_t( value));
 		indices.push_back( size_t( value));
 		// skip whitespace after it
 		// skip whitespace after it
 		SkipSpacesAndLineEnd( &content);
 		SkipSpacesAndLineEnd( &content);

+ 3 - 3
ThirdParty/Assimp/code/ComputeUVMappingProcess.cpp

@@ -98,7 +98,7 @@ inline unsigned int FindEmptyUVChannel (aiMesh* mesh)
 		if (!mesh->mTextureCoords[m])return m;
 		if (!mesh->mTextureCoords[m])return m;
 	
 	
 	DefaultLogger::get()->error("Unable to compute UV coordinates, no free UV slot found");
 	DefaultLogger::get()->error("Unable to compute UV coordinates, no free UV slot found");
-	return 0xffffffff;
+	return UINT_MAX;
 }
 }
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
@@ -380,7 +380,7 @@ void ComputeUVMappingProcess::ComputePlaneMapping(aiMesh* mesh,const aiVector3D&
 }
 }
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
-void ComputeUVMappingProcess::ComputeBoxMapping(aiMesh* mesh, aiVector3D* out)
+void ComputeUVMappingProcess::ComputeBoxMapping(aiMesh* /*mesh*/, aiVector3D* /*out*/)
 {
 {
 	DefaultLogger::get()->error("Mapping type currently not implemented");
 	DefaultLogger::get()->error("Mapping type currently not implemented");
 }
 }
@@ -455,7 +455,7 @@ void ComputeUVMappingProcess::Execute( aiScene* pScene)
 						{
 						{
 							aiMesh* mesh = pScene->mMeshes[m];
 							aiMesh* mesh = pScene->mMeshes[m];
 							unsigned int outIdx;
 							unsigned int outIdx;
-							if ( mesh->mMaterialIndex != i || ( outIdx = FindEmptyUVChannel(mesh) ) == 0xffffffff ||
+							if ( mesh->mMaterialIndex != i || ( outIdx = FindEmptyUVChannel(mesh) ) == UINT_MAX ||
 								!mesh->mNumVertices)
 								!mesh->mNumVertices)
 							{
 							{
 								continue;
 								continue;

+ 2 - 7
ThirdParty/Assimp/code/ComputeUVMappingProcess.h

@@ -56,17 +56,12 @@ namespace Assimp
 */
 */
 class ASSIMP_API ComputeUVMappingProcess : public BaseProcess
 class ASSIMP_API ComputeUVMappingProcess : public BaseProcess
 {
 {
-	friend class Importer;
-	friend class ::ComputeUVMappingTest; // grant the unit test full access to us
-
-protected:
-	/** Constructor to be privately used by Importer */
+public:
 	ComputeUVMappingProcess();
 	ComputeUVMappingProcess();
-
-	/** Destructor, private as well */
 	~ComputeUVMappingProcess();
 	~ComputeUVMappingProcess();
 
 
 public:
 public:
+
 	// -------------------------------------------------------------------
 	// -------------------------------------------------------------------
 	/** Returns whether the processing step is present in the given flag field.
 	/** Returns whether the processing step is present in the given flag field.
 	* @param pFlags The processing flags the importer was called with. A bitwise
 	* @param pFlags The processing flags the importer was called with. A bitwise

+ 1 - 4
ThirdParty/Assimp/code/ConvertToLHProcess.h

@@ -69,13 +69,10 @@ namespace Assimp	{
  */
  */
 class ASSIMP_API MakeLeftHandedProcess : public BaseProcess
 class ASSIMP_API MakeLeftHandedProcess : public BaseProcess
 {
 {
-	friend class Importer;
+	
 
 
 public:
 public:
-	/** Constructor to be privately used by Importer */
 	MakeLeftHandedProcess();
 	MakeLeftHandedProcess();
-
-	/** Destructor, private as well */
 	~MakeLeftHandedProcess();
 	~MakeLeftHandedProcess();
 
 
 	// -------------------------------------------------------------------
 	// -------------------------------------------------------------------

+ 230 - 0
ThirdParty/Assimp/code/DXFHelper.h

@@ -0,0 +1,230 @@
+/*
+Open Asset Import Library (ASSIMP)
+----------------------------------------------------------------------
+
+Copyright (c) 2006-2010, ASSIMP Development Team
+All rights reserved.
+
+Redistribution and use of this software in source and binary forms, 
+with or without modification, are permitted provided that the 
+following conditions are met:
+
+* Redistributions of source code must retain the above
+  copyright notice, this list of conditions and the
+  following disclaimer.
+
+* Redistributions in binary form must reproduce the above
+  copyright notice, this list of conditions and the
+  following disclaimer in the documentation and/or other
+  materials provided with the distribution.
+
+* Neither the name of the ASSIMP team, nor the names of its
+  contributors may be used to endorse or promote products
+  derived from this software without specific prior
+  written permission of the ASSIMP Development Team.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+----------------------------------------------------------------------
+*/
+
+/** @file  DXFHelper.h 
+ *  @brief Internal utilities for the DXF loader.
+ */
+
+#ifndef INCLUDED_DXFHELPER_H
+#define INCLUDED_DXFHELPER_H
+
+#include "LineSplitter.h"
+#include "TinyFormatter.h"
+#include "StreamReader.h"
+
+namespace Assimp {
+	namespace DXF {
+
+
+// read pairs of lines, parse group code and value and provide utilities
+// to convert the data to the target data type.
+class LineReader
+{
+
+public:
+
+	LineReader(StreamReaderLE& reader)
+		 // do NOT skip empty lines. In DXF files, they count as valid data.
+		: splitter(reader,false,true)
+		, end()
+	{
+	}
+
+public:
+
+
+	// -----------------------------------------
+	bool Is(int gc, const char* what) const {
+		return groupcode == gc && !strcmp(what,value.c_str());
+	}
+
+	// -----------------------------------------
+	bool Is(int gc) const {
+		return groupcode == gc;
+	}
+
+	// -----------------------------------------
+	int GroupCode() const {
+		return groupcode;
+	}
+
+	// -----------------------------------------
+	const std::string& Value() const {
+		return value;
+	}
+
+	// -----------------------------------------
+	bool End() const {
+		return !((bool)*this);
+	}
+
+public:
+
+	// -----------------------------------------
+	unsigned int ValueAsUnsignedInt() const {
+		return strtoul10(value.c_str());
+	}
+
+	// -----------------------------------------
+	int ValueAsSignedInt() const {
+		return strtol10(value.c_str());
+	}
+
+	// -----------------------------------------
+	float ValueAsFloat() const {
+		return fast_atof(value.c_str());
+	}
+
+public:
+
+	// -----------------------------------------
+	/** pseudo-iterator increment to advance to the next (groupcode/value) pair */
+	LineReader& operator++() {
+		if (end) {
+			if (end == 1) {
+				++end;
+			}
+			return *this;
+		}
+
+		try {
+			groupcode = strtol10(splitter->c_str());
+			splitter++;
+
+			value = *splitter;
+			splitter++;
+
+			// automatically skip over {} meta blocks (these are for application use
+			// and currently not relevant for Assimp).
+			if (value.length() && value[0] == '{') {
+
+				size_t cnt = 0;
+				for(;splitter->length() && splitter->at(0) != '}'; splitter++, cnt++);
+
+				splitter++;
+				DefaultLogger::get()->debug((Formatter::format("DXF: skipped over control group ("),cnt," lines)"));
+			}
+		} catch(std::logic_error&) {
+			ai_assert(!splitter);
+		}
+		if (!splitter) {
+			end = 1;
+		}
+		return *this;
+	}
+
+	// -----------------------------------------
+	LineReader& operator++(int) {
+		return ++(*this);
+	}
+
+
+	// -----------------------------------------
+	operator bool() const {
+		return end <= 1;
+	}
+
+private:
+
+	LineSplitter splitter;
+	int groupcode;
+	std::string value;
+	int end;
+};
+
+
+
+// represents a POLYLINE or a LWPOLYLINE. or even a 3DFACE The data is converted as needed.
+struct PolyLine
+{
+	PolyLine()
+		: flags()
+	{}
+	
+	std::vector<aiVector3D> positions;
+	std::vector<aiColor4D>  colors;
+	std::vector<unsigned int> indices;
+	std::vector<unsigned int> counts;
+	unsigned int flags;
+
+	std::string layer;
+	std::string desc;
+};
+
+
+// reference to a BLOCK. Specifies its own coordinate system.
+struct InsertBlock
+{
+	InsertBlock()
+		: scale(1.f,1.f,1.f)
+		, angle()
+	{}
+
+	aiVector3D pos;
+	aiVector3D scale;
+	float angle;
+
+	std::string name;
+};
+
+
+// keeps track of all geometry in a single BLOCK.
+struct Block
+{
+	std::vector< boost::shared_ptr<PolyLine> > lines;
+	std::vector<InsertBlock> insertions;
+
+	std::string name;
+	aiVector3D base;
+};
+
+
+struct FileData
+{
+	// note: the LAST block always contains the stuff from ENTITIES.
+	std::vector<Block> blocks;
+};
+
+
+
+
+
+}}
+#endif

+ 631 - 342
ThirdParty/Assimp/code/DXFLoader.cpp

@@ -51,13 +51,19 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include "ConvertToLHProcess.h"
 #include "ConvertToLHProcess.h"
 #include "fast_atof.h"
 #include "fast_atof.h"
 
 
+#include "DXFHelper.h"
+
 using namespace Assimp;
 using namespace Assimp;
 
 
 // AutoCAD Binary DXF<CR><LF><SUB><NULL> 
 // AutoCAD Binary DXF<CR><LF><SUB><NULL> 
 #define AI_DXF_BINARY_IDENT ("AutoCAD Binary DXF\r\n\x1a\0")
 #define AI_DXF_BINARY_IDENT ("AutoCAD Binary DXF\r\n\x1a\0")
 #define AI_DXF_BINARY_IDENT_LEN (24)
 #define AI_DXF_BINARY_IDENT_LEN (24)
 
 
-// color indices for DXF - 16 are supported
+// default vertex color that all uncolored vertices will receive
+#define AI_DXF_DEFAULT_COLOR aiColor4D(0.6f,0.6f,0.6f,0.6f)
+
+// color indices for DXF - 16 are supported, the table is 
+// taken directly from the DXF spec.
 static aiColor4D g_aclrDxfIndexColors[] =
 static aiColor4D g_aclrDxfIndexColors[] =
 {
 {
 	aiColor4D (0.6f, 0.6f, 0.6f, 1.0f),
 	aiColor4D (0.6f, 0.6f, 0.6f, 1.0f),
@@ -78,9 +84,7 @@ static aiColor4D g_aclrDxfIndexColors[] =
 	aiColor4D (0.6f, 0.0f, 1.0f, 1.0f)  // violet
 	aiColor4D (0.6f, 0.0f, 1.0f, 1.0f)  // violet
 };
 };
 #define AI_DXF_NUM_INDEX_COLORS (sizeof(g_aclrDxfIndexColors)/sizeof(g_aclrDxfIndexColors[0]))
 #define AI_DXF_NUM_INDEX_COLORS (sizeof(g_aclrDxfIndexColors)/sizeof(g_aclrDxfIndexColors[0]))
-
-// invalid/unassigned color value
-aiColor4D g_clrInvalid = aiColor4D(get_qnan(),0.f,0.f,1.f);
+#define AI_DXF_ENTITIES_MAGIC_BLOCK "$ASSIMP_ENTITIES_MAGIC"
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
 // Constructor to be privately used by Importer
 // Constructor to be privately used by Importer
@@ -94,7 +98,7 @@ DXFImporter::~DXFImporter()
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
 // Returns whether the class can handle the format of the given file. 
 // Returns whether the class can handle the format of the given file. 
-bool DXFImporter::CanRead( const std::string& pFile, IOSystem* pIOHandler, bool checkSig) const
+bool DXFImporter::CanRead( const std::string& pFile, IOSystem* /*pIOHandler*/, bool /*checkSig*/) const
 {
 {
 	return SimpleExtensionCheck(pFile,"dxf");
 	return SimpleExtensionCheck(pFile,"dxf");
 }
 }
@@ -107,201 +111,288 @@ void DXFImporter::GetExtensionList(std::set<std::string>& extensions)
 }
 }
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
-// Get a copy of the next data line, skip strange data
-bool DXFImporter::GetNextLine()
+// Imports the given file into the given scene structure. 
+void DXFImporter::InternReadFile( const std::string& pFile, 
+	aiScene* pScene, 
+	IOSystem* pIOHandler)
 {
 {
-	if(!SkipLine(&buffer))
-		return false;
-	if(!SkipSpaces(&buffer))
-		return GetNextLine();
-	else if (*buffer == '{')	{
-		// some strange meta data ...
-		while (true)
-		{
-			if(!SkipLine(&buffer))
-				return false;
-
-			if(SkipSpaces(&buffer) && *buffer == '}')
-				break;
-		}
-		return GetNextLine();
+	boost::shared_ptr<IOStream> file = boost::shared_ptr<IOStream>( pIOHandler->Open( pFile) );
+	
+	// Check whether we can read the file
+	if( file.get() == NULL) {
+		throw DeadlyImportError( "Failed to open DXF file " + pFile + "");
 	}
 	}
-	return true;
-}
 
 
-// ------------------------------------------------------------------------------------------------
-// Get the next token in the file
-bool DXFImporter::GetNextToken()
-{
-	if (bRepeat)	{
-		bRepeat = false;
-		return true;
+	// check whether this is a binaray DXF file - we can't read binary DXF files :-(
+	char buff[AI_DXF_BINARY_IDENT_LEN+1] = {0};
+	file->Read(buff,AI_DXF_BINARY_IDENT_LEN,1);
+
+	if (!strncmp(AI_DXF_BINARY_IDENT,buff,AI_DXF_BINARY_IDENT_LEN)) {
+		throw DeadlyImportError("DXF: Binary files are not supported at the moment");
 	}
 	}
 
 
-	SkipSpaces(&buffer);
-	groupCode = strtol10s(buffer,&buffer);
-	if(!GetNextLine())
-		return false;
+	// DXF files can grow very large, so read them via the StreamReader,
+	// which will choose a suitable strategy.
+	file->Seek(0,aiOrigin_SET);
+	StreamReaderLE stream( file );
 	
 	
-	// copy the data line to a separate buffer
-	char* m = cursor, *end = &cursor[4096];
-	while (!IsSpaceOrNewLine( *buffer ) && m < end)
-		*m++ = *buffer++;
+	DXF::LineReader reader (stream);
+	DXF::FileData output;
+
+	// now get all lines of the file and process top-level sections
+	bool eof = false;
+	while(!reader.End()) {
+
+		// blocks table - these 'build blocks' are later (in ENTITIES)
+		// referenced an included via INSERT statements.
+		if (reader.Is(2,"BLOCKS")) {
+			ParseBlocks(reader,output);
+			continue;
+		}
 	
 	
-	*m = '\0';
-	GetNextLine(); 
-	return true;
+		// primary entity table
+		if (reader.Is(2,"ENTITIES")) {
+			ParseEntities(reader,output);
+			continue;
+		}
+
+		// skip unneeded sections entirely to avoid any problems with them 
+		// alltogether.
+		else if (reader.Is(2,"CLASSES") || reader.Is(2,"TABLES")) {
+			SkipSection(reader);
+			continue;
+		}
+
+		else if (reader.Is(2,"HEADER")) {
+			ParseHeader(reader,output);
+			continue;
+		}
+
+		// comments
+		else if (reader.Is(999)) {
+			DefaultLogger::get()->info("DXF Comment: " + reader.Value());
+		}
+
+		// don't read past the official EOF sign
+		else if (reader.Is(0,"EOF")) {
+			eof = true;
+			break;
+		}
+
+		++reader;
+	}
+	if (!eof) {
+		DefaultLogger::get()->warn("DXF: EOF reached, but did not encounter DXF EOF marker");
+	}
+
+	ConvertMeshes(pScene,output);
+
+	// Now rotate the whole scene by 90 degrees around the x axis to convert from AutoCAD's to Assimp's coordinate system
+	pScene->mRootNode->mTransformation = aiMatrix4x4(
+		1.f,0.f,0.f,0.f,
+		0.f,0.f,1.f,0.f,
+		0.f,-1.f,0.f,0.f,
+		0.f,0.f,0.f,1.f) * pScene->mRootNode->mTransformation;
 }
 }
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
-// Imports the given file into the given scene structure. 
-void DXFImporter::InternReadFile( const std::string& pFile, 
-	aiScene* pScene, IOSystem* pIOHandler)
+void DXFImporter::ConvertMeshes(aiScene* pScene, DXF::FileData& output)
 {
 {
-	boost::scoped_ptr<IOStream> file( pIOHandler->Open( pFile));
+	// the process of resolving all the INSERT statements can grow the
+	// polycount excessively, so log the original number.
+	// XXX Option to import blocks as separate nodes?
+	if (!DefaultLogger::isNullLogger()) {
+
+		unsigned int vcount = 0, icount = 0;
+		BOOST_FOREACH (const DXF::Block& bl, output.blocks) {
+			BOOST_FOREACH (boost::shared_ptr<const DXF::PolyLine> pl, bl.lines) {
+				vcount += pl->positions.size();
+				icount += pl->counts.size();
+			}
+		}
 
 
-	// Check whether we can read from the file
-	if( file.get() == NULL) {
-		throw DeadlyImportError( "Failed to open DXF file " + pFile + "");
+		DefaultLogger::get()->debug((Formatter::format("DXF: Unexpanded polycount is "),
+			icount,", vertex count is ",vcount
+		));
 	}
 	}
 
 
-	// read the contents of the file in a buffer
-	std::vector<char> buffer2;
-	TextFileToBuffer(file.get(),buffer2);
-	buffer = &buffer2[0];
+	if (! output.blocks.size()  ) {
+		throw DeadlyImportError("DXF: no data blocks loaded");
+	}
 
 
-	bRepeat = false;
-	mDefaultLayer = NULL;
+	// index blocks by name
+	DXF::BlockMap blocks_by_name;
+	BOOST_FOREACH (const DXF::Block& bl, output.blocks) {
+		blocks_by_name[bl.name] = &bl;
+	}
 
 
-	// check whether this is a binaray DXF file - we can't read binary DXF files :-(
-	if (!strncmp(AI_DXF_BINARY_IDENT,buffer,AI_DXF_BINARY_IDENT_LEN))
-		throw DeadlyImportError("DXF: Binary files are not supported at the moment");
+	const DXF::BlockMap::iterator bit = blocks_by_name.find(AI_DXF_ENTITIES_MAGIC_BLOCK);
+	if (bit == blocks_by_name.end()) {
+		throw DeadlyImportError("DXF: no ENTITIES data block loaded");
+	}
 
 
-	// now get all lines of the file
-	while (GetNextToken())	{
+	// ENTITIES is currently the only block that needs to be modified,
+	// this is the reason that blocks_by_name stores const by default.
+	DXF::Block& entities = const_cast<DXF::Block&>( *(*bit).second );
+	typedef std::map<std::string, unsigned int> LayerMap;
 
 
-		if (2 == groupCode)	{
+	LayerMap layers;
+	std::vector< std::vector< const DXF::PolyLine*> > corr;
 
 
-			// ENTITIES and BLOCKS sections - skip the whole rest, no need to waste our time with them
-			if (!::strcmp(cursor,"ENTITIES") || !::strcmp(cursor,"BLOCKS")) {
-				if (!ParseEntities())
-					break; 
-				else bRepeat = true;
-			}
+	// now expand all block references in the primary ENTITIES block
+	// XXX this involves heavy memory copying, consider a faster solution for future versions.
+	ExpandBlockReferences(entities,blocks_by_name);
 
 
-			// other sections - skip them to make sure there will be no name conflicts
-			else	{
-				while ( GetNextToken())	{
-					if (!::strcmp(cursor,"ENDSEC"))
-						break;
-				}
+	unsigned int cur = 0;
+	BOOST_FOREACH (boost::shared_ptr<const DXF::PolyLine> pl, entities.lines) {
+		if (pl->positions.size()) {
+
+			std::map<std::string, unsigned int>::iterator it = layers.find(pl->layer);
+			if (it == layers.end()) {
+				++pScene->mNumMeshes;
+
+				layers[pl->layer] = cur++;
+
+				std::vector< const DXF::PolyLine* > pv;
+				pv.push_back(&*pl);
+
+				corr.push_back(pv);
+			}
+			else {
+				corr[(*it).second].push_back(&*pl);
 			}
 			}
 		}
 		}
-		// print comment strings
-		else if (999 == groupCode)	{
-			DefaultLogger::get()->info(std::string( cursor ));
-		}
-		else if (!groupCode && !::strcmp(cursor,"EOF"))
-			break;
 	}
 	}
 
 
-	// find out how many valud layers we have
-	for (std::vector<LayerInfo>::const_iterator it = mLayers.begin(),end = mLayers.end(); it != end;++it)	{
-		if (!(*it).vPositions.empty())
-			++pScene->mNumMeshes;
+	if (!pScene->mNumMeshes) {
+		throw DeadlyImportError("DXF: this file contains no 3d data");
 	}
 	}
 
 
-	if (!pScene->mNumMeshes)
-		throw DeadlyImportError("DXF: this file contains no 3d data");
+	pScene->mMeshes = new aiMesh*[ pScene->mNumMeshes ] ();
 
 
-	pScene->mMeshes = new aiMesh*[ pScene->mNumMeshes ];
-	unsigned int m = 0;
-	for (std::vector<LayerInfo>::const_iterator it = mLayers.begin(),end = mLayers.end();it != end;++it) {
-		if ((*it).vPositions.empty()) {
-			continue;
-		}
-		// generate the output mesh
-		aiMesh* pMesh = pScene->mMeshes[m++] = new aiMesh();
-		const std::vector<aiVector3D>& vPositions = (*it).vPositions;
-		const std::vector<aiColor4D>& vColors = (*it).vColors;
-
-		// check whether we need vertex colors here
-		aiColor4D* clrOut = NULL;
-		const aiColor4D* clr = NULL;
-		for (std::vector<aiColor4D>::const_iterator it2 = (*it).vColors.begin(), end2 = (*it).vColors.end();it2 != end2; ++it2)	{
-			
-			if ((*it2).r == (*it2).r) /* qnan? */ {
-				clrOut = pMesh->mColors[0] = new aiColor4D[vPositions.size()];
-				for (unsigned int i = 0; i < vPositions.size();++i)
-					clrOut[i] = aiColor4D(0.6f,0.6f,0.6f,1.0f);
-
-				clr = &vColors[0];
-				break;
-			}
+	BOOST_FOREACH(const LayerMap::value_type& elem, layers){
+		aiMesh* const mesh =  pScene->mMeshes[elem.second] = new aiMesh();
+		mesh->mName.Set(elem.first);
+
+		unsigned int cvert = 0,cface = 0;
+		BOOST_FOREACH(const DXF::PolyLine* pl, corr[elem.second]){
+			// sum over all faces since we need to 'verbosify' them.
+			cvert += std::accumulate(pl->counts.begin(),pl->counts.end(),0); 
+			cface += pl->counts.size();
 		}
 		}
 
 
-		pMesh->mNumFaces = (unsigned int)vPositions.size() / 4u;
-		pMesh->mFaces = new aiFace[pMesh->mNumFaces];
+		aiVector3D* verts = mesh->mVertices = new aiVector3D[cvert];
+		aiColor4D* colors = mesh->mColors[0] = new aiColor4D[cvert];
+		aiFace* faces = mesh->mFaces = new aiFace[cface];
 
 
-		aiVector3D* vpOut = pMesh->mVertices = new aiVector3D[vPositions.size()];
-		const aiVector3D* vp = &vPositions[0];
+		mesh->mNumVertices = cvert;
+		mesh->mNumFaces = cface;
 
 
-		for (unsigned int i = 0; i < pMesh->mNumFaces;++i)	{
-			aiFace& face = pMesh->mFaces[i];
+		unsigned int prims = 0;
+		unsigned int overall_indices = 0;
+		BOOST_FOREACH(const DXF::PolyLine* pl, corr[elem.second]){
 
 
-			// check whether we need four, three or two indices here
-			if (vp[1] == vp[2])	{
-				face.mNumIndices = 2;
-			}
-			else if (vp[3] == vp[2])	{
-				 face.mNumIndices = 3;
-			}
-			else face.mNumIndices = 4;
-			face.mIndices = new unsigned int[face.mNumIndices];
-
-			for (unsigned int a = 0; a < face.mNumIndices;++a)	{
-				*vpOut++ = vp[a];
-				if (clr)	{
-					if (is_not_qnan( clr[a].r )) {
-						*clrOut = clr[a];
+			std::vector<unsigned int>::const_iterator it = pl->indices.begin();
+			BOOST_FOREACH(unsigned int facenumv,pl->counts) {
+				aiFace& face = *faces++;
+				face.mIndices = new unsigned int[face.mNumIndices = facenumv];
+
+				for (unsigned int i = 0; i < facenumv; ++i) {
+					face.mIndices[i] = overall_indices++;
+
+					ai_assert(pl->positions.size() == pl->colors.size());
+					if (*it >= pl->positions.size()) {
+						throw DeadlyImportError("DXF: vertex index out of bounds");
 					}
 					}
-					++clrOut;
+
+					*verts++ = pl->positions[*it];
+					*colors++ = pl->colors[*it++];
+				}
+
+				// set primitive flags now, this saves the extra pass in ScenePreprocessor.
+				switch(face.mNumIndices) {
+					case 1:
+						prims |= aiPrimitiveType_POINT;
+						break;
+					case 2:
+						prims |= aiPrimitiveType_LINE;
+						break;
+					case 3:
+						prims |= aiPrimitiveType_TRIANGLE;
+						break;
+					default:
+						prims |= aiPrimitiveType_POLYGON;
+						break;
 				}
 				}
-				face.mIndices[a] = pMesh->mNumVertices++;
 			}
 			}
-			vp += 4;
 		}
 		}
+
+		mesh->mPrimitiveTypes = prims;
+		mesh->mMaterialIndex = 0;
 	}
 	}
 
 
-	// generate the output scene graph
-	pScene->mRootNode = new aiNode();
-	pScene->mRootNode->mName.Set("<DXF_ROOT>");
+	GenerateHierarchy(pScene,output);
+	GenerateMaterials(pScene,output);
+}
 
 
-	if (1 == pScene->mNumMeshes)	{
-		pScene->mRootNode->mMeshes = new unsigned int[ pScene->mRootNode->mNumMeshes = 1 ];
-		pScene->mRootNode->mMeshes[0] = 0;
-	}
-	else
-	{
-		pScene->mRootNode->mChildren = new aiNode*[ pScene->mRootNode->mNumChildren = pScene->mNumMeshes ];
-		for (m = 0; m < pScene->mRootNode->mNumChildren;++m)	{
-			aiNode* p = pScene->mRootNode->mChildren[m] = new aiNode();
-			p->mName.length = ::strlen( mLayers[m].name );
-			strcpy(p->mName.data, mLayers[m].name);
 
 
-			p->mMeshes = new unsigned int[p->mNumMeshes = 1];
-			p->mMeshes[0] = m;
-			p->mParent = pScene->mRootNode;
+// ------------------------------------------------------------------------------------------------
+void DXFImporter::ExpandBlockReferences(DXF::Block& bl,const DXF::BlockMap& blocks_by_name)
+{
+	BOOST_FOREACH (const DXF::InsertBlock& insert, bl.insertions) {
+
+		// first check if the referenced blocks exists ...
+		const DXF::BlockMap::const_iterator it = blocks_by_name.find(insert.name);
+		if (it == blocks_by_name.end()) {
+			DefaultLogger::get()->error((Formatter::format("DXF: Failed to resolve block reference: "),
+				insert.name,"; skipping"
+			));
+			continue;
+		}
+
+		// XXX this would be the place to implement recursive expansion if needed.
+		const DXF::Block& bl_src = *(*it).second;
+		
+		BOOST_FOREACH (boost::shared_ptr<const DXF::PolyLine> pl_in, bl_src.lines) {
+			boost::shared_ptr<DXF::PolyLine> pl_out = boost::shared_ptr<DXF::PolyLine>(new DXF::PolyLine(*pl_in));
+
+			if (bl_src.base.Length() || insert.scale.x!=1.f || insert.scale.y!=1.f || insert.scale.z!=1.f || insert.angle || insert.pos.Length()) {
+				// manual coordinate system transformation
+				// XXX order
+				aiMatrix4x4 trafo, tmp;
+				aiMatrix4x4::Translation(-bl_src.base,trafo);
+				trafo *= aiMatrix4x4::Scaling(insert.scale,tmp);
+				trafo *= aiMatrix4x4::Translation(insert.pos,tmp);
+
+				// XXX rotation currently ignored - I didn't find an appropriate sample model.
+				if (insert.angle != 0.f) {
+					DefaultLogger::get()->warn("DXF: BLOCK rotation not currently implemented");
+				}
+
+				BOOST_FOREACH (aiVector3D& v, pl_out->positions) {
+					v *= trafo;
+				}
+			}
+
+			bl.lines.push_back(pl_out);
 		}
 		}
 	}
 	}
+}
 
 
+
+// ------------------------------------------------------------------------------------------------
+void DXFImporter::GenerateMaterials(aiScene* pScene, DXF::FileData& /*output*/)
+{
+	// generate an almost-white default material. Reason:
+	// the default vertex color is GREY, so we are
+	// already at Assimp's usual default color.
 	// generate a default material
 	// generate a default material
 	MaterialHelper* pcMat = new MaterialHelper();
 	MaterialHelper* pcMat = new MaterialHelper();
 	aiString s;
 	aiString s;
 	s.Set(AI_DEFAULT_MATERIAL_NAME);
 	s.Set(AI_DEFAULT_MATERIAL_NAME);
 	pcMat->AddProperty(&s, AI_MATKEY_NAME);
 	pcMat->AddProperty(&s, AI_MATKEY_NAME);
 
 
-	aiColor4D clrDiffuse(0.6f,0.6f,0.6f,1.0f);
+	aiColor4D clrDiffuse(0.9f,0.9f,0.9f,1.0f);
 	pcMat->AddProperty(&clrDiffuse,1,AI_MATKEY_COLOR_DIFFUSE);
 	pcMat->AddProperty(&clrDiffuse,1,AI_MATKEY_COLOR_DIFFUSE);
 
 
 	clrDiffuse = aiColor4D(1.0f,1.0f,1.0f,1.0f);
 	clrDiffuse = aiColor4D(1.0f,1.0f,1.0f,1.0f);
@@ -313,296 +404,494 @@ void DXFImporter::InternReadFile( const std::string& pFile,
 	pScene->mNumMaterials = 1;
 	pScene->mNumMaterials = 1;
 	pScene->mMaterials = new aiMaterial*[1];
 	pScene->mMaterials = new aiMaterial*[1];
 	pScene->mMaterials[0] = pcMat;
 	pScene->mMaterials[0] = pcMat;
+}
+
+
+// ------------------------------------------------------------------------------------------------
+void DXFImporter::GenerateHierarchy(aiScene* pScene, DXF::FileData& /*output*/)
+{
+	// generate the output scene graph, which is just the root node with a single child for each layer.
+	pScene->mRootNode = new aiNode();
+	pScene->mRootNode->mName.Set("<DXF_ROOT>");
 
 
-	// flip winding order to be ccw
-	FlipWindingOrderProcess flipper;
-	flipper.Execute(pScene);
+	if (1 == pScene->mNumMeshes)	{
+		pScene->mRootNode->mMeshes = new unsigned int[ pScene->mRootNode->mNumMeshes = 1 ];
+		pScene->mRootNode->mMeshes[0] = 0;
+	}
+	else
+	{
+		pScene->mRootNode->mChildren = new aiNode*[ pScene->mRootNode->mNumChildren = pScene->mNumMeshes ];
+		for (unsigned int m = 0; m < pScene->mRootNode->mNumChildren;++m)	{
+			aiNode* p = pScene->mRootNode->mChildren[m] = new aiNode();
+			p->mName = pScene->mMeshes[m]->mName;
 
 
-	// --- everything destructs automatically ---
+			p->mMeshes = new unsigned int[p->mNumMeshes = 1];
+			p->mMeshes[0] = m;
+			p->mParent = pScene->mRootNode;
+		}
+	}
 }
 }
 
 
+
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
-bool DXFImporter::ParseEntities()
-{
-	while (GetNextToken())	{
-		if (!groupCode)	{			
-			if (!::strcmp(cursor,"3DFACE") || !::strcmp(cursor,"LINE") || !::strcmp(cursor,"3DLINE")){
-				//http://sourceforge.net/tracker/index.php?func=detail&aid=2970566&group_id=226462&atid=1067632
-				Parse3DFace();
-				bRepeat = true;
-			}
-			if (!::strcmp(cursor,"POLYLINE") || !::strcmp(cursor,"LWPOLYLINE")){
-				ParsePolyLine();
-				bRepeat = true;
-			}
-			if (!::strcmp(cursor,"ENDSEC")) {
-				return true;
-			}
+void DXFImporter::SkipSection(DXF::LineReader& reader)
+{	
+	for( ;!reader.End() && !reader.Is(0,"ENDSEC"); reader++);
+}
+
+
+// ------------------------------------------------------------------------------------------------
+void DXFImporter::ParseHeader(DXF::LineReader& reader, DXF::FileData& /*output*/)
+{	
+	for( ;!reader.End() && !reader.Is(0,"ENDSEC"); reader++);
+}
+
+
+// ------------------------------------------------------------------------------------------------
+void DXFImporter::ParseBlocks(DXF::LineReader& reader, DXF::FileData& output)
+{	
+	while( !reader.End() && !reader.Is(0,"ENDSEC")) {
+		if (reader.Is(0,"BLOCK")) {
+			ParseBlock(++reader,output);
+			continue;
 		}
 		}
+		++reader;
 	}
 	}
-	return false;
+
+	DefaultLogger::get()->debug((Formatter::format("DXF: got "),
+		output.blocks.size()," entries in BLOCKS"
+	));
 }
 }
 
 
+
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
-void DXFImporter::SetLayer(LayerInfo*& out)
-{
-	for (std::vector<LayerInfo>::iterator it = mLayers.begin(),end = mLayers.end();it != end;++it)	{
-		if (!::strcmp( (*it).name, cursor ))	{
-			out = &(*it);
+void DXFImporter::ParseBlock(DXF::LineReader& reader, DXF::FileData& output)
+{	
+	// push a new block onto the stack.
+	output.blocks.push_back( DXF::Block() );
+	DXF::Block& block = output.blocks.back();
+
+	while( !reader.End() && !reader.Is(0,"ENDBLK")) {
+
+		switch(reader.GroupCode()) {
+			case 2:
+				block.name = reader.Value();
+				break;
+
+			case 10:
+				block.base.x = reader.ValueAsFloat();
+				break;
+			case 20:
+				block.base.y = reader.ValueAsFloat();
+				break;
+			case 30:
+				block.base.z = reader.ValueAsFloat();
+				break;
+		}
+
+		if (reader.Is(0,"POLYLINE")) {
+			ParsePolyLine(++reader,output);
+			continue;
+		}
+
+		// XXX is this a valid case?
+		if (reader.Is(0,"INSERT")) {
+			DefaultLogger::get()->warn("DXF: INSERT within a BLOCK not currently supported; skipping");
+			for( ;!reader.End() && !reader.Is(0,"ENDBLK"); ++reader);
 			break;
 			break;
 		}
 		}
-	}
-	if (!out)	{
-		// we don't have this layer yet
-		mLayers.push_back(LayerInfo());
-		out = &mLayers.back();
-		::strcpy(out->name,cursor);
+
+		else if (reader.Is(0,"3DFACE") || reader.Is(0,"LINE") || reader.Is(0,"3DLINE")) {
+			//http://sourceforge.net/tracker/index.php?func=detail&aid=2970566&group_id=226462&atid=1067632
+			Parse3DFace(++reader, output);
+			continue;
+		}
+		++reader;
 	}
 	}
 }
 }
 
 
+
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
-void DXFImporter::SetDefaultLayer(LayerInfo*& out)
-{
-	if (!mDefaultLayer)	{
-		mLayers.push_back(LayerInfo());
-		mDefaultLayer = &mLayers.back();
+void DXFImporter::ParseEntities(DXF::LineReader& reader, DXF::FileData& output)
+{	
+	// push a new block onto the stack.
+	output.blocks.push_back( DXF::Block() );
+	DXF::Block& block = output.blocks.back();
+
+	block.name = AI_DXF_ENTITIES_MAGIC_BLOCK;
+
+	while( !reader.End() && !reader.Is(0,"ENDSEC")) {
+		if (reader.Is(0,"POLYLINE")) {
+			ParsePolyLine(++reader,output);
+			continue;
+		}
+
+		else if (reader.Is(0,"INSERT")) {
+			ParseInsertion(++reader,output);
+			continue;
+		}
+
+		else if (reader.Is(0,"3DFACE") || reader.Is(0,"LINE") || reader.Is(0,"3DLINE")) {
+			//http://sourceforge.net/tracker/index.php?func=detail&aid=2970566&group_id=226462&atid=1067632
+			Parse3DFace(++reader, output);
+			continue;
+		}
+
+		++reader;
+	}
+
+	DefaultLogger::get()->debug((Formatter::format("DXF: got "),
+		block.lines.size()," polylines and ", block.insertions.size() ," inserted blocks in ENTITIES"
+	));
+}
+
+
+void DXFImporter::ParseInsertion(DXF::LineReader& reader, DXF::FileData& output)
+{	
+	output.blocks.back().insertions.push_back( DXF::InsertBlock() );
+	DXF::InsertBlock& bl = output.blocks.back().insertions.back();
+
+	while( !reader.End() && !reader.Is(0)) {
+
+		switch(reader.GroupCode()) 
+		{
+			// name of referenced block
+		case 2:
+			bl.name = reader.Value();
+			break;
+
+			// translation
+		case 10:
+			bl.pos.x = reader.ValueAsFloat();
+			break;
+		case 20:
+			bl.pos.y = reader.ValueAsFloat();
+			break;
+		case 30:
+			bl.pos.z = reader.ValueAsFloat();
+			break;
+
+			// scaling
+		case 41:
+			bl.scale.x = reader.ValueAsFloat();
+			break;
+		case 42:
+			bl.scale.y = reader.ValueAsFloat();
+			break;
+		case 43:
+			bl.scale.z = reader.ValueAsFloat();
+			break;
+
+			// rotation angle
+		case 50:
+			bl.angle = reader.ValueAsFloat();
+			break;
+		}
+		reader++;
 	}
 	}
-	out = mDefaultLayer;
 }
 }
 
 
+#define DXF_POLYLINE_FLAG_CLOSED		0x1
+#define DXF_POLYLINE_FLAG_3D_POLYLINE	0x8
+#define DXF_POLYLINE_FLAG_3D_POLYMESH	0x10
+#define DXF_POLYLINE_FLAG_POLYFACEMESH	0x40
+
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
-bool DXFImporter::ParsePolyLine()
+void DXFImporter::ParsePolyLine(DXF::LineReader& reader, DXF::FileData& output)
 {
 {
-	bool ret = false;
-	LayerInfo* out = NULL;
-
-	std::vector<aiVector3D> positions;
-	std::vector<aiColor4D>  colors;
-	std::vector<unsigned int> indices;
-	unsigned int flags = 0;
+	output.blocks.back().lines.push_back( boost::shared_ptr<DXF::PolyLine>( new DXF::PolyLine() ) );
+	DXF::PolyLine& line = *output.blocks.back().lines.back();
 
 
-	while (GetNextToken())	{
-		switch (groupCode)
-		{
-		case 0:
-			{
-				if (!::strcmp(cursor,"VERTEX"))	{
-					aiVector3D v;aiColor4D clr(g_clrInvalid);
-					unsigned int idx[4] = {0xffffffff,0xffffffff,0xffffffff,0xffffffff};
-					ParsePolyLineVertex(v, clr, idx);
-					if (0xffffffff == idx[0])	{
-						positions.push_back(v);
-						colors.push_back(clr);
-					}
-					else	{
-						// check whether we have a fourth coordinate
-						if (0xffffffff == idx[3])	{
-							idx[3] = idx[2];
-						}
-
-						indices.reserve(indices.size()+4);
-						for (unsigned int m = 0; m < 4;++m)
-							indices.push_back(idx[m]);
-					}
-					bRepeat = true;
-				}
-				else if (!::strcmp(cursor,"ENDSEQ"))	{
-					ret = true;
-				}
+	unsigned int iguess = 0, vguess = 0;
+	while( !reader.End() && !reader.Is(0,"ENDSEC")) {
+	
+		if (reader.Is(0,"VERTEX")) {
+			ParsePolyLineVertex(++reader,line);
+			if (reader.Is(0,"SEQEND")) {
 				break;
 				break;
 			}
 			}
+			continue;
+		}
 
 
-		// flags --- important that we know whether it is a polyface mesh
+		switch(reader.GroupCode())	
+		{
+		// flags --- important that we know whether it is a 
+		// polyface mesh or 'just' a line.
 		case 70:
 		case 70:
-			{
-				if (!flags)	{
-					flags = strtol10(cursor);
-				}
-				break;
-			};
+			if (!line.flags)	{
+				line.flags = reader.ValueAsSignedInt();
+			}
+			break;
 
 
 		// optional number of vertices
 		// optional number of vertices
 		case 71:
 		case 71:
-			{
-				positions.reserve(strtol10(cursor));
-				break;
-			}
+			vguess = reader.ValueAsSignedInt();
+			line.positions.reserve(vguess);
+			break;
 
 
 		// optional number of faces
 		// optional number of faces
 		case 72:
 		case 72:
-			{
-				indices.reserve(strtol10(cursor));
-				break;
-			}
+			iguess = reader.ValueAsSignedInt();
+			line.indices.reserve(iguess);
+			break;
 
 
-		// 8 specifies the layer
+		// 8 specifies the layer on which this line is placed on
 		case 8:
 		case 8:
-			{
-				SetLayer(out);
-				break;
-			}
+			line.layer = reader.Value();
+			break;
 		}
 		}
-	}
-	if (!(flags & 64))	{
-		DefaultLogger::get()->warn("DXF: Only polyface meshes are currently supported");
-		return ret;
-	}
 
 
-	if (positions.size() < 3 || indices.size() < 3)	{
-		DefaultLogger::get()->warn("DXF: Unable to parse POLYLINE element - not enough vertices");
-		return ret;
+		reader++;
 	}
 	}
 
 
-	// use a default layer if necessary
-	if (!out) {
-		SetDefaultLayer(out);
+	//if (!(line.flags & DXF_POLYLINE_FLAG_POLYFACEMESH))	{
+	//	DefaultLogger::get()->warn((Formatter::format("DXF: polyline not currently supported: "),line.flags));
+	//	output.blocks.back().lines.pop_back();
+	//	return;
+	//}
+
+	if (vguess && line.positions.size() != vguess) {
+		DefaultLogger::get()->warn((Formatter::format("DXF: unexpected vertex count in polymesh: "),
+			line.positions.size(),", expected ", vguess
+		));
 	}
 	}
 
 
-	flags = (unsigned int)(out->vPositions.size()+indices.size());
-	out->vPositions.reserve(flags);
-	out->vColors.reserve(flags);
+	if (line.flags & DXF_POLYLINE_FLAG_POLYFACEMESH ) {
+		if (line.positions.size() < 3 || line.indices.size() < 3)	{
+				DefaultLogger::get()->warn("DXF: not enough vertices for polymesh; ignoring");
+				output.blocks.back().lines.pop_back();
+				return;
+		}
 
 
-	// generate unique vertices
-	for (std::vector<unsigned int>::const_iterator it = indices.begin(), end = indices.end();it != end; ++it)	{
-		unsigned int idx = *it;
-		if (idx > positions.size() || !idx)	{
-			DefaultLogger::get()->error("DXF: Polyface mesh index os out of range");
-			idx = (unsigned int) positions.size();
+		// if these numbers are wrong, parsing might have gone wild. 
+		// however, the docs state that applications are not required
+		// to set the 71 and 72 fields, respectively, to valid values.
+		// So just fire a warning.
+		if (iguess && line.counts.size() != iguess) {
+			DefaultLogger::get()->warn((Formatter::format("DXF: unexpected face count in polymesh: "),
+				line.counts.size(),", expected ", iguess
+			));
+		}
+	}
+	else if (!line.indices.size() && !line.counts.size()) {
+		// a polyline - so there are no indices yet.
+		size_t guess = line.positions.size() + (line.flags & DXF_POLYLINE_FLAG_CLOSED ? 1 : 0);
+		line.indices.reserve(guess);
+
+		line.counts.reserve(guess/2);
+		for (unsigned int i = 0; i < line.positions.size()/2; ++i) {
+			line.indices.push_back(i*2);
+			line.indices.push_back(i*2+1);
+			line.counts.push_back(2);
+		}
+
+		// closed polyline?
+		if (line.flags & DXF_POLYLINE_FLAG_CLOSED) {
+			line.indices.push_back(line.positions.size()-1);
+			line.indices.push_back(0);
+			line.counts.push_back(2);
 		}
 		}
-		out->vPositions.push_back(positions[idx-1]); // indices are one-based.
-		out->vColors.push_back(colors[idx-1]); // indices are one-based.
 	}
 	}
-
-	return ret;
 }
 }
 
 
+#define DXF_VERTEX_FLAG_PART_OF_POLYFACE 0x80
+#define DXF_VERTEX_FLAG_HAS_POSITIONS 0x40
+
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
-bool DXFImporter::ParsePolyLineVertex(aiVector3D& out,aiColor4D& clr, unsigned int* outIdx)
+void DXFImporter::ParsePolyLineVertex(DXF::LineReader& reader, DXF::PolyLine& line)
 {
 {
-	bool ret = false;
-	while (GetNextToken())	{
-		switch (groupCode)
-		{
-		case 0: ret = true;
-			break;
+	unsigned int cnti = 0, flags = 0;
+	unsigned int indices[4];
 
 
-		// todo - handle the correct layer for the vertex. At the moment it is assumed that all vertices of 
-		// a polyline are placed on the same global layer.
+	aiVector3D out;
+	aiColor4D clr = AI_DXF_DEFAULT_COLOR;
 
 
-		// x position of the first corner
-		case 10: out.x = fast_atof(cursor);break;
+	while( !reader.End() ) {
 
 
-		// y position of the first corner
-		case 20: out.y = -fast_atof(cursor);break;
+		if (reader.Is(0)) { // SEQEND or another VERTEX
+			break;
+		}
 
 
-		// z position of the first corner
-		case 30: out.z = fast_atof(cursor);break;
+		switch (reader.GroupCode())
+		{
+		case 8:
+				// layer to which the vertex belongs to - assume that
+				// this is always the layer the top-level polyline
+				// entity resides on as well.
+				if(reader.Value() != line.layer) {
+					DefaultLogger::get()->warn("DXF: expected vertex to be part of a polyface but the 0x128 flag isn't set");
+				}
+				break;
+
+		case 70:
+				flags = reader.ValueAsUnsignedInt();
+				break;
+
+		// VERTEX COORDINATES
+		case 10: out.x = reader.ValueAsFloat();break;
+		case 20: out.y = reader.ValueAsFloat();break;
+		case 30: out.z = reader.ValueAsFloat();break;
 
 
 		// POLYFACE vertex indices
 		// POLYFACE vertex indices
-		case 71: outIdx[0] = strtol10(cursor);break;
-		case 72: outIdx[1] = strtol10(cursor);break;
-		case 73: outIdx[2] = strtol10(cursor);break;
-	//	case 74: outIdx[3] = strtol10(cursor);break;
+		case 71: 
+		case 72:
+		case 73:
+		case 74: 
+			if (cnti == 4) {
+				DefaultLogger::get()->warn("DXF: more than 4 indices per face not supported; ignoring");
+				break;
+			}
+			indices[cnti++] = reader.ValueAsUnsignedInt();
+			break;
 
 
 		// color
 		// color
-		case 62: clr = g_aclrDxfIndexColors[strtol10(cursor) % AI_DXF_NUM_INDEX_COLORS]; break;
-		};
-		if (ret) {
+		case 62: 
+			clr = g_aclrDxfIndexColors[reader.ValueAsUnsignedInt() % AI_DXF_NUM_INDEX_COLORS]; 
 			break;
 			break;
+		};
+	
+		reader++;
+	}
+	
+	if (line.flags & DXF_POLYLINE_FLAG_POLYFACEMESH && !(flags & DXF_VERTEX_FLAG_PART_OF_POLYFACE)) {
+		DefaultLogger::get()->warn("DXF: expected vertex to be part of a polyface but the 0x128 flag isn't set");
+	}
+
+	if (cnti) {
+		line.counts.push_back(cnti);
+		for (unsigned int i = 0; i < cnti; ++i) {
+			// IMPORTANT NOTE: POLYMESH indices are ONE-BASED
+			if (indices[i] == 0) {
+				DefaultLogger::get()->warn("DXF: invalid vertex index, indices are one-based.");
+				--line.counts.back();
+				continue;
+			}
+			line.indices.push_back(indices[i]-1);
 		}
 		}
 	}
 	}
-	return ret;
+	else {
+		line.positions.push_back(out);
+		line.colors.push_back(clr);
+	}
 }
 }
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
-bool DXFImporter::Parse3DFace()
+void DXFImporter::Parse3DFace(DXF::LineReader& reader, DXF::FileData& output)
 {
 {
-	bool ret = false;
-	LayerInfo* out = NULL;
+	// (note) this is also used for for parsing line entities, so we
+	// must handle the vertex_count == 2 case as well.
 
 
-	aiVector3D vip[4]; // -- vectors are initialized to zero
-	aiColor4D  clr(g_clrInvalid);
+	output.blocks.back().lines.push_back( boost::shared_ptr<DXF::PolyLine>( new DXF::PolyLine() )  );
+	DXF::PolyLine& line = *output.blocks.back().lines.back();
 
 
-	// this is also used for for parsing line entities
-	bool bThird = false;
+	aiVector3D vip[4];
+	aiColor4D  clr = AI_DXF_DEFAULT_COLOR;
+	
+	bool b[4] = {false,false,false,false};
+	while( !reader.End() ) {
 
 
-	while (GetNextToken())	{
-		switch (groupCode)	{
-		case 0: 
-			ret = true;
+		// next entity with a groupcode == 0 is probably already the next vertex or polymesh entity
+		if (reader.GroupCode() == 0) {
 			break;
 			break;
+		}
+		switch (reader.GroupCode())	
+		{
 
 
 		// 8 specifies the layer
 		// 8 specifies the layer
-		case 8:	{
-				SetLayer(out);
-				break;
-			}
+		case 8:	
+			line.layer = reader.Value();
+			break;
 
 
 		// x position of the first corner
 		// x position of the first corner
-		case 10: vip[0].x = fast_atof(cursor);break;
+		case 10: vip[0].x = reader.ValueAsFloat();
+			b[2] = true;
+			break;
 
 
 		// y position of the first corner
 		// y position of the first corner
-		case 20: vip[0].y = -fast_atof(cursor);break;
+		case 20: vip[0].y = reader.ValueAsFloat();
+			b[2] = true;
+			break;
 
 
 		// z position of the first corner
 		// z position of the first corner
-		case 30: vip[0].z = fast_atof(cursor);break;
+		case 30: vip[0].z = reader.ValueAsFloat();
+			b[2] = true;
+			break;
 
 
 		// x position of the second corner
 		// x position of the second corner
-		case 11: vip[1].x = fast_atof(cursor);break;
+		case 11: vip[1].x = reader.ValueAsFloat();
+			b[3] = true;
+			break;
 
 
 		// y position of the second corner
 		// y position of the second corner
-		case 21: vip[1].y = -fast_atof(cursor);break;
+		case 21: vip[1].y = reader.ValueAsFloat();
+			b[3] = true;
+			break;
 
 
 		// z position of the second corner
 		// z position of the second corner
-		case 31: vip[1].z = fast_atof(cursor);break;
+		case 31: vip[1].z = reader.ValueAsFloat();
+			b[3] = true;
+			break;
 
 
 		// x position of the third corner
 		// x position of the third corner
-		case 12: vip[2].x = fast_atof(cursor);
-			bThird = true;break;
+		case 12: vip[2].x = reader.ValueAsFloat();
+			b[0] = true;
+			break;
 
 
 		// y position of the third corner
 		// y position of the third corner
-		case 22: vip[2].y = -fast_atof(cursor);
-			bThird = true;break;
+		case 22: vip[2].y = reader.ValueAsFloat();
+			b[0] = true;
+			break;
 
 
 		// z position of the third corner
 		// z position of the third corner
-		case 32: vip[2].z = fast_atof(cursor);
-			bThird = true;break;
+		case 32: vip[2].z = reader.ValueAsFloat();
+			b[0] = true;
+			break;
 
 
 		// x position of the fourth corner
 		// x position of the fourth corner
-		case 13: vip[3].x = fast_atof(cursor);
-			bThird = true;break;
+		case 13: vip[3].x = reader.ValueAsFloat();
+			b[1] = true;
+			break;
 
 
 		// y position of the fourth corner
 		// y position of the fourth corner
-		case 23: vip[3].y = -fast_atof(cursor);
-			bThird = true;break;
+		case 23: vip[3].y = reader.ValueAsFloat();
+			b[1] = true;
+			break;
 
 
 		// z position of the fourth corner
 		// z position of the fourth corner
-		case 33: vip[3].z = fast_atof(cursor);
-			bThird = true;break;
+		case 33: vip[3].z = reader.ValueAsFloat();
+			b[1] = true;
+			break;
 
 
 		// color
 		// color
-		case 62: clr = g_aclrDxfIndexColors[strtol10(cursor) % AI_DXF_NUM_INDEX_COLORS]; break;
-		};
-		if (ret)
+		case 62: 
+			clr = g_aclrDxfIndexColors[reader.ValueAsUnsignedInt() % AI_DXF_NUM_INDEX_COLORS]; 
 			break;
 			break;
+		};
+
+		++reader;
+	}
+
+	// the fourth corner may even be identical to the third,
+	// in this case we treat it as if it didn't exist.
+	if (vip[3] == vip[2]) {
+		b[1] = false;
+	}
+	
+	// sanity checks to see if we got something meaningful
+	if ((b[1] && !b[0]) || !b[2] || !b[3]) {
+		DefaultLogger::get()->warn("DXF: unexpected vertex setup in 3DFACE/LINE/FACE entity; ignoring");
+		output.blocks.back().lines.pop_back();
+		return;
 	}
 	}
 
 
-	if (!bThird)
-		vip[2] = vip[1];
+	const unsigned int cnt = (2+(b[0]?1:0)+(b[1]?1:0));
+	line.counts.push_back(cnt);
 
 
-	// use a default layer if necessary
-	if (!out) {
-		SetDefaultLayer(out);
+	for (unsigned int i = 0; i < cnt; ++i) {
+		line.indices.push_back(line.positions.size());
+		line.positions.push_back(vip[i]);
+		line.colors.push_back(clr);
 	}
 	}
-	// add the faces to the face list for this layer
-	out->vPositions.push_back(vip[0]);
-	out->vPositions.push_back(vip[1]);
-	out->vPositions.push_back(vip[2]);
-	out->vPositions.push_back(vip[3]); // might be equal to the third
-
-	for (unsigned int i = 0; i < 4;++i)
-		out->vColors.push_back(clr);
-	return ret;
 }
 }
 
 
 #endif // !! ASSIMP_BUILD_NO_DXF_IMPORTER
 #endif // !! ASSIMP_BUILD_NO_DXF_IMPORTER

+ 57 - 89
ThirdParty/Assimp/code/DXFLoader.h

@@ -47,40 +47,29 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include "BaseImporter.h"
 #include "BaseImporter.h"
 
 
 namespace Assimp	{
 namespace Assimp	{
+	namespace DXF {
+	
+		class LineReader;
+		struct FileData;
+		struct PolyLine;
+		struct Block;
+		struct InsertBlock;
+
+		typedef std::map<std::string, const DXF::Block*> BlockMap;
+	}
+
 
 
 // ---------------------------------------------------------------------------
 // ---------------------------------------------------------------------------
-/** DXF importer class
+/** DXF importer implementation.
+ *
 */
 */
 class DXFImporter : public BaseImporter
 class DXFImporter : public BaseImporter
 {
 {
-	friend class Importer;
-
-protected:
-	/** Constructor to be privately used by Importer */
+public:
 	DXFImporter();
 	DXFImporter();
-
-	/** Destructor, private as well */
 	~DXFImporter();
 	~DXFImporter();
 
 
 
 
-	// describes a single layer in the DXF file
-	struct LayerInfo
-	{
-		LayerInfo()
-		{
-			name[0] = '\0';
-		}
-
-		char name[4096];
-
-		// face buffer - order is x,y,z v1,v2,v3,v4 
-		// if v2 = v3:    line
-		// elsif v3 = v2: triangle
-		// else: polygon
-		std::vector<aiVector3D> vPositions;
-		std::vector<aiColor4D>  vColors;
-	};
-
 
 
 public:
 public:
 
 
@@ -94,89 +83,68 @@ protected:
 
 
 	// -------------------------------------------------------------------
 	// -------------------------------------------------------------------
 	/** Called by Importer::GetExtensionList() for each loaded importer.
 	/** Called by Importer::GetExtensionList() for each loaded importer.
-	 * See BaseImporter::GetExtensionList() for details
-	 */
+	 * See BaseImporter::GetExtensionList() for details*/
 	void GetExtensionList(std::set<std::string>& extensions);
 	void GetExtensionList(std::set<std::string>& extensions);
 
 
 	// -------------------------------------------------------------------
 	// -------------------------------------------------------------------
 	/** Imports the given file into the given scene structure. 
 	/** Imports the given file into the given scene structure. 
-	 * See BaseImporter::InternReadFile() for details
-	 */
-	void InternReadFile( const std::string& pFile, aiScene* pScene, 
+	 * See BaseImporter::InternReadFile() for details */
+	void InternReadFile( const std::string& pFile, 
+		aiScene* pScene, 
 		IOSystem* pIOHandler);
 		IOSystem* pIOHandler);
 
 
-	// -------------------------------------------------------------------
-	/** Get the next line from the file.
-	 *  @return false if the end of the file was reached
-	 */
-	bool GetNextLine();
+private:
 
 
-	// -------------------------------------------------------------------
-	/** Get the next token (group code + data line) from the file.
-	 *  @return false if the end of the file was reached
-	 */
-	bool GetNextToken();
+	// -----------------------------------------------------
+	void SkipSection(DXF::LineReader& reader);
 
 
-	// -------------------------------------------------------------------
-	/** Parses the ENTITIES section in the file
-	 *  @return false if the end of the file was reached
-	 */
-	bool ParseEntities();
+	// -----------------------------------------------------
+	void ParseHeader(DXF::LineReader& reader,
+		DXF::FileData& output);
 
 
-	// -------------------------------------------------------------------
-	/** Parses a 3DFACE section in the file
-	 *  @return false if the end of the file was reached
-	 */
-	bool Parse3DFace();
+	// -----------------------------------------------------
+	void ParseEntities(DXF::LineReader& reader,
+		DXF::FileData& output);
 
 
-	// -------------------------------------------------------------------
-	/** Parses a POLYLINE section in the file
-	 *  @return false if the end of the file was reached
-	 */
-	bool ParsePolyLine();
+	// -----------------------------------------------------
+	void ParseBlocks(DXF::LineReader& reader, 
+		DXF::FileData& output);
 
 
-	// -------------------------------------------------------------------
-	/** Sets the current layer - cursor must point to the name of it.
-	 *  @param out Receives a handle to the layer
-	 */
-	void SetLayer(LayerInfo*& out);
+	// -----------------------------------------------------
+	void ParseBlock(DXF::LineReader& reader, 
+		DXF::FileData& output);
 
 
-	// -------------------------------------------------------------------
-	/** Creates a default layer.
-	 *  @param out Receives a handle to the default layer
-	 */
-	void SetDefaultLayer(LayerInfo*& out);
+	// -----------------------------------------------------
+	void ParseInsertion(DXF::LineReader& reader, 
+		DXF::FileData& output);
 
 
-	// -------------------------------------------------------------------
-	/** Parses a VERTEX element in a POLYLINE/POLYFACE
-	 *  @param out Receives the output vertex. 
-	 *  @param clr Receives the output vertex color - won't be modified
-	 *    if it is not existing. 
-	 *  @param outIdx Receives the output vertex indices, if present.
-	 *    Wont't be modified otherwise. Size must be at least 4.
-	 *  @return false if the end of the file was reached
-	 */
-	bool ParsePolyLineVertex(aiVector3D& out, aiColor4D& clr, 
-		unsigned int* outIdx);
+	// -----------------------------------------------------
+	void ParsePolyLine(DXF::LineReader& reader, 
+		DXF::FileData& output);
 
 
-private:
+	// -----------------------------------------------------
+	void ParsePolyLineVertex(DXF::LineReader& reader, 
+		DXF::PolyLine& line);
 
 
-	// points to the next section 
-	const char* buffer;
+	// -----------------------------------------------------
+	void Parse3DFace(DXF::LineReader& reader, 
+		DXF::FileData& output);
 
 
-	// specifies the current group code
-	int groupCode;
+	// -----------------------------------------------------
+	void ConvertMeshes(aiScene* pScene, 
+		DXF::FileData& output);
 
 
-	// contains the current data line
-	char cursor[4096];
+	// -----------------------------------------------------
+	void GenerateHierarchy(aiScene* pScene, 
+		DXF::FileData& output);
 
 
-	// specifies whether the next call to GetNextToken()
-	// should return the current token a second time
-	bool bRepeat;
+	// -----------------------------------------------------
+	void GenerateMaterials(aiScene* pScene, 
+		DXF::FileData& output);
 
 
-	// list of all loaded layers
-	std::vector<LayerInfo> mLayers;
-	LayerInfo* mDefaultLayer;
+	// -----------------------------------------------------
+	void ExpandBlockReferences(DXF::Block& bl,
+		const DXF::BlockMap& blocks_by_name);
 };
 };
 
 
 } // end of namespace Assimp
 } // end of namespace Assimp

+ 464 - 0
ThirdParty/Assimp/code/DeboneProcess.cpp

@@ -0,0 +1,464 @@
+									 /*
+Open Asset Import Library (ASSIMP)
+----------------------------------------------------------------------
+
+Copyright (c) 2006-2010, ASSIMP Development Team
+All rights reserved.
+
+Redistribution and use of this software in source and binary forms, 
+with or without modification, are permitted provided that the 
+following conditions are met:
+
+* Redistributions of source code must retain the above
+  copyright notice, this list of conditions and the
+  following disclaimer.
+
+* Redistributions in binary form must reproduce the above
+  copyright notice, this list of conditions and the
+  following disclaimer in the documentation and/or other
+  materials provided with the distribution.
+
+* Neither the name of the ASSIMP team, nor the names of its
+  contributors may be used to endorse or promote products
+  derived from this software without specific prior
+  written permission of the ASSIMP Development Team.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+----------------------------------------------------------------------
+*/
+
+/// @file DeboneProcess.cpp
+/** Implementation of the DeboneProcess post processing step */
+
+#include "AssimpPCH.h"
+
+// internal headers of the post-processing framework
+#include "ProcessHelper.h"
+#include "DeboneProcess.h"
+
+
+using namespace Assimp;
+
+// ------------------------------------------------------------------------------------------------
+// Constructor to be privately used by Importer
+DeboneProcess::DeboneProcess()
+{
+	mNumBones = 0;
+	mNumBonesCanDoWithout = 0;
+
+	mThreshold = AI_DEBONE_THRESHOLD;
+	mAllOrNone = false;
+}
+
+// ------------------------------------------------------------------------------------------------
+// Destructor, private as well
+DeboneProcess::~DeboneProcess()
+{
+	// nothing to do here
+}
+
+// ------------------------------------------------------------------------------------------------
+// Returns whether the processing step is present in the given flag field.
+bool DeboneProcess::IsActive( unsigned int pFlags) const
+{
+	return (pFlags & aiProcess_Debone) != 0;
+}
+
+// ------------------------------------------------------------------------------------------------
+// Executes the post processing step on the given imported data.
+void DeboneProcess::SetupProperties(const Importer* pImp)
+{	
+	// get the current value of the property
+	mAllOrNone = pImp->GetPropertyInteger(AI_CONFIG_PP_DB_ALL_OR_NONE,0)?true:false;
+	mThreshold = pImp->GetPropertyFloat(AI_CONFIG_PP_DB_THRESHOLD,AI_DEBONE_THRESHOLD);
+}
+
+// ------------------------------------------------------------------------------------------------
+// Executes the post processing step on the given imported data.
+void DeboneProcess::Execute( aiScene* pScene)
+{
+	DefaultLogger::get()->debug("DeboneProcess begin");
+
+	if(!pScene->mNumMeshes) {
+		return;
+	}
+
+	std::vector<bool> splitList(pScene->mNumMeshes); 
+	for( unsigned int a = 0; a < pScene->mNumMeshes; a++) {
+		splitList[a] = ConsiderMesh( pScene->mMeshes[a] );
+	}
+
+	int numSplits = 0; 
+
+	if(!!mNumBonesCanDoWithout && (!mAllOrNone||mNumBonesCanDoWithout==mNumBones))	{
+		for(unsigned int a = 0; a < pScene->mNumMeshes; a++)	{
+			if(splitList[a]) {
+				numSplits++;
+			}
+		}
+	}
+
+	if(numSplits)	{
+		// we need to do something. Let's go.
+		mSubMeshIndices.clear();
+		mSubMeshIndices.resize(pScene->mNumMeshes);
+
+		// build a new array of meshes for the scene
+		std::vector<aiMesh*> meshes;
+
+		for(unsigned int a=0;a<pScene->mNumMeshes;a++)
+		{
+			aiMesh* srcMesh = pScene->mMeshes[a];
+
+			std::vector<std::pair<aiMesh*,const aiBone*> > newMeshes;
+
+			if(splitList[a]) { 
+				SplitMesh(srcMesh,newMeshes);
+			}
+
+			// mesh was split
+			if(!newMeshes.empty())	{				
+				unsigned int out = 0, in = srcMesh->mNumBones;				
+
+				// store new meshes and indices of the new meshes
+				for(unsigned int b=0;b<newMeshes.size();b++)	{						
+					const aiString *find = newMeshes[b].second?&newMeshes[b].second->mName:0;
+
+					aiNode *theNode = find?pScene->mRootNode->FindNode(*find):0;
+					std::pair<unsigned int,aiNode*> push_pair(meshes.size(),theNode);
+
+					mSubMeshIndices[a].push_back(push_pair);
+					meshes.push_back(newMeshes[b].first);
+
+					out+=newMeshes[b].first->mNumBones;
+				}
+						   
+				if(!DefaultLogger::isNullLogger()) {
+					char buffer[1024];
+					::sprintf(buffer,"Removed %i bones. Input bones: %i. Output bones: %i",in-out,in,out);
+					DefaultLogger::get()->info(buffer);
+				}
+
+				// and destroy the source mesh. It should be completely contained inside the new submeshes
+				delete srcMesh;
+			}
+			else	{
+				// Mesh is kept unchanged - store it's new place in the mesh array
+				mSubMeshIndices[a].push_back(std::pair<unsigned int,aiNode*>(meshes.size(),(aiNode*)0));
+				meshes.push_back(srcMesh);
+			}
+		}	
+			
+		// rebuild the scene's mesh array
+		pScene->mNumMeshes = meshes.size();
+		delete [] pScene->mMeshes;
+		pScene->mMeshes = new aiMesh*[pScene->mNumMeshes];
+		std::copy( meshes.begin(), meshes.end(), pScene->mMeshes);
+
+		// recurse through all nodes and translate the node's mesh indices to fit the new mesh array
+		UpdateNode( pScene->mRootNode);
+	}
+
+	DefaultLogger::get()->debug("DeboneProcess end");
+}
+
+// ------------------------------------------------------------------------------------------------
+// Counts bones total/removable in a given mesh.
+bool DeboneProcess::ConsiderMesh(const aiMesh* pMesh)
+{
+	if(!pMesh->HasBones()) {
+		return false;
+	}
+
+	bool split = false;
+
+	//interstitial faces not permitted
+	bool isInterstitialRequired = false;
+
+	std::vector<bool> isBoneNecessary(pMesh->mNumBones,false);
+	std::vector<unsigned int> vertexBones(pMesh->mNumVertices,UINT_MAX);
+
+	const unsigned int cUnowned = UINT_MAX;
+	const unsigned int cCoowned = UINT_MAX-1;
+
+	for(unsigned int i=0;i<pMesh->mNumBones;i++)	{
+		for(unsigned int j=0;j<pMesh->mBones[i]->mNumWeights;j++)	{
+			float w = pMesh->mBones[i]->mWeights[j].mWeight;
+
+			if(w==0.0f) {
+				continue;
+			}
+
+			unsigned int vid = pMesh->mBones[i]->mWeights[j].mVertexId;
+			if(w>=mThreshold)	{
+
+				if(vertexBones[vid]!=cUnowned)	{
+					if(vertexBones[vid]==i) //double entry
+					{
+						DefaultLogger::get()->warn("Encountered double entry in bone weights");					
+					}
+					else //TODO: track attraction in order to break tie
+					{
+						vertexBones[vid] = cCoowned;
+					}
+				}
+				else vertexBones[vid] = i;			
+			}
+
+			if(!isBoneNecessary[i]) {
+				isBoneNecessary[i] = w<mThreshold;
+			}
+		}
+
+		if(!isBoneNecessary[i])  {
+			isInterstitialRequired = true;
+		}
+	}
+
+	if(isInterstitialRequired) {
+		for(unsigned int i=0;i<pMesh->mNumFaces;i++) {
+			unsigned int v = vertexBones[pMesh->mFaces[i].mIndices[0]];
+
+			for(unsigned int j=1;j<pMesh->mFaces[i].mNumIndices;j++) {
+				unsigned int w = vertexBones[pMesh->mFaces[i].mIndices[j]];
+
+				if(v!=w)	{
+					if(v<pMesh->mNumBones) isBoneNecessary[v] = true; 
+					if(w<pMesh->mNumBones) isBoneNecessary[w] = true; 
+				}
+			}
+		}
+	}
+
+	for(unsigned int i=0;i<pMesh->mNumBones;i++)	{
+		if(!isBoneNecessary[i])	{
+			mNumBonesCanDoWithout++; 
+			split = true;
+		}
+		
+		mNumBones++;
+	}
+	return split;
+}
+
+// ------------------------------------------------------------------------------------------------
+// Splits the given mesh by bone count.
+void DeboneProcess::SplitMesh( const aiMesh* pMesh, std::vector< std::pair< aiMesh*,const aiBone* > >& poNewMeshes) const
+{
+	// same deal here as ConsiderMesh basically
+
+	std::vector<bool> isBoneNecessary(pMesh->mNumBones,false);
+	std::vector<unsigned int> vertexBones(pMesh->mNumVertices,UINT_MAX);
+
+	const unsigned int cUnowned = UINT_MAX;
+	const unsigned int cCoowned = UINT_MAX-1;
+
+	for(unsigned int i=0;i<pMesh->mNumBones;i++)	{
+		for(unsigned int j=0;j<pMesh->mBones[i]->mNumWeights;j++)	{
+			float w = pMesh->mBones[i]->mWeights[j].mWeight;
+
+			if(w==0.0f) {
+				continue;
+			}
+
+			unsigned int vid = pMesh->mBones[i]->mWeights[j].mVertexId;
+
+			if(w>=mThreshold) {
+				if(vertexBones[vid]!=cUnowned)  {
+					if(vertexBones[vid]==i) //double entry
+					{
+						//DefaultLogger::get()->warn("Encountered double entry in bone weights");					
+					}
+					else //TODO: track attraction in order to break tie
+					{
+						vertexBones[vid] = cCoowned;
+					}
+				}
+				else vertexBones[vid] = i;			
+			}
+
+			if(!isBoneNecessary[i]) {
+				isBoneNecessary[i] = w<mThreshold;
+			}
+		}
+	}
+
+	unsigned int nFacesUnowned = 0;
+
+	std::vector<unsigned int> faceBones(pMesh->mNumFaces,UINT_MAX);
+	std::vector<unsigned int> facesPerBone(pMesh->mNumBones,0);
+
+	for(unsigned int i=0;i<pMesh->mNumFaces;i++) {
+		unsigned int nInterstitial = 1;
+
+		unsigned int v = vertexBones[pMesh->mFaces[i].mIndices[0]];
+
+		for(unsigned int j=1;j<pMesh->mFaces[i].mNumIndices;j++) {
+			unsigned int w = vertexBones[pMesh->mFaces[i].mIndices[j]];
+
+			if(v!=w)	{
+				if(v<pMesh->mNumBones) isBoneNecessary[v] = true; 
+				if(w<pMesh->mNumBones) isBoneNecessary[w] = true; 
+			}
+			else nInterstitial++;
+		}
+
+		if(v<pMesh->mNumBones &&nInterstitial==pMesh->mFaces[i].mNumIndices)	{				
+			faceBones[i] = v; //primitive belongs to bone #v
+			facesPerBone[v]++;
+		}
+		else nFacesUnowned++; 
+	}
+
+	// invalidate any "cojoined" faces
+	for(unsigned int i=0;i<pMesh->mNumFaces;i++) {
+		if(faceBones[i]<pMesh->mNumBones&&isBoneNecessary[faceBones[i]]) 
+		{
+			ai_assert(facesPerBone[faceBones[i]]>0);
+			facesPerBone[faceBones[i]]--; 
+			
+			nFacesUnowned++; 
+			faceBones[i] = cUnowned; 
+		}
+	}
+
+	if(nFacesUnowned) {	 	
+		std::vector<unsigned int> subFaces;
+
+		for(unsigned int i=0;i<pMesh->mNumFaces;i++)	{
+			if(faceBones[i]==cUnowned) {
+				subFaces.push_back(i);
+			}
+		}
+
+		aiMesh *baseMesh = MakeSubmesh(pMesh,subFaces,0);
+		std::pair<aiMesh*,const aiBone*> push_pair(baseMesh,(const aiBone*)0);
+
+		poNewMeshes.push_back(push_pair);
+	}
+
+	for(unsigned int i=0;i<pMesh->mNumBones;i++) {			
+
+		if(!isBoneNecessary[i]&&facesPerBone[i]>0)	{				
+			std::vector<unsigned int> subFaces;
+
+			for(unsigned int j=0;j<pMesh->mNumFaces;j++)	{
+				if(faceBones[j]==i) {
+					subFaces.push_back(j);
+				}
+			}
+
+			unsigned int f = AI_SUBMESH_FLAGS_SANS_BONES;
+			aiMesh *subMesh =MakeSubmesh(pMesh,subFaces,f);
+
+			//Lifted from PretransformVertices.cpp
+			ApplyTransform(subMesh,pMesh->mBones[i]->mOffsetMatrix);
+			std::pair<aiMesh*,const aiBone*> push_pair(subMesh,pMesh->mBones[i]);
+
+			poNewMeshes.push_back(push_pair);		
+		}
+	}
+}
+
+// ------------------------------------------------------------------------------------------------
+// Recursively updates the node's mesh list to account for the changed mesh list
+void DeboneProcess::UpdateNode(aiNode* pNode) const
+{
+	// rebuild the node's mesh index list
+	
+	std::vector<unsigned int> newMeshList;
+
+	// this will require two passes
+
+	unsigned int m = pNode->mNumMeshes, n = mSubMeshIndices.size();
+	
+	// first pass, look for meshes which have not moved
+
+	for(unsigned int a=0;a<m;a++)	{
+
+		unsigned int srcIndex = pNode->mMeshes[a];
+		const std::vector< std::pair< unsigned int,aiNode* > > &subMeshes = mSubMeshIndices[srcIndex];
+		unsigned int nSubmeshes = subMeshes.size();
+
+		for(unsigned int b=0;b<nSubmeshes;b++) {
+			if(!subMeshes[b].second) {
+				newMeshList.push_back(subMeshes[b].first);
+			}
+		}
+	}
+
+	// second pass, collect deboned meshes 
+
+	for(unsigned int a=0;a<n;a++)
+	{
+		const std::vector< std::pair< unsigned int,aiNode* > > &subMeshes = mSubMeshIndices[a];
+		unsigned int nSubmeshes = subMeshes.size();
+
+		for(unsigned int b=0;b<nSubmeshes;b++) {
+			if(subMeshes[b].second == pNode)	{
+				newMeshList.push_back(subMeshes[b].first);
+			}
+		}
+	}
+
+	if( pNode->mNumMeshes > 0 )	{
+		delete [] pNode->mMeshes; pNode->mMeshes = NULL;
+	}
+
+	pNode->mNumMeshes = newMeshList.size();
+
+	if(pNode->mNumMeshes)	{
+		pNode->mMeshes = new unsigned int[pNode->mNumMeshes];
+		std::copy( newMeshList.begin(), newMeshList.end(), pNode->mMeshes);
+	}
+
+	// do that also recursively for all children
+	for( unsigned int a = 0; a < pNode->mNumChildren; ++a )	{
+		UpdateNode( pNode->mChildren[a]);
+	}
+}
+
+// ------------------------------------------------------------------------------------------------
+// Apply the node transformation to a mesh
+void DeboneProcess::ApplyTransform(aiMesh* mesh, const aiMatrix4x4& mat)const
+{
+	// Check whether we need to transform the coordinates at all
+	if (!mat.IsIdentity()) {
+		
+		if (mesh->HasPositions()) {
+			for (unsigned int i = 0; i < mesh->mNumVertices; ++i) {
+				mesh->mVertices[i] = mat * mesh->mVertices[i];
+			}
+		}
+		if (mesh->HasNormals() || mesh->HasTangentsAndBitangents()) {
+			aiMatrix4x4 mWorldIT = mat;
+			mWorldIT.Inverse().Transpose();
+
+			// TODO: implement Inverse() for aiMatrix3x3
+			aiMatrix3x3 m = aiMatrix3x3(mWorldIT);
+
+			if (mesh->HasNormals()) {
+				for (unsigned int i = 0; i < mesh->mNumVertices; ++i) {
+					mesh->mNormals[i] = (m * mesh->mNormals[i]).Normalize();
+				}
+			}
+			if (mesh->HasTangentsAndBitangents()) {
+				for (unsigned int i = 0; i < mesh->mNumVertices; ++i) {
+					mesh->mTangents[i]   = (m * mesh->mTangents[i]).Normalize();
+					mesh->mBitangents[i] = (m * mesh->mBitangents[i]).Normalize();
+				}
+			}
+		}
+	}
+}

+ 132 - 0
ThirdParty/Assimp/code/DeboneProcess.h

@@ -0,0 +1,132 @@
+				   /*
+Open Asset Import Library (ASSIMP)
+----------------------------------------------------------------------
+
+Copyright (c) 2006-2010, ASSIMP Development Team
+All rights reserved.
+
+Redistribution and use of this software in source and binary forms, 
+with or without modification, are permitted provided that the 
+following conditions are met:
+
+* Redistributions of source code must retain the above
+  copyright notice, this list of conditions and the
+  following disclaimer.
+
+* Redistributions in binary form must reproduce the above
+  copyright notice, this list of conditions and the
+  following disclaimer in the documentation and/or other
+  materials provided with the distribution.
+
+* Neither the name of the ASSIMP team, nor the names of its
+  contributors may be used to endorse or promote products
+  derived from this software without specific prior
+  written permission of the ASSIMP Development Team.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+----------------------------------------------------------------------
+*/
+
+/** Defines a post processing step to limit the number of bones affecting a single vertex. */
+#ifndef AI_DEBONEPROCESS_H_INC
+#define AI_DEBONEPROCESS_H_INC
+
+#include <vector>
+#include <utility>
+#include "BaseProcess.h"
+
+#include "../include/aiMesh.h"
+#include "../include/aiScene.h"
+
+class DeboneTest;
+
+namespace Assimp
+{
+
+#if (!defined AI_DEBONE_THRESHOLD)
+#	define AI_DEBONE_THRESHOLD	1.0f
+#endif // !! AI_DEBONE_THRESHOLD
+
+// ---------------------------------------------------------------------------
+/** This post processing step removes bones nearly losslessly or according to 
+* a configured threshold. In order to remove the bone, the primitives affected by
+* the bone are split from the mesh. The split off (new) mesh is boneless. At any 
+* point in time, bones without affect upon a given mesh are to be removed.
+*/
+class ASSIMP_API DeboneProcess : public BaseProcess
+{
+public:
+
+	DeboneProcess();
+	~DeboneProcess();
+
+public:
+	// -------------------------------------------------------------------
+	/** Returns whether the processing step is present in the given flag.
+	* @param pFlags The processing flags the importer was called with. 
+	*   A bitwise combination of #aiPostProcessSteps.
+	* @return true if the process is present in this flag fields, 
+	*   false if not.
+	*/
+	bool IsActive( unsigned int pFlags) const;
+
+	// -------------------------------------------------------------------
+	/** Called prior to ExecuteOnScene().
+	* The function is a request to the process to update its configuration
+	* basing on the Importer's configuration property list.
+	*/
+	void SetupProperties(const Importer* pImp);
+
+protected:
+		
+	// -------------------------------------------------------------------
+	/** Executes the post processing step on the given imported data.
+	* At the moment a process is not supposed to fail.
+	* @param pScene The imported data to work at.
+	*/
+	void Execute( aiScene* pScene);
+
+	// -------------------------------------------------------------------
+	/** Counts bones total/removable in a given mesh.
+	* @param pMesh The mesh to process.
+	*/
+	bool ConsiderMesh( const aiMesh* pMesh);
+
+	/// Splits the given mesh by bone count.
+	/// @param pMesh the Mesh to split. Is not changed at all, but might be superfluous in case it was split.
+	/// @param poNewMeshes Array of submeshes created in the process. Empty if splitting was not necessary.
+	void SplitMesh(const aiMesh* pMesh, std::vector< std::pair< aiMesh*,const aiBone* > >& poNewMeshes) const;
+
+	/// Recursively updates the node's mesh list to account for the changed mesh list
+	void UpdateNode(aiNode* pNode) const;
+
+	// -------------------------------------------------------------------
+	// Apply transformation to a mesh 
+	void ApplyTransform(aiMesh* mesh, const aiMatrix4x4& mat)const;
+
+public:
+	/** Number of bones present in the scene. */
+	unsigned int mNumBones;
+	unsigned int mNumBonesCanDoWithout;
+
+	float mThreshold;
+	bool mAllOrNone;
+
+	/// Per mesh index: Array of indices of the new submeshes.
+	std::vector< std::vector< std::pair< unsigned int,aiNode* > > > mSubMeshIndices;
+};
+
+} // end of namespace Assimp
+
+#endif // AI_DEBONEPROCESS_H_INC

+ 1 - 1
ThirdParty/Assimp/code/DefaultIOStream.cpp

@@ -108,7 +108,7 @@ size_t DefaultIOStream::FileSize() const
 		return 0;
 		return 0;
 	}
 	}
 	
 	
-	if (0xffffffff == cachedSize) {
+	if (SIZE_MAX == cachedSize) {
 
 
 		// TODO: Is that really faster if we're already owning a handle to the file?
 		// TODO: Is that really faster if we're already owning a handle to the file?
 #if defined _WIN32 && !defined __GNUC__
 #if defined _WIN32 && !defined __GNUC__

+ 2 - 2
ThirdParty/Assimp/code/DefaultIOStream.h

@@ -110,7 +110,7 @@ private:
 inline DefaultIOStream::DefaultIOStream () : 
 inline DefaultIOStream::DefaultIOStream () : 
 	mFile		(NULL), 
 	mFile		(NULL), 
 	mFilename	(""),
 	mFilename	(""),
-	cachedSize	(0xffffffff)
+	cachedSize	(SIZE_MAX)
 {
 {
 	// empty
 	// empty
 }
 }
@@ -121,7 +121,7 @@ inline DefaultIOStream::DefaultIOStream (FILE* pFile,
 		const std::string &strFilename) :
 		const std::string &strFilename) :
 	mFile(pFile), 
 	mFile(pFile), 
 	mFilename(strFilename),
 	mFilename(strFilename),
-	cachedSize	(0xffffffff)
+	cachedSize	(SIZE_MAX)
 {
 {
 	// empty
 	// empty
 }
 }

+ 28 - 24
ThirdParty/Assimp/code/DefaultLogger.cpp

@@ -64,8 +64,10 @@ namespace Assimp	{
 NullLogger DefaultLogger::s_pNullLogger;
 NullLogger DefaultLogger::s_pNullLogger;
 Logger *DefaultLogger::m_pLogger = &DefaultLogger::s_pNullLogger;
 Logger *DefaultLogger::m_pLogger = &DefaultLogger::s_pNullLogger;
 
 
+static const unsigned int SeverityAll = Logger::Info | Logger::Err | Logger::Warn | Logger::Debugging;
+
 // ----------------------------------------------------------------------------------
 // ----------------------------------------------------------------------------------
-// Represents a logstream + its error severity
+// Represents a log-stream + its error severity
 struct LogStreamInfo
 struct LogStreamInfo
 {
 {
 	unsigned int m_uiErrorSeverity;
 	unsigned int m_uiErrorSeverity;
@@ -157,47 +159,49 @@ Logger *DefaultLogger::create(const char* name /*= "AssimpLog.txt"*/,
 }
 }
 
 
 // ----------------------------------------------------------------------------------
 // ----------------------------------------------------------------------------------
-void Logger::debug(const std::string &message)	{
+void Logger::debug(const char* message)	{
 
 
-	// SECURITY FIX: otherwise it's easy to produce overruns ...
-	if (message.length()>MAX_LOG_MESSAGE_LENGTH) {
+	// SECURITY FIX: otherwise it's easy to produce overruns since
+	// sometimes importers will include data from the input file
+	// (i.e. node names) in their messages.
+	if (strlen(message)>MAX_LOG_MESSAGE_LENGTH) {
 		ai_assert(false);
 		ai_assert(false);
 		return;
 		return;
 	}
 	}
-	return OnDebug(message.c_str());
+	return OnDebug(message);
 }
 }
 
 
 // ----------------------------------------------------------------------------------
 // ----------------------------------------------------------------------------------
-void Logger::info(const std::string &message)	{
+void Logger::info(const char* message)	{
 	
 	
-	// SECURITY FIX: otherwise it's easy to produce overruns ...
-	if (message.length()>MAX_LOG_MESSAGE_LENGTH) {
+	// SECURITY FIX: see above
+	if (strlen(message)>MAX_LOG_MESSAGE_LENGTH) {
 		ai_assert(false);
 		ai_assert(false);
 		return;
 		return;
 	}
 	}
-	return OnInfo(message.c_str());
+	return OnInfo(message);
 }
 }
 	
 	
 // ----------------------------------------------------------------------------------
 // ----------------------------------------------------------------------------------
-void Logger::warn(const std::string &message)	{
+void Logger::warn(const char* message)	{
 	
 	
-	// SECURITY FIX: otherwise it's easy to produce overruns ...
-	if (message.length()>MAX_LOG_MESSAGE_LENGTH) {
+	// SECURITY FIX: see above
+	if (strlen(message)>MAX_LOG_MESSAGE_LENGTH) {
 		ai_assert(false);
 		ai_assert(false);
 		return;
 		return;
 	}
 	}
-	return OnWarn(message.c_str());
+	return OnWarn(message);
 }
 }
 
 
 // ----------------------------------------------------------------------------------
 // ----------------------------------------------------------------------------------
-void Logger::error(const std::string &message)	{
+void Logger::error(const char* message)	{
 	
 	
-	// SECURITY FIX: otherwise it's easy to produce overruns ...
-	if (message.length()>MAX_LOG_MESSAGE_LENGTH) {
+	// SECURITY FIX: see above
+	if (strlen(message)>MAX_LOG_MESSAGE_LENGTH) {
 		ai_assert(false);
 		ai_assert(false);
 		return;
 		return;
 	}
 	}
-	return OnError(message.c_str());
+	return OnError(message);
 }
 }
 
 
 // ----------------------------------------------------------------------------------
 // ----------------------------------------------------------------------------------
@@ -252,7 +256,7 @@ void DefaultLogger::OnDebug( const char* message )
 	char msg[MAX_LOG_MESSAGE_LENGTH*2];
 	char msg[MAX_LOG_MESSAGE_LENGTH*2];
 	::sprintf(msg,"Debug, T%i: %s", GetThreadID(), message );
 	::sprintf(msg,"Debug, T%i: %s", GetThreadID(), message );
 
 
-	WriteToStreams( msg, Logger::DEBUGGING );
+	WriteToStreams( msg, Logger::Debugging );
 }
 }
 
 
 // ----------------------------------------------------------------------------------
 // ----------------------------------------------------------------------------------
@@ -262,7 +266,7 @@ void DefaultLogger::OnInfo( const char* message )
 	char msg[MAX_LOG_MESSAGE_LENGTH*2];
 	char msg[MAX_LOG_MESSAGE_LENGTH*2];
 	::sprintf(msg,"Info,  T%i: %s", GetThreadID(), message );
 	::sprintf(msg,"Info,  T%i: %s", GetThreadID(), message );
 
 
-	WriteToStreams( msg , Logger::INFO );
+	WriteToStreams( msg , Logger::Info );
 }
 }
 
 
 // ----------------------------------------------------------------------------------
 // ----------------------------------------------------------------------------------
@@ -272,7 +276,7 @@ void DefaultLogger::OnWarn( const char* message )
 	char msg[MAX_LOG_MESSAGE_LENGTH*2];
 	char msg[MAX_LOG_MESSAGE_LENGTH*2];
 	::sprintf(msg,"Warn,  T%i: %s", GetThreadID(), message );
 	::sprintf(msg,"Warn,  T%i: %s", GetThreadID(), message );
 
 
-	WriteToStreams( msg, Logger::WARN );
+	WriteToStreams( msg, Logger::Warn );
 }
 }
 
 
 // ----------------------------------------------------------------------------------
 // ----------------------------------------------------------------------------------
@@ -282,18 +286,18 @@ void DefaultLogger::OnError( const char* message )
 	char msg[MAX_LOG_MESSAGE_LENGTH*2];
 	char msg[MAX_LOG_MESSAGE_LENGTH*2];
 	::sprintf(msg,"Error, T%i: %s", GetThreadID(), message );
 	::sprintf(msg,"Error, T%i: %s", GetThreadID(), message );
 
 
-	WriteToStreams( msg, Logger::ERR );
+	WriteToStreams( msg, Logger::Err );
 }
 }
 
 
 // ----------------------------------------------------------------------------------
 // ----------------------------------------------------------------------------------
-//	Attachs a new stream
+//	Will attach a new stream
 bool DefaultLogger::attachStream( LogStream *pStream, unsigned int severity )
 bool DefaultLogger::attachStream( LogStream *pStream, unsigned int severity )
 {
 {
 	if (!pStream)
 	if (!pStream)
 		return false;
 		return false;
 
 
 	if (0 == severity)	{
 	if (0 == severity)	{
-		severity = Logger::INFO | Logger::ERR | Logger::WARN | Logger::DEBUGGING;
+		severity = Logger::Info | Logger::Err | Logger::Warn | Logger::Debugging;
 	}
 	}
 
 
 	for ( StreamIt it = m_StreamArray.begin();
 	for ( StreamIt it = m_StreamArray.begin();
@@ -320,7 +324,7 @@ bool DefaultLogger::detatchStream( LogStream *pStream, unsigned int severity )
 		return false;
 		return false;
 
 
 	if (0 == severity)	{
 	if (0 == severity)	{
-		severity = Logger::INFO | Logger::ERR | Logger::WARN | Logger::DEBUGGING;
+		severity = SeverityAll;
 	}
 	}
 	
 	
 	for ( StreamIt it = m_StreamArray.begin();
 	for ( StreamIt it = m_StreamArray.begin();

+ 1 - 1
ThirdParty/Assimp/code/DefaultProgressHandler.h

@@ -53,7 +53,7 @@ class ASSIMP_API DefaultProgressHandler
 	: public ProgressHandler	{
 	: public ProgressHandler	{
 
 
 	
 	
-	virtual bool Update(float percentage) {
+	virtual bool Update(float /*percentage*/) {
 		return false;
 		return false;
 	}
 	}
 
 

+ 2 - 0
ThirdParty/Assimp/code/Exceptional.h

@@ -65,6 +65,8 @@ public:
 private:
 private:
 };
 };
 
 
+typedef DeadlyImportError DeadlyExportError;
+
 #ifdef _MSC_VER
 #ifdef _MSC_VER
 #	pragma warning(default : 4275)
 #	pragma warning(default : 4275)
 #endif
 #endif

+ 400 - 0
ThirdParty/Assimp/code/Exporter.cpp

@@ -0,0 +1,400 @@
+/*
+---------------------------------------------------------------------------
+Open Asset Import Library (ASSIMP)
+---------------------------------------------------------------------------
+
+Copyright (c) 2006-2010, ASSIMP Development Team
+
+All rights reserved.
+
+Redistribution and use of this software in source and binary forms, 
+with or without modification, are permitted provided that the following 
+conditions are met:
+
+* Redistributions of source code must retain the above
+  copyright notice, this list of conditions and the
+  following disclaimer.
+
+* Redistributions in binary form must reproduce the above
+  copyright notice, this list of conditions and the
+  following disclaimer in the documentation and/or other
+  materials provided with the distribution.
+
+* Neither the name of the ASSIMP team, nor the names of its
+  contributors may be used to endorse or promote products
+  derived from this software without specific prior
+  written permission of the ASSIMP Development Team.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+---------------------------------------------------------------------------
+*/
+
+/** @file Exporter.cpp
+
+Assimp export interface. While it's public interface bears many similarities
+to the import interface (in fact, it is largely symmetric), the internal
+implementations differs a lot. Exporters are considered stateless and are
+simple callbacks which we maintain in a global list along with their
+description strings.
+
+Here we implement only the C++ interface (Assimp::Exporter).
+*/
+
+#include "AssimpPCH.h"
+
+#ifndef ASSIMP_BUILD_NO_EXPORT
+
+#include "DefaultIOSystem.h"
+#include "BlobIOSystem.h" 
+#include "SceneCombiner.h" 
+#include "BaseProcess.h" 
+#include "Importer.h" // need this for GetPostProcessingStepInstanceList()
+
+#include "MakeVerboseFormat.h"
+#include "ConvertToLHProcess.h"
+
+namespace Assimp {
+
+// PostStepRegistry.cpp
+void GetPostProcessingStepInstanceList(std::vector< BaseProcess* >& out);
+
+// ------------------------------------------------------------------------------------------------
+// Exporter worker function prototypes. Should not be necessary to #ifndef them, it's just a prototype
+void ExportSceneCollada(const char*,IOSystem*, const aiScene*);
+void ExportSceneObj(const char*,IOSystem*, const aiScene*);
+void ExportSceneSTL(const char*,IOSystem*, const aiScene*);
+void ExportScene3DS(const char*, IOSystem*, const aiScene*) {}
+
+/// Function pointer type of a Export worker function
+typedef void (*fpExportFunc)(const char*,IOSystem*,const aiScene*);
+
+// ------------------------------------------------------------------------------------------------
+/// Internal description of an Assimp export format option
+struct ExportFormatEntry
+{
+	/// Public description structure to be returned by aiGetExportFormatDescription()
+	aiExportFormatDesc mDescription;
+
+	// Worker function to do the actual exporting
+	fpExportFunc mExportFunction;
+
+	// Postprocessing steps to be executed PRIOR to calling mExportFunction
+	unsigned int mEnforcePP;
+
+	// Constructor to fill all entries
+	ExportFormatEntry( const char* pId, const char* pDesc, const char* pExtension, fpExportFunc pFunction, unsigned int pEnforcePP = 0u)
+	{
+		mDescription.id = pId;
+		mDescription.description = pDesc;
+		mDescription.fileExtension = pExtension;
+		mExportFunction = pFunction;
+		mEnforcePP = pEnforcePP;
+	}
+};
+
+// ------------------------------------------------------------------------------------------------
+// global array of all export formats which Assimp supports in its current build
+ExportFormatEntry gExporters[] = 
+{
+#ifndef ASSIMP_BUILD_NO_COLLADA_EXPORTER
+	ExportFormatEntry( "collada", "COLLADA - Digital Asset Exchange Schema", "dae", &ExportSceneCollada),
+#endif
+
+#ifndef ASSIMP_BUILD_NO_OBJ_EXPORTER
+	ExportFormatEntry( "obj", "Wavefront OBJ format", "obj", &ExportSceneObj),
+#endif
+
+#ifndef ASSIMP_BUILD_NO_STL_EXPORTER
+	ExportFormatEntry( "stl", "Stereolithography", "stl" , &ExportSceneSTL, 
+		aiProcess_Triangulate | aiProcess_GenNormals | aiProcess_PreTransformVertices
+	),
+#endif
+
+//#ifndef ASSIMP_BUILD_NO_3DS_EXPORTER
+//	ExportFormatEntry( "3ds", "Autodesk 3DS (legacy format)", "3ds" , &ExportScene3DS),
+//#endif
+};
+
+
+class ExporterPimpl {
+public:
+
+	ExporterPimpl()
+		: blob()
+		, mIOSystem(new Assimp::DefaultIOSystem())
+		, mIsDefaultIOHandler(true)
+	{
+		GetPostProcessingStepInstanceList(mPostProcessingSteps);
+	}
+
+	~ExporterPimpl() 
+	{
+		delete blob;
+
+		// Delete all post-processing plug-ins
+		for( unsigned int a = 0; a < mPostProcessingSteps.size(); a++) {
+			delete mPostProcessingSteps[a];
+		}
+	}
+
+public:
+		
+	aiExportDataBlob* blob;
+	boost::shared_ptr< Assimp::IOSystem > mIOSystem;
+	bool mIsDefaultIOHandler;
+
+	/** Post processing steps we can apply at the imported data. */
+	std::vector< BaseProcess* > mPostProcessingSteps;
+
+	/** Last fatal export error */
+	std::string mError;
+};
+
+#define ASSIMP_NUM_EXPORTERS (sizeof(gExporters)/sizeof(gExporters[0]))
+
+} // end of namespace Assimp
+
+
+
+
+
+using namespace Assimp;
+
+
+// ------------------------------------------------------------------------------------------------
+Exporter :: Exporter() 
+: pimpl(new ExporterPimpl())
+{
+}
+
+
+// ------------------------------------------------------------------------------------------------
+Exporter :: ~Exporter()
+{
+	FreeBlob();
+}
+
+
+// ------------------------------------------------------------------------------------------------
+void Exporter :: SetIOHandler( IOSystem* pIOHandler)
+{
+	pimpl->mIsDefaultIOHandler = !pIOHandler;
+	pimpl->mIOSystem.reset(pIOHandler);
+}
+
+
+// ------------------------------------------------------------------------------------------------
+IOSystem* Exporter :: GetIOHandler() const
+{
+	return pimpl->mIOSystem.get();
+}
+
+
+// ------------------------------------------------------------------------------------------------
+bool Exporter :: IsDefaultIOHandler() const
+{
+	return pimpl->mIsDefaultIOHandler;
+}
+
+
+// ------------------------------------------------------------------------------------------------
+const aiExportDataBlob* Exporter :: ExportToBlob(  const aiScene* pScene, const char* pFormatId, unsigned int pPreprocessing )
+{
+	if (pimpl->blob) {
+		delete pimpl->blob;
+		pimpl->blob = NULL;
+	}
+
+
+	boost::shared_ptr<IOSystem> old = pimpl->mIOSystem;
+
+	BlobIOSystem* blobio = new BlobIOSystem();
+	pimpl->mIOSystem = boost::shared_ptr<IOSystem>( blobio );
+
+	if (AI_SUCCESS != Export(pScene,pFormatId,blobio->GetMagicFileName())) {
+		pimpl->mIOSystem = old;
+		return NULL;
+	}
+
+	pimpl->blob = blobio->GetBlobChain();
+	pimpl->mIOSystem = old;
+
+	return pimpl->blob;
+}
+
+
+// ------------------------------------------------------------------------------------------------
+aiReturn Exporter :: Export( const aiScene* pScene, const char* pFormatId, const char* pPath, unsigned int pPreprocessing )
+{
+	ASSIMP_BEGIN_EXCEPTION_REGION();
+
+	pimpl->mError = "";
+	for (size_t i = 0; i < ASSIMP_NUM_EXPORTERS; ++i) {
+		if (!strcmp(gExporters[i].mDescription.id,pFormatId)) {
+
+			try {
+
+				// Always create a full copy of the scene. We might optimize this one day, 
+				// but for now it is the most pragmatic way.
+				aiScene* scenecopy_tmp;
+				SceneCombiner::CopyScene(&scenecopy_tmp,pScene);
+
+				std::auto_ptr<aiScene> scenecopy(scenecopy_tmp);
+				const ScenePrivateData* const priv = ScenePriv(pScene);
+
+				// steps that are not idempotent, i.e. we might need to run them again, usually to get back to the
+				// original state before the step was applied first. When checking which steps we don't need
+				// to run, those are excluded.
+				const unsigned int nonIdempotentSteps = aiProcess_FlipWindingOrder | aiProcess_FlipUVs | aiProcess_MakeLeftHanded;
+
+				// Erase all pp steps that were already applied to this scene
+				unsigned int pp = (gExporters[i].mEnforcePP | pPreprocessing) & ~(priv 
+					? (priv->mPPStepsApplied & ~nonIdempotentSteps)
+					: 0u);
+
+				// If no extra postprocessing was specified, and we obtained this scene from an
+				// Assimp importer, apply the reverse steps automatically.
+				if (!pPreprocessing && priv) {
+					pp |= (nonIdempotentSteps & priv->mPPStepsApplied);
+				}
+
+				// If the input scene is not in verbose format, but there is at least postprocessing step that relies on it,
+				// we need to run the MakeVerboseFormat step first.
+				if (scenecopy->mFlags & AI_SCENE_FLAGS_NON_VERBOSE_FORMAT) {
+					
+					bool verbosify = false;
+					for( unsigned int a = 0; a < pimpl->mPostProcessingSteps.size(); a++) {
+						BaseProcess* const p = pimpl->mPostProcessingSteps[a];
+
+						if (p->IsActive(pp) && p->RequireVerboseFormat()) {
+							verbosify = true;
+							break;
+						}
+					}
+
+					if (verbosify || (gExporters[i].mEnforcePP & aiProcess_JoinIdenticalVertices)) {
+						DefaultLogger::get()->debug("export: Scene data not in verbose format, applying MakeVerboseFormat step first");
+
+						MakeVerboseFormatProcess proc;
+						proc.Execute(scenecopy.get());
+					}
+				}
+
+				if (pp) {
+					// the three 'conversion' steps need to be executed first because all other steps rely on the standard data layout
+					{
+						FlipWindingOrderProcess step;
+						if (step.IsActive(pp)) {
+							step.Execute(scenecopy.get());
+						}
+					}
+					
+					{
+						FlipUVsProcess step;
+						if (step.IsActive(pp)) {
+							step.Execute(scenecopy.get());
+						}
+					}
+
+					{
+						MakeLeftHandedProcess step;
+						if (step.IsActive(pp)) {
+							step.Execute(scenecopy.get());
+						}
+					}
+
+					// dispatch other processes
+					for( unsigned int a = 0; a < pimpl->mPostProcessingSteps.size(); a++) {
+						BaseProcess* const p = pimpl->mPostProcessingSteps[a];
+
+						if (p->IsActive(pp) 
+							&& !dynamic_cast<FlipUVsProcess*>(p) 
+							&& !dynamic_cast<FlipWindingOrderProcess*>(p) 
+							&& !dynamic_cast<MakeLeftHandedProcess*>(p)) {
+
+							p->Execute(scenecopy.get());
+						}
+					}
+					ScenePrivateData* const privOut = ScenePriv(scenecopy.get());
+					ai_assert(privOut);
+
+					privOut->mPPStepsApplied |= pp;
+				}
+
+				gExporters[i].mExportFunction(pPath,pimpl->mIOSystem.get(),scenecopy.get());
+			}
+			catch (DeadlyExportError& err) {
+				pimpl->mError = err.what();
+				return AI_FAILURE;
+			}
+			return AI_SUCCESS;
+		}
+	}
+
+	pimpl->mError = std::string("Found no exporter to handle this file format: ") + pFormatId;
+	ASSIMP_END_EXCEPTION_REGION(aiReturn);
+	return AI_FAILURE;
+}
+
+
+// ------------------------------------------------------------------------------------------------
+const char* Exporter :: GetErrorString() const
+{
+	return pimpl->mError.c_str();
+}
+
+
+// ------------------------------------------------------------------------------------------------
+void Exporter :: FreeBlob( )
+{
+	delete pimpl->blob;
+	pimpl->blob = NULL;
+
+	pimpl->mError = "";
+}
+
+
+// ------------------------------------------------------------------------------------------------
+const aiExportDataBlob* Exporter :: GetBlob() const 
+{
+	return pimpl->blob;
+}
+
+
+// ------------------------------------------------------------------------------------------------
+const aiExportDataBlob* Exporter :: GetOrphanedBlob() const 
+{
+	const aiExportDataBlob* tmp = pimpl->blob;
+	pimpl->blob = NULL;
+	return tmp;
+}
+
+
+// ------------------------------------------------------------------------------------------------
+size_t Exporter :: GetExportFormatCount() const 
+{
+	return ASSIMP_NUM_EXPORTERS;
+}
+
+// ------------------------------------------------------------------------------------------------
+const aiExportFormatDesc* Exporter :: GetExportFormatDescription( size_t pIndex ) const 
+{
+	if (pIndex >= ASSIMP_NUM_EXPORTERS) {
+		return NULL;
+	}
+
+	return &gExporters[pIndex].mDescription;
+}
+
+
+#endif // !ASSIMP_BUILD_NO_EXPORT

+ 9 - 3
ThirdParty/Assimp/code/FileSystemFilter.h

@@ -50,6 +50,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include "ParsingUtils.h"
 #include "ParsingUtils.h"
 namespace Assimp	{
 namespace Assimp	{
 
 
+inline bool IsHex(char s) {
+	return (s>='0' && s<='9') || (s>='a' && s<='f') || (s>='A' && s<='F');	
+}
+
 // ---------------------------------------------------------------------------
 // ---------------------------------------------------------------------------
 /** File system filter  
 /** File system filter  
  */
  */
@@ -191,6 +195,9 @@ private:
 	void Cleanup (std::string& in) const
 	void Cleanup (std::string& in) const
 	{
 	{
 		char last = 0;
 		char last = 0;
+		if(in.empty()) {
+			return;
+		}
 
 
 		// Remove a very common issue when we're parsing file names: spaces at the
 		// Remove a very common issue when we're parsing file names: spaces at the
 		// beginning of the path. 
 		// beginning of the path. 
@@ -226,9 +233,8 @@ private:
 			else if (*it == '%' && in.end() - it > 2) {
 			else if (*it == '%' && in.end() - it > 2) {
 			
 			
 				// Hex sequence in URIs
 				// Hex sequence in URIs
-				uint32_t tmp;
-				if( 0xffffffff != (tmp = HexOctetToDecimal(&*it))) {
-					*it = (char)tmp;
+				if( IsHex((&*it)[0]) && IsHex((&*it)[1]) ) {
+					*it = HexOctetToDecimal(&*it);
 					it = in.erase(it+1,it+2);
 					it = in.erase(it+1,it+2);
 					--it;
 					--it;
 				}
 				}

+ 1 - 6
ThirdParty/Assimp/code/FindDegenerates.h

@@ -55,14 +55,9 @@ namespace Assimp	{
 */
 */
 class ASSIMP_API FindDegeneratesProcess : public BaseProcess
 class ASSIMP_API FindDegeneratesProcess : public BaseProcess
 {
 {
-	friend class Importer;
-	friend class ::FindDegeneratesProcessTest; // grant the unit test full access to us
+public:
 
 
-protected:
-	/** Constructor to be privately used by Importer */
 	FindDegeneratesProcess();
 	FindDegeneratesProcess();
-
-	/** Destructor, private as well */
 	~FindDegeneratesProcess();
 	~FindDegeneratesProcess();
 
 
 public:
 public:

+ 20 - 31
ThirdParty/Assimp/code/FindInstancesProcess.cpp

@@ -175,43 +175,32 @@ void FindInstancesProcess::Execute( aiScene* pScene)
 					// use a constant epsilon for colors and UV coordinates
 					// use a constant epsilon for colors and UV coordinates
 					static const float uvEpsilon = 10e-4f;
 					static const float uvEpsilon = 10e-4f;
 
 
-					BOOST_STATIC_ASSERT(4 == AI_MAX_NUMBER_OF_COLOR_SETS);
-
-					// as in JIV: manually unrolled as continue wouldn't work as desired in inner loops
-					if (orig->mTextureCoords[0]) {
-						if(!CompareArrays(orig->mTextureCoords[0],inst->mTextureCoords[0],orig->mNumVertices,uvEpsilon))
-							continue;
-						if (orig->mTextureCoords[1]) {
-							if(!CompareArrays(orig->mTextureCoords[1],inst->mTextureCoords[1],orig->mNumVertices,uvEpsilon))
+					{
+						unsigned int i, end = orig->GetNumUVChannels();
+						for(i = 0; i < end; ++i) {
+							if (!orig->mTextureCoords[i]) {
 								continue;
 								continue;
-							if (orig->mTextureCoords[2]) {
-								if(!CompareArrays(orig->mTextureCoords[2],inst->mTextureCoords[2],orig->mNumVertices,uvEpsilon))
-									continue;
-								if (orig->mTextureCoords[3]) {
-									if(!CompareArrays(orig->mTextureCoords[3],inst->mTextureCoords[3],orig->mNumVertices,uvEpsilon))
-										continue;
-								}
+							}
+							if(!CompareArrays(orig->mTextureCoords[i],inst->mTextureCoords[i],orig->mNumVertices,uvEpsilon)) {
+								break;	
 							}
 							}
 						}
 						}
-					}
-
-					BOOST_STATIC_ASSERT(4 == AI_MAX_NUMBER_OF_COLOR_SETS);
-
-					// and the same nasty stuff for vertex colors ...
-					if (orig->mColors[0]) {
-						if(!CompareArrays(orig->mColors[0],inst->mColors[0],orig->mNumVertices,uvEpsilon))
+						if (i != end) {
 							continue;
 							continue;
-						if (orig->mTextureCoords[1]) {
-							if(!CompareArrays(orig->mColors[1],inst->mColors[1],orig->mNumVertices,uvEpsilon))
+						}
+					}
+					{
+						unsigned int i, end = orig->GetNumColorChannels();
+						for(i = 0; i < end; ++i) {
+							if (!orig->mColors[i]) {
 								continue;
 								continue;
-							if (orig->mTextureCoords[2]) {
-								if(!CompareArrays(orig->mColors[2],inst->mColors[2],orig->mNumVertices,uvEpsilon))
-									continue;
-								if (orig->mTextureCoords[3]) {
-									if(!CompareArrays(orig->mColors[3],inst->mColors[3],orig->mNumVertices,uvEpsilon))
-										continue;
-								}
 							}
 							}
+							if(!CompareArrays(orig->mColors[i],inst->mColors[i],orig->mNumVertices,uvEpsilon)) {
+								break;	
+							}
+						}
+						if (i != end) {
+							continue;
 						}
 						}
 					}
 					}
 
 

+ 2 - 7
ThirdParty/Assimp/code/FindInstancesProcess.h

@@ -54,7 +54,7 @@ namespace Assimp	{
 /** @brief Get a pseudo(!)-hash representing a mesh.
 /** @brief Get a pseudo(!)-hash representing a mesh.
  *
  *
  *  The hash is built from number of vertices, faces, primitive types,
  *  The hash is built from number of vertices, faces, primitive types,
- *  .... but *not* from the real mesh data. It isn't absolutely unique.
+ *  .... but *not* from the real mesh data. The funcction is not a perfect hash.
  *  @param in Input mesh
  *  @param in Input mesh
  *  @return Hash. 
  *  @return Hash. 
  */
  */
@@ -107,14 +107,9 @@ inline bool CompareArrays(const aiColor4D* first, const aiColor4D* second,
 */
 */
 class ASSIMP_API FindInstancesProcess : public BaseProcess
 class ASSIMP_API FindInstancesProcess : public BaseProcess
 {
 {
-	friend class Importer;
-	friend class ::FindInstancesProcessTest; 
+public:
 
 
-protected:
-	/** Constructor to be privately used by Importer */
 	FindInstancesProcess();
 	FindInstancesProcess();
-
-	/** Destructor, private as well */
 	~FindInstancesProcess();
 	~FindInstancesProcess();
 
 
 public:
 public:

+ 2 - 2
ThirdParty/Assimp/code/FindInvalidDataProcess.cpp

@@ -90,7 +90,7 @@ void UpdateMeshReferences(aiNode* node, const std::vector<unsigned int>& meshMap
 		for (unsigned int a = 0; a < node->mNumMeshes;++a)	{
 		for (unsigned int a = 0; a < node->mNumMeshes;++a)	{
 
 
 			register unsigned int ref = node->mMeshes[a];
 			register unsigned int ref = node->mMeshes[a];
-			if (0xffffffff != (ref = meshMapping[ref]))	{
+			if (UINT_MAX != (ref = meshMapping[ref]))	{
 				node->mMeshes[out++] = ref;
 				node->mMeshes[out++] = ref;
 			}
 			}
 		}
 		}
@@ -130,7 +130,7 @@ void FindInvalidDataProcess::Execute( aiScene* pScene)
 				delete pScene->mMeshes[a];
 				delete pScene->mMeshes[a];
 				AI_DEBUG_INVALIDATE_PTR(pScene->mMeshes[a]);
 				AI_DEBUG_INVALIDATE_PTR(pScene->mMeshes[a]);
 
 
-				meshMapping[a] = 0xffffffff;
+				meshMapping[a] = UINT_MAX;
 				continue;
 				continue;
 			}
 			}
 		}
 		}

+ 1 - 7
ThirdParty/Assimp/code/FindInvalidDataProcess.h

@@ -59,15 +59,9 @@ namespace Assimp	{
 class ASSIMP_API FindInvalidDataProcess 
 class ASSIMP_API FindInvalidDataProcess 
 	: public BaseProcess
 	: public BaseProcess
 {
 {
-	friend class Importer;
-	friend class ::FindInvalidDataProcessTest;
-
-protected:
+public:
 
 
-	/** Constructor to be privately used by Importer */
 	FindInvalidDataProcess();
 	FindInvalidDataProcess();
-
-	/** Destructor, private as well */
 	~FindInvalidDataProcess();
 	~FindInvalidDataProcess();
 
 
 public:
 public:

+ 3 - 7
ThirdParty/Assimp/code/FixNormalsStep.h

@@ -55,15 +55,11 @@ namespace Assimp
  * vectors of an object are facing inwards. In this case they will be
  * vectors of an object are facing inwards. In this case they will be
  * flipped.
  * flipped.
  */
  */
-	class ASSIMP_API FixInfacingNormalsProcess : public BaseProcess
+class ASSIMP_API FixInfacingNormalsProcess : public BaseProcess
 {
 {
-	friend class Importer;
-
-protected:
-	/** Constructor to be privately used by Importer */
+public:
+	
 	FixInfacingNormalsProcess();
 	FixInfacingNormalsProcess();
-
-	/** Destructor, private as well */
 	~FixInfacingNormalsProcess();
 	~FixInfacingNormalsProcess();
 
 
 public:
 public:

+ 1 - 5
ThirdParty/Assimp/code/GenFaceNormalsProcess.h

@@ -53,13 +53,9 @@ namespace Assimp
 */
 */
 class ASSIMP_API GenFaceNormalsProcess : public BaseProcess
 class ASSIMP_API GenFaceNormalsProcess : public BaseProcess
 {
 {
-	friend class Importer;
+public:
 
 
-protected:
-	/** Constructor to be privately used by Importer */
 	GenFaceNormalsProcess();
 	GenFaceNormalsProcess();
-
-	/** Destructor, private as well */
 	~GenFaceNormalsProcess();
 	~GenFaceNormalsProcess();
 
 
 public:
 public:

+ 1 - 6
ThirdParty/Assimp/code/GenVertexNormalsProcess.h

@@ -55,14 +55,9 @@ namespace Assimp {
 */
 */
 class ASSIMP_API GenVertexNormalsProcess : public BaseProcess
 class ASSIMP_API GenVertexNormalsProcess : public BaseProcess
 {
 {
-	friend class Importer;
-	friend class ::GenNormalsTest;
+public:
 
 
-protected:
-	/** Constructor to be privately used by Importer */
 	GenVertexNormalsProcess();
 	GenVertexNormalsProcess();
-
-	/** Destructor, private as well */
 	~GenVertexNormalsProcess();
 	~GenVertexNormalsProcess();
 
 
 public:
 public:

+ 2 - 6
ThirdParty/Assimp/code/HMPLoader.h

@@ -62,15 +62,11 @@ using namespace HMP;
 */
 */
 class HMPImporter : public MDLImporter
 class HMPImporter : public MDLImporter
 {
 {
-	friend class Importer;
-
-protected:
-	/** Constructor to be privately used by Importer */
+public:
 	HMPImporter();
 	HMPImporter();
-
-	/** Destructor, private as well */
 	~HMPImporter();
 	~HMPImporter();
 
 
+
 public:
 public:
 
 
 	// -------------------------------------------------------------------
 	// -------------------------------------------------------------------

+ 10 - 5
ThirdParty/Assimp/code/Hash.h

@@ -42,9 +42,14 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #define AI_HASH_H_INCLUDED
 #define AI_HASH_H_INCLUDED
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
-// hashing function taken from 
+// Hashing function taken from 
 // http://www.azillionmonkeys.com/qed/hash.html
 // http://www.azillionmonkeys.com/qed/hash.html
-// (incremental version of the hashing function)
+// (incremental version)
+//
+// This code is Copyright 2004-2008 by Paul Hsieh. It is used here in the belief that
+// Assimp's license is considered compatible with Pauls's derivative license as specified
+// on his web page.
+//
 // (stdint.h should have been been included here)
 // (stdint.h should have been been included here)
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
 #undef get16bits
 #undef get16bits
@@ -59,12 +64,12 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #endif
 #endif
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
-inline unsigned int SuperFastHash (const char * data, unsigned int len = 0, unsigned int hash = 0) {
-unsigned int tmp;
+inline uint32_t SuperFastHash (const char * data, uint32_t len = 0, uint32_t hash = 0) {
+uint32_t tmp;
 int rem;
 int rem;
 
 
     if (!data) return 0;
     if (!data) return 0;
-	if (!len)len = (unsigned int)::strlen(data);
+	if (!len)len = (uint32_t)::strlen(data);
 
 
     rem = len & 3;
     rem = len & 3;
     len >>= 2;
     len >>= 2;

+ 663 - 0
ThirdParty/Assimp/code/IFCCurve.cpp

@@ -0,0 +1,663 @@
+/*
+Open Asset Import Library (ASSIMP)
+----------------------------------------------------------------------
+
+Copyright (c) 2006-2010, ASSIMP Development Team
+All rights reserved.
+
+Redistribution and use of this software in source and binary forms, 
+with or without modification, are permitted provided that the 
+following conditions are met:
+
+* Redistributions of source code must retain the above
+  copyright notice, this list of conditions and the
+  following disclaimer.
+
+* Redistributions in binary form must reproduce the above
+  copyright notice, this list of conditions and the
+  following disclaimer in the documentation and/or other
+  materials provided with the distribution.
+
+* Neither the name of the ASSIMP team, nor the names of its
+  contributors may be used to endorse or promote products
+  derived from this software without specific prior
+  written permission of the ASSIMP Development Team.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+----------------------------------------------------------------------
+*/
+
+/** @file  IFCProfile.cpp
+ *  @brief Read profile and curves entities from IFC files
+ */
+
+#include "AssimpPCH.h"
+
+#ifndef ASSIMP_BUILD_NO_IFC_IMPORTER
+#include "IFCUtil.h"
+
+namespace Assimp {
+	namespace IFC {
+		namespace {
+
+
+// --------------------------------------------------------------------------------
+// Conic is the base class for Circle and Ellipse
+// --------------------------------------------------------------------------------
+class Conic : public Curve
+{
+
+public:
+
+	// --------------------------------------------------
+	Conic(const IfcConic& entity, ConversionData& conv) 
+		: Curve(entity,conv)
+	{
+		aiMatrix4x4 trafo;
+		ConvertAxisPlacement(trafo,*entity.Position,conv);
+
+		// for convenience, extract the matrix rows
+		location = aiVector3D(trafo.a4,trafo.b4,trafo.c4);
+		p[0] = aiVector3D(trafo.a1,trafo.b1,trafo.c1);
+		p[1] = aiVector3D(trafo.a2,trafo.b2,trafo.c2);
+		p[2] = aiVector3D(trafo.a3,trafo.b3,trafo.c3);
+	}
+
+public:
+
+	// --------------------------------------------------
+	bool IsClosed() const {
+		return true;
+	}
+	
+	// --------------------------------------------------
+	size_t EstimateSampleCount(float a, float b) const {
+		ai_assert(InRange(a) && InRange(b));
+
+		a = fmod(a,360.f);
+		b = fmod(b,360.f);
+		return static_cast<size_t>( fabs(ceil(( b-a)) / conv.settings.conicSamplingAngle) );
+	}
+
+	// --------------------------------------------------
+	ParamRange GetParametricRange() const {
+		return std::make_pair(0.f,360.f);
+	}
+
+protected:
+	aiVector3D location, p[3];
+};
+
+
+// --------------------------------------------------------------------------------
+// Circle
+// --------------------------------------------------------------------------------
+class Circle : public Conic
+{
+
+public:
+
+	// --------------------------------------------------
+	Circle(const IfcCircle& entity, ConversionData& conv) 
+		: Conic(entity,conv)
+		, entity(entity)
+	{
+	}
+
+public:
+
+	// --------------------------------------------------
+	aiVector3D Eval(float u) const {
+		u = -conv.angle_scale * u;
+		return location + entity.Radius*(::cos(u)*p[0] + ::sin(u)*p[1]);
+	}
+
+private:
+	const IfcCircle& entity;
+};
+
+
+// --------------------------------------------------------------------------------
+// Ellipse
+// --------------------------------------------------------------------------------
+class Ellipse : public Conic
+{
+
+public:
+
+	// --------------------------------------------------
+	Ellipse(const IfcEllipse& entity, ConversionData& conv) 
+		: Conic(entity,conv)
+		, entity(entity)
+	{
+	}
+
+public:
+
+	// --------------------------------------------------
+	aiVector3D Eval(float u) const {
+		u = -conv.angle_scale * u;
+		return location + entity.SemiAxis1*::cos(u)*p[0] + entity.SemiAxis2*::sin(u)*p[1];
+	}
+
+private:
+	const IfcEllipse& entity;
+};
+
+
+// --------------------------------------------------------------------------------
+// Line
+// --------------------------------------------------------------------------------
+class Line : public Curve 
+{
+
+public:
+
+	// --------------------------------------------------
+	Line(const IfcLine& entity, ConversionData& conv) 
+		: Curve(entity,conv)
+		, entity(entity)
+	{
+		ConvertCartesianPoint(p,entity.Pnt);
+		ConvertVector(v,entity.Dir);
+	}
+
+public:
+
+	// --------------------------------------------------
+	bool IsClosed() const {
+		return false;
+	}
+
+	// --------------------------------------------------
+	aiVector3D Eval(float u) const {
+		return p + u*v;
+	}
+
+	// --------------------------------------------------
+	size_t EstimateSampleCount(float a, float b) const {
+		ai_assert(InRange(a) && InRange(b));
+		// two points are always sufficient for a line segment
+		return a==b ? 1 : 2;
+	}
+
+
+	// --------------------------------------------------
+	void SampleDiscrete(TempMesh& out,float a, float b) const
+	{
+		ai_assert(InRange(a) && InRange(b));
+	
+		if (a == b) {
+			out.verts.push_back(Eval(a));
+			return;
+		}
+		out.verts.reserve(out.verts.size()+2);
+		out.verts.push_back(Eval(a));
+		out.verts.push_back(Eval(b));
+	}
+
+	// --------------------------------------------------
+	ParamRange GetParametricRange() const {
+		const float inf = std::numeric_limits<float>::infinity();
+
+		return std::make_pair(-inf,+inf);
+	}
+
+private:
+	const IfcLine& entity;
+	aiVector3D p,v;
+};
+
+// --------------------------------------------------------------------------------
+// CompositeCurve joins multiple smaller, bounded curves
+// --------------------------------------------------------------------------------
+class CompositeCurve : public BoundedCurve 
+{
+
+	typedef std::pair< boost::shared_ptr< BoundedCurve >, bool > CurveEntry;
+
+public:
+
+	// --------------------------------------------------
+	CompositeCurve(const IfcCompositeCurve& entity, ConversionData& conv) 
+		: BoundedCurve(entity,conv)
+		, entity(entity)
+		, total()
+	{
+		curves.reserve(entity.Segments.size());
+		BOOST_FOREACH(const IfcCompositeCurveSegment& curveSegment,entity.Segments) {
+			// according to the specification, this must be a bounded curve
+			boost::shared_ptr< Curve > cv(Curve::Convert(curveSegment.ParentCurve,conv));
+			boost::shared_ptr< BoundedCurve > bc = boost::dynamic_pointer_cast<BoundedCurve>(cv);
+
+			if (!bc) {
+				IFCImporter::LogError("expected segment of composite curve to be a bounded curve");
+				continue;
+			}
+
+			if ( (std::string)curveSegment.Transition != "CONTINUOUS" ) {
+				IFCImporter::LogDebug("ignoring transition code on composite curve segment, only continuous transitions are supported");
+			}
+
+			curves.push_back( CurveEntry(bc,IsTrue(curveSegment.SameSense)) );
+			total += bc->GetParametricRangeDelta();
+		}
+
+		if (curves.empty()) {
+			throw CurveError("empty composite curve");
+		}
+	}
+
+public:
+
+	// --------------------------------------------------
+	aiVector3D Eval(float u) const {
+		if (curves.empty()) {
+			return aiVector3D();
+		}
+
+		float acc = 0;
+		BOOST_FOREACH(const CurveEntry& entry, curves) {
+			const ParamRange& range = entry.first->GetParametricRange();
+			const float delta = range.second-range.first;
+			if (u < acc+delta) {
+				return entry.first->Eval( entry.second ? (u-acc) + range.first : range.second-(u-acc));
+			}
+
+			acc += delta;
+		}
+		// clamp to end
+		return curves.back().first->Eval(curves.back().first->GetParametricRange().second);
+	}
+
+	// --------------------------------------------------
+	size_t EstimateSampleCount(float a, float b) const {
+		ai_assert(InRange(a) && InRange(b));
+		size_t cnt = 0;
+
+		float acc = 0;
+		BOOST_FOREACH(const CurveEntry& entry, curves) {
+			const ParamRange& range = entry.first->GetParametricRange();
+			const float delta = range.second-range.first;
+			if (a <= acc+delta && b >= acc) {
+				const float at =  std::max(0.f,a-acc), bt = std::min(delta,b-acc);
+				cnt += entry.first->EstimateSampleCount( entry.second ? at + range.first : range.second - bt, entry.second ? bt + range.first : range.second - at );
+			}
+
+			acc += delta;
+		}
+
+		return cnt;
+	}
+
+	// --------------------------------------------------
+	void SampleDiscrete(TempMesh& out,float a, float b) const
+	{
+		ai_assert(InRange(a) && InRange(b));
+
+		const size_t cnt = EstimateSampleCount(a,b);
+		out.verts.reserve(out.verts.size() + cnt);
+
+		BOOST_FOREACH(const CurveEntry& entry, curves) {
+			const size_t cnt = out.verts.size();
+			entry.first->SampleDiscrete(out);
+
+			if (!entry.second && cnt != out.verts.size()) {
+				std::reverse(out.verts.begin()+cnt,out.verts.end());
+			}
+		}
+	}
+
+	// --------------------------------------------------
+	ParamRange GetParametricRange() const {
+		return std::make_pair(0.f,total);
+	}
+
+private:
+	const IfcCompositeCurve& entity;
+	std::vector< CurveEntry > curves;
+
+	float total;
+};
+
+
+// --------------------------------------------------------------------------------
+// TrimmedCurve can be used to trim an unbounded curve to a bounded range
+// --------------------------------------------------------------------------------
+class TrimmedCurve : public BoundedCurve 
+{
+
+public:
+
+	// --------------------------------------------------
+	TrimmedCurve(const IfcTrimmedCurve& entity, ConversionData& conv) 
+		: BoundedCurve(entity,conv)
+		, entity(entity)
+		, ok()
+	{
+		base = boost::shared_ptr<const Curve>(Curve::Convert(entity.BasisCurve,conv));
+
+		typedef boost::shared_ptr<const STEP::EXPRESS::DataType> Entry;
+	
+		// for some reason, trimmed curves can either specify a parametric value
+		// or a point on the curve, or both. And they can even specify which of the
+		// two representations they prefer, even though an information invariant
+		// claims that they must be identical if both are present.
+		// oh well.
+		bool have_param = false, have_point = false;
+		aiVector3D point;
+		BOOST_FOREACH(const Entry sel,entity.Trim1) {
+			if (const EXPRESS::REAL* const r = sel->ToPtr<EXPRESS::REAL>()) {
+				range.first = *r;
+				have_param = true;
+				break;
+			}
+			else if (const IfcCartesianPoint* const r = sel->ResolveSelectPtr<IfcCartesianPoint>(conv.db)) {
+				ConvertCartesianPoint(point,*r);
+				have_point = true;
+			}
+		}
+		if (!have_param) {
+			if (!have_point || !base->ReverseEval(point,range.first)) {
+				throw CurveError("IfcTrimmedCurve: failed to read first trim parameter, ignoring curve");
+			}
+		}
+		have_param = false, have_point = false;
+		BOOST_FOREACH(const Entry sel,entity.Trim2) {
+			if (const EXPRESS::REAL* const r = sel->ToPtr<EXPRESS::REAL>()) {
+				range.second = *r;
+				have_param = true;
+				break;
+			}
+			else if (const IfcCartesianPoint* const r = sel->ResolveSelectPtr<IfcCartesianPoint>(conv.db)) {
+				ConvertCartesianPoint(point,*r);
+				have_point = true;
+			}
+		}
+		if (!have_param) {
+			if (!have_point || !base->ReverseEval(point,range.second)) {
+				throw CurveError("IfcTrimmedCurve: failed to read second trim parameter, ignoring curve");
+			}
+		}
+
+		agree_sense = IsTrue(entity.SenseAgreement);
+		if( !agree_sense ) {
+			std::swap(range.first,range.second);
+		}
+
+		// "NOTE In case of a closed curve, it may be necessary to increment t1 or t2
+		// by the parametric length for consistency with the sense flag."
+		if (base->IsClosed()) {
+			if( range.first > range.second ) {
+				range.second += base->GetParametricRangeDelta();
+			}
+		}
+
+		maxval = range.second-range.first;
+		ai_assert(maxval >= 0);
+	}
+
+public:
+
+	// --------------------------------------------------
+	aiVector3D Eval(float p) const {
+		ai_assert(InRange(p));
+		return base->Eval( TrimParam(p) );
+	}
+
+	// --------------------------------------------------
+	size_t EstimateSampleCount(float a, float b) const {
+		ai_assert(InRange(a) && InRange(b));
+		return base->EstimateSampleCount(TrimParam(a),TrimParam(b));
+	}
+
+	// --------------------------------------------------
+	ParamRange GetParametricRange() const {
+		return std::make_pair(0.f,maxval);
+	}
+
+private:
+
+	// --------------------------------------------------
+	float TrimParam(float f) const {
+		return agree_sense ? f + range.first :  range.second - f;
+	}
+
+
+private:
+	const IfcTrimmedCurve& entity;
+	ParamRange range;
+	float maxval;
+	bool agree_sense;
+	bool ok;
+
+	boost::shared_ptr<const Curve> base;
+};
+
+
+// --------------------------------------------------------------------------------
+// PolyLine is a 'curve' defined by linear interpolation over a set of discrete points
+// --------------------------------------------------------------------------------
+class PolyLine : public BoundedCurve 
+{
+
+public:
+
+	// --------------------------------------------------
+	PolyLine(const IfcPolyline& entity, ConversionData& conv) 
+		: BoundedCurve(entity,conv)
+		, entity(entity)
+	{
+		points.reserve(entity.Points.size());
+
+		aiVector3D t;
+		BOOST_FOREACH(const IfcCartesianPoint& cp, entity.Points) {
+			ConvertCartesianPoint(t,cp);
+			points.push_back(t);
+		}
+	}
+
+public:
+
+	// --------------------------------------------------
+	aiVector3D Eval(float p) const {
+		ai_assert(InRange(p));
+		
+		const size_t b = static_cast<size_t>(floor(p));  
+		if (b == points.size()-1) {
+			return points.back();
+		}
+
+		const float d = p-static_cast<float>(b);
+		return points[b+1] * d + points[b] * (1.f-d);
+	}
+
+	// --------------------------------------------------
+	size_t EstimateSampleCount(float a, float b) const {
+		ai_assert(InRange(a) && InRange(b));
+		return static_cast<size_t>( ceil(b) - floor(a) );
+	}
+
+	// --------------------------------------------------
+	ParamRange GetParametricRange() const {
+		return std::make_pair(0.f,static_cast<float>(points.size()-1));
+	}
+
+private:
+	const IfcPolyline& entity;
+	std::vector<aiVector3D> points;
+};
+
+
+} // anon
+
+
+// ------------------------------------------------------------------------------------------------
+Curve* Curve :: Convert(const IFC::IfcCurve& curve,ConversionData& conv) 
+{
+	if(curve.ToPtr<IfcBoundedCurve>()) {
+		if(const IfcPolyline* c = curve.ToPtr<IfcPolyline>()) {
+			return new PolyLine(*c,conv);
+		}
+		if(const IfcTrimmedCurve* c = curve.ToPtr<IfcTrimmedCurve>()) {
+			return new TrimmedCurve(*c,conv);
+		}
+		if(const IfcCompositeCurve* c = curve.ToPtr<IfcCompositeCurve>()) {
+			return new CompositeCurve(*c,conv);
+		}
+		//if(const IfcBSplineCurve* c = curve.ToPtr<IfcBSplineCurve>()) {
+		//	return new BSplineCurve(*c,conv);
+		//}
+	}
+
+	if(curve.ToPtr<IfcConic>()) {
+		if(const IfcCircle* c = curve.ToPtr<IfcCircle>()) {
+			return new Circle(*c,conv);
+		}
+		if(const IfcEllipse* c = curve.ToPtr<IfcEllipse>()) {
+			return new Ellipse(*c,conv);
+		}
+	}
+
+	if(const IfcLine* c = curve.ToPtr<IfcLine>()) {
+		return new Line(*c,conv);
+	}
+
+	// XXX OffsetCurve2D, OffsetCurve3D not currently supported
+	return NULL;
+}
+
+#ifdef _DEBUG
+// ------------------------------------------------------------------------------------------------
+bool Curve :: InRange(float u) const 
+{
+	const ParamRange range = GetParametricRange();
+	if (IsClosed()) {
+		ai_assert(range.first != std::numeric_limits<float>::infinity() && range.second != std::numeric_limits<float>::infinity());
+		u = range.first + fmod(u-range.first,range.second-range.first);
+	}
+	return u >= range.first && u <= range.second;
+}
+#endif 
+
+// ------------------------------------------------------------------------------------------------
+float Curve :: GetParametricRangeDelta() const
+{
+	const ParamRange& range = GetParametricRange();
+	return range.second - range.first;
+}
+
+// ------------------------------------------------------------------------------------------------
+size_t Curve :: EstimateSampleCount(float a, float b) const
+{
+	ai_assert(InRange(a) && InRange(b));
+
+	// arbitrary default value, deriving classes should supply better suited values
+	return 16;
+}
+
+// ------------------------------------------------------------------------------------------------
+float RecursiveSearch(const Curve* cv, const aiVector3D& val, float a, float b, unsigned int samples, float treshold, unsigned int recurse = 0, unsigned int max_recurse = 15)
+{
+	ai_assert(samples>1);
+
+	const float delta = (b-a)/samples, inf = std::numeric_limits<float>::infinity();
+	float min_point[2] = {a,b}, min_diff[2] = {inf,inf};
+	float runner = a;
+
+	for (unsigned int i = 0; i < samples; ++i, runner += delta) {
+		const float diff = (cv->Eval(runner)-val).SquareLength();
+		if (diff < min_diff[0]) {
+			min_diff[1] = min_diff[0];
+			min_point[1] = min_point[0];
+
+			min_diff[0] = diff;
+			min_point[0] = runner;
+		}
+		else if (diff < min_diff[1]) {
+			min_diff[1] = diff;
+			min_point[1] = runner;
+		}
+	}
+
+	ai_assert(min_diff[0] != inf && min_diff[1] != inf);
+	if ( fabs(a-min_point[0]) < treshold || recurse >= max_recurse) {
+		return min_point[0];
+	}
+
+	// fix for closed curves to take their wrap-over into account
+	if (cv->IsClosed() && fabs(min_point[0]-min_point[1]) > cv->GetParametricRangeDelta()*0.5  ) {
+		const Curve::ParamRange& range = cv->GetParametricRange();
+		const float wrapdiff = (cv->Eval(range.first)-val).SquareLength();
+
+		if (wrapdiff < min_diff[0]) {
+			const float t = min_point[0];
+			min_point[0] = min_point[1] > min_point[0] ? range.first : range.second;
+			 min_point[1] = t;
+		}
+	}
+
+	return RecursiveSearch(cv,val,min_point[0],min_point[1],samples,treshold,recurse+1,max_recurse);
+}
+
+// ------------------------------------------------------------------------------------------------
+bool Curve :: ReverseEval(const aiVector3D& val, float& paramOut) const
+{
+	// note: the following algorithm is not guaranteed to find the 'right' parameter value
+	// in all possible cases, but it will always return at least some value so this function
+	// will never fail in the default implementation.
+
+	// XXX derive treshold from curve topology
+	const float treshold = 1e-4;
+	const unsigned int samples = 16;
+
+	const ParamRange& range = GetParametricRange();
+	paramOut = RecursiveSearch(this,val,range.first,range.second,samples,treshold);
+
+	return true;
+}
+
+// ------------------------------------------------------------------------------------------------
+void Curve :: SampleDiscrete(TempMesh& out,float a, float b) const
+{
+	ai_assert(InRange(a) && InRange(b));
+
+	const size_t cnt = std::max(static_cast<size_t>(0),EstimateSampleCount(a,b));
+	out.verts.reserve( out.verts.size() + cnt );
+
+	float p = a, delta = (b-a)/cnt;
+	for(size_t i = 0; i < cnt; ++i, p += delta) {
+		out.verts.push_back(Eval(p));
+	}
+}
+
+// ------------------------------------------------------------------------------------------------
+bool BoundedCurve :: IsClosed() const
+{
+	return false;
+}
+
+// ------------------------------------------------------------------------------------------------
+void BoundedCurve :: SampleDiscrete(TempMesh& out) const
+{
+	const ParamRange& range = GetParametricRange();
+	ai_assert(range.first != std::numeric_limits<float>::infinity() && range.second != std::numeric_limits<float>::infinity());
+
+	return SampleDiscrete(out,range.first,range.second);
+}
+
+} // IFC
+} // Assimp
+
+#endif // ASSIMP_BUILD_NO_IFC_IMPORTER

+ 1371 - 0
ThirdParty/Assimp/code/IFCGeometry.cpp

@@ -0,0 +1,1371 @@
+/*
+Open Asset Import Library (ASSIMP)
+----------------------------------------------------------------------
+
+Copyright (c) 2006-2010, ASSIMP Development Team
+All rights reserved.
+
+Redistribution and use of this software in source and binary forms, 
+with or without modification, are permitted provided that the 
+following conditions are met:
+
+* Redistributions of source code must retain the above
+  copyright notice, this list of conditions and the
+  following disclaimer.
+
+* Redistributions in binary form must reproduce the above
+  copyright notice, this list of conditions and the
+  following disclaimer in the documentation and/or other
+  materials provided with the distribution.
+
+* Neither the name of the ASSIMP team, nor the names of its
+  contributors may be used to endorse or promote products
+  derived from this software without specific prior
+  written permission of the ASSIMP Development Team.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+----------------------------------------------------------------------
+*/
+
+/** @file  IFCGeometry.cpp
+ *  @brief Geometry conversion and synthesis for IFC
+ */
+
+#include "AssimpPCH.h"
+
+#ifndef ASSIMP_BUILD_NO_IFC_IMPORTER
+#include "IFCUtil.h"
+#include "PolyTools.h"
+#include "ProcessHelper.h"
+
+#include <iterator>
+
+namespace Assimp {
+	namespace IFC {
+
+// ------------------------------------------------------------------------------------------------
+bool ProcessPolyloop(const IfcPolyLoop& loop, TempMesh& meshout, ConversionData& /*conv*/)
+{
+	size_t cnt = 0;
+	BOOST_FOREACH(const IfcCartesianPoint& c, loop.Polygon) {
+		aiVector3D tmp;
+		ConvertCartesianPoint(tmp,c);
+
+		meshout.verts.push_back(tmp);
+		++cnt;
+	}
+
+	meshout.vertcnt.push_back(cnt);
+
+	// zero- or one- vertex polyloops simply ignored
+	if (meshout.vertcnt.back() > 1) { 
+		return true;
+	}
+	
+	if (meshout.vertcnt.back()==1) {
+		meshout.vertcnt.pop_back();
+		meshout.verts.pop_back();
+	}
+	return false;
+}
+
+// ------------------------------------------------------------------------------------------------
+void ComputePolygonNormals(const TempMesh& meshout, std::vector<aiVector3D>& normals, bool normalize = true, size_t ofs = 0) 
+{
+	size_t max_vcount = 0;
+	std::vector<unsigned int>::const_iterator begin=meshout.vertcnt.begin()+ofs, end=meshout.vertcnt.end(),  iit;
+	for(iit = begin; iit != end; ++iit) {
+		max_vcount = std::max(max_vcount,static_cast<size_t>(*iit));
+	}
+
+	std::vector<float> temp((max_vcount+2)*4);
+	normals.reserve( normals.size() + meshout.vertcnt.size()-ofs );
+
+	// `NewellNormal()` currently has a relatively strange interface and need to 
+	// re-structure things a bit to meet them.
+	size_t vidx = std::accumulate(meshout.vertcnt.begin(),begin,0);
+	for(iit = begin; iit != end; vidx += *iit++) {
+		if (!*iit) {
+			normals.push_back(aiVector3D());
+			continue;
+		}
+		for(size_t vofs = 0, cnt = 0; vofs < *iit; ++vofs) {
+			const aiVector3D& v = meshout.verts[vidx+vofs];
+			temp[cnt++] = v.x;
+			temp[cnt++] = v.y;
+			temp[cnt++] = v.z;
+#ifdef _DEBUG
+			temp[cnt] = std::numeric_limits<float>::quiet_NaN();
+#endif
+			++cnt;
+		}
+
+		normals.push_back(aiVector3D());
+		NewellNormal<4,4,4>(normals.back(),*iit,&temp[0],&temp[1],&temp[2]);
+	}
+
+	if(normalize) {
+		BOOST_FOREACH(aiVector3D& n, normals) {
+			n.Normalize();
+		}
+	}
+}
+
+// ------------------------------------------------------------------------------------------------
+// Compute the normal of the last polygon in the given mesh
+aiVector3D ComputePolygonNormal(const TempMesh& inmesh, bool normalize = true) 
+{
+	size_t total = inmesh.vertcnt.back(), vidx = inmesh.verts.size() - total;
+	std::vector<float> temp((total+2)*3);
+	for(size_t vofs = 0, cnt = 0; vofs < total; ++vofs) {
+		const aiVector3D& v = inmesh.verts[vidx+vofs];
+		temp[cnt++] = v.x;
+		temp[cnt++] = v.y;
+		temp[cnt++] = v.z;
+	}
+	aiVector3D nor;
+	NewellNormal<3,3,3>(nor,total,&temp[0],&temp[1],&temp[2]);
+	return normalize ? nor.Normalize() : nor;
+}
+
+// ------------------------------------------------------------------------------------------------
+void FixupFaceOrientation(TempMesh& result)
+{
+	const aiVector3D vavg = result.Center();
+
+	std::vector<aiVector3D> normals;
+	ComputePolygonNormals(result,normals);
+
+	size_t c = 0, ofs = 0;
+	BOOST_FOREACH(unsigned int cnt, result.vertcnt) {
+		if (cnt>2){
+			const aiVector3D& thisvert = result.verts[c];
+			if (normals[ofs]*(thisvert-vavg) < 0) {
+				std::reverse(result.verts.begin()+c,result.verts.begin()+cnt+c);
+			}
+		}
+		c += cnt;
+		++ofs;
+	}
+}
+
+// ------------------------------------------------------------------------------------------------
+void RecursiveMergeBoundaries(TempMesh& final_result, const TempMesh& in, const TempMesh& boundary, std::vector<aiVector3D>& normals, const aiVector3D& nor_boundary)
+{
+	ai_assert(in.vertcnt.size() >= 1);
+	ai_assert(boundary.vertcnt.size() == 1);
+	std::vector<unsigned int>::const_iterator end = in.vertcnt.end(), begin=in.vertcnt.begin(), iit, best_iit;
+
+	TempMesh out;
+
+	// iterate through all other bounds and find the one for which the shortest connection
+	// to the outer boundary is actually the shortest possible.
+	size_t vidx = 0, best_vidx_start = 0;
+	size_t best_ofs, best_outer = boundary.verts.size();
+	float best_dist = 1e10;
+	for(std::vector<unsigned int>::const_iterator iit = begin; iit != end; vidx += *iit++) {
+		
+		for(size_t vofs = 0; vofs < *iit; ++vofs) {
+			const aiVector3D& v = in.verts[vidx+vofs];
+
+			for(size_t outer = 0; outer < boundary.verts.size(); ++outer) {
+				const aiVector3D& o = boundary.verts[outer];
+				const float d = (o-v).SquareLength();
+
+				if (d < best_dist) {
+					best_dist = d;
+					best_ofs = vofs;
+					best_outer = outer;
+					best_iit = iit;
+					best_vidx_start = vidx;
+				}
+			}		
+		}
+	}
+
+	ai_assert(best_outer != boundary.verts.size());
+
+
+	// now that we collected all vertex connections to be added, build the output polygon
+	const size_t cnt = boundary.verts.size() + *best_iit+2;
+	out.verts.reserve(cnt);
+
+	for(size_t outer = 0; outer < boundary.verts.size(); ++outer) {
+		const aiVector3D& o = boundary.verts[outer];
+		out.verts.push_back(o);
+
+		if (outer == best_outer) {
+			for(size_t i = best_ofs; i < *best_iit; ++i) {
+				out.verts.push_back(in.verts[best_vidx_start + i]);
+			}
+
+			// we need the first vertex of the inner polygon twice as we return to the
+			// outer loop through the very same connection through which we got there.
+			for(size_t i = 0; i <= best_ofs; ++i) {
+				out.verts.push_back(in.verts[best_vidx_start + i]);
+			}
+
+			// reverse face winding if the normal of the sub-polygon points in the
+			// same direction as the normal of the outer polygonal boundary
+			if (normals[std::distance(begin,best_iit)] * nor_boundary > 0) {
+				std::reverse(out.verts.rbegin(),out.verts.rbegin()+*best_iit+1);
+			}
+
+			// also append a copy of the initial insertion point to be able to continue the outer polygon
+			out.verts.push_back(o);
+		}
+	}
+	out.vertcnt.push_back(cnt);
+	ai_assert(out.verts.size() == cnt);
+
+	if (in.vertcnt.size()-std::count(begin,end,0) > 1) {
+		// Recursively apply the same algorithm if there are more boundaries to merge. The
+		// current implementation is relatively inefficient, though.
+		
+		TempMesh temp;
+		
+		// drop the boundary that we just processed
+		const size_t dist = std::distance(begin, best_iit);
+		TempMesh remaining = in;
+		remaining.vertcnt.erase(remaining.vertcnt.begin() + dist);
+		remaining.verts.erase(remaining.verts.begin()+best_vidx_start,remaining.verts.begin()+best_vidx_start+*best_iit);
+
+		normals.erase(normals.begin() + dist);
+		RecursiveMergeBoundaries(temp,remaining,out,normals,nor_boundary);
+
+		final_result.Append(temp);
+	}
+	else final_result.Append(out);
+}
+
+// ------------------------------------------------------------------------------------------------
+void MergePolygonBoundaries(TempMesh& result, const TempMesh& inmesh, size_t master_bounds = -1) 
+{
+	// standard case - only one boundary, just copy it to the result vector
+	if (inmesh.vertcnt.size() <= 1) {
+		result.Append(inmesh);
+		return;
+	}
+
+	result.vertcnt.reserve(inmesh.vertcnt.size()+result.vertcnt.size());
+
+	// XXX get rid of the extra copy if possible
+	TempMesh meshout = inmesh;
+
+	// handle polygons with holes. Our built in triangulation won't handle them as is, but
+	// the ear cutting algorithm is solid enough to deal with them if we join the inner
+	// holes with the outer boundaries by dummy connections.
+	IFCImporter::LogDebug("fixing polygon with holes for triangulation via ear-cutting");
+	std::vector<unsigned int>::iterator outer_polygon = meshout.vertcnt.end(), begin=meshout.vertcnt.begin(), end=outer_polygon,  iit;
+
+	// each hole results in two extra vertices
+	result.verts.reserve(meshout.verts.size()+meshout.vertcnt.size()*2+result.verts.size());
+	size_t outer_polygon_start = 0;
+
+	// do not normalize 'normals', we need the original length for computing the polygon area
+	std::vector<aiVector3D> normals;
+	ComputePolygonNormals(meshout,normals,false);
+
+	// see if one of the polygons is a IfcFaceOuterBound (in which case `master_bounds` is its index).
+	// sadly we can't rely on it, the docs say 'At most one of the bounds shall be of the type IfcFaceOuterBound' 
+	float area_outer_polygon = 1e-10f;
+	if (master_bounds != (size_t)-1) {
+		outer_polygon = begin + master_bounds;
+		outer_polygon_start = std::accumulate(begin,outer_polygon,0);
+		area_outer_polygon = normals[master_bounds].SquareLength();
+	}
+	else {
+		size_t vidx = 0;
+		for(iit = begin; iit != meshout.vertcnt.end(); vidx += *iit++) {
+			// find the polygon with the largest area, it must be the outer bound. 
+			aiVector3D& n = normals[std::distance(begin,iit)];
+			const float area = n.SquareLength();
+			if (area > area_outer_polygon) {
+				area_outer_polygon = area;
+				outer_polygon = iit;
+				outer_polygon_start = vidx;
+			}
+		}
+	}
+
+	ai_assert(outer_polygon != meshout.vertcnt.end());	
+	std::vector<aiVector3D>& in = meshout.verts;
+
+	// skip over extremely small boundaries - this is a workaround to fix cases
+	// in which the number of holes is so extremely large that the
+	// triangulation code fails.
+#define IFC_VERTICAL_HOLE_SIZE_TRESHOLD 0.000001f
+	size_t vidx = 0, removed = 0, index = 0;
+	const float treshold = area_outer_polygon * IFC_VERTICAL_HOLE_SIZE_TRESHOLD;
+	for(iit = begin; iit != end ;++index) {
+		const float sqlen = normals[index].SquareLength();
+		if (sqlen < treshold) {
+			std::vector<aiVector3D>::iterator inbase = in.begin()+vidx;
+			in.erase(inbase,inbase+*iit);
+			
+			outer_polygon_start -= outer_polygon_start>vidx ? *iit : 0;
+			*iit++ = 0;
+			++removed;
+
+			IFCImporter::LogDebug("skip small hole below treshold");
+		}
+		else {
+			normals[index] /= sqrt(sqlen);
+			vidx += *iit++;
+		}
+	}
+
+	// see if one or more of the hole has a face that lies directly on an outer bound.
+	// this happens for doors, for example.
+	vidx = 0;
+	for(iit = begin; ; vidx += *iit++) {
+next_loop:
+		if (iit == end) {
+			break;
+		}
+		if (iit == outer_polygon) {
+			continue;
+		}
+
+		for(size_t vofs = 0; vofs < *iit; ++vofs) {
+			if (!*iit) {
+				continue;
+			}
+			const size_t next = (vofs+1)%*iit;
+			const aiVector3D& v = in[vidx+vofs], &vnext = in[vidx+next],&vd = (vnext-v).Normalize();
+
+			for(size_t outer = 0; outer < *outer_polygon; ++outer) {
+				const aiVector3D& o = in[outer_polygon_start+outer], &onext = in[outer_polygon_start+(outer+1)%*outer_polygon], &od = (onext-o).Normalize();
+
+				if (fabs(vd * od) > 1.f-1e-6f && (onext-v).Normalize() * vd > 1.f-1e-6f && (onext-v)*(o-v) < 0) {
+					IFCImporter::LogDebug("got an inner hole that lies partly on the outer polygonal boundary, merging them to a single contour");
+
+					// in between outer and outer+1 insert all vertices of this loop, then drop the original altogether.
+					std::vector<aiVector3D> tmp(*iit);
+
+					const size_t start = (v-o).SquareLength() > (vnext-o).SquareLength() ? vofs :  next;
+					std::vector<aiVector3D>::iterator inbase = in.begin()+vidx, it = std::copy(inbase+start, inbase+*iit,tmp.begin());
+					std::copy(inbase, inbase+start,it);
+					std::reverse(tmp.begin(),tmp.end());
+
+					in.insert(in.begin()+outer_polygon_start+(outer+1)%*outer_polygon,tmp.begin(),tmp.end());
+					vidx += outer_polygon_start<vidx ? *iit : 0;
+
+					inbase = in.begin()+vidx;
+					in.erase(inbase,inbase+*iit);
+
+					outer_polygon_start -= outer_polygon_start>vidx ? *iit : 0;
+					
+					*outer_polygon += tmp.size();
+					*iit++ = 0;
+					++removed;
+					goto next_loop;
+				}
+			}
+		}
+	}
+
+	if ( meshout.vertcnt.size() - removed <= 1) {
+		result.Append(meshout);
+		return;
+	}
+
+	// extract the outer boundary and move it to a separate mesh
+	TempMesh boundary;
+	boundary.vertcnt.resize(1,*outer_polygon);
+	boundary.verts.resize(*outer_polygon);
+
+	std::vector<aiVector3D>::iterator b = in.begin()+outer_polygon_start;
+	std::copy(b,b+*outer_polygon,boundary.verts.begin());
+	in.erase(b,b+*outer_polygon);
+
+	std::vector<aiVector3D>::iterator norit = normals.begin()+std::distance(meshout.vertcnt.begin(),outer_polygon);
+	const aiVector3D nor_boundary = *norit;
+	normals.erase(norit);
+	meshout.vertcnt.erase(outer_polygon);
+
+	// keep merging the closest inner boundary with the outer boundary until no more boundaries are left
+	RecursiveMergeBoundaries(result,meshout,boundary,normals,nor_boundary);
+}
+
+
+// ------------------------------------------------------------------------------------------------
+void ProcessConnectedFaceSet(const IfcConnectedFaceSet& fset, TempMesh& result, ConversionData& conv)
+{
+	BOOST_FOREACH(const IfcFace& face, fset.CfsFaces) {
+
+		// size_t ob = -1, cnt = 0;
+		TempMesh meshout;
+		BOOST_FOREACH(const IfcFaceBound& bound, face.Bounds) {
+			
+			// XXX implement proper merging for polygonal loops
+			if(const IfcPolyLoop* const polyloop = bound.Bound->ToPtr<IfcPolyLoop>()) {
+				if(ProcessPolyloop(*polyloop, meshout,conv)) {
+
+					//if(bound.ToPtr<IfcFaceOuterBound>()) {
+					//	ob = cnt;
+					//}
+					//++cnt;
+
+				}
+			}
+			else {
+				IFCImporter::LogWarn("skipping unknown IfcFaceBound entity, type is " + bound.Bound->GetClassName());
+				continue;
+			}
+
+			/*if(!IsTrue(bound.Orientation)) {
+				size_t c = 0;
+				BOOST_FOREACH(unsigned int& c, meshout.vertcnt) {
+					std::reverse(result.verts.begin() + cnt,result.verts.begin() + cnt + c);
+					cnt += c;
+				}
+			}*/
+
+		}
+		MergePolygonBoundaries(result,meshout);
+	}
+}
+
+
+
+
+// ------------------------------------------------------------------------------------------------
+void ProcessRevolvedAreaSolid(const IfcRevolvedAreaSolid& solid, TempMesh& result, ConversionData& conv)
+{
+	TempMesh meshout;
+
+	// first read the profile description
+	if(!ProcessProfile(*solid.SweptArea,meshout,conv) || meshout.verts.size()<=1) {
+		return;
+	}
+
+	aiVector3D axis, pos;
+	ConvertAxisPlacement(axis,pos,solid.Axis);
+
+	aiMatrix4x4 tb0,tb1;
+	aiMatrix4x4::Translation(pos,tb0);
+	aiMatrix4x4::Translation(-pos,tb1);
+
+	const std::vector<aiVector3D>& in = meshout.verts;
+	const size_t size=in.size();
+	
+	bool has_area = solid.SweptArea->ProfileType == "AREA" && size>2;
+	const float max_angle = solid.Angle*conv.angle_scale;
+	if(fabs(max_angle) < 1e-3) {
+		if(has_area) {
+			result = meshout;
+		}
+		return;
+	}
+
+	const unsigned int cnt_segments = std::max(2u,static_cast<unsigned int>(16 * fabs(max_angle)/AI_MATH_HALF_PI_F));
+	const float delta = max_angle/cnt_segments;
+
+	has_area = has_area && 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);
+
+	aiMatrix4x4 rot;
+	rot = tb0 * aiMatrix4x4::Rotation(delta,axis,rot) * tb1;
+
+	size_t base = 0;
+	std::vector<aiVector3D>& out = result.verts;
+
+	// dummy data to simplify later processing
+	for(size_t i = 0; i < size; ++i) {
+		out.insert(out.end(),4,in[i]);
+	}
+
+	for(unsigned int seg = 0; seg < cnt_segments; ++seg) {
+		for(size_t i = 0; i < size; ++i) {
+			const size_t next = (i+1)%size;
+
+			result.vertcnt.push_back(4);
+			const aiVector3D& base_0 = out[base+i*4+3],base_1 = out[base+next*4+3];
+
+			out.push_back(base_0);
+			out.push_back(base_1);
+			out.push_back(rot*base_1);
+			out.push_back(rot*base_0);
+		}
+		base += size*4;
+	}
+
+	out.erase(out.begin(),out.begin()+size*4);
+
+	if(has_area) {
+		// leave the triangulation of the profile area to the ear cutting 
+		// implementation in aiProcess_Triangulate - for now we just
+		// feed in two huge polygons.
+		base -= size*8;
+		for(size_t i = size; i--; ) {
+			out.push_back(out[base+i*4+3]);
+		}
+		for(size_t i = 0; i < size; ++i ) {
+			out.push_back(out[i*4]);
+		}
+		result.vertcnt.push_back(size);
+		result.vertcnt.push_back(size);
+	}
+
+	aiMatrix4x4 trafo;
+	ConvertAxisPlacement(trafo, solid.Position);
+	
+	result.Transform(trafo);
+	IFCImporter::LogDebug("generate mesh procedurally by radial extrusion (IfcRevolvedAreaSolid)");
+}
+
+
+// ------------------------------------------------------------------------------------------------
+bool TryAddOpenings(const std::vector<TempOpening>& openings,const std::vector<aiVector3D>& nors, TempMesh& curmesh)
+{
+	std::vector<aiVector3D>& out = curmesh.verts;
+
+	const size_t s = out.size();
+
+	const aiVector3D any_point = out[s-1];
+	const aiVector3D nor = ComputePolygonNormal(curmesh); ;
+	
+	bool got_openings = false;
+	TempMesh res;
+
+	size_t c = 0;
+	BOOST_FOREACH(const TempOpening& t,openings) {
+		const aiVector3D& outernor = nors[c++];
+		const float dot = nor * outernor;
+		if (fabs(dot)<1.f-1e-6f) {
+			continue;
+		}
+
+		// const aiVector3D diff = t.extrusionDir;
+		const std::vector<aiVector3D>& va = t.profileMesh->verts;
+		if(va.size() <= 2) {
+			continue;	
+		}
+
+		// const float dd = t.extrusionDir*nor;
+		IFCImporter::LogDebug("apply an IfcOpeningElement linked via IfcRelVoidsElement to this polygon");
+
+		got_openings = true;
+
+		// project va[i] onto the plane formed by the current polygon [given by (any_point,nor)]
+		for(size_t i = 0; i < va.size(); ++i) {
+			const aiVector3D& v = va[i];
+			out.push_back(v-(nor*(v-any_point))*nor);
+		}
+		
+
+		curmesh.vertcnt.push_back(va.size());
+
+		res.Clear();
+		MergePolygonBoundaries(res,curmesh,0);
+		curmesh = res;
+	}
+	return got_openings;
+}
+
+// ------------------------------------------------------------------------------------------------
+struct DistanceSorter {
+
+	DistanceSorter(const aiVector3D& base) : base(base) {}
+
+	bool operator () (const TempOpening& a, const TempOpening& b) const {
+		return (a.profileMesh->Center()-base).SquareLength() < (b.profileMesh->Center()-base).SquareLength();
+	}
+
+	aiVector3D base;
+};
+
+// ------------------------------------------------------------------------------------------------
+struct XYSorter {
+
+	// sort first by X coordinates, then by Y coordinates
+	bool operator () (const aiVector2D&a, const aiVector2D& b) const {
+		if (a.x == b.x) {
+			return a.y < b.y;
+		}
+		return a.x < b.x;
+	}
+};
+
+// ------------------------------------------------------------------------------------------------
+struct ProjectionInfo {
+	unsigned int ac, bc;
+	aiVector3D p,u,v;
+};
+
+typedef std::pair< aiVector2D, aiVector2D > BoundingBox;
+typedef std::map<aiVector2D,size_t,XYSorter> XYSortedField;
+
+// ------------------------------------------------------------------------------------------------
+aiVector2D ProjectPositionVectorOntoPlane(const aiVector3D& x, const ProjectionInfo& proj) 
+{
+	const aiVector3D xx = x-proj.p;
+	return aiVector2D(xx[proj.ac]/proj.u[proj.ac],xx[proj.bc]/proj.v[proj.bc]);
+}
+
+// ------------------------------------------------------------------------------------------------
+void QuadrifyPart(const aiVector2D& pmin, const aiVector2D& pmax, XYSortedField& field, const std::vector< BoundingBox >& bbs, 
+	std::vector<aiVector2D>& out)
+{
+	if (!(pmin.x-pmax.x) || !(pmin.y-pmax.y)) {
+		return;
+	}
+
+	float xs = 1e10, xe = 1e10;	
+	bool found = false;
+
+	// Search along the x-axis until we find an opening
+	XYSortedField::iterator start = field.begin();
+	for(; start != field.end(); ++start) {
+		const BoundingBox& bb = bbs[(*start).second];
+		if(bb.first.x >= pmax.x) {
+			break;
+		} 
+
+		if (bb.second.x > pmin.x && bb.second.y > pmin.y && bb.first.y < pmax.y) {
+			xs = bb.first.x;
+			xe = bb.second.x;
+			found = true;
+			break;
+		}
+	}
+
+	if (!found) {
+		// the rectangle [pmin,pend] is opaque, fill it
+		out.push_back(pmin);
+		out.push_back(aiVector2D(pmin.x,pmax.y));
+		out.push_back(pmax);
+		out.push_back(aiVector2D(pmax.x,pmin.y));
+		return;
+	}
+
+	xs = std::max(pmin.x,xs);
+	xe = std::min(pmax.x,xe);
+
+	// see if there's an offset to fill at the top of our quad
+	if (xs - pmin.x) {
+		out.push_back(pmin);
+		out.push_back(aiVector2D(pmin.x,pmax.y));
+		out.push_back(aiVector2D(xs,pmax.y));
+		out.push_back(aiVector2D(xs,pmin.y));
+	}
+
+	// search along the y-axis for all openings that overlap xs and our quad
+	float ylast = pmin.y;
+	found = false;
+	for(; start != field.end(); ++start) {
+		const BoundingBox& bb = bbs[(*start).second];
+		if (bb.first.x > xs || bb.first.y >= pmax.y) {
+			break;
+		}
+
+		if (bb.second.y > ylast) {
+
+			found = true;
+			const float ys = std::max(bb.first.y,pmin.y), ye = std::min(bb.second.y,pmax.y);
+			if (ys - ylast) {
+				QuadrifyPart( aiVector2D(xs,ylast), aiVector2D(xe,ys) ,field,bbs,out);
+			}
+
+			// the following are the window vertices
+
+			/*wnd.push_back(aiVector2D(xs,ys));
+			wnd.push_back(aiVector2D(xs,ye));
+			wnd.push_back(aiVector2D(xe,ye));
+			wnd.push_back(aiVector2D(xe,ys));*/
+			ylast = ye;
+		}
+	}
+	if (!found) {
+		// the rectangle [pmin,pend] is opaque, fill it
+		out.push_back(aiVector2D(xs,pmin.y));
+		out.push_back(aiVector2D(xs,pmax.y));
+		out.push_back(aiVector2D(xe,pmax.y));
+		out.push_back(aiVector2D(xe,pmin.y));
+		return;
+	}
+	if (ylast < pmax.y) {
+		QuadrifyPart( aiVector2D(xs,ylast), aiVector2D(xe,pmax.y) ,field,bbs,out);
+	}
+
+	// now for the whole rest
+	if (pmax.x-xe) {
+		QuadrifyPart(aiVector2D(xe,pmin.y), pmax ,field,bbs,out);
+	}
+}
+
+// ------------------------------------------------------------------------------------------------
+enum Intersect {
+	Intersect_No,
+	Intersect_LiesOnPlane,
+	Intersect_Yes
+};
+
+// ------------------------------------------------------------------------------------------------
+Intersect IntersectSegmentPlane(const aiVector3D& p,const aiVector3D& n, const aiVector3D& e0, const aiVector3D& e1, aiVector3D& out) 
+{
+	const aiVector3D pdelta = e0 - p, seg = e1-e0;
+	const float dotOne = n*seg, dotTwo = -(n*pdelta);
+
+	if (fabs(dotOne) < 1e-6) {
+		return fabs(dotTwo) < 1e-6f ? Intersect_LiesOnPlane : Intersect_No;
+	}
+
+	const float t = dotTwo/dotOne;
+	// t must be in [0..1] if the intersection point is within the given segment
+	if (t > 1.f || t < 0.f) {
+		return Intersect_No;
+	}
+	out = e0+t*seg;
+	return Intersect_Yes;
+}
+
+
+
+// ------------------------------------------------------------------------------------------------
+aiVector3D Unproject(const aiVector2D& vproj, const  ProjectionInfo& proj)
+{
+	return vproj.x*proj.u + vproj.y*proj.v + proj.p;
+}
+
+// ------------------------------------------------------------------------------------------------
+void InsertWindowContours(const std::vector< BoundingBox >& bbs,const std::vector< std::vector<aiVector2D> >& contours,const ProjectionInfo& proj, TempMesh& curmesh)
+{
+	ai_assert(contours.size() == bbs.size());
+
+	// fix windows - we need to insert the real, polygonal shapes into the quadratic holes that we have now
+	for(size_t i = 0; i < contours.size();++i) {
+		const BoundingBox& bb = bbs[i];
+		const std::vector<aiVector2D>& contour = contours[i];
+
+		// check if we need to do it at all - many windows just fit perfectly into their quadratic holes,
+		// i.e. their contours *are* already their bounding boxes.
+		if (contour.size() == 4) {
+			std::set<aiVector2D,XYSorter> verts;
+			for(size_t n = 0; n < 4; ++n) {
+				verts.insert(contour[n]);
+			}
+			const std::set<aiVector2D,XYSorter>::const_iterator end = verts.end();
+			if (verts.find(bb.first)!=end && verts.find(bb.second)!=end
+				&& verts.find(aiVector2D(bb.first.x,bb.second.y))!=end 
+				&& verts.find(aiVector2D(bb.second.x,bb.first.y))!=end 
+			) {
+				continue;
+			}
+		}
+
+		const float epsilon = (bb.first-bb.second).Length()/1000.f;
+
+		// walk through all contour points and find those that lie on the BB corner
+		size_t last_hit = -1, very_first_hit = -1;
+		aiVector2D edge;
+		for(size_t n = 0, e=0, size = contour.size();; n=(n+1)%size, ++e) {
+
+			// sanity checking
+			if (e == size*2) {
+				IFCImporter::LogError("encountered unexpected topology while generating window contour");
+				break;
+			}
+
+			const aiVector2D& v = contour[n];
+
+			bool hit = false;
+			if (fabs(v.x-bb.first.x)<epsilon) {
+				edge.x = bb.first.x;
+				hit = true;
+			}
+			else if (fabs(v.x-bb.second.x)<epsilon) {
+				edge.x = bb.second.x;
+				hit = true;
+			}
+
+			if (fabs(v.y-bb.first.y)<epsilon) {
+				edge.y = bb.first.y;
+				hit = true;
+			}
+			else if (fabs(v.y-bb.second.y)<epsilon) {
+				edge.y = bb.second.y;
+				hit = true;
+			}
+
+			if (hit) {
+				if (last_hit != (size_t)-1) {
+
+					const size_t old = curmesh.verts.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) {
+						curmesh.verts.push_back(Unproject(contour[a],proj));
+					}
+					
+					if (edge != contour[last_hit] && edge != contour[n]) {
+						curmesh.verts.push_back(Unproject(edge,proj));
+					}
+					else if (cnt == 1) {
+						// avoid degenerate polygons (also known as lines or points)
+						curmesh.verts.erase(curmesh.verts.begin()+old,curmesh.verts.end());
+					}
+
+					if (const size_t d = curmesh.verts.size()-old) {
+						curmesh.vertcnt.push_back(d);
+						std::reverse(curmesh.verts.rbegin(),curmesh.verts.rbegin()+d);
+					}
+					if (n == very_first_hit) {
+						break;
+					}
+				}
+				else {
+					very_first_hit = n;
+				}
+				
+				last_hit = n;
+			}
+		}
+	}
+}
+
+// ------------------------------------------------------------------------------------------------
+bool TryAddOpenings_Quadrulate(const std::vector<TempOpening>& openings,const std::vector<aiVector3D>& nors, TempMesh& curmesh)
+{
+	std::vector<aiVector3D>& out = curmesh.verts;
+
+	// Try to derive a solid base plane within the current surface for use as 
+	// working coordinate system. 
+	aiVector3D vmin,vmax;
+	ArrayBounds(&out[0],out.size(),vmin,vmax);
+
+	const size_t s = out.size();
+
+	const aiVector3D any_point = out[s-4];
+	const aiVector3D nor = ((out[s-3]-any_point)^(out[s-2]-any_point)).Normalize();
+
+	const aiVector3D diag = vmax-vmin;
+	const float ax = fabs(nor.x);    
+	const float ay = fabs(nor.y);   
+	const float az = fabs(nor.z);    
+
+	unsigned int ac = 0, bc = 1; /* no z coord. -> projection to xy */
+	if (ax > ay) {
+		if (ax > az) { /* no x coord. -> projection to yz */
+			ac = 1; bc = 2;
+		}
+	}
+	else if (ay > az) { /* no y coord. -> projection to zy */
+		ac = 2; bc = 0;
+	}
+
+	ProjectionInfo proj;
+	proj.u = proj.v = diag;
+	proj.u[bc]=0;
+	proj.v[ac]=0;
+	proj.ac = ac;
+	proj.bc = bc;
+	proj.p = vmin;
+
+	// project all points into the coordinate system defined by the p+sv*tu plane
+	// and compute bounding boxes for them
+	std::vector< BoundingBox > bbs;
+	XYSortedField field;
+
+	std::vector<aiVector2D> contour_flat;
+	contour_flat.reserve(out.size());
+	BOOST_FOREACH(const aiVector3D& x, out) {
+		contour_flat.push_back(ProjectPositionVectorOntoPlane(x,proj));
+	}
+
+	std::vector< std::vector<aiVector2D> > contours;
+
+	size_t c = 0;
+	BOOST_FOREACH(const TempOpening& t,openings) {
+		const aiVector3D& outernor = nors[c++];
+		const float dot = nor * outernor;
+		if (fabs(dot)<1.f-1e-6f) {
+			continue;
+		}
+
+
+		// const aiVector3D diff = t.extrusionDir;
+
+		const std::vector<aiVector3D>& va = t.profileMesh->verts;
+		if(va.size() <= 2) {
+			continue;	
+		}
+
+		aiVector2D vpmin,vpmax;
+		MinMaxChooser<aiVector2D>()(vpmin,vpmax);
+
+		contours.push_back(std::vector<aiVector2D>());
+		std::vector<aiVector2D>& contour = contours.back();
+
+		BOOST_FOREACH(const aiVector3D& x, t.profileMesh->verts) {
+			const aiVector2D& vproj = ProjectPositionVectorOntoPlane(x,proj);
+
+			vpmin = std::min(vpmin,vproj);
+			vpmax = std::max(vpmax,vproj);
+
+			contour.push_back(vproj);
+		}
+
+		
+		if (field.find(vpmin) != field.end()) {
+			IFCImporter::LogWarn("constraint failure during generation of wall openings, results may be faulty");
+		}
+		field[vpmin] = bbs.size();
+		bbs.push_back(BoundingBox(vpmin,vpmax));
+	}
+
+	if (bbs.empty()) {
+		return false;
+	}
+
+
+	std::vector<aiVector2D> outflat;
+	outflat.reserve(openings.size()*4);
+	QuadrifyPart(aiVector2D(0.f,0.f),aiVector2D(1.f,1.f),field,bbs,outflat);
+	ai_assert(!(outflat.size() % 4));
+
+	//FixOuterBoundaries(outflat,contour_flat);
+
+	// undo the projection, generate output quads
+	std::vector<aiVector3D> vold;
+	vold.reserve(outflat.size());
+	std::swap(vold,curmesh.verts);
+
+	std::vector<unsigned int> iold;
+	iold.resize(outflat.size()/4,4);
+	std::swap(iold,curmesh.vertcnt);
+
+	BOOST_FOREACH(const aiVector2D& vproj, outflat) {
+		out.push_back(Unproject(vproj,proj));
+	}
+
+	InsertWindowContours(bbs,contours,proj,curmesh);
+	return true;
+}
+
+
+// ------------------------------------------------------------------------------------------------
+void ProcessExtrudedAreaSolid(const IfcExtrudedAreaSolid& solid, TempMesh& result, ConversionData& conv)
+{
+	TempMesh meshout;
+	
+	// first read the profile description
+	if(!ProcessProfile(*solid.SweptArea,meshout,conv) || meshout.verts.size()<=1) {
+		return;
+	}
+
+	aiVector3D dir;
+	ConvertDirection(dir,solid.ExtrudedDirection);
+
+	dir *= solid.Depth;
+
+	// assuming that `meshout.verts` is now a list of vertex points forming 
+	// the underlying profile, extrude along the given axis, forming new
+	// triangles.
+	
+	std::vector<aiVector3D>& in = meshout.verts;
+	const size_t size=in.size();
+
+	const bool has_area = solid.SweptArea->ProfileType == "AREA" && size>2;
+	if(solid.Depth < 1e-3) {
+		if(has_area) {
+			meshout = result;
+		}
+		return;
+	}
+
+	result.verts.reserve(size*(has_area?4:2));
+	result.vertcnt.reserve(meshout.vertcnt.size()+2);
+
+	// transform to target space
+	aiMatrix4x4 trafo;
+	ConvertAxisPlacement(trafo, solid.Position);
+	BOOST_FOREACH(aiVector3D& v,in) {
+		v *= trafo;
+	}
+
+	
+	aiVector3D min = in[0];
+	dir *= aiMatrix3x3(trafo);
+
+	std::vector<aiVector3D> nors;
+	
+	// compute the normal vectors for all opening polygons
+	if (conv.apply_openings) {
+		if (!conv.settings.useCustomTriangulation) {
+			// it is essential to apply the openings in the correct spatial order. The direction
+			// doesn't matter, but we would screw up if we started with e.g. a door in between
+			// two windows.
+			std::sort(conv.apply_openings->begin(),conv.apply_openings->end(),DistanceSorter(min));
+		}
+
+		nors.reserve(conv.apply_openings->size());
+		BOOST_FOREACH(TempOpening& t,*conv.apply_openings) {
+			TempMesh& bounds = *t.profileMesh.get();
+		
+			if (bounds.verts.size() <= 2) {
+				nors.push_back(aiVector3D());
+				continue;
+			}
+			nors.push_back(((bounds.verts[2]-bounds.verts[0])^(bounds.verts[1]-bounds.verts[0]) ).Normalize());
+		}
+	}
+
+	TempMesh temp;
+	TempMesh& curmesh = conv.apply_openings ? temp : result;
+	std::vector<aiVector3D>& out = curmesh.verts;
+
+	bool (* const gen_openings)(const std::vector<TempOpening>&,const std::vector<aiVector3D>&, TempMesh&) = conv.settings.useCustomTriangulation 
+		? &TryAddOpenings_Quadrulate 
+		: &TryAddOpenings;
+ 
+	size_t sides_with_openings = 0;
+	for(size_t i = 0; i < size; ++i) {
+		const size_t next = (i+1)%size;
+
+		curmesh.vertcnt.push_back(4);
+		
+		out.push_back(in[i]);
+		out.push_back(in[i]+dir);
+		out.push_back(in[next]+dir);
+		out.push_back(in[next]);
+
+		if(conv.apply_openings) {
+			if(gen_openings(*conv.apply_openings,nors,temp)) {
+				++sides_with_openings;
+			}
+			
+			result.Append(temp);
+			temp.Clear();
+		}
+	}
+	
+	size_t sides_with_v_openings = 0;
+	if(has_area) {
+
+		for(size_t n = 0; n < 2; ++n) {
+			for(size_t i = size; i--; ) {
+				out.push_back(in[i]+(n?dir:aiVector3D()));
+			}
+
+			curmesh.vertcnt.push_back(size);
+			if(conv.apply_openings && size > 2) {
+				// XXX here we are forced to use the un-triangulated version of TryAddOpening, with
+				// all the problems it causes. The reason is that vertical walls (ehm, floors)
+				// can have an arbitrary outer shape, so the usual approach of projecting
+				// the surface and all openings onto a flat quad and triangulating the quad 
+				// fails.
+				if(TryAddOpenings(*conv.apply_openings,nors,temp)) {
+					++sides_with_v_openings;
+				}
+
+				result.Append(temp);
+				temp.Clear();
+			}
+		}
+	}
+
+	// add connection geometry to close the 'holes' for the openings
+	if(conv.apply_openings) {
+		//result.infacing.resize(result.verts.size()+);
+		BOOST_FOREACH(const TempOpening& t,*conv.apply_openings) {
+			const std::vector<aiVector3D>& in = t.profileMesh->verts;
+			std::vector<aiVector3D>& out = result.verts; 
+
+			const aiVector3D dir = t.extrusionDir;
+			for(size_t i = 0, size = in.size(); i < size; ++i) {
+				const size_t next = (i+1)%size;
+
+				result.vertcnt.push_back(4);
+
+				out.push_back(in[i]);
+				out.push_back(in[i]+dir);
+				out.push_back(in[next]+dir);
+				out.push_back(in[next]);
+			}
+		}
+	}
+
+	if(conv.apply_openings && ((sides_with_openings != 2 && sides_with_openings) || (sides_with_v_openings != 2 && sides_with_v_openings))) {
+		IFCImporter::LogWarn("failed to resolve all openings, presumably their topology is not supported by Assimp");
+	}
+
+	IFCImporter::LogDebug("generate mesh procedurally by extrusion (IfcExtrudedAreaSolid)");
+}
+
+
+
+// ------------------------------------------------------------------------------------------------
+void ProcessSweptAreaSolid(const IfcSweptAreaSolid& swept, TempMesh& meshout, ConversionData& conv)
+{
+	if(const IfcExtrudedAreaSolid* const solid = swept.ToPtr<IfcExtrudedAreaSolid>()) {
+		// Do we just collect openings for a parent element (i.e. a wall)? 
+		// In this case we don't extrude the surface yet, just keep the profile and transform it correctly
+		if(conv.collect_openings) {
+			boost::shared_ptr<TempMesh> meshtmp(new TempMesh());
+			ProcessProfile(swept.SweptArea,*meshtmp,conv);
+
+			aiMatrix4x4 m;
+			ConvertAxisPlacement(m,solid->Position);
+			meshtmp->Transform(m);
+
+			aiVector3D dir;
+			ConvertDirection(dir,solid->ExtrudedDirection);
+			conv.collect_openings->push_back(TempOpening(solid, aiMatrix3x3(m) * (dir*solid->Depth),meshtmp));
+			return;
+		}
+
+		ProcessExtrudedAreaSolid(*solid,meshout,conv);
+	}
+	else if(const IfcRevolvedAreaSolid* const rev = swept.ToPtr<IfcRevolvedAreaSolid>()) {
+		ProcessRevolvedAreaSolid(*rev,meshout,conv);
+	}
+	else {
+		IFCImporter::LogWarn("skipping unknown IfcSweptAreaSolid entity, type is " + swept.GetClassName());
+	}
+}
+
+// ------------------------------------------------------------------------------------------------
+void ProcessBoolean(const IfcBooleanResult& boolean, TempMesh& result, ConversionData& conv)
+{
+	if(const IfcBooleanResult* const clip = boolean.ToPtr<IfcBooleanResult>()) {
+		if(clip->Operator != "DIFFERENCE") {
+			IFCImporter::LogWarn("encountered unsupported boolean operator: " + (std::string)clip->Operator);
+			return;
+		}
+
+		TempMesh meshout;
+		const IfcHalfSpaceSolid* const hs = clip->SecondOperand->ResolveSelectPtr<IfcHalfSpaceSolid>(conv.db);
+		if(!hs) {
+			IFCImporter::LogError("expected IfcHalfSpaceSolid as second clipping operand");
+			return;
+		}
+
+		const IfcPlane* const plane = hs->BaseSurface->ToPtr<IfcPlane>();
+		if(!plane) {
+			IFCImporter::LogError("expected IfcPlane as base surface for the IfcHalfSpaceSolid");
+			return;
+		}
+
+		if(const IfcBooleanResult* const op0 = clip->FirstOperand->ResolveSelectPtr<IfcBooleanResult>(conv.db)) {
+			ProcessBoolean(*op0,meshout,conv);
+		}
+		else if (const IfcSweptAreaSolid* const swept = clip->FirstOperand->ResolveSelectPtr<IfcSweptAreaSolid>(conv.db)) {
+			ProcessSweptAreaSolid(*swept,meshout,conv);
+		}
+		else {
+			IFCImporter::LogError("expected IfcSweptAreaSolid or IfcBooleanResult as first clipping operand");
+			return;
+		}
+
+		// extract plane base position vector and normal vector
+		aiVector3D p,n(0.f,0.f,1.f);
+		if (plane->Position->Axis) {
+			ConvertDirection(n,plane->Position->Axis.Get());
+		}
+		ConvertCartesianPoint(p,plane->Position->Location);
+
+		if(!IsTrue(hs->AgreementFlag)) {
+			n *= -1.f;
+		}
+
+		// clip the current contents of `meshout` against the plane we obtained from the second operand
+		const std::vector<aiVector3D>& in = meshout.verts;
+		std::vector<aiVector3D>& outvert = result.verts;
+		std::vector<unsigned int>::const_iterator begin=meshout.vertcnt.begin(), end=meshout.vertcnt.end(), iit;
+
+		outvert.reserve(in.size());
+		result.vertcnt.reserve(meshout.vertcnt.size());
+
+		unsigned int vidx = 0;
+		for(iit = begin; iit != end; vidx += *iit++) {
+
+			unsigned int newcount = 0;
+			for(unsigned int i = 0; i < *iit; ++i) {
+				const aiVector3D& e0 = in[vidx+i], e1 = in[vidx+(i+1)%*iit];
+
+				// does the next segment intersect the plane?
+				aiVector3D isectpos;
+				const Intersect isect = IntersectSegmentPlane(p,n,e0,e1,isectpos);
+				if (isect == Intersect_No || isect == Intersect_LiesOnPlane) {
+					if ( (e0-p).Normalize()*n > 0 ) {
+						outvert.push_back(e0);
+						++newcount;
+					}
+				}
+				else if (isect == Intersect_Yes) {
+					if ( (e0-p).Normalize()*n > 0 ) {
+						// e0 is on the right side, so keep it 
+						outvert.push_back(e0);
+						outvert.push_back(isectpos);
+						newcount += 2;
+					}
+					else {
+						// e0 is on the wrong side, so drop it and keep e1 instead
+						outvert.push_back(isectpos);
+						++newcount;
+					}
+				}
+			}	
+
+			if (!newcount) {
+				continue;
+			}
+
+			aiVector3D vmin,vmax;
+			ArrayBounds(&*(outvert.end()-newcount),newcount,vmin,vmax);
+
+			// filter our double points - those may happen if a point lies
+			// directly on the intersection line. However, due to float
+			// precision a bitwise comparison is not feasible to detect
+			// this case.
+			const float epsilon = (vmax-vmin).SquareLength() / 1e6f;
+			FuzzyVectorCompare fz(epsilon);
+
+			std::vector<aiVector3D>::iterator e = std::unique( outvert.end()-newcount, outvert.end(), fz );
+			if (e != outvert.end()) {
+				newcount -= static_cast<unsigned int>(std::distance(e,outvert.end()));
+				outvert.erase(e,outvert.end());
+			}
+			if (fz(*( outvert.end()-newcount),outvert.back())) {
+				outvert.pop_back();
+				--newcount;
+			}
+			if(newcount > 2) {
+				result.vertcnt.push_back(newcount);
+			}
+			else while(newcount-->0)result.verts.pop_back();
+
+		}
+		IFCImporter::LogDebug("generating CSG geometry by plane clipping (IfcBooleanClippingResult)");
+	}
+	else {
+		IFCImporter::LogWarn("skipping unknown IfcBooleanResult entity, type is " + boolean.GetClassName());
+	}
+}
+
+
+
+// ------------------------------------------------------------------------------------------------
+bool ProcessGeometricItem(const IfcRepresentationItem& geo, std::vector<unsigned int>& mesh_indices, ConversionData& conv)
+{
+	TempMesh meshtmp;
+	if(const IfcShellBasedSurfaceModel* shellmod = geo.ToPtr<IfcShellBasedSurfaceModel>()) {
+		BOOST_FOREACH(boost::shared_ptr<const IfcShell> shell,shellmod->SbsmBoundary) {
+			try {
+				const EXPRESS::ENTITY& e = shell->To<ENTITY>();
+				const IfcConnectedFaceSet& fs = conv.db.MustGetObject(e).To<IfcConnectedFaceSet>(); 
+
+				ProcessConnectedFaceSet(fs,meshtmp,conv);
+			}
+			catch(std::bad_cast&) {
+				IFCImporter::LogWarn("unexpected type error, IfcShell ought to inherit from IfcConnectedFaceSet");
+			}
+		}
+	}
+	else if(const IfcConnectedFaceSet* fset = geo.ToPtr<IfcConnectedFaceSet>()) {
+		ProcessConnectedFaceSet(*fset,meshtmp,conv);
+	}
+	else if(const IfcSweptAreaSolid* swept = geo.ToPtr<IfcSweptAreaSolid>()) {
+		ProcessSweptAreaSolid(*swept,meshtmp,conv);
+	}
+	else if(const IfcManifoldSolidBrep* brep = geo.ToPtr<IfcManifoldSolidBrep>()) {
+		ProcessConnectedFaceSet(brep->Outer,meshtmp,conv);
+	}
+	else if(const IfcFaceBasedSurfaceModel* surf = geo.ToPtr<IfcFaceBasedSurfaceModel>()) {
+		BOOST_FOREACH(const IfcConnectedFaceSet& fc, surf->FbsmFaces) {
+			ProcessConnectedFaceSet(fc,meshtmp,conv);
+		}
+	}
+	else if(const IfcBooleanResult* boolean = geo.ToPtr<IfcBooleanResult>()) {
+		ProcessBoolean(*boolean,meshtmp,conv);
+	}
+	else if(geo.ToPtr<IfcBoundingBox>()) {
+		// silently skip over bounding boxes
+		return false; 
+	}
+	else {
+		IFCImporter::LogWarn("skipping unknown IfcGeometricRepresentationItem entity, type is " + geo.GetClassName());
+		return false;
+	}
+
+	meshtmp.RemoveAdjacentDuplicates();
+	FixupFaceOrientation(meshtmp);
+
+	aiMesh* const mesh = meshtmp.ToMesh();
+	if(mesh) {
+		mesh->mMaterialIndex = ProcessMaterials(geo,conv);
+		mesh_indices.push_back(conv.meshes.size());
+		conv.meshes.push_back(mesh);
+		return true;
+	}
+	return false;
+}
+
+// ------------------------------------------------------------------------------------------------
+void AssignAddedMeshes(std::vector<unsigned int>& mesh_indices,aiNode* nd,ConversionData& /*conv*/)
+{
+	if (!mesh_indices.empty()) {
+
+		// make unique
+		std::sort(mesh_indices.begin(),mesh_indices.end());
+		std::vector<unsigned int>::iterator it_end = std::unique(mesh_indices.begin(),mesh_indices.end());
+
+		const size_t size = std::distance(mesh_indices.begin(),it_end);
+
+		nd->mNumMeshes = size;
+		nd->mMeshes = new unsigned int[nd->mNumMeshes];
+		for(unsigned int i = 0; i < nd->mNumMeshes; ++i) {
+			nd->mMeshes[i] = mesh_indices[i];
+		}
+	}
+}
+
+// ------------------------------------------------------------------------------------------------
+bool TryQueryMeshCache(const IfcRepresentationItem& item, std::vector<unsigned int>& mesh_indices, ConversionData& conv) 
+{
+	ConversionData::MeshCache::const_iterator it = conv.cached_meshes.find(&item);
+	if (it != conv.cached_meshes.end()) {
+		std::copy((*it).second.begin(),(*it).second.end(),std::back_inserter(mesh_indices));
+		return true;
+	}
+	return false;
+}
+
+// ------------------------------------------------------------------------------------------------
+void PopulateMeshCache(const IfcRepresentationItem& item, const std::vector<unsigned int>& mesh_indices, ConversionData& conv)
+{
+	conv.cached_meshes[&item] = mesh_indices;
+}
+
+// ------------------------------------------------------------------------------------------------
+bool ProcessRepresentationItem(const IfcRepresentationItem& item, std::vector<unsigned int>& mesh_indices, ConversionData& conv)
+{
+	if (!TryQueryMeshCache(item,mesh_indices,conv)) {
+		if(ProcessGeometricItem(item,mesh_indices,conv)) {
+			if(mesh_indices.size()) {
+				PopulateMeshCache(item,mesh_indices,conv);
+			}
+		}
+		else return false;
+	}
+	return true;
+}
+
+} // ! IFC
+} // ! Assimp
+
+#endif 

+ 758 - 0
ThirdParty/Assimp/code/IFCLoader.cpp

@@ -0,0 +1,758 @@
+/*
+Open Asset Import Library (ASSIMP)
+----------------------------------------------------------------------
+
+Copyright (c) 2006-2010, ASSIMP Development Team
+All rights reserved.
+
+Redistribution and use of this software in source and binary forms, 
+with or without modification, are permitted provided that the 
+following conditions are met:
+
+* Redistributions of source code must retain the above
+  copyright notice, this list of conditions and the
+  following disclaimer.
+
+* Redistributions in binary form must reproduce the above
+  copyright notice, this list of conditions and the
+  following disclaimer in the documentation and/or other
+  materials provided with the distribution.
+
+* Neither the name of the ASSIMP team, nor the names of its
+  contributors may be used to endorse or promote products
+  derived from this software without specific prior
+  written permission of the ASSIMP Development Team.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+----------------------------------------------------------------------
+*/
+
+/** @file  IFCLoad.cpp
+ *  @brief Implementation of the Industry Foundation Classes loader.
+ */
+#include "AssimpPCH.h"
+
+#ifndef ASSIMP_BUILD_NO_IFC_IMPORTER
+
+#include <iterator>
+#include <boost/tuple/tuple.hpp>
+
+
+#include "IFCLoader.h"
+#include "STEPFileReader.h"
+
+#include "IFCUtil.h"
+
+#include "StreamReader.h"
+#include "MemoryIOWrapper.h"
+
+
+using namespace Assimp;
+using namespace Assimp::Formatter;
+using namespace Assimp::IFC;
+
+template<> const std::string LogFunctions<IFCImporter>::log_prefix = "IFC: ";
+
+
+/* DO NOT REMOVE this comment block. The genentitylist.sh script
+ * just looks for names adhering to the IfcSomething naming scheme
+ * and includes all matches in the whitelist for code-generation. Thus,
+ * all entity classes that are only indirectly referenced need to be
+ * mentioned explicitly.
+
+  IfcRepresentationMap
+  IfcProductRepresentation
+  IfcUnitAssignment
+  IfcClosedShell
+  IfcDoor
+
+ */
+
+namespace {
+
+
+// forward declarations
+void SetUnits(ConversionData& conv);
+void SetCoordinateSpace(ConversionData& conv);
+void ProcessSpatialStructures(ConversionData& conv);
+aiNode* ProcessSpatialStructure(aiNode* parent, const IfcProduct& el ,ConversionData& conv);
+void ProcessProductRepresentation(const IfcProduct& el, aiNode* nd, ConversionData& conv);
+void MakeTreeRelative(ConversionData& conv);
+void ConvertUnit(const EXPRESS::DataType& dt,ConversionData& conv);
+
+} // anon
+
+// ------------------------------------------------------------------------------------------------
+// Constructor to be privately used by Importer
+IFCImporter::IFCImporter()
+{}
+
+// ------------------------------------------------------------------------------------------------
+// Destructor, private as well 
+IFCImporter::~IFCImporter()
+{
+}
+
+// ------------------------------------------------------------------------------------------------
+// Returns whether the class can handle the format of the given file. 
+bool IFCImporter::CanRead( const std::string& pFile, IOSystem* pIOHandler, bool checkSig) const
+{
+	const std::string& extension = GetExtension(pFile);
+	if (extension == "ifc") {
+		return true;
+	}
+
+	else if ((!extension.length() || checkSig) && pIOHandler)	{
+		// note: this is the common identification for STEP-encoded files, so
+		// it is only unambiguous as long as we don't support any further
+		// file formats with STEP as their encoding.
+		const char* tokens[] = {"ISO-10303-21"};
+		return SearchFileHeaderForToken(pIOHandler,pFile,tokens,1);
+	}
+	return false;
+}
+
+// ------------------------------------------------------------------------------------------------
+// List all extensions handled by this loader
+void IFCImporter::GetExtensionList(std::set<std::string>& app) 
+{
+	app.insert("ifc");
+}
+
+
+// ------------------------------------------------------------------------------------------------
+// Setup configuration properties for the loader
+void IFCImporter::SetupProperties(const Importer* pImp)
+{
+	settings.skipSpaceRepresentations = pImp->GetPropertyBool(AI_CONFIG_IMPORT_IFC_SKIP_SPACE_REPRESENTATIONS,true);
+	settings.skipCurveRepresentations = pImp->GetPropertyBool(AI_CONFIG_IMPORT_IFC_SKIP_CURVE_REPRESENTATIONS,true);
+	settings.useCustomTriangulation = pImp->GetPropertyBool(AI_CONFIG_IMPORT_IFC_CUSTOM_TRIANGULATION,true);
+
+	settings.conicSamplingAngle = 10.f;
+	settings.skipAnnotations = true;
+}
+
+
+// ------------------------------------------------------------------------------------------------
+// Imports the given file into the given scene structure. 
+void IFCImporter::InternReadFile( const std::string& pFile, 
+	aiScene* pScene, IOSystem* pIOHandler)
+{
+	boost::shared_ptr<IOStream> stream(pIOHandler->Open(pFile));
+	if (!stream) {
+		ThrowException("Could not open file for reading");
+	}
+
+	boost::scoped_ptr<STEP::DB> db(STEP::ReadFileHeader(stream));
+	const STEP::HeaderInfo& head = const_cast<const STEP::DB&>(*db).GetHeader();
+
+	if(!head.fileSchema.size() || head.fileSchema.substr(0,3) != "IFC") {
+		ThrowException("Unrecognized file schema: " + head.fileSchema);
+	}
+
+	if (!DefaultLogger::isNullLogger()) {
+		LogDebug("File schema is \'" + head.fileSchema + '\'');
+		if (head.timestamp.length()) {
+			LogDebug("Timestamp \'" + head.timestamp + '\'');
+		}
+		if (head.app.length()) {
+			LogDebug("Application/Exporter identline is \'" + head.app  + '\'');
+		}
+	}
+
+	// obtain a copy of the machine-generated IFC scheme
+	EXPRESS::ConversionSchema schema;
+	GetSchema(schema);
+
+	// tell the reader which entity types to track with special care
+	static const char* const types_to_track[] = {
+		"ifcsite", "ifcbuilding", "ifcproject"
+	};
+
+	// tell the reader for which types we need to simulate STEPs reverse indices
+	static const char* const inverse_indices_to_track[] = {
+		"ifcrelcontainedinspatialstructure", "ifcrelaggregates", "ifcrelvoidselement", "ifcstyleditem"
+	};
+
+	// feed the IFC schema into the reader and pre-parse all lines
+	STEP::ReadFile(*db, schema, types_to_track, inverse_indices_to_track);
+
+	const STEP::LazyObject* proj =  db->GetObject("ifcproject");
+	if (!proj) {
+		ThrowException("missing IfcProject entity");
+	}
+
+	ConversionData conv(*db,proj->To<IfcProject>(),pScene,settings);
+	SetUnits(conv);
+	SetCoordinateSpace(conv);
+	ProcessSpatialStructures(conv);
+	MakeTreeRelative(conv);
+
+	// NOTE - this is a stress test for the importer, but it works only
+	// in a build with no entities disabled. See 
+	//     scripts/IFCImporter/CPPGenerator.py
+	// for more information.
+#ifdef ASSIMP_IFC_TEST
+	db->EvaluateAll();
+#endif
+
+	// do final data copying
+	if (conv.meshes.size()) {
+		pScene->mNumMeshes = static_cast<unsigned int>(conv.meshes.size());
+		pScene->mMeshes = new aiMesh*[pScene->mNumMeshes]();
+		std::copy(conv.meshes.begin(),conv.meshes.end(),pScene->mMeshes);
+
+		// needed to keep the d'tor from burning us
+		conv.meshes.clear();
+	}
+
+	if (conv.materials.size()) {
+		pScene->mNumMaterials = static_cast<unsigned int>(conv.materials.size());
+		pScene->mMaterials = new aiMaterial*[pScene->mNumMaterials]();
+		std::copy(conv.materials.begin(),conv.materials.end(),pScene->mMaterials);
+
+		// needed to keep the d'tor from burning us
+		conv.materials.clear();
+	}
+
+	// apply world coordinate system (which includes the scaling to convert to meters and a -90 degrees rotation around x)
+	aiMatrix4x4 scale, rot;
+	aiMatrix4x4::Scaling(aiVector3D(conv.len_scale,conv.len_scale,conv.len_scale),scale);
+	aiMatrix4x4::RotationX(-AI_MATH_HALF_PI_F,rot);
+
+	pScene->mRootNode->mTransformation = rot * scale * conv.wcs * pScene->mRootNode->mTransformation;
+
+	// this must be last because objects are evaluated lazily as we process them
+	if ( !DefaultLogger::isNullLogger() ){
+		LogDebug((Formatter::format(),"STEP: evaluated ",db->GetEvaluatedObjectCount()," object records"));
+	}
+}
+
+namespace {
+
+
+// ------------------------------------------------------------------------------------------------
+void ConvertUnit(const IfcNamedUnit& unit,ConversionData& conv)
+{
+	if(const IfcSIUnit* const si = unit.ToPtr<IfcSIUnit>()) {
+
+		if(si->UnitType == "LENGTHUNIT") { 
+			conv.len_scale = si->Prefix ? ConvertSIPrefix(si->Prefix) : 1.f;
+			IFCImporter::LogDebug("got units used for lengths");
+		}
+		if(si->UnitType == "PLANEANGLEUNIT") { 
+			if (si->Name != "RADIAN") {
+				IFCImporter::LogWarn("expected base unit for angles to be radian");
+			}
+		}
+	}
+	else if(const IfcConversionBasedUnit* const convu = unit.ToPtr<IfcConversionBasedUnit>()) {
+
+		if(convu->UnitType == "PLANEANGLEUNIT") { 
+			try {
+				conv.angle_scale = convu->ConversionFactor->ValueComponent->To<EXPRESS::REAL>();
+				ConvertUnit(*convu->ConversionFactor->UnitComponent,conv);
+				IFCImporter::LogDebug("got units used for angles");
+			}
+			catch(std::bad_cast&) {
+				IFCImporter::LogError("skipping unknown IfcConversionBasedUnit.ValueComponent entry - expected REAL");
+			}
+		}
+	}
+}
+
+// ------------------------------------------------------------------------------------------------
+void ConvertUnit(const EXPRESS::DataType& dt,ConversionData& conv)
+{
+	try {
+		const EXPRESS::ENTITY& e = dt.To<ENTITY>();
+
+		const IfcNamedUnit& unit = e.ResolveSelect<IfcNamedUnit>(conv.db);
+		if(unit.UnitType != "LENGTHUNIT" && unit.UnitType != "PLANEANGLEUNIT") {
+			return;
+		}
+
+		ConvertUnit(unit,conv);
+	}
+	catch(std::bad_cast&) {
+		// not entity, somehow
+		IFCImporter::LogError("skipping unknown IfcUnit entry - expected entity");
+	}
+}
+
+// ------------------------------------------------------------------------------------------------
+void SetUnits(ConversionData& conv)
+{
+	// see if we can determine the coordinate space used to express. 
+	for(size_t i = 0; i <  conv.proj.UnitsInContext->Units.size(); ++i ) {
+		ConvertUnit(*conv.proj.UnitsInContext->Units[i],conv);
+	}
+}
+
+
+// ------------------------------------------------------------------------------------------------
+void SetCoordinateSpace(ConversionData& conv)
+{
+	const IfcRepresentationContext* fav = NULL;
+	BOOST_FOREACH(const 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") { 
+			break;
+		}
+	}
+	if (fav) {
+		if(const IfcGeometricRepresentationContext* const geo = fav->ToPtr<IfcGeometricRepresentationContext>()) {
+			ConvertAxisPlacement(conv.wcs, *geo->WorldCoordinateSystem, conv);
+			IFCImporter::LogDebug("got world coordinate system");
+		}
+	}
+}
+
+
+// ------------------------------------------------------------------------------------------------
+void ResolveObjectPlacement(aiMatrix4x4& m, const IfcObjectPlacement& place, ConversionData& conv)
+{
+	if (const IfcLocalPlacement* const local = place.ToPtr<IfcLocalPlacement>()){
+		ConvertAxisPlacement(m, *local->RelativePlacement, conv);
+
+		if (local->PlacementRelTo) {
+			aiMatrix4x4 tmp;
+			ResolveObjectPlacement(tmp,local->PlacementRelTo.Get(),conv);
+			m = tmp * m;
+		}
+	}
+	else {
+		IFCImporter::LogWarn("skipping unknown IfcObjectPlacement entity, type is " + place.GetClassName());
+	}
+}
+
+// ------------------------------------------------------------------------------------------------
+void GetAbsTransform(aiMatrix4x4& out, const aiNode* nd, ConversionData& conv)
+{
+	aiMatrix4x4 t;
+	if (nd->mParent) {
+		GetAbsTransform(t,nd->mParent,conv);
+	}
+	out = t*nd->mTransformation;
+}
+
+// ------------------------------------------------------------------------------------------------
+bool ProcessMappedItem(const IfcMappedItem& mapped, aiNode* nd_src, std::vector< aiNode* >& subnodes_src, ConversionData& conv)
+{
+	// insert a custom node here, the cartesian transform operator is simply a conventional transformation matrix
+	std::auto_ptr<aiNode> nd(new aiNode());
+	nd->mName.Set("IfcMappedItem");
+		
+	// handle the Cartesian operator
+	aiMatrix4x4 m;
+	ConvertTransformOperator(m, *mapped.MappingTarget);
+
+	aiMatrix4x4 msrc;
+	ConvertAxisPlacement(msrc,*mapped.MappingSource->MappingOrigin,conv);
+
+	msrc = m*msrc;
+
+	std::vector<unsigned int> meshes;
+	const size_t old_openings = conv.collect_openings ? conv.collect_openings->size() : 0;
+	if (conv.apply_openings) {
+		aiMatrix4x4 minv = msrc;
+		minv.Inverse();
+		BOOST_FOREACH(TempOpening& open,*conv.apply_openings){
+			open.Transform(minv);
+		}
+	}
+
+	const IfcRepresentation& repr = mapped.MappingSource->MappedRepresentation;
+
+	bool got = false;
+	BOOST_FOREACH(const IfcRepresentationItem& item, repr.Items) {
+		if(!ProcessRepresentationItem(item,meshes,conv)) {
+			IFCImporter::LogWarn("skipping mapped entity of type " + item.GetClassName() + ", no representations could be generated");
+		}
+		else got = true;
+	}
+
+	if (!got) {
+		return false;
+	}
+
+	AssignAddedMeshes(meshes,nd.get(),conv);
+	if (conv.collect_openings) {
+
+		// if this pass serves us only to collect opening geometry,
+		// make sure we transform the TempMesh's which we need to
+		// preserve as well.
+		if(const size_t diff = conv.collect_openings->size() - old_openings) {
+			for(size_t i = 0; i < diff; ++i) {
+				(*conv.collect_openings)[old_openings+i].Transform(msrc);
+			}
+		}
+	}
+
+	nd->mTransformation =  nd_src->mTransformation * msrc;
+	subnodes_src.push_back(nd.release());
+
+	return true;
+}
+
+// ------------------------------------------------------------------------------------------------
+struct RateRepresentationPredicate {
+
+	int Rate(const IfcRepresentation* r) const {
+		// the smaller, the better
+
+		if (! r->RepresentationIdentifier) {
+			// neutral choice if no extra information is specified
+			return 0;
+		}
+
+		
+		const std::string& name = r->RepresentationIdentifier.Get();
+		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>();
+				if (m) {
+					return Rate(m->MappingSource->MappedRepresentation);
+				}
+			}
+			return 100;
+		}
+
+		return Rate(name);
+	}
+
+	int Rate(const std::string& r) const {
+
+
+		if (r == "SolidModel") {
+			return -3;
+		}
+		
+		// give strong preference to extruded geometry
+		if (r == "SweptSolid") {
+			return -10;
+		}
+		
+		if (r == "Clipping") {
+			return -5;
+		}
+
+		// 'Brep' is difficult to get right due to possible voids in the
+		// polygon boundaries, so take it only if we are forced to (i.e.
+		// if the only alternative is (non-clipping) boolean operations, 
+		// which are not supported at all).
+		if (r == "Brep") {
+			return -2;
+		}
+		
+		// Curves, bounding boxes - those will most likely not be loaded
+		// as we can't make any use out of this data. So consider them
+		// last.
+		if (r == "BoundingBox" || r == "Curve2D") {
+			return 100;
+		}
+		return 0;
+	}
+
+	bool operator() (const IfcRepresentation* a, const IfcRepresentation* b) const {
+		return Rate(a) <= Rate(b);
+	}
+};
+
+// ------------------------------------------------------------------------------------------------
+void ProcessProductRepresentation(const IfcProduct& el, aiNode* nd, std::vector< aiNode* >& subnodes, ConversionData& conv)
+{
+	if(!el.Representation) {
+		return;
+	}
+
+
+	std::vector<unsigned int> meshes;
+	
+	// we want only one representation type, so bring them in a suitable order (i.e try those
+	// that look as if we could read them quickly at first). This way of reading
+	// 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());
+	std::copy(src.begin(),src.end(),repr_ordered.begin());
+	std::sort(repr_ordered.begin(),repr_ordered.end(),RateRepresentationPredicate());
+
+	BOOST_FOREACH(const IfcRepresentation* repr, repr_ordered) {
+		bool res = false;
+		BOOST_FOREACH(const IfcRepresentationItem& item, repr->Items) {
+			if(const IfcMappedItem* const geo = item.ToPtr<IfcMappedItem>()) {
+				res = ProcessMappedItem(*geo,nd,subnodes,conv) || res;
+			}
+			else {
+				res = ProcessRepresentationItem(item,meshes,conv) || res;
+			}
+		}
+		// if we got something meaningful at this point, skip any further representations
+		if(res) {
+			break;
+		}
+	}
+
+	AssignAddedMeshes(meshes,nd,conv);
+}
+
+// ------------------------------------------------------------------------------------------------
+aiNode* ProcessSpatialStructure(aiNode* parent, const 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
+	if(conv.settings.skipSpaceRepresentations) {
+		if(const IfcSpace* const space = el.ToPtr<IfcSpace>()) {
+			IFCImporter::LogDebug("skipping IfcSpace entity due to importer settings");
+			return NULL;
+		}
+	}
+
+	if(conv.settings.skipAnnotations) {
+		if(const IfcAnnotation* const ann = el.ToPtr<IfcAnnotation>()) {
+			IFCImporter::LogDebug("skipping IfcAnnotation entity due to importer settings");
+			return NULL;
+		}
+	}
+
+	// add an output node for this spatial structure
+	std::auto_ptr<aiNode> nd(new aiNode());
+	nd->mName.Set(el.GetClassName()+"_"+(el.Name?el.Name:el.GlobalId));
+	nd->mParent = parent;
+
+	if(el.ObjectPlacement) {
+		ResolveObjectPlacement(nd->mTransformation,el.ObjectPlacement.Get(),conv);
+	}
+
+	std::vector<TempOpening> openings;
+
+	aiMatrix4x4 myInv;
+	bool didinv = false;
+
+	// convert everything contained directly within this structure,
+	// this may result in more nodes.
+	std::vector< aiNode* > subnodes;
+	try {
+		// locate aggregates and 'contained-in-here'-elements of this spatial structure and add them in recursively
+		// on our way, collect openings in *this* element
+		STEP::DB::RefMapRange range = refs.equal_range(el.GetID());
+
+		for(STEP::DB::RefMapRange range2 = range; range2.first != range.second; ++range2.first) {
+			const STEP::LazyObject& obj = conv.db.MustGetObject((*range2.first).second);
+
+			// handle regularly-contained elements
+			if(const IfcRelContainedInSpatialStructure* const cont = obj->ToPtr<IfcRelContainedInSpatialStructure>()) {
+				BOOST_FOREACH(const IfcProduct& pro, cont->RelatedElements) {		
+					if(const IfcOpeningElement* const open = pro.ToPtr<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 storeys
+						// but we want them for the building elements to which they belong to.
+						continue;
+					}
+					
+					aiNode* const ndnew = ProcessSpatialStructure(nd.get(),pro,conv,NULL);
+					if(ndnew) {
+						subnodes.push_back( ndnew );
+					}
+				}
+			}
+			// 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>()) {
+				if(fills->RelatingBuildingElement->GetID() == el.GetID()) {
+					const IfcFeatureElementSubtraction& open = fills->RelatedOpeningElement;
+
+					// move opening elements to a separate node since they are semantically different than elements that are just 'contained'
+					std::auto_ptr<aiNode> nd_aggr(new aiNode());
+					nd_aggr->mName.Set("$RelVoidsElement");
+					nd_aggr->mParent = nd.get();
+
+					nd_aggr->mTransformation = nd->mTransformation;
+
+					std::vector<TempOpening> openings_local;
+					aiNode* const ndnew = ProcessSpatialStructure( nd_aggr.get(),open, conv,&openings_local);
+					if (ndnew) {
+
+						nd_aggr->mNumChildren = 1;
+						nd_aggr->mChildren = new aiNode*[1]();
+
+						
+						nd_aggr->mChildren[0] = ndnew;
+						
+						if(openings_local.size()) {
+							if (!didinv) {
+								myInv = aiMatrix4x4(nd->mTransformation ).Inverse();
+								didinv = true;
+							}
+
+							// we need all openings to be in the local space of *this* node, so transform them
+							BOOST_FOREACH(TempOpening& op,openings_local) {
+								op.Transform( myInv*nd_aggr->mChildren[0]->mTransformation);
+								openings.push_back(op);
+							}
+						}
+						subnodes.push_back( nd_aggr.release() );
+					}
+				}
+			}
+		}
+
+		for(;range.first != range.second; ++range.first) {
+			if(const IfcRelAggregates* const aggr = conv.db.GetObject((*range.first).second)->ToPtr<IfcRelAggregates>()) {
+
+				// move aggregate elements to a separate node since they are semantically different than elements that are just 'contained'
+				std::auto_ptr<aiNode> nd_aggr(new aiNode());
+				nd_aggr->mName.Set("$RelAggregates");
+				nd_aggr->mParent = nd.get();
+
+				nd_aggr->mTransformation = nd->mTransformation;
+
+				nd_aggr->mChildren = new aiNode*[aggr->RelatedObjects.size()]();
+				BOOST_FOREACH(const IfcObjectDefinition& def, aggr->RelatedObjects) {
+					if(const IfcProduct* const prod = def.ToPtr<IfcProduct>()) {
+
+						aiNode* const ndnew = ProcessSpatialStructure(nd_aggr.get(),*prod,conv,NULL);
+						if(ndnew) {
+							nd_aggr->mChildren[nd_aggr->mNumChildren++] = ndnew;
+						}
+					}
+				}
+			
+				subnodes.push_back( nd_aggr.release() );
+			}
+		}
+
+		conv.collect_openings = collect_openings;
+		if(!conv.collect_openings) {
+			conv.apply_openings = &openings;
+		}
+
+		ProcessProductRepresentation(el,nd.get(),subnodes,conv);
+		conv.apply_openings = conv.collect_openings = NULL;
+
+		if (subnodes.size()) {
+			nd->mChildren = new aiNode*[subnodes.size()]();
+			BOOST_FOREACH(aiNode* nd2, subnodes) {
+				nd->mChildren[nd->mNumChildren++] = nd2;
+				nd2->mParent = nd.get();
+			}
+		}
+	}
+	catch(...) {
+		// it hurts, but I don't want to pull boost::ptr_vector into -noboost only for these few spots here
+		std::for_each(subnodes.begin(),subnodes.end(),delete_fun<aiNode>());
+		throw;
+	}
+
+	return nd.release();
+}
+
+// ------------------------------------------------------------------------------------------------
+void ProcessSpatialStructures(ConversionData& conv)
+{
+	// XXX add support for multiple sites (i.e. IfcSpatialStructureElements with composition == COMPLEX)
+
+
+	// process all products in the file. it is reasonable to assume that a
+	// file that is relevant for us contains at least a site or a building.
+	const STEP::DB::ObjectMapByType& map = conv.db.GetObjectsByType();
+
+	ai_assert(map.find("ifcsite") != map.end());
+	const STEP::DB::ObjectSet* range = &map.find("ifcsite")->second;
+
+	if (range->empty()) {
+		ai_assert(map.find("ifcbuilding") != map.end());
+		range = &map.find("ifcbuilding")->second;
+		if (range->empty()) {
+			// no site, no building -  fail;
+			IFCImporter::ThrowException("no root element found (expected IfcBuilding or preferably IfcSite)");
+		}
+	}
+
+	
+	BOOST_FOREACH(const STEP::LazyObject* lz, *range) {
+		const IfcSpatialStructureElement* const prod = lz->ToPtr<IfcSpatialStructureElement>();
+		if(!prod) {
+			continue;
+		}
+		IFCImporter::LogDebug("looking at spatial structure `" + (prod->Name ? prod->Name.Get() : "unnamed") + "`" + (prod->ObjectType? " which is of type " + prod->ObjectType.Get():""));
+	
+		// the primary site is referenced by an IFCRELAGGREGATES element which assigns it to the IFCPRODUCT
+		const STEP::DB::RefMap& refs = conv.db.GetRefs();
+		STEP::DB::RefMapRange range = refs.equal_range(conv.proj.GetID());
+		for(;range.first != range.second; ++range.first) {
+			if(const IfcRelAggregates* const aggr = conv.db.GetObject((*range.first).second)->ToPtr<IfcRelAggregates>()) {
+			
+				BOOST_FOREACH(const 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()) { 
+						IFCImporter::LogDebug("selecting this spatial structure as root structure");
+						// got it, this is the primary site.
+						conv.out->mRootNode = ProcessSpatialStructure(NULL,*prod,conv,NULL);
+						return;
+					}
+				}
+
+			}
+		}
+	}
+
+	
+	IFCImporter::LogWarn("failed to determine primary site element, taking the first IfcSite");
+	BOOST_FOREACH(const STEP::LazyObject* lz, *range) {
+		const IfcSpatialStructureElement* const prod = lz->ToPtr<IfcSpatialStructureElement>();
+		if(!prod) {
+			continue;
+		}
+
+		conv.out->mRootNode = ProcessSpatialStructure(NULL,*prod,conv,NULL);
+		return;
+	}
+
+	IFCImporter::ThrowException("failed to determine primary site element");
+}
+
+// ------------------------------------------------------------------------------------------------
+void MakeTreeRelative(aiNode* start, const aiMatrix4x4& combined)
+{
+	// combined is the parent's absolute transformation matrix
+	aiMatrix4x4 old = start->mTransformation;
+
+	if (!combined.IsIdentity()) {
+		start->mTransformation = aiMatrix4x4(combined).Inverse() * start->mTransformation;
+	}
+
+	// All nodes store absolute transformations right now, so we need to make them relative
+	for (unsigned int i = 0; i < start->mNumChildren; ++i) {
+		MakeTreeRelative(start->mChildren[i],old);
+	}
+}
+
+// ------------------------------------------------------------------------------------------------
+void MakeTreeRelative(ConversionData& conv)
+{
+	MakeTreeRelative(conv.out->mRootNode,aiMatrix4x4());
+}
+
+} // !anon
+
+
+
+#endif

+ 132 - 0
ThirdParty/Assimp/code/IFCLoader.h

@@ -0,0 +1,132 @@
+/*
+Open Asset Import Library (ASSIMP)
+----------------------------------------------------------------------
+
+Copyright (c) 2006-2010, ASSIMP Development Team
+All rights reserved.
+
+Redistribution and use of this software in source and binary forms, 
+with or without modification, are permitted provided that the 
+following conditions are met:
+
+* Redistributions of source code must retain the above
+  copyright notice, this list of conditions and the
+  following disclaimer.
+
+* Redistributions in binary form must reproduce the above
+  copyright notice, this list of conditions and the
+  following disclaimer in the documentation and/or other
+  materials provided with the distribution.
+
+* Neither the name of the ASSIMP team, nor the names of its
+  contributors may be used to endorse or promote products
+  derived from this software without specific prior
+  written permission of the ASSIMP Development Team.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+----------------------------------------------------------------------
+*/
+
+/** @file  IFC.h
+ *  @brief Declaration of the Industry Foundation Classes (IFC) loader main class
+ */
+#ifndef INCLUDED_AI_IFC_LOADER_H
+#define INCLUDED_AI_IFC_LOADER_H
+
+#include "BaseImporter.h"
+#include "LogAux.h"
+
+namespace Assimp	{
+	
+	// TinyFormatter.h
+	namespace Formatter {
+		template <typename T,typename TR, typename A> class basic_formatter;
+		typedef class basic_formatter< char, std::char_traits<char>, std::allocator<char> > format;
+	}
+
+	namespace STEP {
+		class DB;
+	}
+
+
+// -------------------------------------------------------------------------------------------
+/** Load the IFC format, which is an open specification to describe building and construction
+    industry data.
+
+ See http://en.wikipedia.org/wiki/Industry_Foundation_Classes
+*/
+// -------------------------------------------------------------------------------------------
+class IFCImporter : public BaseImporter, public LogFunctions<IFCImporter>
+{
+public:
+	IFCImporter();
+	~IFCImporter();
+
+
+public:
+
+	// --------------------
+	bool CanRead( const std::string& pFile, 
+		IOSystem* pIOHandler,
+		bool checkSig
+	) const;
+
+protected:
+
+	// --------------------
+	void GetExtensionList(std::set<std::string>& app);
+
+	// --------------------
+	void SetupProperties(const Importer* pImp);
+
+	// --------------------
+	void InternReadFile( const std::string& pFile, 
+		aiScene* pScene, 
+		IOSystem* pIOHandler
+	);
+
+private:
+
+
+public: 
+
+
+	// loader settings, publicly accessible via their corresponding AI_CONFIG constants
+	struct Settings 
+	{
+		Settings()
+			: skipSpaceRepresentations()
+			, skipCurveRepresentations()
+			, useCustomTriangulation()
+			, skipAnnotations()
+			, conicSamplingAngle(10.f)
+		{}
+
+
+		bool skipSpaceRepresentations;
+		bool skipCurveRepresentations;
+		bool useCustomTriangulation;
+		bool skipAnnotations;
+		float conicSamplingAngle;
+	};
+	
+	
+private:
+
+	Settings settings;
+
+}; // !class IFCImporter
+
+} // end of namespace Assimp
+#endif // !INCLUDED_AI_IFC_LOADER_H

+ 179 - 0
ThirdParty/Assimp/code/IFCMaterial.cpp

@@ -0,0 +1,179 @@
+/*
+Open Asset Import Library (ASSIMP)
+----------------------------------------------------------------------
+
+Copyright (c) 2006-2010, ASSIMP Development Team
+All rights reserved.
+
+Redistribution and use of this software in source and binary forms, 
+with or without modification, are permitted provided that the 
+following conditions are met:
+
+* Redistributions of source code must retain the above
+  copyright notice, this list of conditions and the
+  following disclaimer.
+
+* Redistributions in binary form must reproduce the above
+  copyright notice, this list of conditions and the
+  following disclaimer in the documentation and/or other
+  materials provided with the distribution.
+
+* Neither the name of the ASSIMP team, nor the names of its
+  contributors may be used to endorse or promote products
+  derived from this software without specific prior
+  written permission of the ASSIMP Development Team.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+----------------------------------------------------------------------
+*/
+
+/** @file  IFCMaterial.cpp
+ *  @brief Implementation of conversion routines to convert IFC materials to aiMaterial
+ */
+
+#include "AssimpPCH.h"
+
+#ifndef ASSIMP_BUILD_NO_IFC_IMPORTER
+#include "IFCUtil.h"
+
+namespace Assimp {
+	namespace IFC {
+
+// ------------------------------------------------------------------------------------------------
+int ConvertShadingMode(const std::string& name)
+{
+	if (name == "BLINN") {
+		return aiShadingMode_Blinn;
+	}
+	else if (name == "FLAT" || name == "NOTDEFINED") {
+		return aiShadingMode_NoShading;
+	}
+	else if (name == "PHONG") {
+		return aiShadingMode_Phong;
+	}
+	IFCImporter::LogWarn("shading mode "+name+" not recognized by Assimp, using Phong instead");
+	return aiShadingMode_Phong;
+}
+
+// ------------------------------------------------------------------------------------------------
+void FillMaterial(MaterialHelper* mat,const IFC::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
+	BOOST_FOREACH(boost::shared_ptr< const IFC::IfcSurfaceStyleElementSelect > sel2, surf->Styles) {
+		if (const IFC::IfcSurfaceStyleShading* shade = sel2->ResolveSelectPtr<IFC::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 (ren->Transparency) {
+					const float t = 1.f-ren->Transparency.Get();
+					mat->AddProperty(&t,1, AI_MATKEY_OPACITY);
+				}
+
+				if (ren->DiffuseColour) {
+					ConvertColor(col, *ren->DiffuseColour.Get(),conv,&col_base);
+					mat->AddProperty(&col,1, AI_MATKEY_COLOR_DIFFUSE);
+				}
+
+				if (ren->SpecularColour) {
+					ConvertColor(col, *ren->SpecularColour.Get(),conv,&col_base);
+					mat->AddProperty(&col,1, AI_MATKEY_COLOR_SPECULAR);
+				}
+
+				if (ren->TransmissionColour) {
+					ConvertColor(col, *ren->TransmissionColour.Get(),conv,&col_base);
+					mat->AddProperty(&col,1, AI_MATKEY_COLOR_TRANSPARENT);
+				}
+
+				if (ren->ReflectionColour) {
+					ConvertColor(col, *ren->ReflectionColour.Get(),conv,&col_base);
+					mat->AddProperty(&col,1, AI_MATKEY_COLOR_REFLECTIVE);
+				}
+
+				const int shading = (ren->SpecularHighlight && ren->SpecularColour)?ConvertShadingMode(ren->ReflectanceMethod):static_cast<int>(aiShadingMode_Gouraud);
+				mat->AddProperty(&shading,1, AI_MATKEY_SHADING_MODEL);
+
+				if (ren->SpecularHighlight) {
+					if(const EXPRESS::REAL* rt = ren->SpecularHighlight.Get()->ToPtr<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 = *rt;
+						mat->AddProperty(&e,1,AI_MATKEY_SHININESS);
+					}
+					else {
+						IFCImporter::LogWarn("unexpected type error, SpecularHighlight should be a REAL");
+					}
+				}
+			}
+		}
+		else if (const IFC::IfcSurfaceStyleWithTextures* tex = sel2->ResolveSelectPtr<IFC::IfcSurfaceStyleWithTextures>(conv.db)) {
+			// XXX
+		}
+	}
+
+}
+
+// ------------------------------------------------------------------------------------------------
+unsigned int ProcessMaterials(const IFC::IfcRepresentationItem& item, ConversionData& conv)
+{
+	if (conv.materials.empty()) {
+		aiString name;
+		std::auto_ptr<MaterialHelper> mat(new MaterialHelper());
+
+		name.Set("<IFCDefault>");
+		mat->AddProperty(&name,AI_MATKEY_NAME);
+
+		aiColor4D col = aiColor4D(0.6f,0.6f,0.6f,1.0f);
+		mat->AddProperty(&col,1, AI_MATKEY_COLOR_DIFFUSE);
+
+		conv.materials.push_back(mat.release());
+	}
+
+	STEP::DB::RefMapRange range = conv.db.GetRefs().equal_range(item.GetID());
+	for(;range.first != range.second; ++range.first) {
+		if(const IFC::IfcStyledItem* const styled = conv.db.GetObject((*range.first).second)->ToPtr<IFC::IfcStyledItem>()) {
+			BOOST_FOREACH(const IFC::IfcPresentationStyleAssignment& as, styled->Styles) {
+				BOOST_FOREACH(boost::shared_ptr<const IFC::IfcPresentationStyleSelect> sel, as.Styles) {
+
+					if (const IFC::IfcSurfaceStyle* const surf =  sel->ResolveSelectPtr<IFC::IfcSurfaceStyle>(conv.db)) {
+						const std::string side = static_cast<std::string>(surf->Side);
+						if (side != "BOTH") {
+							IFCImporter::LogWarn("ignoring surface side marker on IFC::IfcSurfaceStyle: " + side);
+						}
+
+						std::auto_ptr<MaterialHelper> mat(new MaterialHelper());
+
+						FillMaterial(mat.get(),surf,conv);
+
+						conv.materials.push_back(mat.release());
+						return conv.materials.size()-1;
+					}
+				}
+			}
+		}
+	}
+	return 0;
+}
+
+} // ! IFC
+} // ! Assimp
+
+#endif

+ 168 - 0
ThirdParty/Assimp/code/IFCProfile.cpp

@@ -0,0 +1,168 @@
+/*
+Open Asset Import Library (ASSIMP)
+----------------------------------------------------------------------
+
+Copyright (c) 2006-2010, ASSIMP Development Team
+All rights reserved.
+
+Redistribution and use of this software in source and binary forms, 
+with or without modification, are permitted provided that the 
+following conditions are met:
+
+* Redistributions of source code must retain the above
+  copyright notice, this list of conditions and the
+  following disclaimer.
+
+* Redistributions in binary form must reproduce the above
+  copyright notice, this list of conditions and the
+  following disclaimer in the documentation and/or other
+  materials provided with the distribution.
+
+* Neither the name of the ASSIMP team, nor the names of its
+  contributors may be used to endorse or promote products
+  derived from this software without specific prior
+  written permission of the ASSIMP Development Team.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+----------------------------------------------------------------------
+*/
+
+/** @file  IFCProfile.cpp
+ *  @brief Read profile and curves entities from IFC files
+ */
+
+#include "AssimpPCH.h"
+
+#ifndef ASSIMP_BUILD_NO_IFC_IMPORTER
+#include "IFCUtil.h"
+
+namespace Assimp {
+	namespace IFC {
+
+// ------------------------------------------------------------------------------------------------
+void ProcessPolyLine(const IfcPolyline& def, TempMesh& meshout, ConversionData& /*conv*/)
+{
+	// this won't produce a valid mesh, it just spits out a list of vertices
+	aiVector3D t;
+	BOOST_FOREACH(const IfcCartesianPoint& cp, def.Points) {
+		ConvertCartesianPoint(t,cp);
+		meshout.verts.push_back(t);
+	}
+	meshout.vertcnt.push_back(meshout.verts.size());
+}
+
+// ------------------------------------------------------------------------------------------------
+bool ProcessCurve(const IfcCurve& curve,  TempMesh& meshout, ConversionData& conv)
+{
+	boost::scoped_ptr<const Curve> cv(Curve::Convert(curve,conv));
+	if (!cv) {
+		IFCImporter::LogWarn("skipping unknown IfcCurve entity, type is " + curve.GetClassName());
+		return false;
+	}
+
+	// we must have a bounded curve at this point
+	if (const BoundedCurve* bc = dynamic_cast<const BoundedCurve*>(cv.get())) {
+		try {
+			bc->SampleDiscrete(meshout);
+		}
+		catch(const  CurveError& cv) {
+			IFCImporter::LogError(cv.s+ " (error occurred while processing curve)");
+			return false;
+		}
+		meshout.vertcnt.push_back(meshout.verts.size());
+		return true;
+	}
+
+	IFCImporter::LogError("cannot use unbounded curve as profile");
+	return false;
+}
+
+// ------------------------------------------------------------------------------------------------
+void ProcessClosedProfile(const IfcArbitraryClosedProfileDef& def, TempMesh& meshout, ConversionData& conv)
+{
+	ProcessCurve(def.OuterCurve,meshout,conv);
+}
+
+// ------------------------------------------------------------------------------------------------
+void ProcessOpenProfile(const IfcArbitraryOpenProfileDef& def, TempMesh& meshout, ConversionData& conv)
+{
+	ProcessCurve(def.Curve,meshout,conv);
+}
+
+// ------------------------------------------------------------------------------------------------
+void ProcessParametrizedProfile(const IfcParameterizedProfileDef& def, TempMesh& meshout, ConversionData& conv)
+{
+	if(const IfcRectangleProfileDef* const cprofile = def.ToPtr<IfcRectangleProfileDef>()) {
+		const float x = cprofile->XDim*0.5f, y = cprofile->YDim*0.5f;
+
+		meshout.verts.reserve(meshout.verts.size()+4);
+		meshout.verts.push_back( aiVector3D( x, y, 0.f ));
+		meshout.verts.push_back( aiVector3D(-x, y, 0.f ));
+		meshout.verts.push_back( aiVector3D(-x,-y, 0.f ));
+		meshout.verts.push_back( aiVector3D( x,-y, 0.f ));
+		meshout.vertcnt.push_back(4);
+	}
+	else if( const IfcCircleProfileDef* const circle = def.ToPtr<IfcCircleProfileDef>()) {
+		if( const IfcCircleHollowProfileDef* const hollow = def.ToPtr<IfcCircleHollowProfileDef>()) {
+			// TODO
+		}
+		const size_t segments = 32;
+		const float delta = AI_MATH_TWO_PI_F/segments, radius = circle->Radius;
+
+		meshout.verts.reserve(segments);
+
+		float angle = 0.f;
+		for(size_t i = 0; i < segments; ++i, angle += delta) {
+			meshout.verts.push_back( aiVector3D( cos(angle)*radius, sin(angle)*radius, 0.f ));
+		}
+
+		meshout.vertcnt.push_back(segments);
+	}
+	else {
+		IFCImporter::LogWarn("skipping unknown IfcParameterizedProfileDef entity, type is " + def.GetClassName());
+		return;
+	}
+
+	aiMatrix4x4 trafo;
+	ConvertAxisPlacement(trafo, *def.Position);
+	meshout.Transform(trafo);
+}
+
+// ------------------------------------------------------------------------------------------------
+bool ProcessProfile(const IfcProfileDef& prof, TempMesh& meshout, ConversionData& conv) 
+{
+	if(const IfcArbitraryClosedProfileDef* const cprofile = prof.ToPtr<IfcArbitraryClosedProfileDef>()) {
+		ProcessClosedProfile(*cprofile,meshout,conv);
+	}
+	else if(const IfcArbitraryOpenProfileDef* const copen = prof.ToPtr<IfcArbitraryOpenProfileDef>()) {
+		ProcessOpenProfile(*copen,meshout,conv);
+	}
+	else if(const IfcParameterizedProfileDef* const cparam = prof.ToPtr<IfcParameterizedProfileDef>()) {
+		ProcessParametrizedProfile(*cparam,meshout,conv);
+	}
+	else {
+		IFCImporter::LogWarn("skipping unknown IfcProfileDef entity, type is " + prof.GetClassName());
+		return false;
+	}
+	meshout.RemoveAdjacentDuplicates();
+	if (!meshout.vertcnt.size() || meshout.vertcnt.front() <= 1) {
+		return false;
+	}
+	return true;
+}
+
+} // ! IFC
+} // ! Assimp
+
+#endif

+ 4800 - 0
ThirdParty/Assimp/code/IFCReaderGen.cpp

@@ -0,0 +1,4800 @@
+/*
+Open Asset Import Library (ASSIMP)
+----------------------------------------------------------------------
+
+Copyright (c) 2006-2010, ASSIMP Development Team
+All rights reserved.
+
+Redistribution and use of this software in source and binary forms, 
+with or without modification, are permitted provided that the 
+following conditions are met:
+
+* Redistributions of source code must retain the above
+  copyright notice, this list of conditions and the
+  following disclaimer.
+
+* Redistributions in binary form must reproduce the above
+  copyright notice, this list of conditions and the
+  following disclaimer in the documentation and/or other
+  materials provided with the distribution.
+
+* Neither the name of the ASSIMP team, nor the names of its
+  contributors may be used to endorse or promote products
+  derived from this software without specific prior
+  written permission of the ASSIMP Development Team.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+----------------------------------------------------------------------
+*/
+
+/** MACHINE-GENERATED by scripts/ICFImporter/CppGenerator.py */
+
+#include "AssimpPCH.h"
+#ifndef ASSIMP_BUILD_NO_IFC_IMPORTER
+
+#include "IFCReaderGen.h"
+
+namespace Assimp {
+using namespace IFC;
+
+namespace {
+
+	typedef EXPRESS::ConversionSchema::SchemaEntry SchemaEntry;
+	const SchemaEntry schema_raw[] =  {
+		SchemaEntry("ifcsoundpowermeasure",NULL )
+,		SchemaEntry("ifcdoorstyleoperationenum",NULL )
+,		SchemaEntry("ifcrotationalfrequencymeasure",NULL )
+,		SchemaEntry("ifccharacterstyleselect",NULL )
+,		SchemaEntry("ifcelectrictimecontroltypeenum",NULL )
+,		SchemaEntry("ifcairterminaltypeenum",NULL )
+,		SchemaEntry("ifcprojectordertypeenum",NULL )
+,		SchemaEntry("ifcsequenceenum",NULL )
+,		SchemaEntry("ifcspecificheatcapacitymeasure",NULL )
+,		SchemaEntry("ifcheatingvaluemeasure",NULL )
+,		SchemaEntry("ifcribplatedirectionenum",NULL )
+,		SchemaEntry("ifcsensortypeenum",NULL )
+,		SchemaEntry("ifcelectricheatertypeenum",NULL )
+,		SchemaEntry("ifcobjectiveenum",NULL )
+,		SchemaEntry("ifctextstyleselect",NULL )
+,		SchemaEntry("ifccolumntypeenum",NULL )
+,		SchemaEntry("ifcgasterminaltypeenum",NULL )
+,		SchemaEntry("ifcmassdensitymeasure",NULL )
+,		SchemaEntry("ifcsimplevalue",NULL )
+,		SchemaEntry("ifcelectricconductancemeasure",NULL )
+,		SchemaEntry("ifcbuildingelementproxytypeenum",NULL )
+,		SchemaEntry("ifcjunctionboxtypeenum",NULL )
+,		SchemaEntry("ifcmodulusofelasticitymeasure",NULL )
+,		SchemaEntry("ifcactionsourcetypeenum",NULL )
+,		SchemaEntry("ifcsiunitname",NULL )
+,		SchemaEntry("ifcrotationalmassmeasure",NULL )
+,		SchemaEntry("ifcmembertypeenum",NULL )
+,		SchemaEntry("ifctextdecoration",NULL )
+,		SchemaEntry("ifcpositivelengthmeasure",NULL )
+,		SchemaEntry("ifcamountofsubstancemeasure",NULL )
+,		SchemaEntry("ifcdoorstyleconstructionenum",NULL )
+,		SchemaEntry("ifcangularvelocitymeasure",NULL )
+,		SchemaEntry("ifcdirectionsenseenum",NULL )
+,		SchemaEntry("ifcnullstyle",NULL )
+,		SchemaEntry("ifcmonthinyearnumber",NULL )
+,		SchemaEntry("ifcrampflighttypeenum",NULL )
+,		SchemaEntry("ifcwindowstyleoperationenum",NULL )
+,		SchemaEntry("ifccurvaturemeasure",NULL )
+,		SchemaEntry("ifcbooleanoperator",NULL )
+,		SchemaEntry("ifcductfittingtypeenum",NULL )
+,		SchemaEntry("ifccurrencyenum",NULL )
+,		SchemaEntry("ifcobjecttypeenum",NULL )
+,		SchemaEntry("ifcthermalloadtypeenum",NULL )
+,		SchemaEntry("ifcionconcentrationmeasure",NULL )
+,		SchemaEntry("ifcobjectreferenceselect",NULL )
+,		SchemaEntry("ifcclassificationnotationselect",NULL )
+,		SchemaEntry("ifcbsplinecurveform",NULL )
+,		SchemaEntry("ifcelementcompositionenum",NULL )
+,		SchemaEntry("ifcdraughtingcalloutelement",NULL )
+,		SchemaEntry("ifcfillstyleselect",NULL )
+,		SchemaEntry("ifcheatfluxdensitymeasure",NULL )
+,		SchemaEntry("ifcgeometricprojectionenum",NULL )
+,		SchemaEntry("ifcfontvariant",NULL )
+,		SchemaEntry("ifcthermalresistancemeasure",NULL )
+,		SchemaEntry("ifcreflectancemethodenum",NULL )
+,		SchemaEntry("ifcslabtypeenum",NULL )
+,		SchemaEntry("ifcpositiveratiomeasure",NULL )
+,		SchemaEntry("ifcinternalorexternalenum",NULL )
+,		SchemaEntry("ifcdimensionextentusage",NULL )
+,		SchemaEntry("ifcpipefittingtypeenum",NULL )
+,		SchemaEntry("ifcsanitaryterminaltypeenum",NULL )
+,		SchemaEntry("ifcminuteinhour",NULL )
+,		SchemaEntry("ifcwalltypeenum",NULL )
+,		SchemaEntry("ifcmolecularweightmeasure",NULL )
+,		SchemaEntry("ifcunitaryequipmenttypeenum",NULL )
+,		SchemaEntry("ifcproceduretypeenum",NULL )
+,		SchemaEntry("ifcdistributionchamberelementtypeenum",NULL )
+,		SchemaEntry("ifctextpath",NULL )
+,		SchemaEntry("ifccostscheduletypeenum",NULL )
+,		SchemaEntry("ifcshell",NULL )
+,		SchemaEntry("ifclinearmomentmeasure",NULL )
+,		SchemaEntry("ifcelectriccurrentmeasure",NULL )
+,		SchemaEntry("ifcdaylightsavinghour",NULL )
+,		SchemaEntry("ifcnormalisedratiomeasure",NULL )
+,		SchemaEntry("ifcfantypeenum",NULL )
+,		SchemaEntry("ifccontextdependentmeasure",NULL )
+,		SchemaEntry("ifcaheadorbehind",NULL )
+,		SchemaEntry("ifcfontstyle",NULL )
+,		SchemaEntry("ifccooledbeamtypeenum",NULL )
+,		SchemaEntry("ifcsurfacestyleelementselect",NULL )
+,		SchemaEntry("ifcyearnumber",NULL )
+,		SchemaEntry("ifclabel",NULL )
+,		SchemaEntry("ifctimestamp",NULL )
+,		SchemaEntry("ifcfiresuppressionterminaltypeenum",NULL )
+,		SchemaEntry("ifcdocumentconfidentialityenum",NULL )
+,		SchemaEntry("ifccolourorfactor",NULL )
+,		SchemaEntry("ifcairterminalboxtypeenum",NULL )
+,		SchemaEntry("ifcnumericmeasure",NULL )
+,		SchemaEntry("ifcderivedunitenum",NULL )
+,		SchemaEntry("ifccurveoredgecurve",NULL )
+,		SchemaEntry("ifclightemissionsourceenum",NULL )
+,		SchemaEntry("ifckinematicviscositymeasure",NULL )
+,		SchemaEntry("ifcboxalignment",NULL )
+,		SchemaEntry("ifcdocumentselect",NULL )
+,		SchemaEntry("ifccablecarrierfittingtypeenum",NULL )
+,		SchemaEntry("ifcpumptypeenum",NULL )
+,		SchemaEntry("ifchourinday",NULL )
+,		SchemaEntry("ifcprojectorderrecordtypeenum",NULL )
+,		SchemaEntry("ifcwindowstyleconstructionenum",NULL )
+,		SchemaEntry("ifcpresentationstyleselect",NULL )
+,		SchemaEntry("ifccablesegmenttypeenum",NULL )
+,		SchemaEntry("ifcwasteterminaltypeenum",NULL )
+,		SchemaEntry("ifcisothermalmoisturecapacitymeasure",NULL )
+,		SchemaEntry("ifcidentifier",NULL )
+,		SchemaEntry("ifcradioactivitymeasure",NULL )
+,		SchemaEntry("ifcsymbolstyleselect",NULL )
+,		SchemaEntry("ifcrooftypeenum",NULL )
+,		SchemaEntry("ifcreal",NULL )
+,		SchemaEntry("ifcroleenum",NULL )
+,		SchemaEntry("ifcmeasurevalue",NULL )
+,		SchemaEntry("ifcpiletypeenum",NULL )
+,		SchemaEntry("ifcelectriccurrentenum",NULL )
+,		SchemaEntry("ifctexttransformation",NULL )
+,		SchemaEntry("ifcfiltertypeenum",NULL )
+,		SchemaEntry("ifctransformertypeenum",NULL )
+,		SchemaEntry("ifcsurfaceside",NULL )
+,		SchemaEntry("ifcthermaltransmittancemeasure",NULL )
+,		SchemaEntry("ifctubebundletypeenum",NULL )
+,		SchemaEntry("ifclightfixturetypeenum",NULL )
+,		SchemaEntry("ifcinductancemeasure",NULL )
+,		SchemaEntry("ifcglobalorlocalenum",NULL )
+,		SchemaEntry("ifcoutlettypeenum",NULL )
+,		SchemaEntry("ifcworkcontroltypeenum",NULL )
+,		SchemaEntry("ifcwarpingmomentmeasure",NULL )
+,		SchemaEntry("ifcdynamicviscositymeasure",NULL )
+,		SchemaEntry("ifcenergysequenceenum",NULL )
+,		SchemaEntry("ifcfillareastyletileshapeselect",NULL )
+,		SchemaEntry("ifcpointorvertexpoint",NULL )
+,		SchemaEntry("ifcvibrationisolatortypeenum",NULL )
+,		SchemaEntry("ifctanktypeenum",NULL )
+,		SchemaEntry("ifctimeseriesdatatypeenum",NULL )
+,		SchemaEntry("ifcsurfacetextureenum",NULL )
+,		SchemaEntry("ifcaddresstypeenum",NULL )
+,		SchemaEntry("ifcchillertypeenum",NULL )
+,		SchemaEntry("ifccomplexnumber",NULL )
+,		SchemaEntry("ifclightdistributioncurveenum",NULL )
+,		SchemaEntry("ifcreinforcingbarroleenum",NULL )
+,		SchemaEntry("ifcresourceconsumptionenum",NULL )
+,		SchemaEntry("ifccsgselect",NULL )
+,		SchemaEntry("ifcmodulusoflinearsubgradereactionmeasure",NULL )
+,		SchemaEntry("ifcevaporatortypeenum",NULL )
+,		SchemaEntry("ifctimeseriesscheduletypeenum",NULL )
+,		SchemaEntry("ifcdayinmonthnumber",NULL )
+,		SchemaEntry("ifcelectricmotortypeenum",NULL )
+,		SchemaEntry("ifcthermalconductivitymeasure",NULL )
+,		SchemaEntry("ifcenergymeasure",NULL )
+,		SchemaEntry("ifcrotationalstiffnessmeasure",NULL )
+,		SchemaEntry("ifcderivedmeasurevalue",NULL )
+,		SchemaEntry("ifcdoorpaneloperationenum",NULL )
+,		SchemaEntry("ifccurvestylefontselect",NULL )
+,		SchemaEntry("ifcwindowpaneloperationenum",NULL )
+,		SchemaEntry("ifcdataoriginenum",NULL )
+,		SchemaEntry("ifcstairtypeenum",NULL )
+,		SchemaEntry("ifcrailingtypeenum",NULL )
+,		SchemaEntry("ifcpowermeasure",NULL )
+,		SchemaEntry("ifcstackterminaltypeenum",NULL )
+,		SchemaEntry("ifchatchlinedistanceselect",NULL )
+,		SchemaEntry("ifctrimmingselect",NULL )
+,		SchemaEntry("ifcthermalexpansioncoefficientmeasure",NULL )
+,		SchemaEntry("ifclightdistributiondatasourceselect",NULL )
+,		SchemaEntry("ifctorquemeasure",NULL )
+,		SchemaEntry("ifcmassperlengthmeasure",NULL )
+,		SchemaEntry("ifcvalvetypeenum",NULL )
+,		SchemaEntry("ifcwindowpanelpositionenum",NULL )
+,		SchemaEntry("ifcsurfaceorfacesurface",NULL )
+,		SchemaEntry("ifcpropertysourceenum",NULL )
+,		SchemaEntry("ifccablecarriersegmenttypeenum",NULL )
+,		SchemaEntry("ifccountmeasure",NULL )
+,		SchemaEntry("ifcfontweight",NULL )
+,		SchemaEntry("ifcphysicalorvirtualenum",NULL )
+,		SchemaEntry("ifcspacetypeenum",NULL )
+,		SchemaEntry("ifcvolumetricflowratemeasure",NULL )
+,		SchemaEntry("ifcluminousfluxmeasure",NULL )
+,		SchemaEntry("ifcevaporativecoolertypeenum",NULL )
+,		SchemaEntry("ifclayereditem",NULL )
+,		SchemaEntry("ifcmodulusofsubgradereactionmeasure",NULL )
+,		SchemaEntry("ifcheatexchangertypeenum",NULL )
+,		SchemaEntry("ifcprotectivedevicetypeenum",NULL )
+,		SchemaEntry("ifcdampertypeenum",NULL )
+,		SchemaEntry("ifccontrollertypeenum",NULL )
+,		SchemaEntry("ifcmassflowratemeasure",NULL )
+,		SchemaEntry("ifcassemblyplaceenum",NULL )
+,		SchemaEntry("ifcareameasure",NULL )
+,		SchemaEntry("ifcservicelifefactortypeenum",NULL )
+,		SchemaEntry("ifcvolumemeasure",NULL )
+,		SchemaEntry("ifcbeamtypeenum",NULL )
+,		SchemaEntry("ifcstateenum",NULL )
+,		SchemaEntry("ifcspaceheatertypeenum",NULL )
+,		SchemaEntry("ifcsectiontypeenum",NULL )
+,		SchemaEntry("ifcfootingtypeenum",NULL )
+,		SchemaEntry("ifcmonetarymeasure",NULL )
+,		SchemaEntry("ifcloadgrouptypeenum",NULL )
+,		SchemaEntry("ifcelectricgeneratortypeenum",NULL )
+,		SchemaEntry("ifcflowmetertypeenum",NULL )
+,		SchemaEntry("ifcmaterialselect",NULL )
+,		SchemaEntry("ifcanalysismodeltypeenum",NULL )
+,		SchemaEntry("ifctemperaturegradientmeasure",NULL )
+,		SchemaEntry("ifcmodulusofrotationalsubgradereactionmeasure",NULL )
+,		SchemaEntry("ifccolour",NULL )
+,		SchemaEntry("ifccurtainwalltypeenum",NULL )
+,		SchemaEntry("ifcmetricvalueselect",NULL )
+,		SchemaEntry("ifctextalignment",NULL )
+,		SchemaEntry("ifcdoorpanelpositionenum",NULL )
+,		SchemaEntry("ifcplatetypeenum",NULL )
+,		SchemaEntry("ifcsectionalareaintegralmeasure",NULL )
+,		SchemaEntry("ifcpresentabletext",NULL )
+,		SchemaEntry("ifcvaporpermeabilitymeasure",NULL )
+,		SchemaEntry("ifcstructuralsurfacetypeenum",NULL )
+,		SchemaEntry("ifclinearvelocitymeasure",NULL )
+,		SchemaEntry("ifcintegercountratemeasure",NULL )
+,		SchemaEntry("ifcairtoairheatrecoverytypeenum",NULL )
+,		SchemaEntry("ifcdocumentstatusenum",NULL )
+,		SchemaEntry("ifclengthmeasure",NULL )
+,		SchemaEntry("ifcplanarforcemeasure",NULL )
+,		SchemaEntry("ifcbooleanoperand",NULL )
+,		SchemaEntry("ifcinteger",NULL )
+,		SchemaEntry("ifcramptypeenum",NULL )
+,		SchemaEntry("ifcactorselect",NULL )
+,		SchemaEntry("ifcelectricchargemeasure",NULL )
+,		SchemaEntry("ifcgeometricsetselect",NULL )
+,		SchemaEntry("ifcconnectiontypeenum",NULL )
+,		SchemaEntry("ifcvalue",NULL )
+,		SchemaEntry("ifccoolingtowertypeenum",NULL )
+,		SchemaEntry("ifcplaneanglemeasure",NULL )
+,		SchemaEntry("ifcswitchingdevicetypeenum",NULL )
+,		SchemaEntry("ifcflowdirectionenum",NULL )
+,		SchemaEntry("ifcthermalloadsourceenum",NULL )
+,		SchemaEntry("ifctextfontselect",NULL )
+,		SchemaEntry("ifcspecularhighlightselect",NULL )
+,		SchemaEntry("ifcanalysistheorytypeenum",NULL )
+,		SchemaEntry("ifctextfontname",NULL )
+,		SchemaEntry("ifcelectricvoltagemeasure",NULL )
+,		SchemaEntry("ifctendontypeenum",NULL )
+,		SchemaEntry("ifcsoundpressuremeasure",NULL )
+,		SchemaEntry("ifcelectricdistributionpointfunctionenum",NULL )
+,		SchemaEntry("ifcspecularroughness",NULL )
+,		SchemaEntry("ifcactiontypeenum",NULL )
+,		SchemaEntry("ifcreinforcingbarsurfaceenum",NULL )
+,		SchemaEntry("ifchumidifiertypeenum",NULL )
+,		SchemaEntry("ifcilluminancemeasure",NULL )
+,		SchemaEntry("ifclibraryselect",NULL )
+,		SchemaEntry("ifctext",NULL )
+,		SchemaEntry("ifclayersetdirectionenum",NULL )
+,		SchemaEntry("ifcboilertypeenum",NULL )
+,		SchemaEntry("ifctimemeasure",NULL )
+,		SchemaEntry("ifcaccelerationmeasure",NULL )
+,		SchemaEntry("ifcelectricflowstoragedevicetypeenum",NULL )
+,		SchemaEntry("ifcluminousintensitymeasure",NULL )
+,		SchemaEntry("ifcdefinedsymbolselect",NULL )
+,		SchemaEntry("ifcunitenum",NULL )
+,		SchemaEntry("ifcinventorytypeenum",NULL )
+,		SchemaEntry("ifcstructuralactivityassignmentselect",NULL )
+,		SchemaEntry("ifcelementassemblytypeenum",NULL )
+,		SchemaEntry("ifcservicelifetypeenum",NULL )
+,		SchemaEntry("ifccoveringtypeenum",NULL )
+,		SchemaEntry("ifcstairflighttypeenum",NULL )
+,		SchemaEntry("ifcsiprefix",NULL )
+,		SchemaEntry("ifcelectriccapacitancemeasure",NULL )
+,		SchemaEntry("ifcflowinstrumenttypeenum",NULL )
+,		SchemaEntry("ifcthermodynamictemperaturemeasure",NULL )
+,		SchemaEntry("ifcgloballyuniqueid",NULL )
+,		SchemaEntry("ifclamptypeenum",NULL )
+,		SchemaEntry("ifcmagneticfluxmeasure",NULL )
+,		SchemaEntry("ifcsolidanglemeasure",NULL )
+,		SchemaEntry("ifcfrequencymeasure",NULL )
+,		SchemaEntry("ifctransportelementtypeenum",NULL )
+,		SchemaEntry("ifcsoundscaleenum",NULL )
+,		SchemaEntry("ifcphmeasure",NULL )
+,		SchemaEntry("ifcactuatortypeenum",NULL )
+,		SchemaEntry("ifcpositiveplaneanglemeasure",NULL )
+,		SchemaEntry("ifcappliedvalueselect",NULL )
+,		SchemaEntry("ifcsecondinminute",NULL )
+,		SchemaEntry("ifcductsegmenttypeenum",NULL )
+,		SchemaEntry("ifcthermaladmittancemeasure",NULL )
+,		SchemaEntry("ifcspecularexponent",NULL )
+,		SchemaEntry("ifcdatetimeselect",NULL )
+,		SchemaEntry("ifctransitioncode",NULL )
+,		SchemaEntry("ifcdimensioncount",NULL )
+,		SchemaEntry("ifclinearstiffnessmeasure",NULL )
+,		SchemaEntry("ifccompoundplaneanglemeasure",NULL )
+,		SchemaEntry("ifcelectricappliancetypeenum",NULL )
+,		SchemaEntry("ifcprofiletypeenum",NULL )
+,		SchemaEntry("ifccurvefontorscaledcurvefontselect",NULL )
+,		SchemaEntry("ifcprojectedortruelengthenum",NULL )
+,		SchemaEntry("ifcabsorbeddosemeasure",NULL )
+,		SchemaEntry("ifcparametervalue",NULL )
+,		SchemaEntry("ifcpileconstructionenum",NULL )
+,		SchemaEntry("ifcmotorconnectiontypeenum",NULL )
+,		SchemaEntry("ifcoccupanttypeenum",NULL )
+,		SchemaEntry("ifcunit",NULL )
+,		SchemaEntry("ifclinearforcemeasure",NULL )
+,		SchemaEntry("ifccondensertypeenum",NULL )
+,		SchemaEntry("ifcdescriptivemeasure",NULL )
+,		SchemaEntry("ifcmomentofinertiameasure",NULL )
+,		SchemaEntry("ifcdoseequivalentmeasure",NULL )
+,		SchemaEntry("ifcorientationselect",NULL )
+,		SchemaEntry("ifclogical",NULL )
+,		SchemaEntry("ifcsizeselect",NULL )
+,		SchemaEntry("ifcenvironmentalimpactcategoryenum",NULL )
+,		SchemaEntry("ifclogicaloperatorenum",NULL )
+,		SchemaEntry("ifccompressortypeenum",NULL )
+,		SchemaEntry("ifcbenchmarkenum",NULL )
+,		SchemaEntry("ifcratiomeasure",NULL )
+,		SchemaEntry("ifcvectorordirection",NULL )
+,		SchemaEntry("ifcconstraintenum",NULL )
+,		SchemaEntry("ifcalarmtypeenum",NULL )
+,		SchemaEntry("ifcluminousintensitydistributionmeasure",NULL )
+,		SchemaEntry("ifcarithmeticoperatorenum",NULL )
+,		SchemaEntry("ifcaxis2placement",NULL )
+,		SchemaEntry("ifcforcemeasure",NULL )
+,		SchemaEntry("ifctrimmingpreference",NULL )
+,		SchemaEntry("ifcelectricresistancemeasure",NULL )
+,		SchemaEntry("ifcwarpingconstantmeasure",NULL )
+,		SchemaEntry("ifcpipesegmenttypeenum",NULL )
+,		SchemaEntry("ifcconditioncriterionselect",NULL )
+,		SchemaEntry("ifcshearmodulusmeasure",NULL )
+,		SchemaEntry("ifcpressuremeasure",NULL )
+,		SchemaEntry("ifcductsilencertypeenum",NULL )
+,		SchemaEntry("ifcboolean",NULL )
+,		SchemaEntry("ifcsectionmodulusmeasure",NULL )
+,		SchemaEntry("ifcchangeactionenum",NULL )
+,		SchemaEntry("ifccoiltypeenum",NULL )
+,		SchemaEntry("ifcmassmeasure",NULL )
+,		SchemaEntry("ifcstructuralcurvetypeenum",NULL )
+,		SchemaEntry("ifcpermeablecoveringoperationenum",NULL )
+,		SchemaEntry("ifcmagneticfluxdensitymeasure",NULL )
+,		SchemaEntry("ifcmoisturediffusivitymeasure",NULL )
+,		SchemaEntry("ifcroot",&STEP::ObjectHelper<IfcRoot,4>::Construct )
+,		SchemaEntry("ifcobjectdefinition",&STEP::ObjectHelper<IfcObjectDefinition,0>::Construct )
+,		SchemaEntry("ifctypeobject",&STEP::ObjectHelper<IfcTypeObject,2>::Construct )
+,		SchemaEntry("ifctypeproduct",&STEP::ObjectHelper<IfcTypeProduct,2>::Construct )
+,		SchemaEntry("ifcelementtype",&STEP::ObjectHelper<IfcElementType,1>::Construct )
+,		SchemaEntry("ifcfurnishingelementtype",&STEP::ObjectHelper<IfcFurnishingElementType,0>::Construct )
+,		SchemaEntry("ifcfurnituretype",&STEP::ObjectHelper<IfcFurnitureType,1>::Construct )
+,		SchemaEntry("ifcobject",&STEP::ObjectHelper<IfcObject,1>::Construct )
+,		SchemaEntry("ifcproduct",&STEP::ObjectHelper<IfcProduct,2>::Construct )
+,		SchemaEntry("ifcgrid",&STEP::ObjectHelper<IfcGrid,3>::Construct )
+,		SchemaEntry("ifcrepresentationitem",&STEP::ObjectHelper<IfcRepresentationItem,0>::Construct )
+,		SchemaEntry("ifcgeometricrepresentationitem",&STEP::ObjectHelper<IfcGeometricRepresentationItem,0>::Construct )
+,		SchemaEntry("ifconedirectionrepeatfactor",&STEP::ObjectHelper<IfcOneDirectionRepeatFactor,1>::Construct )
+,		SchemaEntry("ifctwodirectionrepeatfactor",&STEP::ObjectHelper<IfcTwoDirectionRepeatFactor,1>::Construct )
+,		SchemaEntry("ifcelement",&STEP::ObjectHelper<IfcElement,1>::Construct )
+,		SchemaEntry("ifcelementcomponent",&STEP::ObjectHelper<IfcElementComponent,0>::Construct )
+,		SchemaEntry("ifclocaltime",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcspatialstructureelementtype",&STEP::ObjectHelper<IfcSpatialStructureElementType,0>::Construct )
+,		SchemaEntry("ifccontrol",&STEP::ObjectHelper<IfcControl,0>::Construct )
+,		SchemaEntry("ifcactionrequest",&STEP::ObjectHelper<IfcActionRequest,1>::Construct )
+,		SchemaEntry("ifctexturevertex",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcpropertydefinition",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcpropertysetdefinition",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcfluidflowproperties",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcdocumentinformation",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifccalendardate",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcdistributionelementtype",&STEP::ObjectHelper<IfcDistributionElementType,0>::Construct )
+,		SchemaEntry("ifcdistributionflowelementtype",&STEP::ObjectHelper<IfcDistributionFlowElementType,0>::Construct )
+,		SchemaEntry("ifcenergyconversiondevicetype",&STEP::ObjectHelper<IfcEnergyConversionDeviceType,0>::Construct )
+,		SchemaEntry("ifccooledbeamtype",&STEP::ObjectHelper<IfcCooledBeamType,1>::Construct )
+,		SchemaEntry("ifccsgprimitive3d",&STEP::ObjectHelper<IfcCsgPrimitive3D,1>::Construct )
+,		SchemaEntry("ifcrectangularpyramid",&STEP::ObjectHelper<IfcRectangularPyramid,3>::Construct )
+,		SchemaEntry("ifcstructuralload",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcstructuralloadstatic",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcstructuralloadlinearforce",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcsurface",&STEP::ObjectHelper<IfcSurface,0>::Construct )
+,		SchemaEntry("ifcboundedsurface",&STEP::ObjectHelper<IfcBoundedSurface,0>::Construct )
+,		SchemaEntry("ifcrectangulartrimmedsurface",&STEP::ObjectHelper<IfcRectangularTrimmedSurface,7>::Construct )
+,		SchemaEntry("ifcphysicalquantity",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcphysicalsimplequantity",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcquantityvolume",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcquantityarea",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcgroup",&STEP::ObjectHelper<IfcGroup,0>::Construct )
+,		SchemaEntry("ifcrelationship",&STEP::ObjectHelper<IfcRelationship,0>::Construct )
+,		SchemaEntry("ifcrelassigns",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcrelassignstoactor",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifchalfspacesolid",&STEP::ObjectHelper<IfcHalfSpaceSolid,2>::Construct )
+,		SchemaEntry("ifcpolygonalboundedhalfspace",&STEP::ObjectHelper<IfcPolygonalBoundedHalfSpace,2>::Construct )
+,		SchemaEntry("ifcenergyproperties",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcairtoairheatrecoverytype",&STEP::ObjectHelper<IfcAirToAirHeatRecoveryType,1>::Construct )
+,		SchemaEntry("ifcflowfittingtype",&STEP::ObjectHelper<IfcFlowFittingType,0>::Construct )
+,		SchemaEntry("ifcpipefittingtype",&STEP::ObjectHelper<IfcPipeFittingType,1>::Construct )
+,		SchemaEntry("ifcrepresentation",&STEP::ObjectHelper<IfcRepresentation,4>::Construct )
+,		SchemaEntry("ifcstylemodel",&STEP::ObjectHelper<IfcStyleModel,0>::Construct )
+,		SchemaEntry("ifcstyledrepresentation",&STEP::ObjectHelper<IfcStyledRepresentation,0>::Construct )
+,		SchemaEntry("ifcrelassignstocontrol",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcrelassignstoprojectorder",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcdimensionalexponents",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcbooleanresult",&STEP::ObjectHelper<IfcBooleanResult,3>::Construct )
+,		SchemaEntry("ifcsoundproperties",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcfeatureelement",&STEP::ObjectHelper<IfcFeatureElement,0>::Construct )
+,		SchemaEntry("ifcfeatureelementsubtraction",&STEP::ObjectHelper<IfcFeatureElementSubtraction,0>::Construct )
+,		SchemaEntry("ifcopeningelement",&STEP::ObjectHelper<IfcOpeningElement,0>::Construct )
+,		SchemaEntry("ifcconditioncriterion",&STEP::ObjectHelper<IfcConditionCriterion,2>::Construct )
+,		SchemaEntry("ifcflowterminaltype",&STEP::ObjectHelper<IfcFlowTerminalType,0>::Construct )
+,		SchemaEntry("ifcflowcontrollertype",&STEP::ObjectHelper<IfcFlowControllerType,0>::Construct )
+,		SchemaEntry("ifcswitchingdevicetype",&STEP::ObjectHelper<IfcSwitchingDeviceType,1>::Construct )
+,		SchemaEntry("ifcsystem",&STEP::ObjectHelper<IfcSystem,0>::Construct )
+,		SchemaEntry("ifcelectricalcircuit",&STEP::ObjectHelper<IfcElectricalCircuit,0>::Construct )
+,		SchemaEntry("ifcactorrole",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcdateandtime",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcdraughtingcalloutrelationship",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcdimensioncalloutrelationship",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcderivedunitelement",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcexternalreference",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcclassificationreference",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcunitaryequipmenttype",&STEP::ObjectHelper<IfcUnitaryEquipmentType,1>::Construct )
+,		SchemaEntry("ifcproperty",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcport",&STEP::ObjectHelper<IfcPort,0>::Construct )
+,		SchemaEntry("ifcaddress",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcplacement",&STEP::ObjectHelper<IfcPlacement,1>::Construct )
+,		SchemaEntry("ifcpredefineditem",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcpredefinedcolour",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcdraughtingpredefinedcolour",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcprofiledef",&STEP::ObjectHelper<IfcProfileDef,2>::Construct )
+,		SchemaEntry("ifcarbitraryclosedprofiledef",&STEP::ObjectHelper<IfcArbitraryClosedProfileDef,1>::Construct )
+,		SchemaEntry("ifccurve",&STEP::ObjectHelper<IfcCurve,0>::Construct )
+,		SchemaEntry("ifcconic",&STEP::ObjectHelper<IfcConic,1>::Construct )
+,		SchemaEntry("ifccircle",&STEP::ObjectHelper<IfcCircle,1>::Construct )
+,		SchemaEntry("ifcappliedvalue",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcenvironmentalimpactvalue",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcsimpleproperty",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcpropertysinglevalue",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcelementarysurface",&STEP::ObjectHelper<IfcElementarySurface,1>::Construct )
+,		SchemaEntry("ifcplane",&STEP::ObjectHelper<IfcPlane,0>::Construct )
+,		SchemaEntry("ifcpropertyboundedvalue",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifccostschedule",&STEP::ObjectHelper<IfcCostSchedule,8>::Construct )
+,		SchemaEntry("ifcmonetaryunit",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcconnectiongeometry",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcconnectioncurvegeometry",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcrightcircularcone",&STEP::ObjectHelper<IfcRightCircularCone,2>::Construct )
+,		SchemaEntry("ifcelementassembly",&STEP::ObjectHelper<IfcElementAssembly,2>::Construct )
+,		SchemaEntry("ifcbuildingelement",&STEP::ObjectHelper<IfcBuildingElement,0>::Construct )
+,		SchemaEntry("ifcmember",&STEP::ObjectHelper<IfcMember,0>::Construct )
+,		SchemaEntry("ifcpropertydependencyrelationship",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcbuildingelementproxy",&STEP::ObjectHelper<IfcBuildingElementProxy,1>::Construct )
+,		SchemaEntry("ifcstructuralactivity",&STEP::ObjectHelper<IfcStructuralActivity,2>::Construct )
+,		SchemaEntry("ifcstructuralaction",&STEP::ObjectHelper<IfcStructuralAction,2>::Construct )
+,		SchemaEntry("ifcstructuralplanaraction",&STEP::ObjectHelper<IfcStructuralPlanarAction,1>::Construct )
+,		SchemaEntry("ifctopologicalrepresentationitem",&STEP::ObjectHelper<IfcTopologicalRepresentationItem,0>::Construct )
+,		SchemaEntry("ifcconnectedfaceset",&STEP::ObjectHelper<IfcConnectedFaceSet,1>::Construct )
+,		SchemaEntry("ifcsweptsurface",&STEP::ObjectHelper<IfcSweptSurface,2>::Construct )
+,		SchemaEntry("ifcsurfaceoflinearextrusion",&STEP::ObjectHelper<IfcSurfaceOfLinearExtrusion,2>::Construct )
+,		SchemaEntry("ifcarbitraryprofiledefwithvoids",&STEP::ObjectHelper<IfcArbitraryProfileDefWithVoids,1>::Construct )
+,		SchemaEntry("ifcprocess",&STEP::ObjectHelper<IfcProcess,0>::Construct )
+,		SchemaEntry("ifcprocedure",&STEP::ObjectHelper<IfcProcedure,3>::Construct )
+,		SchemaEntry("ifccurvestylefontpattern",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcvector",&STEP::ObjectHelper<IfcVector,2>::Construct )
+,		SchemaEntry("ifcfacebound",&STEP::ObjectHelper<IfcFaceBound,2>::Construct )
+,		SchemaEntry("ifcfaceouterbound",&STEP::ObjectHelper<IfcFaceOuterBound,0>::Construct )
+,		SchemaEntry("ifcfeatureelementaddition",&STEP::ObjectHelper<IfcFeatureElementAddition,0>::Construct )
+,		SchemaEntry("ifcnamedunit",&STEP::ObjectHelper<IfcNamedUnit,2>::Construct )
+,		SchemaEntry("ifcconversionbasedunit",&STEP::ObjectHelper<IfcConversionBasedUnit,2>::Construct )
+,		SchemaEntry("ifcstructuralloadsingleforce",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcheatexchangertype",&STEP::ObjectHelper<IfcHeatExchangerType,1>::Construct )
+,		SchemaEntry("ifcpresentationstyleassignment",&STEP::ObjectHelper<IfcPresentationStyleAssignment,1>::Construct )
+,		SchemaEntry("ifcflowtreatmentdevicetype",&STEP::ObjectHelper<IfcFlowTreatmentDeviceType,0>::Construct )
+,		SchemaEntry("ifcfiltertype",&STEP::ObjectHelper<IfcFilterType,1>::Construct )
+,		SchemaEntry("ifcresource",&STEP::ObjectHelper<IfcResource,0>::Construct )
+,		SchemaEntry("ifcevaporativecoolertype",&STEP::ObjectHelper<IfcEvaporativeCoolerType,1>::Construct )
+,		SchemaEntry("ifctexturecoordinate",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifctexturecoordinategenerator",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcoffsetcurve2d",&STEP::ObjectHelper<IfcOffsetCurve2D,3>::Construct )
+,		SchemaEntry("ifcedge",&STEP::ObjectHelper<IfcEdge,2>::Construct )
+,		SchemaEntry("ifcsubedge",&STEP::ObjectHelper<IfcSubedge,1>::Construct )
+,		SchemaEntry("ifcproxy",&STEP::ObjectHelper<IfcProxy,2>::Construct )
+,		SchemaEntry("ifcline",&STEP::ObjectHelper<IfcLine,2>::Construct )
+,		SchemaEntry("ifccolumn",&STEP::ObjectHelper<IfcColumn,0>::Construct )
+,		SchemaEntry("ifcclassificationnotationfacet",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcobjectplacement",&STEP::ObjectHelper<IfcObjectPlacement,0>::Construct )
+,		SchemaEntry("ifcgridplacement",&STEP::ObjectHelper<IfcGridPlacement,2>::Construct )
+,		SchemaEntry("ifcdistributioncontrolelementtype",&STEP::ObjectHelper<IfcDistributionControlElementType,0>::Construct )
+,		SchemaEntry("ifcstructuralloadsingleforcewarping",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcexternallydefinedtextfont",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcrelconnects",&STEP::ObjectHelper<IfcRelConnects,0>::Construct )
+,		SchemaEntry("ifcrelconnectselements",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcrelconnectswithrealizingelements",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcconstraintclassificationrelationship",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcannotation",&STEP::ObjectHelper<IfcAnnotation,0>::Construct )
+,		SchemaEntry("ifcplate",&STEP::ObjectHelper<IfcPlate,0>::Construct )
+,		SchemaEntry("ifcsolidmodel",&STEP::ObjectHelper<IfcSolidModel,0>::Construct )
+,		SchemaEntry("ifcmanifoldsolidbrep",&STEP::ObjectHelper<IfcManifoldSolidBrep,1>::Construct )
+,		SchemaEntry("ifcpredefinedcurvefont",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcboundarycondition",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcboundaryfacecondition",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcflowstoragedevicetype",&STEP::ObjectHelper<IfcFlowStorageDeviceType,0>::Construct )
+,		SchemaEntry("ifcstructuralitem",&STEP::ObjectHelper<IfcStructuralItem,0>::Construct )
+,		SchemaEntry("ifcstructuralmember",&STEP::ObjectHelper<IfcStructuralMember,0>::Construct )
+,		SchemaEntry("ifcstructuralcurvemember",&STEP::ObjectHelper<IfcStructuralCurveMember,1>::Construct )
+,		SchemaEntry("ifcstructuralconnection",&STEP::ObjectHelper<IfcStructuralConnection,1>::Construct )
+,		SchemaEntry("ifcstructuralsurfaceconnection",&STEP::ObjectHelper<IfcStructuralSurfaceConnection,0>::Construct )
+,		SchemaEntry("ifccoiltype",&STEP::ObjectHelper<IfcCoilType,1>::Construct )
+,		SchemaEntry("ifcductfittingtype",&STEP::ObjectHelper<IfcDuctFittingType,1>::Construct )
+,		SchemaEntry("ifcstyleditem",&STEP::ObjectHelper<IfcStyledItem,3>::Construct )
+,		SchemaEntry("ifcannotationoccurrence",&STEP::ObjectHelper<IfcAnnotationOccurrence,0>::Construct )
+,		SchemaEntry("ifcannotationcurveoccurrence",&STEP::ObjectHelper<IfcAnnotationCurveOccurrence,0>::Construct )
+,		SchemaEntry("ifcdimensioncurve",&STEP::ObjectHelper<IfcDimensionCurve,0>::Construct )
+,		SchemaEntry("ifcboundedcurve",&STEP::ObjectHelper<IfcBoundedCurve,0>::Construct )
+,		SchemaEntry("ifcaxis1placement",&STEP::ObjectHelper<IfcAxis1Placement,1>::Construct )
+,		SchemaEntry("ifclightintensitydistribution",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcpredefinedsymbol",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcstructuralpointaction",&STEP::ObjectHelper<IfcStructuralPointAction,0>::Construct )
+,		SchemaEntry("ifcspatialstructureelement",&STEP::ObjectHelper<IfcSpatialStructureElement,2>::Construct )
+,		SchemaEntry("ifcspace",&STEP::ObjectHelper<IfcSpace,2>::Construct )
+,		SchemaEntry("ifccontextdependentunit",&STEP::ObjectHelper<IfcContextDependentUnit,1>::Construct )
+,		SchemaEntry("ifcvirtualgridintersection",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcrelassociates",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcrelassociatesclassification",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifccoolingtowertype",&STEP::ObjectHelper<IfcCoolingTowerType,1>::Construct )
+,		SchemaEntry("ifcmaterialproperties",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcgeneralmaterialproperties",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcfacetedbrepwithvoids",&STEP::ObjectHelper<IfcFacetedBrepWithVoids,1>::Construct )
+,		SchemaEntry("ifcprofileproperties",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcgeneralprofileproperties",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcstructuralprofileproperties",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcvalvetype",&STEP::ObjectHelper<IfcValveType,1>::Construct )
+,		SchemaEntry("ifcsystemfurnitureelementtype",&STEP::ObjectHelper<IfcSystemFurnitureElementType,0>::Construct )
+,		SchemaEntry("ifcdiscreteaccessory",&STEP::ObjectHelper<IfcDiscreteAccessory,0>::Construct )
+,		SchemaEntry("ifcperson",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcbuildingelementtype",&STEP::ObjectHelper<IfcBuildingElementType,0>::Construct )
+,		SchemaEntry("ifcrailingtype",&STEP::ObjectHelper<IfcRailingType,1>::Construct )
+,		SchemaEntry("ifcgasterminaltype",&STEP::ObjectHelper<IfcGasTerminalType,1>::Construct )
+,		SchemaEntry("ifctimeseries",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcirregulartimeseries",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcspaceprogram",&STEP::ObjectHelper<IfcSpaceProgram,5>::Construct )
+,		SchemaEntry("ifccovering",&STEP::ObjectHelper<IfcCovering,1>::Construct )
+,		SchemaEntry("ifcshapeaspect",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcpresentationstyle",&STEP::ObjectHelper<IfcPresentationStyle,1>::Construct )
+,		SchemaEntry("ifcclassificationitemrelationship",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcelectricheatertype",&STEP::ObjectHelper<IfcElectricHeaterType,1>::Construct )
+,		SchemaEntry("ifcbuildingstorey",&STEP::ObjectHelper<IfcBuildingStorey,1>::Construct )
+,		SchemaEntry("ifcvertex",&STEP::ObjectHelper<IfcVertex,0>::Construct )
+,		SchemaEntry("ifcvertexpoint",&STEP::ObjectHelper<IfcVertexPoint,1>::Construct )
+,		SchemaEntry("ifcflowinstrumenttype",&STEP::ObjectHelper<IfcFlowInstrumentType,1>::Construct )
+,		SchemaEntry("ifcparameterizedprofiledef",&STEP::ObjectHelper<IfcParameterizedProfileDef,1>::Construct )
+,		SchemaEntry("ifcushapeprofiledef",&STEP::ObjectHelper<IfcUShapeProfileDef,8>::Construct )
+,		SchemaEntry("ifcramp",&STEP::ObjectHelper<IfcRamp,1>::Construct )
+,		SchemaEntry("ifcfillareastyle",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifccompositecurve",&STEP::ObjectHelper<IfcCompositeCurve,2>::Construct )
+,		SchemaEntry("ifcrelservicesbuildings",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcstructuralcurvemembervarying",&STEP::ObjectHelper<IfcStructuralCurveMemberVarying,0>::Construct )
+,		SchemaEntry("ifcrelreferencedinspatialstructure",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcrampflighttype",&STEP::ObjectHelper<IfcRampFlightType,1>::Construct )
+,		SchemaEntry("ifcdraughtingcallout",&STEP::ObjectHelper<IfcDraughtingCallout,1>::Construct )
+,		SchemaEntry("ifcdimensioncurvedirectedcallout",&STEP::ObjectHelper<IfcDimensionCurveDirectedCallout,0>::Construct )
+,		SchemaEntry("ifcradiusdimension",&STEP::ObjectHelper<IfcRadiusDimension,0>::Construct )
+,		SchemaEntry("ifcedgefeature",&STEP::ObjectHelper<IfcEdgeFeature,1>::Construct )
+,		SchemaEntry("ifcsweptareasolid",&STEP::ObjectHelper<IfcSweptAreaSolid,2>::Construct )
+,		SchemaEntry("ifcextrudedareasolid",&STEP::ObjectHelper<IfcExtrudedAreaSolid,2>::Construct )
+,		SchemaEntry("ifcquantitycount",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcannotationtextoccurrence",&STEP::ObjectHelper<IfcAnnotationTextOccurrence,0>::Construct )
+,		SchemaEntry("ifcreferencesvaluedocument",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcstair",&STEP::ObjectHelper<IfcStair,1>::Construct )
+,		SchemaEntry("ifcsymbolstyle",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcfillareastyletilesymbolwithstyle",&STEP::ObjectHelper<IfcFillAreaStyleTileSymbolWithStyle,1>::Construct )
+,		SchemaEntry("ifcannotationsymboloccurrence",&STEP::ObjectHelper<IfcAnnotationSymbolOccurrence,0>::Construct )
+,		SchemaEntry("ifcterminatorsymbol",&STEP::ObjectHelper<IfcTerminatorSymbol,1>::Construct )
+,		SchemaEntry("ifcdimensioncurveterminator",&STEP::ObjectHelper<IfcDimensionCurveTerminator,1>::Construct )
+,		SchemaEntry("ifcrectangleprofiledef",&STEP::ObjectHelper<IfcRectangleProfileDef,2>::Construct )
+,		SchemaEntry("ifcrectanglehollowprofiledef",&STEP::ObjectHelper<IfcRectangleHollowProfileDef,3>::Construct )
+,		SchemaEntry("ifcrelassociateslibrary",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifclocalplacement",&STEP::ObjectHelper<IfcLocalPlacement,2>::Construct )
+,		SchemaEntry("ifcopticalmaterialproperties",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcservicelifefactor",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcrelassignstasks",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifctask",&STEP::ObjectHelper<IfcTask,5>::Construct )
+,		SchemaEntry("ifcannotationfillareaoccurrence",&STEP::ObjectHelper<IfcAnnotationFillAreaOccurrence,2>::Construct )
+,		SchemaEntry("ifcface",&STEP::ObjectHelper<IfcFace,1>::Construct )
+,		SchemaEntry("ifcflowsegmenttype",&STEP::ObjectHelper<IfcFlowSegmentType,0>::Construct )
+,		SchemaEntry("ifcductsegmenttype",&STEP::ObjectHelper<IfcDuctSegmentType,1>::Construct )
+,		SchemaEntry("ifcpropertyenumeration",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcconstructionresource",&STEP::ObjectHelper<IfcConstructionResource,4>::Construct )
+,		SchemaEntry("ifcconstructionequipmentresource",&STEP::ObjectHelper<IfcConstructionEquipmentResource,0>::Construct )
+,		SchemaEntry("ifcsanitaryterminaltype",&STEP::ObjectHelper<IfcSanitaryTerminalType,1>::Construct )
+,		SchemaEntry("ifcpredefineddimensionsymbol",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcorganization",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifccircleprofiledef",&STEP::ObjectHelper<IfcCircleProfileDef,1>::Construct )
+,		SchemaEntry("ifcstructuralreaction",&STEP::ObjectHelper<IfcStructuralReaction,0>::Construct )
+,		SchemaEntry("ifcstructuralpointreaction",&STEP::ObjectHelper<IfcStructuralPointReaction,0>::Construct )
+,		SchemaEntry("ifcrailing",&STEP::ObjectHelper<IfcRailing,1>::Construct )
+,		SchemaEntry("ifctextliteral",&STEP::ObjectHelper<IfcTextLiteral,3>::Construct )
+,		SchemaEntry("ifccartesiantransformationoperator",&STEP::ObjectHelper<IfcCartesianTransformationOperator,4>::Construct )
+,		SchemaEntry("ifccostvalue",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifctextstyle",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifclineardimension",&STEP::ObjectHelper<IfcLinearDimension,0>::Construct )
+,		SchemaEntry("ifcdampertype",&STEP::ObjectHelper<IfcDamperType,1>::Construct )
+,		SchemaEntry("ifcsiunit",&STEP::ObjectHelper<IfcSIUnit,2>::Construct )
+,		SchemaEntry("ifcsurfacestylelighting",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcmeasurewithunit",&STEP::ObjectHelper<IfcMeasureWithUnit,2>::Construct )
+,		SchemaEntry("ifcmateriallayerset",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcdistributionelement",&STEP::ObjectHelper<IfcDistributionElement,0>::Construct )
+,		SchemaEntry("ifcdistributioncontrolelement",&STEP::ObjectHelper<IfcDistributionControlElement,1>::Construct )
+,		SchemaEntry("ifctransformertype",&STEP::ObjectHelper<IfcTransformerType,1>::Construct )
+,		SchemaEntry("ifclaborresource",&STEP::ObjectHelper<IfcLaborResource,1>::Construct )
+,		SchemaEntry("ifcderivedprofiledef",&STEP::ObjectHelper<IfcDerivedProfileDef,3>::Construct )
+,		SchemaEntry("ifcrelconnectsstructuralmember",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcrelconnectswitheccentricity",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcfurniturestandard",&STEP::ObjectHelper<IfcFurnitureStandard,0>::Construct )
+,		SchemaEntry("ifcstairflighttype",&STEP::ObjectHelper<IfcStairFlightType,1>::Construct )
+,		SchemaEntry("ifcworkcontrol",&STEP::ObjectHelper<IfcWorkControl,10>::Construct )
+,		SchemaEntry("ifcworkplan",&STEP::ObjectHelper<IfcWorkPlan,0>::Construct )
+,		SchemaEntry("ifcreldefines",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcreldefinesbyproperties",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifccondition",&STEP::ObjectHelper<IfcCondition,0>::Construct )
+,		SchemaEntry("ifcgridaxis",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcrelvoidselement",&STEP::ObjectHelper<IfcRelVoidsElement,2>::Construct )
+,		SchemaEntry("ifcwindow",&STEP::ObjectHelper<IfcWindow,2>::Construct )
+,		SchemaEntry("ifcrelflowcontrolelements",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcrelconnectsporttoelement",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcprotectivedevicetype",&STEP::ObjectHelper<IfcProtectiveDeviceType,1>::Construct )
+,		SchemaEntry("ifcjunctionboxtype",&STEP::ObjectHelper<IfcJunctionBoxType,1>::Construct )
+,		SchemaEntry("ifcstructuralanalysismodel",&STEP::ObjectHelper<IfcStructuralAnalysisModel,4>::Construct )
+,		SchemaEntry("ifcaxis2placement2d",&STEP::ObjectHelper<IfcAxis2Placement2D,1>::Construct )
+,		SchemaEntry("ifcspacetype",&STEP::ObjectHelper<IfcSpaceType,1>::Construct )
+,		SchemaEntry("ifcellipseprofiledef",&STEP::ObjectHelper<IfcEllipseProfileDef,2>::Construct )
+,		SchemaEntry("ifcdistributionflowelement",&STEP::ObjectHelper<IfcDistributionFlowElement,0>::Construct )
+,		SchemaEntry("ifcflowmovingdevice",&STEP::ObjectHelper<IfcFlowMovingDevice,0>::Construct )
+,		SchemaEntry("ifcsurfacestylewithtextures",&STEP::ObjectHelper<IfcSurfaceStyleWithTextures,1>::Construct )
+,		SchemaEntry("ifcgeometricset",&STEP::ObjectHelper<IfcGeometricSet,1>::Construct )
+,		SchemaEntry("ifcmechanicalmaterialproperties",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcmechanicalconcretematerialproperties",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcribplateprofileproperties",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcdocumentinformationrelationship",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcprojectorder",&STEP::ObjectHelper<IfcProjectOrder,3>::Construct )
+,		SchemaEntry("ifcbsplinecurve",&STEP::ObjectHelper<IfcBSplineCurve,5>::Construct )
+,		SchemaEntry("ifcbeziercurve",&STEP::ObjectHelper<IfcBezierCurve,0>::Construct )
+,		SchemaEntry("ifcstructuralpointconnection",&STEP::ObjectHelper<IfcStructuralPointConnection,0>::Construct )
+,		SchemaEntry("ifcflowcontroller",&STEP::ObjectHelper<IfcFlowController,0>::Construct )
+,		SchemaEntry("ifcelectricdistributionpoint",&STEP::ObjectHelper<IfcElectricDistributionPoint,2>::Construct )
+,		SchemaEntry("ifcsite",&STEP::ObjectHelper<IfcSite,5>::Construct )
+,		SchemaEntry("ifcoffsetcurve3d",&STEP::ObjectHelper<IfcOffsetCurve3D,4>::Construct )
+,		SchemaEntry("ifcpropertyset",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcconnectionsurfacegeometry",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcvirtualelement",&STEP::ObjectHelper<IfcVirtualElement,0>::Construct )
+,		SchemaEntry("ifcconstructionproductresource",&STEP::ObjectHelper<IfcConstructionProductResource,0>::Construct )
+,		SchemaEntry("ifcwaterproperties",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcsurfacecurvesweptareasolid",&STEP::ObjectHelper<IfcSurfaceCurveSweptAreaSolid,4>::Construct )
+,		SchemaEntry("ifcpermeablecoveringproperties",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifccartesiantransformationoperator3d",&STEP::ObjectHelper<IfcCartesianTransformationOperator3D,1>::Construct )
+,		SchemaEntry("ifccartesiantransformationoperator3dnonuniform",&STEP::ObjectHelper<IfcCartesianTransformationOperator3DnonUniform,2>::Construct )
+,		SchemaEntry("ifccrewresource",&STEP::ObjectHelper<IfcCrewResource,0>::Construct )
+,		SchemaEntry("ifcstructuralsurfacemember",&STEP::ObjectHelper<IfcStructuralSurfaceMember,2>::Construct )
+,		SchemaEntry("ifc2dcompositecurve",&STEP::ObjectHelper<Ifc2DCompositeCurve,0>::Construct )
+,		SchemaEntry("ifcrepresentationcontext",&STEP::ObjectHelper<IfcRepresentationContext,2>::Construct )
+,		SchemaEntry("ifcgeometricrepresentationcontext",&STEP::ObjectHelper<IfcGeometricRepresentationContext,4>::Construct )
+,		SchemaEntry("ifcflowtreatmentdevice",&STEP::ObjectHelper<IfcFlowTreatmentDevice,0>::Construct )
+,		SchemaEntry("ifctextstylefordefinedfont",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcrightcircularcylinder",&STEP::ObjectHelper<IfcRightCircularCylinder,2>::Construct )
+,		SchemaEntry("ifcwasteterminaltype",&STEP::ObjectHelper<IfcWasteTerminalType,1>::Construct )
+,		SchemaEntry("ifcspacethermalloadproperties",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcconstraintrelationship",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcbuildingelementcomponent",&STEP::ObjectHelper<IfcBuildingElementComponent,0>::Construct )
+,		SchemaEntry("ifcbuildingelementpart",&STEP::ObjectHelper<IfcBuildingElementPart,0>::Construct )
+,		SchemaEntry("ifcwall",&STEP::ObjectHelper<IfcWall,0>::Construct )
+,		SchemaEntry("ifcwallstandardcase",&STEP::ObjectHelper<IfcWallStandardCase,0>::Construct )
+,		SchemaEntry("ifcapprovalactorrelationship",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcpath",&STEP::ObjectHelper<IfcPath,1>::Construct )
+,		SchemaEntry("ifcdefinedsymbol",&STEP::ObjectHelper<IfcDefinedSymbol,2>::Construct )
+,		SchemaEntry("ifcstructuralsurfacemembervarying",&STEP::ObjectHelper<IfcStructuralSurfaceMemberVarying,2>::Construct )
+,		SchemaEntry("ifcpoint",&STEP::ObjectHelper<IfcPoint,0>::Construct )
+,		SchemaEntry("ifcsurfaceofrevolution",&STEP::ObjectHelper<IfcSurfaceOfRevolution,1>::Construct )
+,		SchemaEntry("ifcflowterminal",&STEP::ObjectHelper<IfcFlowTerminal,0>::Construct )
+,		SchemaEntry("ifcfurnishingelement",&STEP::ObjectHelper<IfcFurnishingElement,0>::Construct )
+,		SchemaEntry("ifccurvestylefont",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcsurfacestyleshading",&STEP::ObjectHelper<IfcSurfaceStyleShading,1>::Construct )
+,		SchemaEntry("ifcsurfacestylerendering",&STEP::ObjectHelper<IfcSurfaceStyleRendering,8>::Construct )
+,		SchemaEntry("ifccoordinateduniversaltimeoffset",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcstructuralloadsingledisplacement",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifccirclehollowprofiledef",&STEP::ObjectHelper<IfcCircleHollowProfileDef,1>::Construct )
+,		SchemaEntry("ifcflowmovingdevicetype",&STEP::ObjectHelper<IfcFlowMovingDeviceType,0>::Construct )
+,		SchemaEntry("ifcfantype",&STEP::ObjectHelper<IfcFanType,1>::Construct )
+,		SchemaEntry("ifcstructuralplanaractionvarying",&STEP::ObjectHelper<IfcStructuralPlanarActionVarying,2>::Construct )
+,		SchemaEntry("ifcproductrepresentation",&STEP::ObjectHelper<IfcProductRepresentation,3>::Construct )
+,		SchemaEntry("ifcreldefinesbytype",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcpredefinedtextfont",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifctextstylefontmodel",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcstackterminaltype",&STEP::ObjectHelper<IfcStackTerminalType,1>::Construct )
+,		SchemaEntry("ifcapprovalpropertyrelationship",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcexternallydefinedsymbol",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcreinforcingelement",&STEP::ObjectHelper<IfcReinforcingElement,1>::Construct )
+,		SchemaEntry("ifcreinforcingmesh",&STEP::ObjectHelper<IfcReinforcingMesh,8>::Construct )
+,		SchemaEntry("ifcorderaction",&STEP::ObjectHelper<IfcOrderAction,1>::Construct )
+,		SchemaEntry("ifcrelcoversbldgelements",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifclightsource",&STEP::ObjectHelper<IfcLightSource,4>::Construct )
+,		SchemaEntry("ifclightsourcedirectional",&STEP::ObjectHelper<IfcLightSourceDirectional,1>::Construct )
+,		SchemaEntry("ifcloop",&STEP::ObjectHelper<IfcLoop,0>::Construct )
+,		SchemaEntry("ifcvertexloop",&STEP::ObjectHelper<IfcVertexLoop,1>::Construct )
+,		SchemaEntry("ifcchamferedgefeature",&STEP::ObjectHelper<IfcChamferEdgeFeature,2>::Construct )
+,		SchemaEntry("ifcwindowpanelproperties",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcclassification",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcelementcomponenttype",&STEP::ObjectHelper<IfcElementComponentType,0>::Construct )
+,		SchemaEntry("ifcfastenertype",&STEP::ObjectHelper<IfcFastenerType,0>::Construct )
+,		SchemaEntry("ifcmechanicalfastenertype",&STEP::ObjectHelper<IfcMechanicalFastenerType,0>::Construct )
+,		SchemaEntry("ifcscheduletimecontrol",&STEP::ObjectHelper<IfcScheduleTimeControl,18>::Construct )
+,		SchemaEntry("ifcsurfacestyle",&STEP::ObjectHelper<IfcSurfaceStyle,2>::Construct )
+,		SchemaEntry("ifcreinforcementbarproperties",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcopenshell",&STEP::ObjectHelper<IfcOpenShell,0>::Construct )
+,		SchemaEntry("ifclibraryreference",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcsubcontractresource",&STEP::ObjectHelper<IfcSubContractResource,2>::Construct )
+,		SchemaEntry("ifctimeseriesreferencerelationship",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcsweptdisksolid",&STEP::ObjectHelper<IfcSweptDiskSolid,5>::Construct )
+,		SchemaEntry("ifccompositeprofiledef",&STEP::ObjectHelper<IfcCompositeProfileDef,2>::Construct )
+,		SchemaEntry("ifcelectricalbaseproperties",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcpredefinedpointmarkersymbol",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifctanktype",&STEP::ObjectHelper<IfcTankType,1>::Construct )
+,		SchemaEntry("ifcboundarynodecondition",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcboundarynodeconditionwarping",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcrelassignstogroup",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcpresentationlayerassignment",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcsphere",&STEP::ObjectHelper<IfcSphere,1>::Construct )
+,		SchemaEntry("ifcpolyloop",&STEP::ObjectHelper<IfcPolyLoop,1>::Construct )
+,		SchemaEntry("ifccablecarrierfittingtype",&STEP::ObjectHelper<IfcCableCarrierFittingType,1>::Construct )
+,		SchemaEntry("ifchumidifiertype",&STEP::ObjectHelper<IfcHumidifierType,1>::Construct )
+,		SchemaEntry("ifcpropertylistvalue",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcpropertyconstraintrelationship",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcperformancehistory",&STEP::ObjectHelper<IfcPerformanceHistory,1>::Construct )
+,		SchemaEntry("ifcshapemodel",&STEP::ObjectHelper<IfcShapeModel,0>::Construct )
+,		SchemaEntry("ifctopologyrepresentation",&STEP::ObjectHelper<IfcTopologyRepresentation,0>::Construct )
+,		SchemaEntry("ifcbuilding",&STEP::ObjectHelper<IfcBuilding,3>::Construct )
+,		SchemaEntry("ifcroundedrectangleprofiledef",&STEP::ObjectHelper<IfcRoundedRectangleProfileDef,1>::Construct )
+,		SchemaEntry("ifcstairflight",&STEP::ObjectHelper<IfcStairFlight,4>::Construct )
+,		SchemaEntry("ifcsurfacestylerefraction",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcrelinteractionrequirements",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcconstraint",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcobjective",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcconnectionportgeometry",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcdistributionchamberelement",&STEP::ObjectHelper<IfcDistributionChamberElement,0>::Construct )
+,		SchemaEntry("ifcpersonandorganization",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcshaperepresentation",&STEP::ObjectHelper<IfcShapeRepresentation,0>::Construct )
+,		SchemaEntry("ifcrampflight",&STEP::ObjectHelper<IfcRampFlight,0>::Construct )
+,		SchemaEntry("ifcbeamtype",&STEP::ObjectHelper<IfcBeamType,1>::Construct )
+,		SchemaEntry("ifcreldecomposes",&STEP::ObjectHelper<IfcRelDecomposes,2>::Construct )
+,		SchemaEntry("ifcroof",&STEP::ObjectHelper<IfcRoof,1>::Construct )
+,		SchemaEntry("ifcfooting",&STEP::ObjectHelper<IfcFooting,1>::Construct )
+,		SchemaEntry("ifcrelcoversspaces",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifclightsourceambient",&STEP::ObjectHelper<IfcLightSourceAmbient,0>::Construct )
+,		SchemaEntry("ifctimeseriesvalue",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcwindowstyle",&STEP::ObjectHelper<IfcWindowStyle,4>::Construct )
+,		SchemaEntry("ifcpropertyreferencevalue",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcapproval",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcrelconnectsstructuralelement",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcbuildingelementproxytype",&STEP::ObjectHelper<IfcBuildingElementProxyType,1>::Construct )
+,		SchemaEntry("ifcrelassociatesprofileproperties",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcaxis2placement3d",&STEP::ObjectHelper<IfcAxis2Placement3D,2>::Construct )
+,		SchemaEntry("ifcrelconnectsports",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcedgecurve",&STEP::ObjectHelper<IfcEdgeCurve,2>::Construct )
+,		SchemaEntry("ifcclosedshell",&STEP::ObjectHelper<IfcClosedShell,0>::Construct )
+,		SchemaEntry("ifctendonanchor",&STEP::ObjectHelper<IfcTendonAnchor,0>::Construct )
+,		SchemaEntry("ifccondensertype",&STEP::ObjectHelper<IfcCondenserType,1>::Construct )
+,		SchemaEntry("ifcquantitytime",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcsurfacetexture",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcpixeltexture",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcstructuralconnectioncondition",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcfailureconnectioncondition",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcdocumentreference",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcmechanicalsteelmaterialproperties",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcpipesegmenttype",&STEP::ObjectHelper<IfcPipeSegmentType,1>::Construct )
+,		SchemaEntry("ifcpointonsurface",&STEP::ObjectHelper<IfcPointOnSurface,3>::Construct )
+,		SchemaEntry("ifctable",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifclightdistributiondata",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcpropertytablevalue",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcpresentationlayerwithstyle",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcasset",&STEP::ObjectHelper<IfcAsset,9>::Construct )
+,		SchemaEntry("ifclightsourcepositional",&STEP::ObjectHelper<IfcLightSourcePositional,5>::Construct )
+,		SchemaEntry("ifclibraryinformation",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifctextstyletextmodel",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcprojectioncurve",&STEP::ObjectHelper<IfcProjectionCurve,0>::Construct )
+,		SchemaEntry("ifcfillareastyletiles",&STEP::ObjectHelper<IfcFillAreaStyleTiles,3>::Construct )
+,		SchemaEntry("ifcrelfillselement",&STEP::ObjectHelper<IfcRelFillsElement,2>::Construct )
+,		SchemaEntry("ifcelectricmotortype",&STEP::ObjectHelper<IfcElectricMotorType,1>::Construct )
+,		SchemaEntry("ifctendon",&STEP::ObjectHelper<IfcTendon,8>::Construct )
+,		SchemaEntry("ifcdistributionchamberelementtype",&STEP::ObjectHelper<IfcDistributionChamberElementType,1>::Construct )
+,		SchemaEntry("ifcmembertype",&STEP::ObjectHelper<IfcMemberType,1>::Construct )
+,		SchemaEntry("ifcstructurallinearaction",&STEP::ObjectHelper<IfcStructuralLinearAction,1>::Construct )
+,		SchemaEntry("ifcstructurallinearactionvarying",&STEP::ObjectHelper<IfcStructuralLinearActionVarying,2>::Construct )
+,		SchemaEntry("ifcproductdefinitionshape",&STEP::ObjectHelper<IfcProductDefinitionShape,0>::Construct )
+,		SchemaEntry("ifcfastener",&STEP::ObjectHelper<IfcFastener,0>::Construct )
+,		SchemaEntry("ifcmechanicalfastener",&STEP::ObjectHelper<IfcMechanicalFastener,2>::Construct )
+,		SchemaEntry("ifcfuelproperties",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcevaporatortype",&STEP::ObjectHelper<IfcEvaporatorType,1>::Construct )
+,		SchemaEntry("ifcmateriallayersetusage",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcdiscreteaccessorytype",&STEP::ObjectHelper<IfcDiscreteAccessoryType,0>::Construct )
+,		SchemaEntry("ifcstructuralcurveconnection",&STEP::ObjectHelper<IfcStructuralCurveConnection,0>::Construct )
+,		SchemaEntry("ifcprojectionelement",&STEP::ObjectHelper<IfcProjectionElement,0>::Construct )
+,		SchemaEntry("ifcimagetexture",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifccoveringtype",&STEP::ObjectHelper<IfcCoveringType,1>::Construct )
+,		SchemaEntry("ifcrelassociatesappliedvalue",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcpumptype",&STEP::ObjectHelper<IfcPumpType,1>::Construct )
+,		SchemaEntry("ifcpile",&STEP::ObjectHelper<IfcPile,2>::Construct )
+,		SchemaEntry("ifcunitassignment",&STEP::ObjectHelper<IfcUnitAssignment,1>::Construct )
+,		SchemaEntry("ifcboundingbox",&STEP::ObjectHelper<IfcBoundingBox,4>::Construct )
+,		SchemaEntry("ifcshellbasedsurfacemodel",&STEP::ObjectHelper<IfcShellBasedSurfaceModel,1>::Construct )
+,		SchemaEntry("ifcfacetedbrep",&STEP::ObjectHelper<IfcFacetedBrep,0>::Construct )
+,		SchemaEntry("ifctextliteralwithextent",&STEP::ObjectHelper<IfcTextLiteralWithExtent,2>::Construct )
+,		SchemaEntry("ifcapplication",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcextendedmaterialproperties",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcelectricappliancetype",&STEP::ObjectHelper<IfcElectricApplianceType,1>::Construct )
+,		SchemaEntry("ifcreloccupiesspaces",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifctrapeziumprofiledef",&STEP::ObjectHelper<IfcTrapeziumProfileDef,4>::Construct )
+,		SchemaEntry("ifcquantityweight",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcrelcontainedinspatialstructure",&STEP::ObjectHelper<IfcRelContainedInSpatialStructure,2>::Construct )
+,		SchemaEntry("ifcedgeloop",&STEP::ObjectHelper<IfcEdgeLoop,1>::Construct )
+,		SchemaEntry("ifcproject",&STEP::ObjectHelper<IfcProject,4>::Construct )
+,		SchemaEntry("ifccartesianpoint",&STEP::ObjectHelper<IfcCartesianPoint,1>::Construct )
+,		SchemaEntry("ifcmaterial",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifccurveboundedplane",&STEP::ObjectHelper<IfcCurveBoundedPlane,3>::Construct )
+,		SchemaEntry("ifcwalltype",&STEP::ObjectHelper<IfcWallType,1>::Construct )
+,		SchemaEntry("ifcfillareastylehatching",&STEP::ObjectHelper<IfcFillAreaStyleHatching,5>::Construct )
+,		SchemaEntry("ifcequipmentstandard",&STEP::ObjectHelper<IfcEquipmentStandard,0>::Construct )
+,		SchemaEntry("ifchygroscopicmaterialproperties",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcdoorpanelproperties",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcdiameterdimension",&STEP::ObjectHelper<IfcDiameterDimension,0>::Construct )
+,		SchemaEntry("ifcstructuralloadgroup",&STEP::ObjectHelper<IfcStructuralLoadGroup,5>::Construct )
+,		SchemaEntry("ifctelecomaddress",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcconstructionmaterialresource",&STEP::ObjectHelper<IfcConstructionMaterialResource,2>::Construct )
+,		SchemaEntry("ifcblobtexture",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcirregulartimeseriesvalue",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcrelaggregates",&STEP::ObjectHelper<IfcRelAggregates,0>::Construct )
+,		SchemaEntry("ifcboilertype",&STEP::ObjectHelper<IfcBoilerType,1>::Construct )
+,		SchemaEntry("ifcrelprojectselement",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifccolourspecification",&STEP::ObjectHelper<IfcColourSpecification,1>::Construct )
+,		SchemaEntry("ifccolourrgb",&STEP::ObjectHelper<IfcColourRgb,3>::Construct )
+,		SchemaEntry("ifcrelconnectsstructuralactivity",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcdoorstyle",&STEP::ObjectHelper<IfcDoorStyle,4>::Construct )
+,		SchemaEntry("ifcstructuralloadsingledisplacementdistortion",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcrelassignstoprocess",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcductsilencertype",&STEP::ObjectHelper<IfcDuctSilencerType,1>::Construct )
+,		SchemaEntry("ifclightsourcegoniometric",&STEP::ObjectHelper<IfcLightSourceGoniometric,6>::Construct )
+,		SchemaEntry("ifcactuatortype",&STEP::ObjectHelper<IfcActuatorType,1>::Construct )
+,		SchemaEntry("ifcsensortype",&STEP::ObjectHelper<IfcSensorType,1>::Construct )
+,		SchemaEntry("ifcairterminalboxtype",&STEP::ObjectHelper<IfcAirTerminalBoxType,1>::Construct )
+,		SchemaEntry("ifcannotationsurfaceoccurrence",&STEP::ObjectHelper<IfcAnnotationSurfaceOccurrence,0>::Construct )
+,		SchemaEntry("ifczshapeprofiledef",&STEP::ObjectHelper<IfcZShapeProfileDef,6>::Construct )
+,		SchemaEntry("ifcclassificationnotation",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcrationalbeziercurve",&STEP::ObjectHelper<IfcRationalBezierCurve,1>::Construct )
+,		SchemaEntry("ifccartesiantransformationoperator2d",&STEP::ObjectHelper<IfcCartesianTransformationOperator2D,0>::Construct )
+,		SchemaEntry("ifccartesiantransformationoperator2dnonuniform",&STEP::ObjectHelper<IfcCartesianTransformationOperator2DnonUniform,1>::Construct )
+,		SchemaEntry("ifcmove",&STEP::ObjectHelper<IfcMove,3>::Construct )
+,		SchemaEntry("ifcboundaryedgecondition",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcdoorliningproperties",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifccablecarriersegmenttype",&STEP::ObjectHelper<IfcCableCarrierSegmentType,1>::Construct )
+,		SchemaEntry("ifcpostaladdress",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcrelconnectspathelements",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcelectricalelement",&STEP::ObjectHelper<IfcElectricalElement,0>::Construct )
+,		SchemaEntry("ifcownerhistory",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcstructuralloadtemperature",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifctextstylewithboxcharacteristics",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcchillertype",&STEP::ObjectHelper<IfcChillerType,1>::Construct )
+,		SchemaEntry("ifcrelschedulescostitems",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcreinforcingbar",&STEP::ObjectHelper<IfcReinforcingBar,5>::Construct )
+,		SchemaEntry("ifccurrencyrelationship",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcsoundvalue",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifccshapeprofiledef",&STEP::ObjectHelper<IfcCShapeProfileDef,6>::Construct )
+,		SchemaEntry("ifcpermit",&STEP::ObjectHelper<IfcPermit,1>::Construct )
+,		SchemaEntry("ifcslabtype",&STEP::ObjectHelper<IfcSlabType,1>::Construct )
+,		SchemaEntry("ifcslippageconnectioncondition",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifclamptype",&STEP::ObjectHelper<IfcLampType,1>::Construct )
+,		SchemaEntry("ifcplanarextent",&STEP::ObjectHelper<IfcPlanarExtent,2>::Construct )
+,		SchemaEntry("ifcalarmtype",&STEP::ObjectHelper<IfcAlarmType,1>::Construct )
+,		SchemaEntry("ifcdocumentelectronicformat",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcelectricflowstoragedevicetype",&STEP::ObjectHelper<IfcElectricFlowStorageDeviceType,1>::Construct )
+,		SchemaEntry("ifcequipmentelement",&STEP::ObjectHelper<IfcEquipmentElement,0>::Construct )
+,		SchemaEntry("ifclightfixturetype",&STEP::ObjectHelper<IfcLightFixtureType,1>::Construct )
+,		SchemaEntry("ifcmetric",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcrelnests",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifccurtainwall",&STEP::ObjectHelper<IfcCurtainWall,0>::Construct )
+,		SchemaEntry("ifcrelassociatesdocument",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifccomplexproperty",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcvertexbasedtexturemap",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcslab",&STEP::ObjectHelper<IfcSlab,1>::Construct )
+,		SchemaEntry("ifccurtainwalltype",&STEP::ObjectHelper<IfcCurtainWallType,1>::Construct )
+,		SchemaEntry("ifcoutlettype",&STEP::ObjectHelper<IfcOutletType,1>::Construct )
+,		SchemaEntry("ifccompressortype",&STEP::ObjectHelper<IfcCompressorType,1>::Construct )
+,		SchemaEntry("ifccranerailashapeprofiledef",&STEP::ObjectHelper<IfcCraneRailAShapeProfileDef,12>::Construct )
+,		SchemaEntry("ifcflowsegment",&STEP::ObjectHelper<IfcFlowSegment,0>::Construct )
+,		SchemaEntry("ifcsectionedspine",&STEP::ObjectHelper<IfcSectionedSpine,3>::Construct )
+,		SchemaEntry("ifctablerow",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcdraughtingpredefinedtextfont",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcelectrictimecontroltype",&STEP::ObjectHelper<IfcElectricTimeControlType,1>::Construct )
+,		SchemaEntry("ifcfacesurface",&STEP::ObjectHelper<IfcFaceSurface,2>::Construct )
+,		SchemaEntry("ifcmateriallist",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcmotorconnectiontype",&STEP::ObjectHelper<IfcMotorConnectionType,1>::Construct )
+,		SchemaEntry("ifcflowfitting",&STEP::ObjectHelper<IfcFlowFitting,0>::Construct )
+,		SchemaEntry("ifcpointoncurve",&STEP::ObjectHelper<IfcPointOnCurve,2>::Construct )
+,		SchemaEntry("ifctransportelementtype",&STEP::ObjectHelper<IfcTransportElementType,1>::Construct )
+,		SchemaEntry("ifcregulartimeseries",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcrelassociatesconstraint",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcpropertyenumeratedvalue",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcstructuralsteelprofileproperties",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifccablesegmenttype",&STEP::ObjectHelper<IfcCableSegmentType,1>::Construct )
+,		SchemaEntry("ifcexternallydefinedhatchstyle",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcannotationsurface",&STEP::ObjectHelper<IfcAnnotationSurface,2>::Construct )
+,		SchemaEntry("ifccompositecurvesegment",&STEP::ObjectHelper<IfcCompositeCurveSegment,3>::Construct )
+,		SchemaEntry("ifcservicelife",&STEP::ObjectHelper<IfcServiceLife,2>::Construct )
+,		SchemaEntry("ifcplatetype",&STEP::ObjectHelper<IfcPlateType,1>::Construct )
+,		SchemaEntry("ifccurvestyle",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcsectionproperties",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcvibrationisolatortype",&STEP::ObjectHelper<IfcVibrationIsolatorType,1>::Construct )
+,		SchemaEntry("ifctexturemap",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifctrimmedcurve",&STEP::ObjectHelper<IfcTrimmedCurve,5>::Construct )
+,		SchemaEntry("ifcmappeditem",&STEP::ObjectHelper<IfcMappedItem,2>::Construct )
+,		SchemaEntry("ifcmateriallayer",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcdirection",&STEP::ObjectHelper<IfcDirection,1>::Construct )
+,		SchemaEntry("ifcblock",&STEP::ObjectHelper<IfcBlock,3>::Construct )
+,		SchemaEntry("ifcprojectorderrecord",&STEP::ObjectHelper<IfcProjectOrderRecord,2>::Construct )
+,		SchemaEntry("ifcflowmetertype",&STEP::ObjectHelper<IfcFlowMeterType,1>::Construct )
+,		SchemaEntry("ifccontrollertype",&STEP::ObjectHelper<IfcControllerType,1>::Construct )
+,		SchemaEntry("ifcbeam",&STEP::ObjectHelper<IfcBeam,0>::Construct )
+,		SchemaEntry("ifcarbitraryopenprofiledef",&STEP::ObjectHelper<IfcArbitraryOpenProfileDef,1>::Construct )
+,		SchemaEntry("ifccenterlineprofiledef",&STEP::ObjectHelper<IfcCenterLineProfileDef,1>::Construct )
+,		SchemaEntry("ifcstructuralloadplanarforce",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifctimeseriesschedule",&STEP::ObjectHelper<IfcTimeSeriesSchedule,3>::Construct )
+,		SchemaEntry("ifcroundededgefeature",&STEP::ObjectHelper<IfcRoundedEdgeFeature,1>::Construct )
+,		SchemaEntry("ifcwindowliningproperties",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcreloverridesproperties",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcapprovalrelationship",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcishapeprofiledef",&STEP::ObjectHelper<IfcIShapeProfileDef,5>::Construct )
+,		SchemaEntry("ifcspaceheatertype",&STEP::ObjectHelper<IfcSpaceHeaterType,1>::Construct )
+,		SchemaEntry("ifcexternallydefinedsurfacestyle",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcderivedunit",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcflowstoragedevice",&STEP::ObjectHelper<IfcFlowStorageDevice,0>::Construct )
+,		SchemaEntry("ifcmaterialclassificationrelationship",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcclassificationitem",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcrevolvedareasolid",&STEP::ObjectHelper<IfcRevolvedAreaSolid,2>::Construct )
+,		SchemaEntry("ifcconnectionpointgeometry",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcdoor",&STEP::ObjectHelper<IfcDoor,2>::Construct )
+,		SchemaEntry("ifcellipse",&STEP::ObjectHelper<IfcEllipse,2>::Construct )
+,		SchemaEntry("ifctubebundletype",&STEP::ObjectHelper<IfcTubeBundleType,1>::Construct )
+,		SchemaEntry("ifcangulardimension",&STEP::ObjectHelper<IfcAngularDimension,0>::Construct )
+,		SchemaEntry("ifcthermalmaterialproperties",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcfacebasedsurfacemodel",&STEP::ObjectHelper<IfcFaceBasedSurfaceModel,1>::Construct )
+,		SchemaEntry("ifccranerailfshapeprofiledef",&STEP::ObjectHelper<IfcCraneRailFShapeProfileDef,9>::Construct )
+,		SchemaEntry("ifccolumntype",&STEP::ObjectHelper<IfcColumnType,1>::Construct )
+,		SchemaEntry("ifctshapeprofiledef",&STEP::ObjectHelper<IfcTShapeProfileDef,10>::Construct )
+,		SchemaEntry("ifcenergyconversiondevice",&STEP::ObjectHelper<IfcEnergyConversionDevice,0>::Construct )
+,		SchemaEntry("ifcconnectionpointeccentricity",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcreinforcementdefinitionproperties",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifccurvestylefontandscaling",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcworkschedule",&STEP::ObjectHelper<IfcWorkSchedule,0>::Construct )
+,		SchemaEntry("ifcorganizationrelationship",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifczone",&STEP::ObjectHelper<IfcZone,0>::Construct )
+,		SchemaEntry("ifctransportelement",&STEP::ObjectHelper<IfcTransportElement,3>::Construct )
+,		SchemaEntry("ifcdraughtingpredefinedcurvefont",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcgeometricrepresentationsubcontext",&STEP::ObjectHelper<IfcGeometricRepresentationSubContext,4>::Construct )
+,		SchemaEntry("ifclshapeprofiledef",&STEP::ObjectHelper<IfcLShapeProfileDef,8>::Construct )
+,		SchemaEntry("ifcgeometriccurveset",&STEP::ObjectHelper<IfcGeometricCurveSet,0>::Construct )
+,		SchemaEntry("ifcactor",&STEP::ObjectHelper<IfcActor,1>::Construct )
+,		SchemaEntry("ifcoccupant",&STEP::ObjectHelper<IfcOccupant,1>::Construct )
+,		SchemaEntry("ifcphysicalcomplexquantity",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcbooleanclippingresult",&STEP::ObjectHelper<IfcBooleanClippingResult,0>::Construct )
+,		SchemaEntry("ifcpredefinedterminatorsymbol",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcannotationfillarea",&STEP::ObjectHelper<IfcAnnotationFillArea,2>::Construct )
+,		SchemaEntry("ifcconstraintaggregationrelationship",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcrelassociatesapproval",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcrelassociatesmaterial",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcrelassignstoproduct",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcappliedvaluerelationship",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifclightsourcespot",&STEP::ObjectHelper<IfcLightSourceSpot,4>::Construct )
+,		SchemaEntry("ifcfiresuppressionterminaltype",&STEP::ObjectHelper<IfcFireSuppressionTerminalType,1>::Construct )
+,		SchemaEntry("ifcelementquantity",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcdimensionpair",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcelectricgeneratortype",&STEP::ObjectHelper<IfcElectricGeneratorType,1>::Construct )
+,		SchemaEntry("ifcrelsequence",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcinventory",&STEP::ObjectHelper<IfcInventory,6>::Construct )
+,		SchemaEntry("ifcpolyline",&STEP::ObjectHelper<IfcPolyline,1>::Construct )
+,		SchemaEntry("ifcboxedhalfspace",&STEP::ObjectHelper<IfcBoxedHalfSpace,1>::Construct )
+,		SchemaEntry("ifcairterminaltype",&STEP::ObjectHelper<IfcAirTerminalType,1>::Construct )
+,		SchemaEntry("ifcsectionreinforcementproperties",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcdistributionport",&STEP::ObjectHelper<IfcDistributionPort,1>::Construct )
+,		SchemaEntry("ifccostitem",&STEP::ObjectHelper<IfcCostItem,0>::Construct )
+,		SchemaEntry("ifcstructureddimensioncallout",&STEP::ObjectHelper<IfcStructuredDimensionCallout,0>::Construct )
+,		SchemaEntry("ifcstructuralresultgroup",&STEP::ObjectHelper<IfcStructuralResultGroup,3>::Construct )
+,		SchemaEntry("ifcrelspaceboundary",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcorientededge",&STEP::ObjectHelper<IfcOrientedEdge,2>::Construct )
+,		SchemaEntry("ifcrelassignstoresource",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifccsgsolid",&STEP::ObjectHelper<IfcCsgSolid,1>::Construct )
+,		SchemaEntry("ifcproductsofcombustionproperties",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcrelaxation",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcplanarbox",&STEP::ObjectHelper<IfcPlanarBox,1>::Construct )
+,		SchemaEntry("ifcquantitylength",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+,		SchemaEntry("ifcmaterialdefinitionrepresentation",&STEP::ObjectHelper<IfcMaterialDefinitionRepresentation,1>::Construct )
+,		SchemaEntry("ifcasymmetricishapeprofiledef",&STEP::ObjectHelper<IfcAsymmetricIShapeProfileDef,4>::Construct )
+,		SchemaEntry("ifcrepresentationmap",&STEP::ObjectHelper<IfcRepresentationMap,2>::Construct )
+
+	};
+}
+
+// -----------------------------------------------------------------------------------------------------------
+void IFC::GetSchema(EXPRESS::ConversionSchema& out)
+{
+	out = EXPRESS::ConversionSchema(schema_raw);
+}
+
+namespace STEP {
+
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<NotImplemented>(const STEP::DB& db, const LIST& params, NotImplemented* in)
+{
+	return 0;
+}
+
+
+
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcRoot>(const DB& db, const LIST& params, IfcRoot* in)
+{
+	size_t base = 0;
+	if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to IfcRoot"); }    do { // convert the 'GlobalId' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::IfcRoot,4>::aux_is_derived[0]=true; break; }
+        try { GenericConvert( in->GlobalId, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to IfcRoot to be a `IfcGloballyUniqueId`")); }
+    } while(0);
+    do { // convert the 'OwnerHistory' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::IfcRoot,4>::aux_is_derived[1]=true; break; }
+        try { GenericConvert( in->OwnerHistory, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to IfcRoot to be a `IfcOwnerHistory`")); }
+    } while(0);
+    do { // convert the 'Name' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::IfcRoot,4>::aux_is_derived[2]=true; break; }
+        if (dynamic_cast<const UNSET*>(&*arg)) break;
+        try { GenericConvert( in->Name, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to IfcRoot to be a `IfcLabel`")); }
+    } while(0);
+    do { // convert the 'Description' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::IfcRoot,4>::aux_is_derived[3]=true; break; }
+        if (dynamic_cast<const UNSET*>(&*arg)) break;
+        try { GenericConvert( in->Description, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to IfcRoot to be a `IfcText`")); }
+    } while(0);
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcObjectDefinition>(const DB& db, const LIST& params, IfcObjectDefinition* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcRoot*>(in));
+	if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to IfcObjectDefinition"); }	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcTypeObject>(const DB& db, const LIST& params, IfcTypeObject* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcObjectDefinition*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcTypeProduct>(const DB& db, const LIST& params, IfcTypeProduct* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcTypeObject*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcElementType>(const DB& db, const LIST& params, IfcElementType* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcTypeProduct*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcFurnishingElementType>(const DB& db, const LIST& params, IfcFurnishingElementType* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcElementType*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcFurnitureType>(const DB& db, const LIST& params, IfcFurnitureType* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcFurnishingElementType*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcObject>(const DB& db, const LIST& params, IfcObject* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcObjectDefinition*>(in));
+	if (params.GetSize() < 5) { throw STEP::TypeError("expected 5 arguments to IfcObject"); }    do { // convert the 'ObjectType' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::IfcObject,1>::aux_is_derived[0]=true; break; }
+        if (dynamic_cast<const UNSET*>(&*arg)) break;
+        try { GenericConvert( in->ObjectType, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 4 to IfcObject to be a `IfcLabel`")); }
+    } while(0);
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcProduct>(const DB& db, const LIST& params, IfcProduct* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcObject*>(in));
+	if (params.GetSize() < 7) { throw STEP::TypeError("expected 7 arguments to IfcProduct"); }    do { // convert the 'ObjectPlacement' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::IfcProduct,2>::aux_is_derived[0]=true; break; }
+        if (dynamic_cast<const UNSET*>(&*arg)) break;
+        try { GenericConvert( in->ObjectPlacement, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 5 to IfcProduct to be a `IfcObjectPlacement`")); }
+    } while(0);
+    do { // convert the 'Representation' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::IfcProduct,2>::aux_is_derived[1]=true; break; }
+        if (dynamic_cast<const UNSET*>(&*arg)) break;
+        try { GenericConvert( in->Representation, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 6 to IfcProduct to be a `IfcProductRepresentation`")); }
+    } while(0);
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcGrid>(const DB& db, const LIST& params, IfcGrid* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcProduct*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcRepresentationItem>(const DB& db, const LIST& params, IfcRepresentationItem* in)
+{
+	size_t base = 0;
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcGeometricRepresentationItem>(const DB& db, const LIST& params, IfcGeometricRepresentationItem* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcRepresentationItem*>(in));
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcOneDirectionRepeatFactor>(const DB& db, const LIST& params, IfcOneDirectionRepeatFactor* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcGeometricRepresentationItem*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcTwoDirectionRepeatFactor>(const DB& db, const LIST& params, IfcTwoDirectionRepeatFactor* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcOneDirectionRepeatFactor*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcElement>(const DB& db, const LIST& params, IfcElement* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcProduct*>(in));
+	if (params.GetSize() < 8) { throw STEP::TypeError("expected 8 arguments to IfcElement"); }    do { // convert the 'Tag' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::IfcElement,1>::aux_is_derived[0]=true; break; }
+        if (dynamic_cast<const UNSET*>(&*arg)) break;
+        try { GenericConvert( in->Tag, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 7 to IfcElement to be a `IfcIdentifier`")); }
+    } while(0);
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcElementComponent>(const DB& db, const LIST& params, IfcElementComponent* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcElement*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcSpatialStructureElementType>(const DB& db, const LIST& params, IfcSpatialStructureElementType* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcElementType*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcControl>(const DB& db, const LIST& params, IfcControl* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcObject*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcActionRequest>(const DB& db, const LIST& params, IfcActionRequest* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcControl*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcDistributionElementType>(const DB& db, const LIST& params, IfcDistributionElementType* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcElementType*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcDistributionFlowElementType>(const DB& db, const LIST& params, IfcDistributionFlowElementType* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcDistributionElementType*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcEnergyConversionDeviceType>(const DB& db, const LIST& params, IfcEnergyConversionDeviceType* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcDistributionFlowElementType*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcCooledBeamType>(const DB& db, const LIST& params, IfcCooledBeamType* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcEnergyConversionDeviceType*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcCsgPrimitive3D>(const DB& db, const LIST& params, IfcCsgPrimitive3D* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcGeometricRepresentationItem*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcRectangularPyramid>(const DB& db, const LIST& params, IfcRectangularPyramid* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcCsgPrimitive3D*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcSurface>(const DB& db, const LIST& params, IfcSurface* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcGeometricRepresentationItem*>(in));
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcBoundedSurface>(const DB& db, const LIST& params, IfcBoundedSurface* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcSurface*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcRectangularTrimmedSurface>(const DB& db, const LIST& params, IfcRectangularTrimmedSurface* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcBoundedSurface*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcGroup>(const DB& db, const LIST& params, IfcGroup* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcObject*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcRelationship>(const DB& db, const LIST& params, IfcRelationship* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcRoot*>(in));
+	if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to IfcRelationship"); }	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcHalfSpaceSolid>(const DB& db, const LIST& params, IfcHalfSpaceSolid* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcGeometricRepresentationItem*>(in));
+	if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to IfcHalfSpaceSolid"); }    do { // convert the 'BaseSurface' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::IfcHalfSpaceSolid,2>::aux_is_derived[0]=true; break; }
+        try { GenericConvert( in->BaseSurface, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to IfcHalfSpaceSolid to be a `IfcSurface`")); }
+    } while(0);
+    do { // convert the 'AgreementFlag' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::IfcHalfSpaceSolid,2>::aux_is_derived[1]=true; break; }
+        try { GenericConvert( in->AgreementFlag, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to IfcHalfSpaceSolid to be a `BOOLEAN`")); }
+    } while(0);
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcPolygonalBoundedHalfSpace>(const DB& db, const LIST& params, IfcPolygonalBoundedHalfSpace* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcHalfSpaceSolid*>(in));
+	if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to IfcPolygonalBoundedHalfSpace"); }    do { // convert the 'Position' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        try { GenericConvert( in->Position, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to IfcPolygonalBoundedHalfSpace to be a `IfcAxis2Placement3D`")); }
+    } while(0);
+    do { // convert the 'PolygonalBoundary' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        try { GenericConvert( in->PolygonalBoundary, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to IfcPolygonalBoundedHalfSpace to be a `IfcBoundedCurve`")); }
+    } while(0);
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcAirToAirHeatRecoveryType>(const DB& db, const LIST& params, IfcAirToAirHeatRecoveryType* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcEnergyConversionDeviceType*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcFlowFittingType>(const DB& db, const LIST& params, IfcFlowFittingType* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcDistributionFlowElementType*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcPipeFittingType>(const DB& db, const LIST& params, IfcPipeFittingType* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcFlowFittingType*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcRepresentation>(const DB& db, const LIST& params, IfcRepresentation* in)
+{
+	size_t base = 0;
+	if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to IfcRepresentation"); }    do { // convert the 'ContextOfItems' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::IfcRepresentation,4>::aux_is_derived[0]=true; break; }
+        try { GenericConvert( in->ContextOfItems, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to IfcRepresentation to be a `IfcRepresentationContext`")); }
+    } while(0);
+    do { // convert the 'RepresentationIdentifier' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::IfcRepresentation,4>::aux_is_derived[1]=true; break; }
+        if (dynamic_cast<const UNSET*>(&*arg)) break;
+        try { GenericConvert( in->RepresentationIdentifier, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to IfcRepresentation to be a `IfcLabel`")); }
+    } while(0);
+    do { // convert the 'RepresentationType' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::IfcRepresentation,4>::aux_is_derived[2]=true; break; }
+        if (dynamic_cast<const UNSET*>(&*arg)) break;
+        try { GenericConvert( in->RepresentationType, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to IfcRepresentation to be a `IfcLabel`")); }
+    } while(0);
+    do { // convert the 'Items' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::IfcRepresentation,4>::aux_is_derived[3]=true; break; }
+        try { GenericConvert( in->Items, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to IfcRepresentation to be a `SET [1:?] OF IfcRepresentationItem`")); }
+    } while(0);
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcStyleModel>(const DB& db, const LIST& params, IfcStyleModel* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcRepresentation*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcStyledRepresentation>(const DB& db, const LIST& params, IfcStyledRepresentation* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcStyleModel*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcBooleanResult>(const DB& db, const LIST& params, IfcBooleanResult* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcGeometricRepresentationItem*>(in));
+	if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to IfcBooleanResult"); }    do { // convert the 'Operator' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::IfcBooleanResult,3>::aux_is_derived[0]=true; break; }
+        try { GenericConvert( in->Operator, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to IfcBooleanResult to be a `IfcBooleanOperator`")); }
+    } while(0);
+    do { // convert the 'FirstOperand' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::IfcBooleanResult,3>::aux_is_derived[1]=true; break; }
+        try { GenericConvert( in->FirstOperand, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to IfcBooleanResult to be a `IfcBooleanOperand`")); }
+    } while(0);
+    do { // convert the 'SecondOperand' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::IfcBooleanResult,3>::aux_is_derived[2]=true; break; }
+        try { GenericConvert( in->SecondOperand, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to IfcBooleanResult to be a `IfcBooleanOperand`")); }
+    } while(0);
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcFeatureElement>(const DB& db, const LIST& params, IfcFeatureElement* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcElement*>(in));
+	if (params.GetSize() < 8) { throw STEP::TypeError("expected 8 arguments to IfcFeatureElement"); }	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcFeatureElementSubtraction>(const DB& db, const LIST& params, IfcFeatureElementSubtraction* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcFeatureElement*>(in));
+	if (params.GetSize() < 8) { throw STEP::TypeError("expected 8 arguments to IfcFeatureElementSubtraction"); }	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcOpeningElement>(const DB& db, const LIST& params, IfcOpeningElement* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcFeatureElementSubtraction*>(in));
+	if (params.GetSize() < 8) { throw STEP::TypeError("expected 8 arguments to IfcOpeningElement"); }	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcConditionCriterion>(const DB& db, const LIST& params, IfcConditionCriterion* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcControl*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcFlowTerminalType>(const DB& db, const LIST& params, IfcFlowTerminalType* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcDistributionFlowElementType*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcFlowControllerType>(const DB& db, const LIST& params, IfcFlowControllerType* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcDistributionFlowElementType*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcSwitchingDeviceType>(const DB& db, const LIST& params, IfcSwitchingDeviceType* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcFlowControllerType*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcSystem>(const DB& db, const LIST& params, IfcSystem* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcGroup*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcElectricalCircuit>(const DB& db, const LIST& params, IfcElectricalCircuit* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcSystem*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcUnitaryEquipmentType>(const DB& db, const LIST& params, IfcUnitaryEquipmentType* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcEnergyConversionDeviceType*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcPort>(const DB& db, const LIST& params, IfcPort* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcProduct*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcPlacement>(const DB& db, const LIST& params, IfcPlacement* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcGeometricRepresentationItem*>(in));
+	if (params.GetSize() < 1) { throw STEP::TypeError("expected 1 arguments to IfcPlacement"); }    do { // convert the 'Location' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::IfcPlacement,1>::aux_is_derived[0]=true; break; }
+        try { GenericConvert( in->Location, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to IfcPlacement to be a `IfcCartesianPoint`")); }
+    } while(0);
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcProfileDef>(const DB& db, const LIST& params, IfcProfileDef* in)
+{
+	size_t base = 0;
+	if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to IfcProfileDef"); }    do { // convert the 'ProfileType' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::IfcProfileDef,2>::aux_is_derived[0]=true; break; }
+        try { GenericConvert( in->ProfileType, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to IfcProfileDef to be a `IfcProfileTypeEnum`")); }
+    } while(0);
+    do { // convert the 'ProfileName' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::IfcProfileDef,2>::aux_is_derived[1]=true; break; }
+        if (dynamic_cast<const UNSET*>(&*arg)) break;
+        try { GenericConvert( in->ProfileName, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to IfcProfileDef to be a `IfcLabel`")); }
+    } while(0);
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcArbitraryClosedProfileDef>(const DB& db, const LIST& params, IfcArbitraryClosedProfileDef* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcProfileDef*>(in));
+	if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to IfcArbitraryClosedProfileDef"); }    do { // convert the 'OuterCurve' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::IfcArbitraryClosedProfileDef,1>::aux_is_derived[0]=true; break; }
+        try { GenericConvert( in->OuterCurve, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to IfcArbitraryClosedProfileDef to be a `IfcCurve`")); }
+    } while(0);
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcCurve>(const DB& db, const LIST& params, IfcCurve* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcGeometricRepresentationItem*>(in));
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcConic>(const DB& db, const LIST& params, IfcConic* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcCurve*>(in));
+	if (params.GetSize() < 1) { throw STEP::TypeError("expected 1 arguments to IfcConic"); }    do { // convert the 'Position' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::IfcConic,1>::aux_is_derived[0]=true; break; }
+        try { GenericConvert( in->Position, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to IfcConic to be a `IfcAxis2Placement`")); }
+    } while(0);
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcCircle>(const DB& db, const LIST& params, IfcCircle* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcConic*>(in));
+	if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to IfcCircle"); }    do { // convert the 'Radius' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        try { GenericConvert( in->Radius, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to IfcCircle to be a `IfcPositiveLengthMeasure`")); }
+    } while(0);
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcElementarySurface>(const DB& db, const LIST& params, IfcElementarySurface* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcSurface*>(in));
+	if (params.GetSize() < 1) { throw STEP::TypeError("expected 1 arguments to IfcElementarySurface"); }    do { // convert the 'Position' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::IfcElementarySurface,1>::aux_is_derived[0]=true; break; }
+        try { GenericConvert( in->Position, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to IfcElementarySurface to be a `IfcAxis2Placement3D`")); }
+    } while(0);
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcPlane>(const DB& db, const LIST& params, IfcPlane* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcElementarySurface*>(in));
+	if (params.GetSize() < 1) { throw STEP::TypeError("expected 1 arguments to IfcPlane"); }	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcCostSchedule>(const DB& db, const LIST& params, IfcCostSchedule* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcControl*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcRightCircularCone>(const DB& db, const LIST& params, IfcRightCircularCone* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcCsgPrimitive3D*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcElementAssembly>(const DB& db, const LIST& params, IfcElementAssembly* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcElement*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcBuildingElement>(const DB& db, const LIST& params, IfcBuildingElement* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcElement*>(in));
+	if (params.GetSize() < 8) { throw STEP::TypeError("expected 8 arguments to IfcBuildingElement"); }	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcMember>(const DB& db, const LIST& params, IfcMember* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcBuildingElement*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcBuildingElementProxy>(const DB& db, const LIST& params, IfcBuildingElementProxy* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcBuildingElement*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcStructuralActivity>(const DB& db, const LIST& params, IfcStructuralActivity* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcProduct*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcStructuralAction>(const DB& db, const LIST& params, IfcStructuralAction* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcStructuralActivity*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcStructuralPlanarAction>(const DB& db, const LIST& params, IfcStructuralPlanarAction* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcStructuralAction*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcTopologicalRepresentationItem>(const DB& db, const LIST& params, IfcTopologicalRepresentationItem* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcRepresentationItem*>(in));
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcConnectedFaceSet>(const DB& db, const LIST& params, IfcConnectedFaceSet* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcTopologicalRepresentationItem*>(in));
+	if (params.GetSize() < 1) { throw STEP::TypeError("expected 1 arguments to IfcConnectedFaceSet"); }    do { // convert the 'CfsFaces' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::IfcConnectedFaceSet,1>::aux_is_derived[0]=true; break; }
+        try { GenericConvert( in->CfsFaces, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to IfcConnectedFaceSet to be a `SET [1:?] OF IfcFace`")); }
+    } while(0);
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcSweptSurface>(const DB& db, const LIST& params, IfcSweptSurface* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcSurface*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcSurfaceOfLinearExtrusion>(const DB& db, const LIST& params, IfcSurfaceOfLinearExtrusion* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcSweptSurface*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcArbitraryProfileDefWithVoids>(const DB& db, const LIST& params, IfcArbitraryProfileDefWithVoids* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcArbitraryClosedProfileDef*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcProcess>(const DB& db, const LIST& params, IfcProcess* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcObject*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcProcedure>(const DB& db, const LIST& params, IfcProcedure* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcProcess*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcVector>(const DB& db, const LIST& params, IfcVector* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcGeometricRepresentationItem*>(in));
+	if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to IfcVector"); }    do { // convert the 'Orientation' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        try { GenericConvert( in->Orientation, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to IfcVector to be a `IfcDirection`")); }
+    } while(0);
+    do { // convert the 'Magnitude' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        try { GenericConvert( in->Magnitude, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to IfcVector to be a `IfcLengthMeasure`")); }
+    } while(0);
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcFaceBound>(const DB& db, const LIST& params, IfcFaceBound* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcTopologicalRepresentationItem*>(in));
+	if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to IfcFaceBound"); }    do { // convert the 'Bound' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::IfcFaceBound,2>::aux_is_derived[0]=true; break; }
+        try { GenericConvert( in->Bound, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to IfcFaceBound to be a `IfcLoop`")); }
+    } while(0);
+    do { // convert the 'Orientation' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::IfcFaceBound,2>::aux_is_derived[1]=true; break; }
+        try { GenericConvert( in->Orientation, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to IfcFaceBound to be a `BOOLEAN`")); }
+    } while(0);
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcFaceOuterBound>(const DB& db, const LIST& params, IfcFaceOuterBound* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcFaceBound*>(in));
+	if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to IfcFaceOuterBound"); }	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcFeatureElementAddition>(const DB& db, const LIST& params, IfcFeatureElementAddition* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcFeatureElement*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcNamedUnit>(const DB& db, const LIST& params, IfcNamedUnit* in)
+{
+	size_t base = 0;
+	if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to IfcNamedUnit"); }    do { // convert the 'Dimensions' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::IfcNamedUnit,2>::aux_is_derived[0]=true; break; }
+        try { GenericConvert( in->Dimensions, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to IfcNamedUnit to be a `IfcDimensionalExponents`")); }
+    } while(0);
+    do { // convert the 'UnitType' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::IfcNamedUnit,2>::aux_is_derived[1]=true; break; }
+        try { GenericConvert( in->UnitType, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to IfcNamedUnit to be a `IfcUnitEnum`")); }
+    } while(0);
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcConversionBasedUnit>(const DB& db, const LIST& params, IfcConversionBasedUnit* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcNamedUnit*>(in));
+	if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to IfcConversionBasedUnit"); }    do { // convert the 'Name' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        try { GenericConvert( in->Name, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to IfcConversionBasedUnit to be a `IfcLabel`")); }
+    } while(0);
+    do { // convert the 'ConversionFactor' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        try { GenericConvert( in->ConversionFactor, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to IfcConversionBasedUnit to be a `IfcMeasureWithUnit`")); }
+    } while(0);
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcHeatExchangerType>(const DB& db, const LIST& params, IfcHeatExchangerType* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcEnergyConversionDeviceType*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcPresentationStyleAssignment>(const DB& db, const LIST& params, IfcPresentationStyleAssignment* in)
+{
+	size_t base = 0;
+	if (params.GetSize() < 1) { throw STEP::TypeError("expected 1 arguments to IfcPresentationStyleAssignment"); }    do { // convert the 'Styles' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        try { GenericConvert( in->Styles, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to IfcPresentationStyleAssignment to be a `SET [1:?] OF IfcPresentationStyleSelect`")); }
+    } while(0);
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcFlowTreatmentDeviceType>(const DB& db, const LIST& params, IfcFlowTreatmentDeviceType* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcDistributionFlowElementType*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcFilterType>(const DB& db, const LIST& params, IfcFilterType* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcFlowTreatmentDeviceType*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcResource>(const DB& db, const LIST& params, IfcResource* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcObject*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcEvaporativeCoolerType>(const DB& db, const LIST& params, IfcEvaporativeCoolerType* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcEnergyConversionDeviceType*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcOffsetCurve2D>(const DB& db, const LIST& params, IfcOffsetCurve2D* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcCurve*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcEdge>(const DB& db, const LIST& params, IfcEdge* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcTopologicalRepresentationItem*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcSubedge>(const DB& db, const LIST& params, IfcSubedge* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcEdge*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcProxy>(const DB& db, const LIST& params, IfcProxy* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcProduct*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcLine>(const DB& db, const LIST& params, IfcLine* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcCurve*>(in));
+	if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to IfcLine"); }    do { // convert the 'Pnt' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        try { GenericConvert( in->Pnt, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to IfcLine to be a `IfcCartesianPoint`")); }
+    } while(0);
+    do { // convert the 'Dir' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        try { GenericConvert( in->Dir, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to IfcLine to be a `IfcVector`")); }
+    } while(0);
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcColumn>(const DB& db, const LIST& params, IfcColumn* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcBuildingElement*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcObjectPlacement>(const DB& db, const LIST& params, IfcObjectPlacement* in)
+{
+	size_t base = 0;
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcGridPlacement>(const DB& db, const LIST& params, IfcGridPlacement* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcObjectPlacement*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcDistributionControlElementType>(const DB& db, const LIST& params, IfcDistributionControlElementType* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcDistributionElementType*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcRelConnects>(const DB& db, const LIST& params, IfcRelConnects* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcRelationship*>(in));
+	if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to IfcRelConnects"); }	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcAnnotation>(const DB& db, const LIST& params, IfcAnnotation* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcProduct*>(in));
+	if (params.GetSize() < 7) { throw STEP::TypeError("expected 7 arguments to IfcAnnotation"); }	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcPlate>(const DB& db, const LIST& params, IfcPlate* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcBuildingElement*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcSolidModel>(const DB& db, const LIST& params, IfcSolidModel* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcGeometricRepresentationItem*>(in));
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcManifoldSolidBrep>(const DB& db, const LIST& params, IfcManifoldSolidBrep* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcSolidModel*>(in));
+	if (params.GetSize() < 1) { throw STEP::TypeError("expected 1 arguments to IfcManifoldSolidBrep"); }    do { // convert the 'Outer' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::IfcManifoldSolidBrep,1>::aux_is_derived[0]=true; break; }
+        try { GenericConvert( in->Outer, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to IfcManifoldSolidBrep to be a `IfcClosedShell`")); }
+    } while(0);
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcFlowStorageDeviceType>(const DB& db, const LIST& params, IfcFlowStorageDeviceType* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcDistributionFlowElementType*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcStructuralItem>(const DB& db, const LIST& params, IfcStructuralItem* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcProduct*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcStructuralMember>(const DB& db, const LIST& params, IfcStructuralMember* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcStructuralItem*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcStructuralCurveMember>(const DB& db, const LIST& params, IfcStructuralCurveMember* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcStructuralMember*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcStructuralConnection>(const DB& db, const LIST& params, IfcStructuralConnection* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcStructuralItem*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcStructuralSurfaceConnection>(const DB& db, const LIST& params, IfcStructuralSurfaceConnection* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcStructuralConnection*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcCoilType>(const DB& db, const LIST& params, IfcCoilType* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcEnergyConversionDeviceType*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcDuctFittingType>(const DB& db, const LIST& params, IfcDuctFittingType* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcFlowFittingType*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcStyledItem>(const DB& db, const LIST& params, IfcStyledItem* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcRepresentationItem*>(in));
+	if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to IfcStyledItem"); }    do { // convert the 'Item' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::IfcStyledItem,3>::aux_is_derived[0]=true; break; }
+        if (dynamic_cast<const UNSET*>(&*arg)) break;
+        try { GenericConvert( in->Item, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to IfcStyledItem to be a `IfcRepresentationItem`")); }
+    } while(0);
+    do { // convert the 'Styles' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::IfcStyledItem,3>::aux_is_derived[1]=true; break; }
+        try { GenericConvert( in->Styles, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to IfcStyledItem to be a `SET [1:?] OF IfcPresentationStyleAssignment`")); }
+    } while(0);
+    do { // convert the 'Name' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::IfcStyledItem,3>::aux_is_derived[2]=true; break; }
+        if (dynamic_cast<const UNSET*>(&*arg)) break;
+        try { GenericConvert( in->Name, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to IfcStyledItem to be a `IfcLabel`")); }
+    } while(0);
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcAnnotationOccurrence>(const DB& db, const LIST& params, IfcAnnotationOccurrence* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcStyledItem*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcAnnotationCurveOccurrence>(const DB& db, const LIST& params, IfcAnnotationCurveOccurrence* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcAnnotationOccurrence*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcDimensionCurve>(const DB& db, const LIST& params, IfcDimensionCurve* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcAnnotationCurveOccurrence*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcBoundedCurve>(const DB& db, const LIST& params, IfcBoundedCurve* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcCurve*>(in));
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcAxis1Placement>(const DB& db, const LIST& params, IfcAxis1Placement* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcPlacement*>(in));
+	if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to IfcAxis1Placement"); }    do { // convert the 'Axis' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        if (dynamic_cast<const UNSET*>(&*arg)) break;
+        try { GenericConvert( in->Axis, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to IfcAxis1Placement to be a `IfcDirection`")); }
+    } while(0);
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcStructuralPointAction>(const DB& db, const LIST& params, IfcStructuralPointAction* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcStructuralAction*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcSpatialStructureElement>(const DB& db, const LIST& params, IfcSpatialStructureElement* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcProduct*>(in));
+	if (params.GetSize() < 9) { throw STEP::TypeError("expected 9 arguments to IfcSpatialStructureElement"); }    do { // convert the 'LongName' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::IfcSpatialStructureElement,2>::aux_is_derived[0]=true; break; }
+        if (dynamic_cast<const UNSET*>(&*arg)) break;
+        try { GenericConvert( in->LongName, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 7 to IfcSpatialStructureElement to be a `IfcLabel`")); }
+    } while(0);
+    do { // convert the 'CompositionType' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::IfcSpatialStructureElement,2>::aux_is_derived[1]=true; break; }
+        try { GenericConvert( in->CompositionType, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 8 to IfcSpatialStructureElement to be a `IfcElementCompositionEnum`")); }
+    } while(0);
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcSpace>(const DB& db, const LIST& params, IfcSpace* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcSpatialStructureElement*>(in));
+	if (params.GetSize() < 11) { throw STEP::TypeError("expected 11 arguments to IfcSpace"); }    do { // convert the 'InteriorOrExteriorSpace' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        try { GenericConvert( in->InteriorOrExteriorSpace, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 9 to IfcSpace to be a `IfcInternalOrExternalEnum`")); }
+    } while(0);
+    do { // convert the 'ElevationWithFlooring' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        if (dynamic_cast<const UNSET*>(&*arg)) break;
+        try { GenericConvert( in->ElevationWithFlooring, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 10 to IfcSpace to be a `IfcLengthMeasure`")); }
+    } while(0);
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcContextDependentUnit>(const DB& db, const LIST& params, IfcContextDependentUnit* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcNamedUnit*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcCoolingTowerType>(const DB& db, const LIST& params, IfcCoolingTowerType* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcEnergyConversionDeviceType*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcFacetedBrepWithVoids>(const DB& db, const LIST& params, IfcFacetedBrepWithVoids* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcManifoldSolidBrep*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcValveType>(const DB& db, const LIST& params, IfcValveType* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcFlowControllerType*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcSystemFurnitureElementType>(const DB& db, const LIST& params, IfcSystemFurnitureElementType* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcFurnishingElementType*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcDiscreteAccessory>(const DB& db, const LIST& params, IfcDiscreteAccessory* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcElementComponent*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcBuildingElementType>(const DB& db, const LIST& params, IfcBuildingElementType* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcElementType*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcRailingType>(const DB& db, const LIST& params, IfcRailingType* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcBuildingElementType*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcGasTerminalType>(const DB& db, const LIST& params, IfcGasTerminalType* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcFlowTerminalType*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcSpaceProgram>(const DB& db, const LIST& params, IfcSpaceProgram* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcControl*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcCovering>(const DB& db, const LIST& params, IfcCovering* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcBuildingElement*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcPresentationStyle>(const DB& db, const LIST& params, IfcPresentationStyle* in)
+{
+	size_t base = 0;
+	if (params.GetSize() < 1) { throw STEP::TypeError("expected 1 arguments to IfcPresentationStyle"); }    do { // convert the 'Name' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::IfcPresentationStyle,1>::aux_is_derived[0]=true; break; }
+        if (dynamic_cast<const UNSET*>(&*arg)) break;
+        try { GenericConvert( in->Name, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to IfcPresentationStyle to be a `IfcLabel`")); }
+    } while(0);
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcElectricHeaterType>(const DB& db, const LIST& params, IfcElectricHeaterType* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcFlowTerminalType*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcBuildingStorey>(const DB& db, const LIST& params, IfcBuildingStorey* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcSpatialStructureElement*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcVertex>(const DB& db, const LIST& params, IfcVertex* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcTopologicalRepresentationItem*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcVertexPoint>(const DB& db, const LIST& params, IfcVertexPoint* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcVertex*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcFlowInstrumentType>(const DB& db, const LIST& params, IfcFlowInstrumentType* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcDistributionControlElementType*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcParameterizedProfileDef>(const DB& db, const LIST& params, IfcParameterizedProfileDef* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcProfileDef*>(in));
+	if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to IfcParameterizedProfileDef"); }    do { // convert the 'Position' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::IfcParameterizedProfileDef,1>::aux_is_derived[0]=true; break; }
+        try { GenericConvert( in->Position, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to IfcParameterizedProfileDef to be a `IfcAxis2Placement2D`")); }
+    } while(0);
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcUShapeProfileDef>(const DB& db, const LIST& params, IfcUShapeProfileDef* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcParameterizedProfileDef*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcRamp>(const DB& db, const LIST& params, IfcRamp* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcBuildingElement*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcCompositeCurve>(const DB& db, const LIST& params, IfcCompositeCurve* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcBoundedCurve*>(in));
+	if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to IfcCompositeCurve"); }    do { // convert the 'Segments' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::IfcCompositeCurve,2>::aux_is_derived[0]=true; break; }
+        try { GenericConvert( in->Segments, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to IfcCompositeCurve to be a `LIST [1:?] OF IfcCompositeCurveSegment`")); }
+    } while(0);
+    do { // convert the 'SelfIntersect' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::IfcCompositeCurve,2>::aux_is_derived[1]=true; break; }
+        try { GenericConvert( in->SelfIntersect, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to IfcCompositeCurve to be a `LOGICAL`")); }
+    } while(0);
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcStructuralCurveMemberVarying>(const DB& db, const LIST& params, IfcStructuralCurveMemberVarying* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcStructuralCurveMember*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcRampFlightType>(const DB& db, const LIST& params, IfcRampFlightType* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcBuildingElementType*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcDraughtingCallout>(const DB& db, const LIST& params, IfcDraughtingCallout* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcGeometricRepresentationItem*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcDimensionCurveDirectedCallout>(const DB& db, const LIST& params, IfcDimensionCurveDirectedCallout* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcDraughtingCallout*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcRadiusDimension>(const DB& db, const LIST& params, IfcRadiusDimension* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcDimensionCurveDirectedCallout*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcEdgeFeature>(const DB& db, const LIST& params, IfcEdgeFeature* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcFeatureElementSubtraction*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcSweptAreaSolid>(const DB& db, const LIST& params, IfcSweptAreaSolid* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcSolidModel*>(in));
+	if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to IfcSweptAreaSolid"); }    do { // convert the 'SweptArea' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::IfcSweptAreaSolid,2>::aux_is_derived[0]=true; break; }
+        try { GenericConvert( in->SweptArea, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to IfcSweptAreaSolid to be a `IfcProfileDef`")); }
+    } while(0);
+    do { // convert the 'Position' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::IfcSweptAreaSolid,2>::aux_is_derived[1]=true; break; }
+        try { GenericConvert( in->Position, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to IfcSweptAreaSolid to be a `IfcAxis2Placement3D`")); }
+    } while(0);
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcExtrudedAreaSolid>(const DB& db, const LIST& params, IfcExtrudedAreaSolid* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcSweptAreaSolid*>(in));
+	if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to IfcExtrudedAreaSolid"); }    do { // convert the 'ExtrudedDirection' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        try { GenericConvert( in->ExtrudedDirection, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to IfcExtrudedAreaSolid to be a `IfcDirection`")); }
+    } while(0);
+    do { // convert the 'Depth' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        try { GenericConvert( in->Depth, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to IfcExtrudedAreaSolid to be a `IfcPositiveLengthMeasure`")); }
+    } while(0);
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcAnnotationTextOccurrence>(const DB& db, const LIST& params, IfcAnnotationTextOccurrence* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcAnnotationOccurrence*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcStair>(const DB& db, const LIST& params, IfcStair* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcBuildingElement*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcFillAreaStyleTileSymbolWithStyle>(const DB& db, const LIST& params, IfcFillAreaStyleTileSymbolWithStyle* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcGeometricRepresentationItem*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcAnnotationSymbolOccurrence>(const DB& db, const LIST& params, IfcAnnotationSymbolOccurrence* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcAnnotationOccurrence*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcTerminatorSymbol>(const DB& db, const LIST& params, IfcTerminatorSymbol* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcAnnotationSymbolOccurrence*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcDimensionCurveTerminator>(const DB& db, const LIST& params, IfcDimensionCurveTerminator* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcTerminatorSymbol*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcRectangleProfileDef>(const DB& db, const LIST& params, IfcRectangleProfileDef* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcParameterizedProfileDef*>(in));
+	if (params.GetSize() < 5) { throw STEP::TypeError("expected 5 arguments to IfcRectangleProfileDef"); }    do { // convert the 'XDim' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::IfcRectangleProfileDef,2>::aux_is_derived[0]=true; break; }
+        try { GenericConvert( in->XDim, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to IfcRectangleProfileDef to be a `IfcPositiveLengthMeasure`")); }
+    } while(0);
+    do { // convert the 'YDim' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::IfcRectangleProfileDef,2>::aux_is_derived[1]=true; break; }
+        try { GenericConvert( in->YDim, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 4 to IfcRectangleProfileDef to be a `IfcPositiveLengthMeasure`")); }
+    } while(0);
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcRectangleHollowProfileDef>(const DB& db, const LIST& params, IfcRectangleHollowProfileDef* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcRectangleProfileDef*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcLocalPlacement>(const DB& db, const LIST& params, IfcLocalPlacement* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcObjectPlacement*>(in));
+	if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to IfcLocalPlacement"); }    do { // convert the 'PlacementRelTo' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        if (dynamic_cast<const UNSET*>(&*arg)) break;
+        try { GenericConvert( in->PlacementRelTo, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to IfcLocalPlacement to be a `IfcObjectPlacement`")); }
+    } while(0);
+    do { // convert the 'RelativePlacement' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        try { GenericConvert( in->RelativePlacement, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to IfcLocalPlacement to be a `IfcAxis2Placement`")); }
+    } while(0);
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcTask>(const DB& db, const LIST& params, IfcTask* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcProcess*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcAnnotationFillAreaOccurrence>(const DB& db, const LIST& params, IfcAnnotationFillAreaOccurrence* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcAnnotationOccurrence*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcFace>(const DB& db, const LIST& params, IfcFace* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcTopologicalRepresentationItem*>(in));
+	if (params.GetSize() < 1) { throw STEP::TypeError("expected 1 arguments to IfcFace"); }    do { // convert the 'Bounds' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::IfcFace,1>::aux_is_derived[0]=true; break; }
+        try { GenericConvert( in->Bounds, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to IfcFace to be a `SET [1:?] OF IfcFaceBound`")); }
+    } while(0);
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcFlowSegmentType>(const DB& db, const LIST& params, IfcFlowSegmentType* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcDistributionFlowElementType*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcDuctSegmentType>(const DB& db, const LIST& params, IfcDuctSegmentType* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcFlowSegmentType*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcConstructionResource>(const DB& db, const LIST& params, IfcConstructionResource* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcResource*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcConstructionEquipmentResource>(const DB& db, const LIST& params, IfcConstructionEquipmentResource* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcConstructionResource*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcSanitaryTerminalType>(const DB& db, const LIST& params, IfcSanitaryTerminalType* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcFlowTerminalType*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcCircleProfileDef>(const DB& db, const LIST& params, IfcCircleProfileDef* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcParameterizedProfileDef*>(in));
+	if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to IfcCircleProfileDef"); }    do { // convert the 'Radius' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::IfcCircleProfileDef,1>::aux_is_derived[0]=true; break; }
+        try { GenericConvert( in->Radius, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to IfcCircleProfileDef to be a `IfcPositiveLengthMeasure`")); }
+    } while(0);
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcStructuralReaction>(const DB& db, const LIST& params, IfcStructuralReaction* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcStructuralActivity*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcStructuralPointReaction>(const DB& db, const LIST& params, IfcStructuralPointReaction* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcStructuralReaction*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcRailing>(const DB& db, const LIST& params, IfcRailing* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcBuildingElement*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcTextLiteral>(const DB& db, const LIST& params, IfcTextLiteral* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcGeometricRepresentationItem*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcCartesianTransformationOperator>(const DB& db, const LIST& params, IfcCartesianTransformationOperator* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcGeometricRepresentationItem*>(in));
+	if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to IfcCartesianTransformationOperator"); }    do { // convert the 'Axis1' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::IfcCartesianTransformationOperator,4>::aux_is_derived[0]=true; break; }
+        if (dynamic_cast<const UNSET*>(&*arg)) break;
+        try { GenericConvert( in->Axis1, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to IfcCartesianTransformationOperator to be a `IfcDirection`")); }
+    } while(0);
+    do { // convert the 'Axis2' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::IfcCartesianTransformationOperator,4>::aux_is_derived[1]=true; break; }
+        if (dynamic_cast<const UNSET*>(&*arg)) break;
+        try { GenericConvert( in->Axis2, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to IfcCartesianTransformationOperator to be a `IfcDirection`")); }
+    } while(0);
+    do { // convert the 'LocalOrigin' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::IfcCartesianTransformationOperator,4>::aux_is_derived[2]=true; break; }
+        try { GenericConvert( in->LocalOrigin, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to IfcCartesianTransformationOperator to be a `IfcCartesianPoint`")); }
+    } while(0);
+    do { // convert the 'Scale' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::IfcCartesianTransformationOperator,4>::aux_is_derived[3]=true; break; }
+        if (dynamic_cast<const UNSET*>(&*arg)) break;
+        try { GenericConvert( in->Scale, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to IfcCartesianTransformationOperator to be a `REAL`")); }
+    } while(0);
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcLinearDimension>(const DB& db, const LIST& params, IfcLinearDimension* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcDimensionCurveDirectedCallout*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcDamperType>(const DB& db, const LIST& params, IfcDamperType* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcFlowControllerType*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcSIUnit>(const DB& db, const LIST& params, IfcSIUnit* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcNamedUnit*>(in));
+	if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to IfcSIUnit"); }    do { // convert the 'Prefix' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        if (dynamic_cast<const UNSET*>(&*arg)) break;
+        try { GenericConvert( in->Prefix, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to IfcSIUnit to be a `IfcSIPrefix`")); }
+    } while(0);
+    do { // convert the 'Name' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        try { GenericConvert( in->Name, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to IfcSIUnit to be a `IfcSIUnitName`")); }
+    } while(0);
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcMeasureWithUnit>(const DB& db, const LIST& params, IfcMeasureWithUnit* in)
+{
+	size_t base = 0;
+	if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to IfcMeasureWithUnit"); }    do { // convert the 'ValueComponent' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        try { GenericConvert( in->ValueComponent, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to IfcMeasureWithUnit to be a `IfcValue`")); }
+    } while(0);
+    do { // convert the 'UnitComponent' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        try { GenericConvert( in->UnitComponent, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to IfcMeasureWithUnit to be a `IfcUnit`")); }
+    } while(0);
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcDistributionElement>(const DB& db, const LIST& params, IfcDistributionElement* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcElement*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcDistributionControlElement>(const DB& db, const LIST& params, IfcDistributionControlElement* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcDistributionElement*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcTransformerType>(const DB& db, const LIST& params, IfcTransformerType* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcEnergyConversionDeviceType*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcLaborResource>(const DB& db, const LIST& params, IfcLaborResource* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcConstructionResource*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcDerivedProfileDef>(const DB& db, const LIST& params, IfcDerivedProfileDef* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcProfileDef*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcFurnitureStandard>(const DB& db, const LIST& params, IfcFurnitureStandard* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcControl*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcStairFlightType>(const DB& db, const LIST& params, IfcStairFlightType* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcBuildingElementType*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcWorkControl>(const DB& db, const LIST& params, IfcWorkControl* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcControl*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcWorkPlan>(const DB& db, const LIST& params, IfcWorkPlan* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcWorkControl*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcCondition>(const DB& db, const LIST& params, IfcCondition* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcGroup*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcRelVoidsElement>(const DB& db, const LIST& params, IfcRelVoidsElement* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcRelConnects*>(in));
+	if (params.GetSize() < 6) { throw STEP::TypeError("expected 6 arguments to IfcRelVoidsElement"); }    do { // convert the 'RelatingBuildingElement' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        try { GenericConvert( in->RelatingBuildingElement, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 4 to IfcRelVoidsElement to be a `IfcElement`")); }
+    } while(0);
+    do { // convert the 'RelatedOpeningElement' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        try { GenericConvert( in->RelatedOpeningElement, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 5 to IfcRelVoidsElement to be a `IfcFeatureElementSubtraction`")); }
+    } while(0);
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcWindow>(const DB& db, const LIST& params, IfcWindow* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcBuildingElement*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcProtectiveDeviceType>(const DB& db, const LIST& params, IfcProtectiveDeviceType* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcFlowControllerType*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcJunctionBoxType>(const DB& db, const LIST& params, IfcJunctionBoxType* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcFlowFittingType*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcStructuralAnalysisModel>(const DB& db, const LIST& params, IfcStructuralAnalysisModel* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcSystem*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcAxis2Placement2D>(const DB& db, const LIST& params, IfcAxis2Placement2D* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcPlacement*>(in));
+	if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to IfcAxis2Placement2D"); }    do { // convert the 'RefDirection' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        if (dynamic_cast<const UNSET*>(&*arg)) break;
+        try { GenericConvert( in->RefDirection, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to IfcAxis2Placement2D to be a `IfcDirection`")); }
+    } while(0);
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcSpaceType>(const DB& db, const LIST& params, IfcSpaceType* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcSpatialStructureElementType*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcEllipseProfileDef>(const DB& db, const LIST& params, IfcEllipseProfileDef* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcParameterizedProfileDef*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcDistributionFlowElement>(const DB& db, const LIST& params, IfcDistributionFlowElement* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcDistributionElement*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcFlowMovingDevice>(const DB& db, const LIST& params, IfcFlowMovingDevice* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcDistributionFlowElement*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcSurfaceStyleWithTextures>(const DB& db, const LIST& params, IfcSurfaceStyleWithTextures* in)
+{
+	size_t base = 0;
+	if (params.GetSize() < 1) { throw STEP::TypeError("expected 1 arguments to IfcSurfaceStyleWithTextures"); }    do { // convert the 'Textures' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        try { GenericConvert( in->Textures, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to IfcSurfaceStyleWithTextures to be a `LIST [1:?] OF IfcSurfaceTexture`")); }
+    } while(0);
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcGeometricSet>(const DB& db, const LIST& params, IfcGeometricSet* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcGeometricRepresentationItem*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcProjectOrder>(const DB& db, const LIST& params, IfcProjectOrder* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcControl*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcBSplineCurve>(const DB& db, const LIST& params, IfcBSplineCurve* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcBoundedCurve*>(in));
+	if (params.GetSize() < 5) { throw STEP::TypeError("expected 5 arguments to IfcBSplineCurve"); }    do { // convert the 'Degree' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::IfcBSplineCurve,5>::aux_is_derived[0]=true; break; }
+        try { GenericConvert( in->Degree, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to IfcBSplineCurve to be a `INTEGER`")); }
+    } while(0);
+    do { // convert the 'ControlPointsList' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::IfcBSplineCurve,5>::aux_is_derived[1]=true; break; }
+        try { GenericConvert( in->ControlPointsList, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to IfcBSplineCurve to be a `LIST [2:?] OF IfcCartesianPoint`")); }
+    } while(0);
+    do { // convert the 'CurveForm' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::IfcBSplineCurve,5>::aux_is_derived[2]=true; break; }
+        try { GenericConvert( in->CurveForm, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to IfcBSplineCurve to be a `IfcBSplineCurveForm`")); }
+    } while(0);
+    do { // convert the 'ClosedCurve' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::IfcBSplineCurve,5>::aux_is_derived[3]=true; break; }
+        try { GenericConvert( in->ClosedCurve, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to IfcBSplineCurve to be a `LOGICAL`")); }
+    } while(0);
+    do { // convert the 'SelfIntersect' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::IfcBSplineCurve,5>::aux_is_derived[4]=true; break; }
+        try { GenericConvert( in->SelfIntersect, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 4 to IfcBSplineCurve to be a `LOGICAL`")); }
+    } while(0);
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcBezierCurve>(const DB& db, const LIST& params, IfcBezierCurve* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcBSplineCurve*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcStructuralPointConnection>(const DB& db, const LIST& params, IfcStructuralPointConnection* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcStructuralConnection*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcFlowController>(const DB& db, const LIST& params, IfcFlowController* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcDistributionFlowElement*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcElectricDistributionPoint>(const DB& db, const LIST& params, IfcElectricDistributionPoint* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcFlowController*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcSite>(const DB& db, const LIST& params, IfcSite* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcSpatialStructureElement*>(in));
+	if (params.GetSize() < 14) { throw STEP::TypeError("expected 14 arguments to IfcSite"); }    do { // convert the 'RefLatitude' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        if (dynamic_cast<const UNSET*>(&*arg)) break;
+        try { GenericConvert( in->RefLatitude, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 9 to IfcSite to be a `IfcCompoundPlaneAngleMeasure`")); }
+    } while(0);
+    do { // convert the 'RefLongitude' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        if (dynamic_cast<const UNSET*>(&*arg)) break;
+        try { GenericConvert( in->RefLongitude, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 10 to IfcSite to be a `IfcCompoundPlaneAngleMeasure`")); }
+    } while(0);
+    do { // convert the 'RefElevation' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        if (dynamic_cast<const UNSET*>(&*arg)) break;
+        try { GenericConvert( in->RefElevation, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 11 to IfcSite to be a `IfcLengthMeasure`")); }
+    } while(0);
+    do { // convert the 'LandTitleNumber' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        if (dynamic_cast<const UNSET*>(&*arg)) break;
+        try { GenericConvert( in->LandTitleNumber, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 12 to IfcSite to be a `IfcLabel`")); }
+    } while(0);
+    do { // convert the 'SiteAddress' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        if (dynamic_cast<const UNSET*>(&*arg)) break;
+        try { GenericConvert( in->SiteAddress, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 13 to IfcSite to be a `IfcPostalAddress`")); }
+    } while(0);
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcOffsetCurve3D>(const DB& db, const LIST& params, IfcOffsetCurve3D* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcCurve*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcVirtualElement>(const DB& db, const LIST& params, IfcVirtualElement* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcElement*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcConstructionProductResource>(const DB& db, const LIST& params, IfcConstructionProductResource* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcConstructionResource*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcSurfaceCurveSweptAreaSolid>(const DB& db, const LIST& params, IfcSurfaceCurveSweptAreaSolid* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcSweptAreaSolid*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcCartesianTransformationOperator3D>(const DB& db, const LIST& params, IfcCartesianTransformationOperator3D* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcCartesianTransformationOperator*>(in));
+	if (params.GetSize() < 5) { throw STEP::TypeError("expected 5 arguments to IfcCartesianTransformationOperator3D"); }    do { // convert the 'Axis3' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::IfcCartesianTransformationOperator3D,1>::aux_is_derived[0]=true; break; }
+        if (dynamic_cast<const UNSET*>(&*arg)) break;
+        try { GenericConvert( in->Axis3, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 4 to IfcCartesianTransformationOperator3D to be a `IfcDirection`")); }
+    } while(0);
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcCartesianTransformationOperator3DnonUniform>(const DB& db, const LIST& params, IfcCartesianTransformationOperator3DnonUniform* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcCartesianTransformationOperator3D*>(in));
+	if (params.GetSize() < 7) { throw STEP::TypeError("expected 7 arguments to IfcCartesianTransformationOperator3DnonUniform"); }    do { // convert the 'Scale2' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        if (dynamic_cast<const UNSET*>(&*arg)) break;
+        try { GenericConvert( in->Scale2, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 5 to IfcCartesianTransformationOperator3DnonUniform to be a `REAL`")); }
+    } while(0);
+    do { // convert the 'Scale3' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        if (dynamic_cast<const UNSET*>(&*arg)) break;
+        try { GenericConvert( in->Scale3, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 6 to IfcCartesianTransformationOperator3DnonUniform to be a `REAL`")); }
+    } while(0);
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcCrewResource>(const DB& db, const LIST& params, IfcCrewResource* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcConstructionResource*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcStructuralSurfaceMember>(const DB& db, const LIST& params, IfcStructuralSurfaceMember* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcStructuralMember*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<Ifc2DCompositeCurve>(const DB& db, const LIST& params, Ifc2DCompositeCurve* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcCompositeCurve*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcRepresentationContext>(const DB& db, const LIST& params, IfcRepresentationContext* in)
+{
+	size_t base = 0;
+	if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to IfcRepresentationContext"); }    do { // convert the 'ContextIdentifier' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::IfcRepresentationContext,2>::aux_is_derived[0]=true; break; }
+        if (dynamic_cast<const UNSET*>(&*arg)) break;
+        try { GenericConvert( in->ContextIdentifier, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to IfcRepresentationContext to be a `IfcLabel`")); }
+    } while(0);
+    do { // convert the 'ContextType' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::IfcRepresentationContext,2>::aux_is_derived[1]=true; break; }
+        if (dynamic_cast<const UNSET*>(&*arg)) break;
+        try { GenericConvert( in->ContextType, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to IfcRepresentationContext to be a `IfcLabel`")); }
+    } while(0);
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcGeometricRepresentationContext>(const DB& db, const LIST& params, IfcGeometricRepresentationContext* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcRepresentationContext*>(in));
+	if (params.GetSize() < 6) { throw STEP::TypeError("expected 6 arguments to IfcGeometricRepresentationContext"); }    do { // convert the 'CoordinateSpaceDimension' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::IfcGeometricRepresentationContext,4>::aux_is_derived[0]=true; break; }
+        try { GenericConvert( in->CoordinateSpaceDimension, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to IfcGeometricRepresentationContext to be a `IfcDimensionCount`")); }
+    } while(0);
+    do { // convert the 'Precision' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::IfcGeometricRepresentationContext,4>::aux_is_derived[1]=true; break; }
+        if (dynamic_cast<const UNSET*>(&*arg)) break;
+        try { GenericConvert( in->Precision, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to IfcGeometricRepresentationContext to be a `REAL`")); }
+    } while(0);
+    do { // convert the 'WorldCoordinateSystem' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::IfcGeometricRepresentationContext,4>::aux_is_derived[2]=true; break; }
+        try { GenericConvert( in->WorldCoordinateSystem, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 4 to IfcGeometricRepresentationContext to be a `IfcAxis2Placement`")); }
+    } while(0);
+    do { // convert the 'TrueNorth' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::IfcGeometricRepresentationContext,4>::aux_is_derived[3]=true; break; }
+        if (dynamic_cast<const UNSET*>(&*arg)) break;
+        try { GenericConvert( in->TrueNorth, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 5 to IfcGeometricRepresentationContext to be a `IfcDirection`")); }
+    } while(0);
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcFlowTreatmentDevice>(const DB& db, const LIST& params, IfcFlowTreatmentDevice* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcDistributionFlowElement*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcRightCircularCylinder>(const DB& db, const LIST& params, IfcRightCircularCylinder* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcCsgPrimitive3D*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcWasteTerminalType>(const DB& db, const LIST& params, IfcWasteTerminalType* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcFlowTerminalType*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcBuildingElementComponent>(const DB& db, const LIST& params, IfcBuildingElementComponent* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcBuildingElement*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcBuildingElementPart>(const DB& db, const LIST& params, IfcBuildingElementPart* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcBuildingElementComponent*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcWall>(const DB& db, const LIST& params, IfcWall* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcBuildingElement*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcWallStandardCase>(const DB& db, const LIST& params, IfcWallStandardCase* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcWall*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcPath>(const DB& db, const LIST& params, IfcPath* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcTopologicalRepresentationItem*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcDefinedSymbol>(const DB& db, const LIST& params, IfcDefinedSymbol* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcGeometricRepresentationItem*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcStructuralSurfaceMemberVarying>(const DB& db, const LIST& params, IfcStructuralSurfaceMemberVarying* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcStructuralSurfaceMember*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcPoint>(const DB& db, const LIST& params, IfcPoint* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcGeometricRepresentationItem*>(in));
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcSurfaceOfRevolution>(const DB& db, const LIST& params, IfcSurfaceOfRevolution* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcSweptSurface*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcFlowTerminal>(const DB& db, const LIST& params, IfcFlowTerminal* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcDistributionFlowElement*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcFurnishingElement>(const DB& db, const LIST& params, IfcFurnishingElement* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcElement*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcSurfaceStyleShading>(const DB& db, const LIST& params, IfcSurfaceStyleShading* in)
+{
+	size_t base = 0;
+	if (params.GetSize() < 1) { throw STEP::TypeError("expected 1 arguments to IfcSurfaceStyleShading"); }    do { // convert the 'SurfaceColour' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::IfcSurfaceStyleShading,1>::aux_is_derived[0]=true; break; }
+        try { GenericConvert( in->SurfaceColour, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to IfcSurfaceStyleShading to be a `IfcColourRgb`")); }
+    } while(0);
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcSurfaceStyleRendering>(const DB& db, const LIST& params, IfcSurfaceStyleRendering* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcSurfaceStyleShading*>(in));
+	if (params.GetSize() < 9) { throw STEP::TypeError("expected 9 arguments to IfcSurfaceStyleRendering"); }    do { // convert the 'Transparency' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        if (dynamic_cast<const UNSET*>(&*arg)) break;
+        try { GenericConvert( in->Transparency, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to IfcSurfaceStyleRendering to be a `IfcNormalisedRatioMeasure`")); }
+    } while(0);
+    do { // convert the 'DiffuseColour' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        if (dynamic_cast<const UNSET*>(&*arg)) break;
+        try { GenericConvert( in->DiffuseColour, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to IfcSurfaceStyleRendering to be a `IfcColourOrFactor`")); }
+    } while(0);
+    do { // convert the 'TransmissionColour' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        if (dynamic_cast<const UNSET*>(&*arg)) break;
+        try { GenericConvert( in->TransmissionColour, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to IfcSurfaceStyleRendering to be a `IfcColourOrFactor`")); }
+    } while(0);
+    do { // convert the 'DiffuseTransmissionColour' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        if (dynamic_cast<const UNSET*>(&*arg)) break;
+        try { GenericConvert( in->DiffuseTransmissionColour, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 4 to IfcSurfaceStyleRendering to be a `IfcColourOrFactor`")); }
+    } while(0);
+    do { // convert the 'ReflectionColour' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        if (dynamic_cast<const UNSET*>(&*arg)) break;
+        try { GenericConvert( in->ReflectionColour, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 5 to IfcSurfaceStyleRendering to be a `IfcColourOrFactor`")); }
+    } while(0);
+    do { // convert the 'SpecularColour' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        if (dynamic_cast<const UNSET*>(&*arg)) break;
+        try { GenericConvert( in->SpecularColour, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 6 to IfcSurfaceStyleRendering to be a `IfcColourOrFactor`")); }
+    } while(0);
+    do { // convert the 'SpecularHighlight' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        if (dynamic_cast<const UNSET*>(&*arg)) break;
+        try { GenericConvert( in->SpecularHighlight, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 7 to IfcSurfaceStyleRendering to be a `IfcSpecularHighlightSelect`")); }
+    } while(0);
+    do { // convert the 'ReflectanceMethod' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        try { GenericConvert( in->ReflectanceMethod, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 8 to IfcSurfaceStyleRendering to be a `IfcReflectanceMethodEnum`")); }
+    } while(0);
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcCircleHollowProfileDef>(const DB& db, const LIST& params, IfcCircleHollowProfileDef* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcCircleProfileDef*>(in));
+	if (params.GetSize() < 5) { throw STEP::TypeError("expected 5 arguments to IfcCircleHollowProfileDef"); }    do { // convert the 'WallThickness' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        try { GenericConvert( in->WallThickness, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 4 to IfcCircleHollowProfileDef to be a `IfcPositiveLengthMeasure`")); }
+    } while(0);
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcFlowMovingDeviceType>(const DB& db, const LIST& params, IfcFlowMovingDeviceType* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcDistributionFlowElementType*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcFanType>(const DB& db, const LIST& params, IfcFanType* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcFlowMovingDeviceType*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcStructuralPlanarActionVarying>(const DB& db, const LIST& params, IfcStructuralPlanarActionVarying* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcStructuralPlanarAction*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcProductRepresentation>(const DB& db, const LIST& params, IfcProductRepresentation* in)
+{
+	size_t base = 0;
+	if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to IfcProductRepresentation"); }    do { // convert the 'Name' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::IfcProductRepresentation,3>::aux_is_derived[0]=true; break; }
+        if (dynamic_cast<const UNSET*>(&*arg)) break;
+        try { GenericConvert( in->Name, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to IfcProductRepresentation to be a `IfcLabel`")); }
+    } while(0);
+    do { // convert the 'Description' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::IfcProductRepresentation,3>::aux_is_derived[1]=true; break; }
+        if (dynamic_cast<const UNSET*>(&*arg)) break;
+        try { GenericConvert( in->Description, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to IfcProductRepresentation to be a `IfcText`")); }
+    } while(0);
+    do { // convert the 'Representations' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::IfcProductRepresentation,3>::aux_is_derived[2]=true; break; }
+        try { GenericConvert( in->Representations, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to IfcProductRepresentation to be a `LIST [1:?] OF IfcRepresentation`")); }
+    } while(0);
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcStackTerminalType>(const DB& db, const LIST& params, IfcStackTerminalType* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcFlowTerminalType*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcReinforcingElement>(const DB& db, const LIST& params, IfcReinforcingElement* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcBuildingElementComponent*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcReinforcingMesh>(const DB& db, const LIST& params, IfcReinforcingMesh* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcReinforcingElement*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcOrderAction>(const DB& db, const LIST& params, IfcOrderAction* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcTask*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcLightSource>(const DB& db, const LIST& params, IfcLightSource* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcGeometricRepresentationItem*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcLightSourceDirectional>(const DB& db, const LIST& params, IfcLightSourceDirectional* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcLightSource*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcLoop>(const DB& db, const LIST& params, IfcLoop* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcTopologicalRepresentationItem*>(in));
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcVertexLoop>(const DB& db, const LIST& params, IfcVertexLoop* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcLoop*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcChamferEdgeFeature>(const DB& db, const LIST& params, IfcChamferEdgeFeature* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcEdgeFeature*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcElementComponentType>(const DB& db, const LIST& params, IfcElementComponentType* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcElementType*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcFastenerType>(const DB& db, const LIST& params, IfcFastenerType* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcElementComponentType*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcMechanicalFastenerType>(const DB& db, const LIST& params, IfcMechanicalFastenerType* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcFastenerType*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcScheduleTimeControl>(const DB& db, const LIST& params, IfcScheduleTimeControl* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcControl*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcSurfaceStyle>(const DB& db, const LIST& params, IfcSurfaceStyle* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcPresentationStyle*>(in));
+	if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to IfcSurfaceStyle"); }    do { // convert the 'Side' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        try { GenericConvert( in->Side, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to IfcSurfaceStyle to be a `IfcSurfaceSide`")); }
+    } while(0);
+    do { // convert the 'Styles' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        try { GenericConvert( in->Styles, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to IfcSurfaceStyle to be a `SET [1:5] OF IfcSurfaceStyleElementSelect`")); }
+    } while(0);
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcOpenShell>(const DB& db, const LIST& params, IfcOpenShell* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcConnectedFaceSet*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcSubContractResource>(const DB& db, const LIST& params, IfcSubContractResource* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcConstructionResource*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcSweptDiskSolid>(const DB& db, const LIST& params, IfcSweptDiskSolid* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcSolidModel*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcCompositeProfileDef>(const DB& db, const LIST& params, IfcCompositeProfileDef* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcProfileDef*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcTankType>(const DB& db, const LIST& params, IfcTankType* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcFlowStorageDeviceType*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcSphere>(const DB& db, const LIST& params, IfcSphere* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcCsgPrimitive3D*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcPolyLoop>(const DB& db, const LIST& params, IfcPolyLoop* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcLoop*>(in));
+	if (params.GetSize() < 1) { throw STEP::TypeError("expected 1 arguments to IfcPolyLoop"); }    do { // convert the 'Polygon' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        try { GenericConvert( in->Polygon, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to IfcPolyLoop to be a `LIST [3:?] OF IfcCartesianPoint`")); }
+    } while(0);
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcCableCarrierFittingType>(const DB& db, const LIST& params, IfcCableCarrierFittingType* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcFlowFittingType*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcHumidifierType>(const DB& db, const LIST& params, IfcHumidifierType* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcEnergyConversionDeviceType*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcPerformanceHistory>(const DB& db, const LIST& params, IfcPerformanceHistory* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcControl*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcShapeModel>(const DB& db, const LIST& params, IfcShapeModel* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcRepresentation*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcTopologyRepresentation>(const DB& db, const LIST& params, IfcTopologyRepresentation* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcShapeModel*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcBuilding>(const DB& db, const LIST& params, IfcBuilding* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcSpatialStructureElement*>(in));
+	if (params.GetSize() < 12) { throw STEP::TypeError("expected 12 arguments to IfcBuilding"); }    do { // convert the 'ElevationOfRefHeight' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        if (dynamic_cast<const UNSET*>(&*arg)) break;
+        try { GenericConvert( in->ElevationOfRefHeight, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 9 to IfcBuilding to be a `IfcLengthMeasure`")); }
+    } while(0);
+    do { // convert the 'ElevationOfTerrain' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        if (dynamic_cast<const UNSET*>(&*arg)) break;
+        try { GenericConvert( in->ElevationOfTerrain, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 10 to IfcBuilding to be a `IfcLengthMeasure`")); }
+    } while(0);
+    do { // convert the 'BuildingAddress' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        if (dynamic_cast<const UNSET*>(&*arg)) break;
+        try { GenericConvert( in->BuildingAddress, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 11 to IfcBuilding to be a `IfcPostalAddress`")); }
+    } while(0);
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcRoundedRectangleProfileDef>(const DB& db, const LIST& params, IfcRoundedRectangleProfileDef* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcRectangleProfileDef*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcStairFlight>(const DB& db, const LIST& params, IfcStairFlight* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcBuildingElement*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcDistributionChamberElement>(const DB& db, const LIST& params, IfcDistributionChamberElement* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcDistributionFlowElement*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcShapeRepresentation>(const DB& db, const LIST& params, IfcShapeRepresentation* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcShapeModel*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcRampFlight>(const DB& db, const LIST& params, IfcRampFlight* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcBuildingElement*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcBeamType>(const DB& db, const LIST& params, IfcBeamType* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcBuildingElementType*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcRelDecomposes>(const DB& db, const LIST& params, IfcRelDecomposes* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcRelationship*>(in));
+	if (params.GetSize() < 6) { throw STEP::TypeError("expected 6 arguments to IfcRelDecomposes"); }    do { // convert the 'RelatingObject' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::IfcRelDecomposes,2>::aux_is_derived[0]=true; break; }
+        try { GenericConvert( in->RelatingObject, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 4 to IfcRelDecomposes to be a `IfcObjectDefinition`")); }
+    } while(0);
+    do { // convert the 'RelatedObjects' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::IfcRelDecomposes,2>::aux_is_derived[1]=true; break; }
+        try { GenericConvert( in->RelatedObjects, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 5 to IfcRelDecomposes to be a `SET [1:?] OF IfcObjectDefinition`")); }
+    } while(0);
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcRoof>(const DB& db, const LIST& params, IfcRoof* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcBuildingElement*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcFooting>(const DB& db, const LIST& params, IfcFooting* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcBuildingElement*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcLightSourceAmbient>(const DB& db, const LIST& params, IfcLightSourceAmbient* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcLightSource*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcWindowStyle>(const DB& db, const LIST& params, IfcWindowStyle* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcTypeProduct*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcBuildingElementProxyType>(const DB& db, const LIST& params, IfcBuildingElementProxyType* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcBuildingElementType*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcAxis2Placement3D>(const DB& db, const LIST& params, IfcAxis2Placement3D* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcPlacement*>(in));
+	if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to IfcAxis2Placement3D"); }    do { // convert the 'Axis' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        if (dynamic_cast<const UNSET*>(&*arg)) break;
+        try { GenericConvert( in->Axis, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to IfcAxis2Placement3D to be a `IfcDirection`")); }
+    } while(0);
+    do { // convert the 'RefDirection' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        if (dynamic_cast<const UNSET*>(&*arg)) break;
+        try { GenericConvert( in->RefDirection, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to IfcAxis2Placement3D to be a `IfcDirection`")); }
+    } while(0);
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcEdgeCurve>(const DB& db, const LIST& params, IfcEdgeCurve* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcEdge*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcClosedShell>(const DB& db, const LIST& params, IfcClosedShell* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcConnectedFaceSet*>(in));
+	if (params.GetSize() < 1) { throw STEP::TypeError("expected 1 arguments to IfcClosedShell"); }	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcTendonAnchor>(const DB& db, const LIST& params, IfcTendonAnchor* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcReinforcingElement*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcCondenserType>(const DB& db, const LIST& params, IfcCondenserType* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcEnergyConversionDeviceType*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcPipeSegmentType>(const DB& db, const LIST& params, IfcPipeSegmentType* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcFlowSegmentType*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcPointOnSurface>(const DB& db, const LIST& params, IfcPointOnSurface* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcPoint*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcAsset>(const DB& db, const LIST& params, IfcAsset* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcGroup*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcLightSourcePositional>(const DB& db, const LIST& params, IfcLightSourcePositional* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcLightSource*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcProjectionCurve>(const DB& db, const LIST& params, IfcProjectionCurve* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcAnnotationCurveOccurrence*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcFillAreaStyleTiles>(const DB& db, const LIST& params, IfcFillAreaStyleTiles* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcGeometricRepresentationItem*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcRelFillsElement>(const DB& db, const LIST& params, IfcRelFillsElement* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcRelConnects*>(in));
+	if (params.GetSize() < 6) { throw STEP::TypeError("expected 6 arguments to IfcRelFillsElement"); }    do { // convert the 'RelatingOpeningElement' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        try { GenericConvert( in->RelatingOpeningElement, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 4 to IfcRelFillsElement to be a `IfcOpeningElement`")); }
+    } while(0);
+    do { // convert the 'RelatedBuildingElement' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        try { GenericConvert( in->RelatedBuildingElement, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 5 to IfcRelFillsElement to be a `IfcElement`")); }
+    } while(0);
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcElectricMotorType>(const DB& db, const LIST& params, IfcElectricMotorType* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcEnergyConversionDeviceType*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcTendon>(const DB& db, const LIST& params, IfcTendon* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcReinforcingElement*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcDistributionChamberElementType>(const DB& db, const LIST& params, IfcDistributionChamberElementType* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcDistributionFlowElementType*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcMemberType>(const DB& db, const LIST& params, IfcMemberType* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcBuildingElementType*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcStructuralLinearAction>(const DB& db, const LIST& params, IfcStructuralLinearAction* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcStructuralAction*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcStructuralLinearActionVarying>(const DB& db, const LIST& params, IfcStructuralLinearActionVarying* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcStructuralLinearAction*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcProductDefinitionShape>(const DB& db, const LIST& params, IfcProductDefinitionShape* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcProductRepresentation*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcFastener>(const DB& db, const LIST& params, IfcFastener* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcElementComponent*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcMechanicalFastener>(const DB& db, const LIST& params, IfcMechanicalFastener* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcFastener*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcEvaporatorType>(const DB& db, const LIST& params, IfcEvaporatorType* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcEnergyConversionDeviceType*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcDiscreteAccessoryType>(const DB& db, const LIST& params, IfcDiscreteAccessoryType* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcElementComponentType*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcStructuralCurveConnection>(const DB& db, const LIST& params, IfcStructuralCurveConnection* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcStructuralConnection*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcProjectionElement>(const DB& db, const LIST& params, IfcProjectionElement* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcFeatureElementAddition*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcCoveringType>(const DB& db, const LIST& params, IfcCoveringType* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcBuildingElementType*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcPumpType>(const DB& db, const LIST& params, IfcPumpType* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcFlowMovingDeviceType*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcPile>(const DB& db, const LIST& params, IfcPile* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcBuildingElement*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcUnitAssignment>(const DB& db, const LIST& params, IfcUnitAssignment* in)
+{
+	size_t base = 0;
+	if (params.GetSize() < 1) { throw STEP::TypeError("expected 1 arguments to IfcUnitAssignment"); }    do { // convert the 'Units' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        try { GenericConvert( in->Units, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to IfcUnitAssignment to be a `SET [1:?] OF IfcUnit`")); }
+    } while(0);
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcBoundingBox>(const DB& db, const LIST& params, IfcBoundingBox* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcGeometricRepresentationItem*>(in));
+	if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to IfcBoundingBox"); }    do { // convert the 'Corner' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        try { GenericConvert( in->Corner, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to IfcBoundingBox to be a `IfcCartesianPoint`")); }
+    } while(0);
+    do { // convert the 'XDim' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        try { GenericConvert( in->XDim, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to IfcBoundingBox to be a `IfcPositiveLengthMeasure`")); }
+    } while(0);
+    do { // convert the 'YDim' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        try { GenericConvert( in->YDim, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to IfcBoundingBox to be a `IfcPositiveLengthMeasure`")); }
+    } while(0);
+    do { // convert the 'ZDim' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        try { GenericConvert( in->ZDim, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to IfcBoundingBox to be a `IfcPositiveLengthMeasure`")); }
+    } while(0);
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcShellBasedSurfaceModel>(const DB& db, const LIST& params, IfcShellBasedSurfaceModel* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcGeometricRepresentationItem*>(in));
+	if (params.GetSize() < 1) { throw STEP::TypeError("expected 1 arguments to IfcShellBasedSurfaceModel"); }    do { // convert the 'SbsmBoundary' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        try { GenericConvert( in->SbsmBoundary, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to IfcShellBasedSurfaceModel to be a `SET [1:?] OF IfcShell`")); }
+    } while(0);
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcFacetedBrep>(const DB& db, const LIST& params, IfcFacetedBrep* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcManifoldSolidBrep*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcTextLiteralWithExtent>(const DB& db, const LIST& params, IfcTextLiteralWithExtent* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcTextLiteral*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcElectricApplianceType>(const DB& db, const LIST& params, IfcElectricApplianceType* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcFlowTerminalType*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcTrapeziumProfileDef>(const DB& db, const LIST& params, IfcTrapeziumProfileDef* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcParameterizedProfileDef*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcRelContainedInSpatialStructure>(const DB& db, const LIST& params, IfcRelContainedInSpatialStructure* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcRelConnects*>(in));
+	if (params.GetSize() < 6) { throw STEP::TypeError("expected 6 arguments to IfcRelContainedInSpatialStructure"); }    do { // convert the 'RelatedElements' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        try { GenericConvert( in->RelatedElements, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 4 to IfcRelContainedInSpatialStructure to be a `SET [1:?] OF IfcProduct`")); }
+    } while(0);
+    do { // convert the 'RelatingStructure' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        try { GenericConvert( in->RelatingStructure, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 5 to IfcRelContainedInSpatialStructure to be a `IfcSpatialStructureElement`")); }
+    } while(0);
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcEdgeLoop>(const DB& db, const LIST& params, IfcEdgeLoop* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcLoop*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcProject>(const DB& db, const LIST& params, IfcProject* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcObject*>(in));
+	if (params.GetSize() < 9) { throw STEP::TypeError("expected 9 arguments to IfcProject"); }    do { // convert the 'LongName' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        if (dynamic_cast<const UNSET*>(&*arg)) break;
+        try { GenericConvert( in->LongName, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 5 to IfcProject to be a `IfcLabel`")); }
+    } while(0);
+    do { // convert the 'Phase' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        if (dynamic_cast<const UNSET*>(&*arg)) break;
+        try { GenericConvert( in->Phase, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 6 to IfcProject to be a `IfcLabel`")); }
+    } while(0);
+    do { // convert the 'RepresentationContexts' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        try { GenericConvert( in->RepresentationContexts, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 7 to IfcProject to be a `SET [1:?] OF IfcRepresentationContext`")); }
+    } while(0);
+    do { // convert the 'UnitsInContext' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        try { GenericConvert( in->UnitsInContext, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 8 to IfcProject to be a `IfcUnitAssignment`")); }
+    } while(0);
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcCartesianPoint>(const DB& db, const LIST& params, IfcCartesianPoint* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcPoint*>(in));
+	if (params.GetSize() < 1) { throw STEP::TypeError("expected 1 arguments to IfcCartesianPoint"); }    do { // convert the 'Coordinates' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        try { GenericConvert( in->Coordinates, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to IfcCartesianPoint to be a `LIST [1:3] OF IfcLengthMeasure`")); }
+    } while(0);
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcCurveBoundedPlane>(const DB& db, const LIST& params, IfcCurveBoundedPlane* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcBoundedSurface*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcWallType>(const DB& db, const LIST& params, IfcWallType* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcBuildingElementType*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcFillAreaStyleHatching>(const DB& db, const LIST& params, IfcFillAreaStyleHatching* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcGeometricRepresentationItem*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcEquipmentStandard>(const DB& db, const LIST& params, IfcEquipmentStandard* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcControl*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcDiameterDimension>(const DB& db, const LIST& params, IfcDiameterDimension* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcDimensionCurveDirectedCallout*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcStructuralLoadGroup>(const DB& db, const LIST& params, IfcStructuralLoadGroup* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcGroup*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcConstructionMaterialResource>(const DB& db, const LIST& params, IfcConstructionMaterialResource* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcConstructionResource*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcRelAggregates>(const DB& db, const LIST& params, IfcRelAggregates* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcRelDecomposes*>(in));
+	if (params.GetSize() < 6) { throw STEP::TypeError("expected 6 arguments to IfcRelAggregates"); }	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcBoilerType>(const DB& db, const LIST& params, IfcBoilerType* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcEnergyConversionDeviceType*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcColourSpecification>(const DB& db, const LIST& params, IfcColourSpecification* in)
+{
+	size_t base = 0;
+	if (params.GetSize() < 1) { throw STEP::TypeError("expected 1 arguments to IfcColourSpecification"); }    do { // convert the 'Name' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::IfcColourSpecification,1>::aux_is_derived[0]=true; break; }
+        if (dynamic_cast<const UNSET*>(&*arg)) break;
+        try { GenericConvert( in->Name, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to IfcColourSpecification to be a `IfcLabel`")); }
+    } while(0);
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcColourRgb>(const DB& db, const LIST& params, IfcColourRgb* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcColourSpecification*>(in));
+	if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to IfcColourRgb"); }    do { // convert the 'Red' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        try { GenericConvert( in->Red, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to IfcColourRgb to be a `IfcNormalisedRatioMeasure`")); }
+    } while(0);
+    do { // convert the 'Green' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        try { GenericConvert( in->Green, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to IfcColourRgb to be a `IfcNormalisedRatioMeasure`")); }
+    } while(0);
+    do { // convert the 'Blue' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        try { GenericConvert( in->Blue, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to IfcColourRgb to be a `IfcNormalisedRatioMeasure`")); }
+    } while(0);
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcDoorStyle>(const DB& db, const LIST& params, IfcDoorStyle* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcTypeProduct*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcDuctSilencerType>(const DB& db, const LIST& params, IfcDuctSilencerType* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcFlowTreatmentDeviceType*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcLightSourceGoniometric>(const DB& db, const LIST& params, IfcLightSourceGoniometric* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcLightSource*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcActuatorType>(const DB& db, const LIST& params, IfcActuatorType* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcDistributionControlElementType*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcSensorType>(const DB& db, const LIST& params, IfcSensorType* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcDistributionControlElementType*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcAirTerminalBoxType>(const DB& db, const LIST& params, IfcAirTerminalBoxType* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcFlowControllerType*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcAnnotationSurfaceOccurrence>(const DB& db, const LIST& params, IfcAnnotationSurfaceOccurrence* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcAnnotationOccurrence*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcZShapeProfileDef>(const DB& db, const LIST& params, IfcZShapeProfileDef* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcParameterizedProfileDef*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcRationalBezierCurve>(const DB& db, const LIST& params, IfcRationalBezierCurve* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcBezierCurve*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcCartesianTransformationOperator2D>(const DB& db, const LIST& params, IfcCartesianTransformationOperator2D* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcCartesianTransformationOperator*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcCartesianTransformationOperator2DnonUniform>(const DB& db, const LIST& params, IfcCartesianTransformationOperator2DnonUniform* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcCartesianTransformationOperator2D*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcMove>(const DB& db, const LIST& params, IfcMove* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcTask*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcCableCarrierSegmentType>(const DB& db, const LIST& params, IfcCableCarrierSegmentType* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcFlowSegmentType*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcElectricalElement>(const DB& db, const LIST& params, IfcElectricalElement* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcElement*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcChillerType>(const DB& db, const LIST& params, IfcChillerType* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcEnergyConversionDeviceType*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcReinforcingBar>(const DB& db, const LIST& params, IfcReinforcingBar* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcReinforcingElement*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcCShapeProfileDef>(const DB& db, const LIST& params, IfcCShapeProfileDef* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcParameterizedProfileDef*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcPermit>(const DB& db, const LIST& params, IfcPermit* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcControl*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcSlabType>(const DB& db, const LIST& params, IfcSlabType* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcBuildingElementType*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcLampType>(const DB& db, const LIST& params, IfcLampType* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcFlowTerminalType*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcPlanarExtent>(const DB& db, const LIST& params, IfcPlanarExtent* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcGeometricRepresentationItem*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcAlarmType>(const DB& db, const LIST& params, IfcAlarmType* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcDistributionControlElementType*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcElectricFlowStorageDeviceType>(const DB& db, const LIST& params, IfcElectricFlowStorageDeviceType* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcFlowStorageDeviceType*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcEquipmentElement>(const DB& db, const LIST& params, IfcEquipmentElement* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcElement*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcLightFixtureType>(const DB& db, const LIST& params, IfcLightFixtureType* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcFlowTerminalType*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcCurtainWall>(const DB& db, const LIST& params, IfcCurtainWall* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcBuildingElement*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcSlab>(const DB& db, const LIST& params, IfcSlab* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcBuildingElement*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcCurtainWallType>(const DB& db, const LIST& params, IfcCurtainWallType* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcBuildingElementType*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcOutletType>(const DB& db, const LIST& params, IfcOutletType* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcFlowTerminalType*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcCompressorType>(const DB& db, const LIST& params, IfcCompressorType* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcFlowMovingDeviceType*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcCraneRailAShapeProfileDef>(const DB& db, const LIST& params, IfcCraneRailAShapeProfileDef* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcParameterizedProfileDef*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcFlowSegment>(const DB& db, const LIST& params, IfcFlowSegment* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcDistributionFlowElement*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcSectionedSpine>(const DB& db, const LIST& params, IfcSectionedSpine* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcGeometricRepresentationItem*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcElectricTimeControlType>(const DB& db, const LIST& params, IfcElectricTimeControlType* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcFlowControllerType*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcFaceSurface>(const DB& db, const LIST& params, IfcFaceSurface* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcFace*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcMotorConnectionType>(const DB& db, const LIST& params, IfcMotorConnectionType* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcEnergyConversionDeviceType*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcFlowFitting>(const DB& db, const LIST& params, IfcFlowFitting* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcDistributionFlowElement*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcPointOnCurve>(const DB& db, const LIST& params, IfcPointOnCurve* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcPoint*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcTransportElementType>(const DB& db, const LIST& params, IfcTransportElementType* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcElementType*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcCableSegmentType>(const DB& db, const LIST& params, IfcCableSegmentType* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcFlowSegmentType*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcAnnotationSurface>(const DB& db, const LIST& params, IfcAnnotationSurface* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcGeometricRepresentationItem*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcCompositeCurveSegment>(const DB& db, const LIST& params, IfcCompositeCurveSegment* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcGeometricRepresentationItem*>(in));
+	if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to IfcCompositeCurveSegment"); }    do { // convert the 'Transition' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        try { GenericConvert( in->Transition, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to IfcCompositeCurveSegment to be a `IfcTransitionCode`")); }
+    } while(0);
+    do { // convert the 'SameSense' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        try { GenericConvert( in->SameSense, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to IfcCompositeCurveSegment to be a `BOOLEAN`")); }
+    } while(0);
+    do { // convert the 'ParentCurve' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        try { GenericConvert( in->ParentCurve, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to IfcCompositeCurveSegment to be a `IfcCurve`")); }
+    } while(0);
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcServiceLife>(const DB& db, const LIST& params, IfcServiceLife* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcControl*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcPlateType>(const DB& db, const LIST& params, IfcPlateType* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcBuildingElementType*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcVibrationIsolatorType>(const DB& db, const LIST& params, IfcVibrationIsolatorType* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcDiscreteAccessoryType*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcTrimmedCurve>(const DB& db, const LIST& params, IfcTrimmedCurve* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcBoundedCurve*>(in));
+	if (params.GetSize() < 5) { throw STEP::TypeError("expected 5 arguments to IfcTrimmedCurve"); }    do { // convert the 'BasisCurve' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        try { GenericConvert( in->BasisCurve, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to IfcTrimmedCurve to be a `IfcCurve`")); }
+    } while(0);
+    do { // convert the 'Trim1' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        try { GenericConvert( in->Trim1, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to IfcTrimmedCurve to be a `SET [1:2] OF IfcTrimmingSelect`")); }
+    } while(0);
+    do { // convert the 'Trim2' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        try { GenericConvert( in->Trim2, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to IfcTrimmedCurve to be a `SET [1:2] OF IfcTrimmingSelect`")); }
+    } while(0);
+    do { // convert the 'SenseAgreement' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        try { GenericConvert( in->SenseAgreement, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to IfcTrimmedCurve to be a `BOOLEAN`")); }
+    } while(0);
+    do { // convert the 'MasterRepresentation' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        try { GenericConvert( in->MasterRepresentation, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 4 to IfcTrimmedCurve to be a `IfcTrimmingPreference`")); }
+    } while(0);
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcMappedItem>(const DB& db, const LIST& params, IfcMappedItem* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcRepresentationItem*>(in));
+	if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to IfcMappedItem"); }    do { // convert the 'MappingSource' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        try { GenericConvert( in->MappingSource, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to IfcMappedItem to be a `IfcRepresentationMap`")); }
+    } while(0);
+    do { // convert the 'MappingTarget' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        try { GenericConvert( in->MappingTarget, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to IfcMappedItem to be a `IfcCartesianTransformationOperator`")); }
+    } while(0);
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcDirection>(const DB& db, const LIST& params, IfcDirection* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcGeometricRepresentationItem*>(in));
+	if (params.GetSize() < 1) { throw STEP::TypeError("expected 1 arguments to IfcDirection"); }    do { // convert the 'DirectionRatios' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        try { GenericConvert( in->DirectionRatios, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to IfcDirection to be a `LIST [2:3] OF REAL`")); }
+    } while(0);
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcBlock>(const DB& db, const LIST& params, IfcBlock* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcCsgPrimitive3D*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcProjectOrderRecord>(const DB& db, const LIST& params, IfcProjectOrderRecord* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcControl*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcFlowMeterType>(const DB& db, const LIST& params, IfcFlowMeterType* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcFlowControllerType*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcControllerType>(const DB& db, const LIST& params, IfcControllerType* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcDistributionControlElementType*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcBeam>(const DB& db, const LIST& params, IfcBeam* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcBuildingElement*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcArbitraryOpenProfileDef>(const DB& db, const LIST& params, IfcArbitraryOpenProfileDef* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcProfileDef*>(in));
+	if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to IfcArbitraryOpenProfileDef"); }    do { // convert the 'Curve' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::IfcArbitraryOpenProfileDef,1>::aux_is_derived[0]=true; break; }
+        try { GenericConvert( in->Curve, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to IfcArbitraryOpenProfileDef to be a `IfcBoundedCurve`")); }
+    } while(0);
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcCenterLineProfileDef>(const DB& db, const LIST& params, IfcCenterLineProfileDef* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcArbitraryOpenProfileDef*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcTimeSeriesSchedule>(const DB& db, const LIST& params, IfcTimeSeriesSchedule* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcControl*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcRoundedEdgeFeature>(const DB& db, const LIST& params, IfcRoundedEdgeFeature* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcEdgeFeature*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcIShapeProfileDef>(const DB& db, const LIST& params, IfcIShapeProfileDef* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcParameterizedProfileDef*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcSpaceHeaterType>(const DB& db, const LIST& params, IfcSpaceHeaterType* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcEnergyConversionDeviceType*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcFlowStorageDevice>(const DB& db, const LIST& params, IfcFlowStorageDevice* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcDistributionFlowElement*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcRevolvedAreaSolid>(const DB& db, const LIST& params, IfcRevolvedAreaSolid* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcSweptAreaSolid*>(in));
+	if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to IfcRevolvedAreaSolid"); }    do { // convert the 'Axis' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        try { GenericConvert( in->Axis, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to IfcRevolvedAreaSolid to be a `IfcAxis1Placement`")); }
+    } while(0);
+    do { // convert the 'Angle' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        try { GenericConvert( in->Angle, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to IfcRevolvedAreaSolid to be a `IfcPlaneAngleMeasure`")); }
+    } while(0);
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcDoor>(const DB& db, const LIST& params, IfcDoor* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcBuildingElement*>(in));
+	if (params.GetSize() < 10) { throw STEP::TypeError("expected 10 arguments to IfcDoor"); }    do { // convert the 'OverallHeight' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        if (dynamic_cast<const UNSET*>(&*arg)) break;
+        try { GenericConvert( in->OverallHeight, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 8 to IfcDoor to be a `IfcPositiveLengthMeasure`")); }
+    } while(0);
+    do { // convert the 'OverallWidth' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        if (dynamic_cast<const UNSET*>(&*arg)) break;
+        try { GenericConvert( in->OverallWidth, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 9 to IfcDoor to be a `IfcPositiveLengthMeasure`")); }
+    } while(0);
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcEllipse>(const DB& db, const LIST& params, IfcEllipse* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcConic*>(in));
+	if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to IfcEllipse"); }    do { // convert the 'SemiAxis1' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        try { GenericConvert( in->SemiAxis1, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to IfcEllipse to be a `IfcPositiveLengthMeasure`")); }
+    } while(0);
+    do { // convert the 'SemiAxis2' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        try { GenericConvert( in->SemiAxis2, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to IfcEllipse to be a `IfcPositiveLengthMeasure`")); }
+    } while(0);
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcTubeBundleType>(const DB& db, const LIST& params, IfcTubeBundleType* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcEnergyConversionDeviceType*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcAngularDimension>(const DB& db, const LIST& params, IfcAngularDimension* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcDimensionCurveDirectedCallout*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcFaceBasedSurfaceModel>(const DB& db, const LIST& params, IfcFaceBasedSurfaceModel* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcGeometricRepresentationItem*>(in));
+	if (params.GetSize() < 1) { throw STEP::TypeError("expected 1 arguments to IfcFaceBasedSurfaceModel"); }    do { // convert the 'FbsmFaces' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        try { GenericConvert( in->FbsmFaces, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to IfcFaceBasedSurfaceModel to be a `SET [1:?] OF IfcConnectedFaceSet`")); }
+    } while(0);
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcCraneRailFShapeProfileDef>(const DB& db, const LIST& params, IfcCraneRailFShapeProfileDef* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcParameterizedProfileDef*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcColumnType>(const DB& db, const LIST& params, IfcColumnType* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcBuildingElementType*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcTShapeProfileDef>(const DB& db, const LIST& params, IfcTShapeProfileDef* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcParameterizedProfileDef*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcEnergyConversionDevice>(const DB& db, const LIST& params, IfcEnergyConversionDevice* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcDistributionFlowElement*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcWorkSchedule>(const DB& db, const LIST& params, IfcWorkSchedule* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcWorkControl*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcZone>(const DB& db, const LIST& params, IfcZone* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcGroup*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcTransportElement>(const DB& db, const LIST& params, IfcTransportElement* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcElement*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcGeometricRepresentationSubContext>(const DB& db, const LIST& params, IfcGeometricRepresentationSubContext* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcGeometricRepresentationContext*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcLShapeProfileDef>(const DB& db, const LIST& params, IfcLShapeProfileDef* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcParameterizedProfileDef*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcGeometricCurveSet>(const DB& db, const LIST& params, IfcGeometricCurveSet* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcGeometricSet*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcActor>(const DB& db, const LIST& params, IfcActor* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcObject*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcOccupant>(const DB& db, const LIST& params, IfcOccupant* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcActor*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcBooleanClippingResult>(const DB& db, const LIST& params, IfcBooleanClippingResult* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcBooleanResult*>(in));
+	if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to IfcBooleanClippingResult"); }	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcAnnotationFillArea>(const DB& db, const LIST& params, IfcAnnotationFillArea* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcGeometricRepresentationItem*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcLightSourceSpot>(const DB& db, const LIST& params, IfcLightSourceSpot* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcLightSourcePositional*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcFireSuppressionTerminalType>(const DB& db, const LIST& params, IfcFireSuppressionTerminalType* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcFlowTerminalType*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcElectricGeneratorType>(const DB& db, const LIST& params, IfcElectricGeneratorType* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcEnergyConversionDeviceType*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcInventory>(const DB& db, const LIST& params, IfcInventory* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcGroup*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcPolyline>(const DB& db, const LIST& params, IfcPolyline* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcBoundedCurve*>(in));
+	if (params.GetSize() < 1) { throw STEP::TypeError("expected 1 arguments to IfcPolyline"); }    do { // convert the 'Points' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        try { GenericConvert( in->Points, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to IfcPolyline to be a `LIST [2:?] OF IfcCartesianPoint`")); }
+    } while(0);
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcBoxedHalfSpace>(const DB& db, const LIST& params, IfcBoxedHalfSpace* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcHalfSpaceSolid*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcAirTerminalType>(const DB& db, const LIST& params, IfcAirTerminalType* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcFlowTerminalType*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcDistributionPort>(const DB& db, const LIST& params, IfcDistributionPort* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcPort*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcCostItem>(const DB& db, const LIST& params, IfcCostItem* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcControl*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcStructuredDimensionCallout>(const DB& db, const LIST& params, IfcStructuredDimensionCallout* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcDraughtingCallout*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcStructuralResultGroup>(const DB& db, const LIST& params, IfcStructuralResultGroup* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcGroup*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcOrientedEdge>(const DB& db, const LIST& params, IfcOrientedEdge* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcEdge*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcCsgSolid>(const DB& db, const LIST& params, IfcCsgSolid* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcSolidModel*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcPlanarBox>(const DB& db, const LIST& params, IfcPlanarBox* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcPlanarExtent*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcMaterialDefinitionRepresentation>(const DB& db, const LIST& params, IfcMaterialDefinitionRepresentation* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcProductRepresentation*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcAsymmetricIShapeProfileDef>(const DB& db, const LIST& params, IfcAsymmetricIShapeProfileDef* in)
+{
+	size_t base = GenericFill(db,params,static_cast<IfcIShapeProfileDef*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+	return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcRepresentationMap>(const DB& db, const LIST& params, IfcRepresentationMap* in)
+{
+	size_t base = 0;
+	if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to IfcRepresentationMap"); }    do { // convert the 'MappingOrigin' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        try { GenericConvert( in->MappingOrigin, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to IfcRepresentationMap to be a `IfcAxis2Placement`")); }
+    } while(0);
+    do { // convert the 'MappedRepresentation' argument
+        boost::shared_ptr<const DataType> arg = params[base++];
+        try { GenericConvert( in->MappedRepresentation, arg, db ); break; } 
+        catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to IfcRepresentationMap to be a `IfcRepresentation`")); }
+    } while(0);
+	return base;
+}
+
+} // ! STEP
+} // ! Assimp
+
+#endif

+ 4259 - 0
ThirdParty/Assimp/code/IFCReaderGen.h

@@ -0,0 +1,4259 @@
+/*
+Open Asset Import Library (ASSIMP)
+----------------------------------------------------------------------
+
+Copyright (c) 2006-2010, ASSIMP Development Team
+All rights reserved.
+
+Redistribution and use of this software in source and binary forms, 
+with or without modification, are permitted provided that the 
+following conditions are met:
+
+* Redistributions of source code must retain the above
+  copyright notice, this list of conditions and the
+  following disclaimer.
+
+* Redistributions in binary form must reproduce the above
+  copyright notice, this list of conditions and the
+  following disclaimer in the documentation and/or other
+  materials provided with the distribution.
+
+* Neither the name of the ASSIMP team, nor the names of its
+  contributors may be used to endorse or promote products
+  derived from this software without specific prior
+  written permission of the ASSIMP Development Team.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+----------------------------------------------------------------------
+*/
+
+/** MACHINE-GENERATED by scripts/ICFImporter/CppGenerator.py */
+
+#ifndef INCLUDED_IFC_READER_GEN_H
+#define INCLUDED_IFC_READER_GEN_H
+
+#include "STEPFile.h"
+
+namespace Assimp {
+namespace IFC {
+	using namespace STEP;
+	using namespace STEP::EXPRESS;
+	
+	
+	struct NotImplemented : public ObjectHelper<NotImplemented,0> {
+		
+	};
+	
+
+	// ******************************************************************************
+	// IFC Custom data types
+	// ******************************************************************************
+
+
+    // C++ wrapper type for IfcSoundPowerMeasure
+    typedef REAL IfcSoundPowerMeasure;
+    // C++ wrapper type for IfcDoorStyleOperationEnum
+    typedef ENUMERATION IfcDoorStyleOperationEnum;
+    // C++ wrapper type for IfcRotationalFrequencyMeasure
+    typedef REAL IfcRotationalFrequencyMeasure;
+    // C++ wrapper type for IfcCharacterStyleSelect
+    typedef SELECT IfcCharacterStyleSelect;
+    // C++ wrapper type for IfcElectricTimeControlTypeEnum
+    typedef ENUMERATION IfcElectricTimeControlTypeEnum;
+    // C++ wrapper type for IfcAirTerminalTypeEnum
+    typedef ENUMERATION IfcAirTerminalTypeEnum;
+    // C++ wrapper type for IfcProjectOrderTypeEnum
+    typedef ENUMERATION IfcProjectOrderTypeEnum;
+    // C++ wrapper type for IfcSequenceEnum
+    typedef ENUMERATION IfcSequenceEnum;
+    // C++ wrapper type for IfcSpecificHeatCapacityMeasure
+    typedef REAL IfcSpecificHeatCapacityMeasure;
+    // C++ wrapper type for IfcHeatingValueMeasure
+    typedef REAL IfcHeatingValueMeasure;
+    // C++ wrapper type for IfcRibPlateDirectionEnum
+    typedef ENUMERATION IfcRibPlateDirectionEnum;
+    // C++ wrapper type for IfcSensorTypeEnum
+    typedef ENUMERATION IfcSensorTypeEnum;
+    // C++ wrapper type for IfcElectricHeaterTypeEnum
+    typedef ENUMERATION IfcElectricHeaterTypeEnum;
+    // C++ wrapper type for IfcObjectiveEnum
+    typedef ENUMERATION IfcObjectiveEnum;
+    // C++ wrapper type for IfcTextStyleSelect
+    typedef SELECT IfcTextStyleSelect;
+    // C++ wrapper type for IfcColumnTypeEnum
+    typedef ENUMERATION IfcColumnTypeEnum;
+    // C++ wrapper type for IfcGasTerminalTypeEnum
+    typedef ENUMERATION IfcGasTerminalTypeEnum;
+    // C++ wrapper type for IfcMassDensityMeasure
+    typedef REAL IfcMassDensityMeasure;
+    // C++ wrapper type for IfcSimpleValue
+    typedef SELECT IfcSimpleValue;
+    // C++ wrapper type for IfcElectricConductanceMeasure
+    typedef REAL IfcElectricConductanceMeasure;
+    // C++ wrapper type for IfcBuildingElementProxyTypeEnum
+    typedef ENUMERATION IfcBuildingElementProxyTypeEnum;
+    // C++ wrapper type for IfcJunctionBoxTypeEnum
+    typedef ENUMERATION IfcJunctionBoxTypeEnum;
+    // C++ wrapper type for IfcModulusOfElasticityMeasure
+    typedef REAL IfcModulusOfElasticityMeasure;
+    // C++ wrapper type for IfcActionSourceTypeEnum
+    typedef ENUMERATION IfcActionSourceTypeEnum;
+    // C++ wrapper type for IfcSIUnitName
+    typedef ENUMERATION IfcSIUnitName;
+    // C++ wrapper type for IfcRotationalMassMeasure
+    typedef REAL IfcRotationalMassMeasure;
+    // C++ wrapper type for IfcMemberTypeEnum
+    typedef ENUMERATION IfcMemberTypeEnum;
+    // C++ wrapper type for IfcTextDecoration
+    typedef STRING IfcTextDecoration;
+    // C++ wrapper type for IfcPositiveLengthMeasure
+    typedef REAL IfcPositiveLengthMeasure;
+    // C++ wrapper type for IfcAmountOfSubstanceMeasure
+    typedef REAL IfcAmountOfSubstanceMeasure;
+    // C++ wrapper type for IfcDoorStyleConstructionEnum
+    typedef ENUMERATION IfcDoorStyleConstructionEnum;
+    // C++ wrapper type for IfcAngularVelocityMeasure
+    typedef REAL IfcAngularVelocityMeasure;
+    // C++ wrapper type for IfcDirectionSenseEnum
+    typedef ENUMERATION IfcDirectionSenseEnum;
+    // C++ wrapper type for IfcNullStyle
+    typedef ENUMERATION IfcNullStyle;
+    // C++ wrapper type for IfcMonthInYearNumber
+    typedef INTEGER IfcMonthInYearNumber;
+    // C++ wrapper type for IfcRampFlightTypeEnum
+    typedef ENUMERATION IfcRampFlightTypeEnum;
+    // C++ wrapper type for IfcWindowStyleOperationEnum
+    typedef ENUMERATION IfcWindowStyleOperationEnum;
+    // C++ wrapper type for IfcCurvatureMeasure
+    typedef REAL IfcCurvatureMeasure;
+    // C++ wrapper type for IfcBooleanOperator
+    typedef ENUMERATION IfcBooleanOperator;
+    // C++ wrapper type for IfcDuctFittingTypeEnum
+    typedef ENUMERATION IfcDuctFittingTypeEnum;
+    // C++ wrapper type for IfcCurrencyEnum
+    typedef ENUMERATION IfcCurrencyEnum;
+    // C++ wrapper type for IfcObjectTypeEnum
+    typedef ENUMERATION IfcObjectTypeEnum;
+    // C++ wrapper type for IfcThermalLoadTypeEnum
+    typedef ENUMERATION IfcThermalLoadTypeEnum;
+    // C++ wrapper type for IfcIonConcentrationMeasure
+    typedef REAL IfcIonConcentrationMeasure;
+    // C++ wrapper type for IfcObjectReferenceSelect
+    typedef SELECT IfcObjectReferenceSelect;
+    // C++ wrapper type for IfcClassificationNotationSelect
+    typedef SELECT IfcClassificationNotationSelect;
+    // C++ wrapper type for IfcBSplineCurveForm
+    typedef ENUMERATION IfcBSplineCurveForm;
+    // C++ wrapper type for IfcElementCompositionEnum
+    typedef ENUMERATION IfcElementCompositionEnum;
+    // C++ wrapper type for IfcDraughtingCalloutElement
+    typedef SELECT IfcDraughtingCalloutElement;
+    // C++ wrapper type for IfcFillStyleSelect
+    typedef SELECT IfcFillStyleSelect;
+    // C++ wrapper type for IfcHeatFluxDensityMeasure
+    typedef REAL IfcHeatFluxDensityMeasure;
+    // C++ wrapper type for IfcGeometricProjectionEnum
+    typedef ENUMERATION IfcGeometricProjectionEnum;
+    // C++ wrapper type for IfcFontVariant
+    typedef STRING IfcFontVariant;
+    // C++ wrapper type for IfcThermalResistanceMeasure
+    typedef REAL IfcThermalResistanceMeasure;
+    // C++ wrapper type for IfcReflectanceMethodEnum
+    typedef ENUMERATION IfcReflectanceMethodEnum;
+    // C++ wrapper type for IfcSlabTypeEnum
+    typedef ENUMERATION IfcSlabTypeEnum;
+    // C++ wrapper type for IfcPositiveRatioMeasure
+    typedef REAL IfcPositiveRatioMeasure;
+    // C++ wrapper type for IfcInternalOrExternalEnum
+    typedef ENUMERATION IfcInternalOrExternalEnum;
+    // C++ wrapper type for IfcDimensionExtentUsage
+    typedef ENUMERATION IfcDimensionExtentUsage;
+    // C++ wrapper type for IfcPipeFittingTypeEnum
+    typedef ENUMERATION IfcPipeFittingTypeEnum;
+    // C++ wrapper type for IfcSanitaryTerminalTypeEnum
+    typedef ENUMERATION IfcSanitaryTerminalTypeEnum;
+    // C++ wrapper type for IfcMinuteInHour
+    typedef INTEGER IfcMinuteInHour;
+    // C++ wrapper type for IfcWallTypeEnum
+    typedef ENUMERATION IfcWallTypeEnum;
+    // C++ wrapper type for IfcMolecularWeightMeasure
+    typedef REAL IfcMolecularWeightMeasure;
+    // C++ wrapper type for IfcUnitaryEquipmentTypeEnum
+    typedef ENUMERATION IfcUnitaryEquipmentTypeEnum;
+    // C++ wrapper type for IfcProcedureTypeEnum
+    typedef ENUMERATION IfcProcedureTypeEnum;
+    // C++ wrapper type for IfcDistributionChamberElementTypeEnum
+    typedef ENUMERATION IfcDistributionChamberElementTypeEnum;
+    // C++ wrapper type for IfcTextPath
+    typedef ENUMERATION IfcTextPath;
+    // C++ wrapper type for IfcCostScheduleTypeEnum
+    typedef ENUMERATION IfcCostScheduleTypeEnum;
+    // C++ wrapper type for IfcShell
+    typedef SELECT IfcShell;
+    // C++ wrapper type for IfcLinearMomentMeasure
+    typedef REAL IfcLinearMomentMeasure;
+    // C++ wrapper type for IfcElectricCurrentMeasure
+    typedef REAL IfcElectricCurrentMeasure;
+    // C++ wrapper type for IfcDaylightSavingHour
+    typedef INTEGER IfcDaylightSavingHour;
+    // C++ wrapper type for IfcNormalisedRatioMeasure
+    typedef REAL IfcNormalisedRatioMeasure;
+    // C++ wrapper type for IfcFanTypeEnum
+    typedef ENUMERATION IfcFanTypeEnum;
+    // C++ wrapper type for IfcContextDependentMeasure
+    typedef REAL IfcContextDependentMeasure;
+    // C++ wrapper type for IfcAheadOrBehind
+    typedef ENUMERATION IfcAheadOrBehind;
+    // C++ wrapper type for IfcFontStyle
+    typedef STRING IfcFontStyle;
+    // C++ wrapper type for IfcCooledBeamTypeEnum
+    typedef ENUMERATION IfcCooledBeamTypeEnum;
+    // C++ wrapper type for IfcSurfaceStyleElementSelect
+    typedef SELECT IfcSurfaceStyleElementSelect;
+    // C++ wrapper type for IfcYearNumber
+    typedef INTEGER IfcYearNumber;
+    // C++ wrapper type for IfcLabel
+    typedef STRING IfcLabel;
+    // C++ wrapper type for IfcTimeStamp
+    typedef INTEGER IfcTimeStamp;
+    // C++ wrapper type for IfcFireSuppressionTerminalTypeEnum
+    typedef ENUMERATION IfcFireSuppressionTerminalTypeEnum;
+    // C++ wrapper type for IfcDocumentConfidentialityEnum
+    typedef ENUMERATION IfcDocumentConfidentialityEnum;
+    // C++ wrapper type for IfcColourOrFactor
+    typedef SELECT IfcColourOrFactor;
+    // C++ wrapper type for IfcAirTerminalBoxTypeEnum
+    typedef ENUMERATION IfcAirTerminalBoxTypeEnum;
+    // C++ wrapper type for IfcNumericMeasure
+    typedef NUMBER IfcNumericMeasure;
+    // C++ wrapper type for IfcDerivedUnitEnum
+    typedef ENUMERATION IfcDerivedUnitEnum;
+    // C++ wrapper type for IfcCurveOrEdgeCurve
+    typedef SELECT IfcCurveOrEdgeCurve;
+    // C++ wrapper type for IfcLightEmissionSourceEnum
+    typedef ENUMERATION IfcLightEmissionSourceEnum;
+    // C++ wrapper type for IfcKinematicViscosityMeasure
+    typedef REAL IfcKinematicViscosityMeasure;
+    // C++ wrapper type for IfcBoxAlignment
+    typedef STRING IfcBoxAlignment;
+    // C++ wrapper type for IfcDocumentSelect
+    typedef SELECT IfcDocumentSelect;
+    // C++ wrapper type for IfcCableCarrierFittingTypeEnum
+    typedef ENUMERATION IfcCableCarrierFittingTypeEnum;
+    // C++ wrapper type for IfcPumpTypeEnum
+    typedef ENUMERATION IfcPumpTypeEnum;
+    // C++ wrapper type for IfcHourInDay
+    typedef INTEGER IfcHourInDay;
+    // C++ wrapper type for IfcProjectOrderRecordTypeEnum
+    typedef ENUMERATION IfcProjectOrderRecordTypeEnum;
+    // C++ wrapper type for IfcWindowStyleConstructionEnum
+    typedef ENUMERATION IfcWindowStyleConstructionEnum;
+    // C++ wrapper type for IfcPresentationStyleSelect
+    typedef SELECT IfcPresentationStyleSelect;
+    // C++ wrapper type for IfcCableSegmentTypeEnum
+    typedef ENUMERATION IfcCableSegmentTypeEnum;
+    // C++ wrapper type for IfcWasteTerminalTypeEnum
+    typedef ENUMERATION IfcWasteTerminalTypeEnum;
+    // C++ wrapper type for IfcIsothermalMoistureCapacityMeasure
+    typedef REAL IfcIsothermalMoistureCapacityMeasure;
+    // C++ wrapper type for IfcIdentifier
+    typedef STRING IfcIdentifier;
+    // C++ wrapper type for IfcRadioActivityMeasure
+    typedef REAL IfcRadioActivityMeasure;
+    // C++ wrapper type for IfcSymbolStyleSelect
+    typedef SELECT IfcSymbolStyleSelect;
+    // C++ wrapper type for IfcRoofTypeEnum
+    typedef ENUMERATION IfcRoofTypeEnum;
+    // C++ wrapper type for IfcReal
+    typedef REAL IfcReal;
+    // C++ wrapper type for IfcRoleEnum
+    typedef ENUMERATION IfcRoleEnum;
+    // C++ wrapper type for IfcMeasureValue
+    typedef SELECT IfcMeasureValue;
+    // C++ wrapper type for IfcPileTypeEnum
+    typedef ENUMERATION IfcPileTypeEnum;
+    // C++ wrapper type for IfcElectricCurrentEnum
+    typedef ENUMERATION IfcElectricCurrentEnum;
+    // C++ wrapper type for IfcTextTransformation
+    typedef STRING IfcTextTransformation;
+    // C++ wrapper type for IfcFilterTypeEnum
+    typedef ENUMERATION IfcFilterTypeEnum;
+    // C++ wrapper type for IfcTransformerTypeEnum
+    typedef ENUMERATION IfcTransformerTypeEnum;
+    // C++ wrapper type for IfcSurfaceSide
+    typedef ENUMERATION IfcSurfaceSide;
+    // C++ wrapper type for IfcThermalTransmittanceMeasure
+    typedef REAL IfcThermalTransmittanceMeasure;
+    // C++ wrapper type for IfcTubeBundleTypeEnum
+    typedef ENUMERATION IfcTubeBundleTypeEnum;
+    // C++ wrapper type for IfcLightFixtureTypeEnum
+    typedef ENUMERATION IfcLightFixtureTypeEnum;
+    // C++ wrapper type for IfcInductanceMeasure
+    typedef REAL IfcInductanceMeasure;
+    // C++ wrapper type for IfcGlobalOrLocalEnum
+    typedef ENUMERATION IfcGlobalOrLocalEnum;
+    // C++ wrapper type for IfcOutletTypeEnum
+    typedef ENUMERATION IfcOutletTypeEnum;
+    // C++ wrapper type for IfcWorkControlTypeEnum
+    typedef ENUMERATION IfcWorkControlTypeEnum;
+    // C++ wrapper type for IfcWarpingMomentMeasure
+    typedef REAL IfcWarpingMomentMeasure;
+    // C++ wrapper type for IfcDynamicViscosityMeasure
+    typedef REAL IfcDynamicViscosityMeasure;
+    // C++ wrapper type for IfcEnergySequenceEnum
+    typedef ENUMERATION IfcEnergySequenceEnum;
+    // C++ wrapper type for IfcFillAreaStyleTileShapeSelect
+    typedef SELECT IfcFillAreaStyleTileShapeSelect;
+    // C++ wrapper type for IfcPointOrVertexPoint
+    typedef SELECT IfcPointOrVertexPoint;
+    // C++ wrapper type for IfcVibrationIsolatorTypeEnum
+    typedef ENUMERATION IfcVibrationIsolatorTypeEnum;
+    // C++ wrapper type for IfcTankTypeEnum
+    typedef ENUMERATION IfcTankTypeEnum;
+    // C++ wrapper type for IfcTimeSeriesDataTypeEnum
+    typedef ENUMERATION IfcTimeSeriesDataTypeEnum;
+    // C++ wrapper type for IfcSurfaceTextureEnum
+    typedef ENUMERATION IfcSurfaceTextureEnum;
+    // C++ wrapper type for IfcAddressTypeEnum
+    typedef ENUMERATION IfcAddressTypeEnum;
+    // C++ wrapper type for IfcChillerTypeEnum
+    typedef ENUMERATION IfcChillerTypeEnum;
+    // C++ wrapper type for IfcLightDistributionCurveEnum
+    typedef ENUMERATION IfcLightDistributionCurveEnum;
+    // C++ wrapper type for IfcReinforcingBarRoleEnum
+    typedef ENUMERATION IfcReinforcingBarRoleEnum;
+    // C++ wrapper type for IfcResourceConsumptionEnum
+    typedef ENUMERATION IfcResourceConsumptionEnum;
+    // C++ wrapper type for IfcCsgSelect
+    typedef SELECT IfcCsgSelect;
+    // C++ wrapper type for IfcModulusOfLinearSubgradeReactionMeasure
+    typedef REAL IfcModulusOfLinearSubgradeReactionMeasure;
+    // C++ wrapper type for IfcEvaporatorTypeEnum
+    typedef ENUMERATION IfcEvaporatorTypeEnum;
+    // C++ wrapper type for IfcTimeSeriesScheduleTypeEnum
+    typedef ENUMERATION IfcTimeSeriesScheduleTypeEnum;
+    // C++ wrapper type for IfcDayInMonthNumber
+    typedef INTEGER IfcDayInMonthNumber;
+    // C++ wrapper type for IfcElectricMotorTypeEnum
+    typedef ENUMERATION IfcElectricMotorTypeEnum;
+    // C++ wrapper type for IfcThermalConductivityMeasure
+    typedef REAL IfcThermalConductivityMeasure;
+    // C++ wrapper type for IfcEnergyMeasure
+    typedef REAL IfcEnergyMeasure;
+    // C++ wrapper type for IfcRotationalStiffnessMeasure
+    typedef REAL IfcRotationalStiffnessMeasure;
+    // C++ wrapper type for IfcDerivedMeasureValue
+    typedef SELECT IfcDerivedMeasureValue;
+    // C++ wrapper type for IfcDoorPanelOperationEnum
+    typedef ENUMERATION IfcDoorPanelOperationEnum;
+    // C++ wrapper type for IfcCurveStyleFontSelect
+    typedef SELECT IfcCurveStyleFontSelect;
+    // C++ wrapper type for IfcWindowPanelOperationEnum
+    typedef ENUMERATION IfcWindowPanelOperationEnum;
+    // C++ wrapper type for IfcDataOriginEnum
+    typedef ENUMERATION IfcDataOriginEnum;
+    // C++ wrapper type for IfcStairTypeEnum
+    typedef ENUMERATION IfcStairTypeEnum;
+    // C++ wrapper type for IfcRailingTypeEnum
+    typedef ENUMERATION IfcRailingTypeEnum;
+    // C++ wrapper type for IfcPowerMeasure
+    typedef REAL IfcPowerMeasure;
+    // C++ wrapper type for IfcStackTerminalTypeEnum
+    typedef ENUMERATION IfcStackTerminalTypeEnum;
+    // C++ wrapper type for IfcHatchLineDistanceSelect
+    typedef SELECT IfcHatchLineDistanceSelect;
+    // C++ wrapper type for IfcTrimmingSelect
+    typedef SELECT IfcTrimmingSelect;
+    // C++ wrapper type for IfcThermalExpansionCoefficientMeasure
+    typedef REAL IfcThermalExpansionCoefficientMeasure;
+    // C++ wrapper type for IfcLightDistributionDataSourceSelect
+    typedef SELECT IfcLightDistributionDataSourceSelect;
+    // C++ wrapper type for IfcTorqueMeasure
+    typedef REAL IfcTorqueMeasure;
+    // C++ wrapper type for IfcMassPerLengthMeasure
+    typedef REAL IfcMassPerLengthMeasure;
+    // C++ wrapper type for IfcValveTypeEnum
+    typedef ENUMERATION IfcValveTypeEnum;
+    // C++ wrapper type for IfcWindowPanelPositionEnum
+    typedef ENUMERATION IfcWindowPanelPositionEnum;
+    // C++ wrapper type for IfcSurfaceOrFaceSurface
+    typedef SELECT IfcSurfaceOrFaceSurface;
+    // C++ wrapper type for IfcPropertySourceEnum
+    typedef ENUMERATION IfcPropertySourceEnum;
+    // C++ wrapper type for IfcCableCarrierSegmentTypeEnum
+    typedef ENUMERATION IfcCableCarrierSegmentTypeEnum;
+    // C++ wrapper type for IfcCountMeasure
+    typedef NUMBER IfcCountMeasure;
+    // C++ wrapper type for IfcFontWeight
+    typedef STRING IfcFontWeight;
+    // C++ wrapper type for IfcPhysicalOrVirtualEnum
+    typedef ENUMERATION IfcPhysicalOrVirtualEnum;
+    // C++ wrapper type for IfcSpaceTypeEnum
+    typedef ENUMERATION IfcSpaceTypeEnum;
+    // C++ wrapper type for IfcVolumetricFlowRateMeasure
+    typedef REAL IfcVolumetricFlowRateMeasure;
+    // C++ wrapper type for IfcLuminousFluxMeasure
+    typedef REAL IfcLuminousFluxMeasure;
+    // C++ wrapper type for IfcEvaporativeCoolerTypeEnum
+    typedef ENUMERATION IfcEvaporativeCoolerTypeEnum;
+    // C++ wrapper type for IfcLayeredItem
+    typedef SELECT IfcLayeredItem;
+    // C++ wrapper type for IfcModulusOfSubgradeReactionMeasure
+    typedef REAL IfcModulusOfSubgradeReactionMeasure;
+    // C++ wrapper type for IfcHeatExchangerTypeEnum
+    typedef ENUMERATION IfcHeatExchangerTypeEnum;
+    // C++ wrapper type for IfcProtectiveDeviceTypeEnum
+    typedef ENUMERATION IfcProtectiveDeviceTypeEnum;
+    // C++ wrapper type for IfcDamperTypeEnum
+    typedef ENUMERATION IfcDamperTypeEnum;
+    // C++ wrapper type for IfcControllerTypeEnum
+    typedef ENUMERATION IfcControllerTypeEnum;
+    // C++ wrapper type for IfcMassFlowRateMeasure
+    typedef REAL IfcMassFlowRateMeasure;
+    // C++ wrapper type for IfcAssemblyPlaceEnum
+    typedef ENUMERATION IfcAssemblyPlaceEnum;
+    // C++ wrapper type for IfcAreaMeasure
+    typedef REAL IfcAreaMeasure;
+    // C++ wrapper type for IfcServiceLifeFactorTypeEnum
+    typedef ENUMERATION IfcServiceLifeFactorTypeEnum;
+    // C++ wrapper type for IfcVolumeMeasure
+    typedef REAL IfcVolumeMeasure;
+    // C++ wrapper type for IfcBeamTypeEnum
+    typedef ENUMERATION IfcBeamTypeEnum;
+    // C++ wrapper type for IfcStateEnum
+    typedef ENUMERATION IfcStateEnum;
+    // C++ wrapper type for IfcSpaceHeaterTypeEnum
+    typedef ENUMERATION IfcSpaceHeaterTypeEnum;
+    // C++ wrapper type for IfcSectionTypeEnum
+    typedef ENUMERATION IfcSectionTypeEnum;
+    // C++ wrapper type for IfcFootingTypeEnum
+    typedef ENUMERATION IfcFootingTypeEnum;
+    // C++ wrapper type for IfcMonetaryMeasure
+    typedef REAL IfcMonetaryMeasure;
+    // C++ wrapper type for IfcLoadGroupTypeEnum
+    typedef ENUMERATION IfcLoadGroupTypeEnum;
+    // C++ wrapper type for IfcElectricGeneratorTypeEnum
+    typedef ENUMERATION IfcElectricGeneratorTypeEnum;
+    // C++ wrapper type for IfcFlowMeterTypeEnum
+    typedef ENUMERATION IfcFlowMeterTypeEnum;
+    // C++ wrapper type for IfcMaterialSelect
+    typedef SELECT IfcMaterialSelect;
+    // C++ wrapper type for IfcAnalysisModelTypeEnum
+    typedef ENUMERATION IfcAnalysisModelTypeEnum;
+    // C++ wrapper type for IfcTemperatureGradientMeasure
+    typedef REAL IfcTemperatureGradientMeasure;
+    // C++ wrapper type for IfcModulusOfRotationalSubgradeReactionMeasure
+    typedef REAL IfcModulusOfRotationalSubgradeReactionMeasure;
+    // C++ wrapper type for IfcColour
+    typedef SELECT IfcColour;
+    // C++ wrapper type for IfcCurtainWallTypeEnum
+    typedef ENUMERATION IfcCurtainWallTypeEnum;
+    // C++ wrapper type for IfcMetricValueSelect
+    typedef SELECT IfcMetricValueSelect;
+    // C++ wrapper type for IfcTextAlignment
+    typedef STRING IfcTextAlignment;
+    // C++ wrapper type for IfcDoorPanelPositionEnum
+    typedef ENUMERATION IfcDoorPanelPositionEnum;
+    // C++ wrapper type for IfcPlateTypeEnum
+    typedef ENUMERATION IfcPlateTypeEnum;
+    // C++ wrapper type for IfcSectionalAreaIntegralMeasure
+    typedef REAL IfcSectionalAreaIntegralMeasure;
+    // C++ wrapper type for IfcPresentableText
+    typedef STRING IfcPresentableText;
+    // C++ wrapper type for IfcVaporPermeabilityMeasure
+    typedef REAL IfcVaporPermeabilityMeasure;
+    // C++ wrapper type for IfcStructuralSurfaceTypeEnum
+    typedef ENUMERATION IfcStructuralSurfaceTypeEnum;
+    // C++ wrapper type for IfcLinearVelocityMeasure
+    typedef REAL IfcLinearVelocityMeasure;
+    // C++ wrapper type for IfcIntegerCountRateMeasure
+    typedef INTEGER IfcIntegerCountRateMeasure;
+    // C++ wrapper type for IfcAirToAirHeatRecoveryTypeEnum
+    typedef ENUMERATION IfcAirToAirHeatRecoveryTypeEnum;
+    // C++ wrapper type for IfcDocumentStatusEnum
+    typedef ENUMERATION IfcDocumentStatusEnum;
+    // C++ wrapper type for IfcLengthMeasure
+    typedef REAL IfcLengthMeasure;
+    // C++ wrapper type for IfcPlanarForceMeasure
+    typedef REAL IfcPlanarForceMeasure;
+    // C++ wrapper type for IfcBooleanOperand
+    typedef SELECT IfcBooleanOperand;
+    // C++ wrapper type for IfcInteger
+    typedef INTEGER IfcInteger;
+    // C++ wrapper type for IfcRampTypeEnum
+    typedef ENUMERATION IfcRampTypeEnum;
+    // C++ wrapper type for IfcActorSelect
+    typedef SELECT IfcActorSelect;
+    // C++ wrapper type for IfcElectricChargeMeasure
+    typedef REAL IfcElectricChargeMeasure;
+    // C++ wrapper type for IfcGeometricSetSelect
+    typedef SELECT IfcGeometricSetSelect;
+    // C++ wrapper type for IfcConnectionTypeEnum
+    typedef ENUMERATION IfcConnectionTypeEnum;
+    // C++ wrapper type for IfcValue
+    typedef SELECT IfcValue;
+    // C++ wrapper type for IfcCoolingTowerTypeEnum
+    typedef ENUMERATION IfcCoolingTowerTypeEnum;
+    // C++ wrapper type for IfcPlaneAngleMeasure
+    typedef REAL IfcPlaneAngleMeasure;
+    // C++ wrapper type for IfcSwitchingDeviceTypeEnum
+    typedef ENUMERATION IfcSwitchingDeviceTypeEnum;
+    // C++ wrapper type for IfcFlowDirectionEnum
+    typedef ENUMERATION IfcFlowDirectionEnum;
+    // C++ wrapper type for IfcThermalLoadSourceEnum
+    typedef ENUMERATION IfcThermalLoadSourceEnum;
+    // C++ wrapper type for IfcTextFontSelect
+    typedef SELECT IfcTextFontSelect;
+    // C++ wrapper type for IfcSpecularHighlightSelect
+    typedef SELECT IfcSpecularHighlightSelect;
+    // C++ wrapper type for IfcAnalysisTheoryTypeEnum
+    typedef ENUMERATION IfcAnalysisTheoryTypeEnum;
+    // C++ wrapper type for IfcTextFontName
+    typedef STRING IfcTextFontName;
+    // C++ wrapper type for IfcElectricVoltageMeasure
+    typedef REAL IfcElectricVoltageMeasure;
+    // C++ wrapper type for IfcTendonTypeEnum
+    typedef ENUMERATION IfcTendonTypeEnum;
+    // C++ wrapper type for IfcSoundPressureMeasure
+    typedef REAL IfcSoundPressureMeasure;
+    // C++ wrapper type for IfcElectricDistributionPointFunctionEnum
+    typedef ENUMERATION IfcElectricDistributionPointFunctionEnum;
+    // C++ wrapper type for IfcSpecularRoughness
+    typedef REAL IfcSpecularRoughness;
+    // C++ wrapper type for IfcActionTypeEnum
+    typedef ENUMERATION IfcActionTypeEnum;
+    // C++ wrapper type for IfcReinforcingBarSurfaceEnum
+    typedef ENUMERATION IfcReinforcingBarSurfaceEnum;
+    // C++ wrapper type for IfcHumidifierTypeEnum
+    typedef ENUMERATION IfcHumidifierTypeEnum;
+    // C++ wrapper type for IfcIlluminanceMeasure
+    typedef REAL IfcIlluminanceMeasure;
+    // C++ wrapper type for IfcLibrarySelect
+    typedef SELECT IfcLibrarySelect;
+    // C++ wrapper type for IfcText
+    typedef STRING IfcText;
+    // C++ wrapper type for IfcLayerSetDirectionEnum
+    typedef ENUMERATION IfcLayerSetDirectionEnum;
+    // C++ wrapper type for IfcBoilerTypeEnum
+    typedef ENUMERATION IfcBoilerTypeEnum;
+    // C++ wrapper type for IfcTimeMeasure
+    typedef REAL IfcTimeMeasure;
+    // C++ wrapper type for IfcAccelerationMeasure
+    typedef REAL IfcAccelerationMeasure;
+    // C++ wrapper type for IfcElectricFlowStorageDeviceTypeEnum
+    typedef ENUMERATION IfcElectricFlowStorageDeviceTypeEnum;
+    // C++ wrapper type for IfcLuminousIntensityMeasure
+    typedef REAL IfcLuminousIntensityMeasure;
+    // C++ wrapper type for IfcDefinedSymbolSelect
+    typedef SELECT IfcDefinedSymbolSelect;
+    // C++ wrapper type for IfcUnitEnum
+    typedef ENUMERATION IfcUnitEnum;
+    // C++ wrapper type for IfcInventoryTypeEnum
+    typedef ENUMERATION IfcInventoryTypeEnum;
+    // C++ wrapper type for IfcStructuralActivityAssignmentSelect
+    typedef SELECT IfcStructuralActivityAssignmentSelect;
+    // C++ wrapper type for IfcElementAssemblyTypeEnum
+    typedef ENUMERATION IfcElementAssemblyTypeEnum;
+    // C++ wrapper type for IfcServiceLifeTypeEnum
+    typedef ENUMERATION IfcServiceLifeTypeEnum;
+    // C++ wrapper type for IfcCoveringTypeEnum
+    typedef ENUMERATION IfcCoveringTypeEnum;
+    // C++ wrapper type for IfcStairFlightTypeEnum
+    typedef ENUMERATION IfcStairFlightTypeEnum;
+    // C++ wrapper type for IfcSIPrefix
+    typedef ENUMERATION IfcSIPrefix;
+    // C++ wrapper type for IfcElectricCapacitanceMeasure
+    typedef REAL IfcElectricCapacitanceMeasure;
+    // C++ wrapper type for IfcFlowInstrumentTypeEnum
+    typedef ENUMERATION IfcFlowInstrumentTypeEnum;
+    // C++ wrapper type for IfcThermodynamicTemperatureMeasure
+    typedef REAL IfcThermodynamicTemperatureMeasure;
+    // C++ wrapper type for IfcGloballyUniqueId
+    typedef STRING IfcGloballyUniqueId;
+    // C++ wrapper type for IfcLampTypeEnum
+    typedef ENUMERATION IfcLampTypeEnum;
+    // C++ wrapper type for IfcMagneticFluxMeasure
+    typedef REAL IfcMagneticFluxMeasure;
+    // C++ wrapper type for IfcSolidAngleMeasure
+    typedef REAL IfcSolidAngleMeasure;
+    // C++ wrapper type for IfcFrequencyMeasure
+    typedef REAL IfcFrequencyMeasure;
+    // C++ wrapper type for IfcTransportElementTypeEnum
+    typedef ENUMERATION IfcTransportElementTypeEnum;
+    // C++ wrapper type for IfcSoundScaleEnum
+    typedef ENUMERATION IfcSoundScaleEnum;
+    // C++ wrapper type for IfcPHMeasure
+    typedef REAL IfcPHMeasure;
+    // C++ wrapper type for IfcActuatorTypeEnum
+    typedef ENUMERATION IfcActuatorTypeEnum;
+    // C++ wrapper type for IfcPositivePlaneAngleMeasure
+    typedef REAL IfcPositivePlaneAngleMeasure;
+    // C++ wrapper type for IfcAppliedValueSelect
+    typedef SELECT IfcAppliedValueSelect;
+    // C++ wrapper type for IfcSecondInMinute
+    typedef REAL IfcSecondInMinute;
+    // C++ wrapper type for IfcDuctSegmentTypeEnum
+    typedef ENUMERATION IfcDuctSegmentTypeEnum;
+    // C++ wrapper type for IfcThermalAdmittanceMeasure
+    typedef REAL IfcThermalAdmittanceMeasure;
+    // C++ wrapper type for IfcSpecularExponent
+    typedef REAL IfcSpecularExponent;
+    // C++ wrapper type for IfcDateTimeSelect
+    typedef SELECT IfcDateTimeSelect;
+    // C++ wrapper type for IfcTransitionCode
+    typedef ENUMERATION IfcTransitionCode;
+    // C++ wrapper type for IfcDimensionCount
+    typedef INTEGER IfcDimensionCount;
+    // C++ wrapper type for IfcLinearStiffnessMeasure
+    typedef REAL IfcLinearStiffnessMeasure;
+    // C++ wrapper type for IfcCompoundPlaneAngleMeasure
+    typedef ListOf< INTEGER, 3, 3 > IfcCompoundPlaneAngleMeasure;
+    // C++ wrapper type for IfcElectricApplianceTypeEnum
+    typedef ENUMERATION IfcElectricApplianceTypeEnum;
+    // C++ wrapper type for IfcProfileTypeEnum
+    typedef ENUMERATION IfcProfileTypeEnum;
+    // C++ wrapper type for IfcCurveFontOrScaledCurveFontSelect
+    typedef SELECT IfcCurveFontOrScaledCurveFontSelect;
+    // C++ wrapper type for IfcProjectedOrTrueLengthEnum
+    typedef ENUMERATION IfcProjectedOrTrueLengthEnum;
+    // C++ wrapper type for IfcAbsorbedDoseMeasure
+    typedef REAL IfcAbsorbedDoseMeasure;
+    // C++ wrapper type for IfcParameterValue
+    typedef REAL IfcParameterValue;
+    // C++ wrapper type for IfcPileConstructionEnum
+    typedef ENUMERATION IfcPileConstructionEnum;
+    // C++ wrapper type for IfcMotorConnectionTypeEnum
+    typedef ENUMERATION IfcMotorConnectionTypeEnum;
+    // C++ wrapper type for IfcOccupantTypeEnum
+    typedef ENUMERATION IfcOccupantTypeEnum;
+    // C++ wrapper type for IfcUnit
+    typedef SELECT IfcUnit;
+    // C++ wrapper type for IfcLinearForceMeasure
+    typedef REAL IfcLinearForceMeasure;
+    // C++ wrapper type for IfcCondenserTypeEnum
+    typedef ENUMERATION IfcCondenserTypeEnum;
+    // C++ wrapper type for IfcDescriptiveMeasure
+    typedef STRING IfcDescriptiveMeasure;
+    // C++ wrapper type for IfcMomentOfInertiaMeasure
+    typedef REAL IfcMomentOfInertiaMeasure;
+    // C++ wrapper type for IfcDoseEquivalentMeasure
+    typedef REAL IfcDoseEquivalentMeasure;
+    // C++ wrapper type for IfcOrientationSelect
+    typedef SELECT IfcOrientationSelect;
+    // C++ wrapper type for IfcLogical
+    typedef LOGICAL IfcLogical;
+    // C++ wrapper type for IfcSizeSelect
+    typedef SELECT IfcSizeSelect;
+    // C++ wrapper type for IfcEnvironmentalImpactCategoryEnum
+    typedef ENUMERATION IfcEnvironmentalImpactCategoryEnum;
+    // C++ wrapper type for IfcLogicalOperatorEnum
+    typedef ENUMERATION IfcLogicalOperatorEnum;
+    // C++ wrapper type for IfcCompressorTypeEnum
+    typedef ENUMERATION IfcCompressorTypeEnum;
+    // C++ wrapper type for IfcBenchmarkEnum
+    typedef ENUMERATION IfcBenchmarkEnum;
+    // C++ wrapper type for IfcRatioMeasure
+    typedef REAL IfcRatioMeasure;
+    // C++ wrapper type for IfcVectorOrDirection
+    typedef SELECT IfcVectorOrDirection;
+    // C++ wrapper type for IfcConstraintEnum
+    typedef ENUMERATION IfcConstraintEnum;
+    // C++ wrapper type for IfcAlarmTypeEnum
+    typedef ENUMERATION IfcAlarmTypeEnum;
+    // C++ wrapper type for IfcLuminousIntensityDistributionMeasure
+    typedef REAL IfcLuminousIntensityDistributionMeasure;
+    // C++ wrapper type for IfcArithmeticOperatorEnum
+    typedef ENUMERATION IfcArithmeticOperatorEnum;
+    // C++ wrapper type for IfcAxis2Placement
+    typedef SELECT IfcAxis2Placement;
+    // C++ wrapper type for IfcForceMeasure
+    typedef REAL IfcForceMeasure;
+    // C++ wrapper type for IfcTrimmingPreference
+    typedef ENUMERATION IfcTrimmingPreference;
+    // C++ wrapper type for IfcElectricResistanceMeasure
+    typedef REAL IfcElectricResistanceMeasure;
+    // C++ wrapper type for IfcWarpingConstantMeasure
+    typedef REAL IfcWarpingConstantMeasure;
+    // C++ wrapper type for IfcPipeSegmentTypeEnum
+    typedef ENUMERATION IfcPipeSegmentTypeEnum;
+    // C++ wrapper type for IfcConditionCriterionSelect
+    typedef SELECT IfcConditionCriterionSelect;
+    // C++ wrapper type for IfcShearModulusMeasure
+    typedef REAL IfcShearModulusMeasure;
+    // C++ wrapper type for IfcPressureMeasure
+    typedef REAL IfcPressureMeasure;
+    // C++ wrapper type for IfcDuctSilencerTypeEnum
+    typedef ENUMERATION IfcDuctSilencerTypeEnum;
+    // C++ wrapper type for IfcBoolean
+    typedef BOOLEAN IfcBoolean;
+    // C++ wrapper type for IfcSectionModulusMeasure
+    typedef REAL IfcSectionModulusMeasure;
+    // C++ wrapper type for IfcChangeActionEnum
+    typedef ENUMERATION IfcChangeActionEnum;
+    // C++ wrapper type for IfcCoilTypeEnum
+    typedef ENUMERATION IfcCoilTypeEnum;
+    // C++ wrapper type for IfcMassMeasure
+    typedef REAL IfcMassMeasure;
+    // C++ wrapper type for IfcStructuralCurveTypeEnum
+    typedef ENUMERATION IfcStructuralCurveTypeEnum;
+    // C++ wrapper type for IfcPermeableCoveringOperationEnum
+    typedef ENUMERATION IfcPermeableCoveringOperationEnum;
+    // C++ wrapper type for IfcMagneticFluxDensityMeasure
+    typedef REAL IfcMagneticFluxDensityMeasure;
+    // C++ wrapper type for IfcMoistureDiffusivityMeasure
+    typedef REAL IfcMoistureDiffusivityMeasure;
+
+
+	// ******************************************************************************
+	// IFC Entities
+	// ******************************************************************************
+
+	struct IfcRoot;
+	struct IfcObjectDefinition;
+	struct IfcTypeObject;
+	struct IfcTypeProduct;
+	struct IfcElementType;
+	struct IfcFurnishingElementType;
+	struct IfcFurnitureType;
+	struct IfcObject;
+	struct IfcProduct;
+	struct IfcGrid;
+	struct IfcRepresentationItem;
+	struct IfcGeometricRepresentationItem;
+	struct IfcOneDirectionRepeatFactor;
+	struct IfcTwoDirectionRepeatFactor;
+	struct IfcElement;
+	struct IfcElementComponent;
+	typedef NotImplemented IfcLocalTime; // (not currently used by Assimp)
+	struct IfcSpatialStructureElementType;
+	struct IfcControl;
+	struct IfcActionRequest;
+	typedef NotImplemented IfcTextureVertex; // (not currently used by Assimp)
+	typedef NotImplemented IfcPropertyDefinition; // (not currently used by Assimp)
+	typedef NotImplemented IfcPropertySetDefinition; // (not currently used by Assimp)
+	typedef NotImplemented IfcFluidFlowProperties; // (not currently used by Assimp)
+	typedef NotImplemented IfcDocumentInformation; // (not currently used by Assimp)
+	typedef NotImplemented IfcCalendarDate; // (not currently used by Assimp)
+	struct IfcDistributionElementType;
+	struct IfcDistributionFlowElementType;
+	struct IfcEnergyConversionDeviceType;
+	struct IfcCooledBeamType;
+	struct IfcCsgPrimitive3D;
+	struct IfcRectangularPyramid;
+	typedef NotImplemented IfcStructuralLoad; // (not currently used by Assimp)
+	typedef NotImplemented IfcStructuralLoadStatic; // (not currently used by Assimp)
+	typedef NotImplemented IfcStructuralLoadLinearForce; // (not currently used by Assimp)
+	struct IfcSurface;
+	struct IfcBoundedSurface;
+	struct IfcRectangularTrimmedSurface;
+	typedef NotImplemented IfcPhysicalQuantity; // (not currently used by Assimp)
+	typedef NotImplemented IfcPhysicalSimpleQuantity; // (not currently used by Assimp)
+	typedef NotImplemented IfcQuantityVolume; // (not currently used by Assimp)
+	typedef NotImplemented IfcQuantityArea; // (not currently used by Assimp)
+	struct IfcGroup;
+	struct IfcRelationship;
+	typedef NotImplemented IfcRelAssigns; // (not currently used by Assimp)
+	typedef NotImplemented IfcRelAssignsToActor; // (not currently used by Assimp)
+	struct IfcHalfSpaceSolid;
+	struct IfcPolygonalBoundedHalfSpace;
+	typedef NotImplemented IfcEnergyProperties; // (not currently used by Assimp)
+	struct IfcAirToAirHeatRecoveryType;
+	struct IfcFlowFittingType;
+	struct IfcPipeFittingType;
+	struct IfcRepresentation;
+	struct IfcStyleModel;
+	struct IfcStyledRepresentation;
+	typedef NotImplemented IfcRelAssignsToControl; // (not currently used by Assimp)
+	typedef NotImplemented IfcRelAssignsToProjectOrder; // (not currently used by Assimp)
+	typedef NotImplemented IfcDimensionalExponents; // (not currently used by Assimp)
+	struct IfcBooleanResult;
+	typedef NotImplemented IfcSoundProperties; // (not currently used by Assimp)
+	struct IfcFeatureElement;
+	struct IfcFeatureElementSubtraction;
+	struct IfcOpeningElement;
+	struct IfcConditionCriterion;
+	struct IfcFlowTerminalType;
+	struct IfcFlowControllerType;
+	struct IfcSwitchingDeviceType;
+	struct IfcSystem;
+	struct IfcElectricalCircuit;
+	typedef NotImplemented IfcActorRole; // (not currently used by Assimp)
+	typedef NotImplemented IfcDateAndTime; // (not currently used by Assimp)
+	typedef NotImplemented IfcDraughtingCalloutRelationship; // (not currently used by Assimp)
+	typedef NotImplemented IfcDimensionCalloutRelationship; // (not currently used by Assimp)
+	typedef NotImplemented IfcDerivedUnitElement; // (not currently used by Assimp)
+	typedef NotImplemented IfcExternalReference; // (not currently used by Assimp)
+	typedef NotImplemented IfcClassificationReference; // (not currently used by Assimp)
+	struct IfcUnitaryEquipmentType;
+	typedef NotImplemented IfcProperty; // (not currently used by Assimp)
+	struct IfcPort;
+	typedef NotImplemented IfcAddress; // (not currently used by Assimp)
+	struct IfcPlacement;
+	typedef NotImplemented IfcPreDefinedItem; // (not currently used by Assimp)
+	typedef NotImplemented IfcPreDefinedColour; // (not currently used by Assimp)
+	typedef NotImplemented IfcDraughtingPreDefinedColour; // (not currently used by Assimp)
+	struct IfcProfileDef;
+	struct IfcArbitraryClosedProfileDef;
+	struct IfcCurve;
+	struct IfcConic;
+	struct IfcCircle;
+	typedef NotImplemented IfcAppliedValue; // (not currently used by Assimp)
+	typedef NotImplemented IfcEnvironmentalImpactValue; // (not currently used by Assimp)
+	typedef NotImplemented IfcSimpleProperty; // (not currently used by Assimp)
+	typedef NotImplemented IfcPropertySingleValue; // (not currently used by Assimp)
+	struct IfcElementarySurface;
+	struct IfcPlane;
+	typedef NotImplemented IfcPropertyBoundedValue; // (not currently used by Assimp)
+	struct IfcCostSchedule;
+	typedef NotImplemented IfcMonetaryUnit; // (not currently used by Assimp)
+	typedef NotImplemented IfcConnectionGeometry; // (not currently used by Assimp)
+	typedef NotImplemented IfcConnectionCurveGeometry; // (not currently used by Assimp)
+	struct IfcRightCircularCone;
+	struct IfcElementAssembly;
+	struct IfcBuildingElement;
+	struct IfcMember;
+	typedef NotImplemented IfcPropertyDependencyRelationship; // (not currently used by Assimp)
+	struct IfcBuildingElementProxy;
+	struct IfcStructuralActivity;
+	struct IfcStructuralAction;
+	struct IfcStructuralPlanarAction;
+	struct IfcTopologicalRepresentationItem;
+	struct IfcConnectedFaceSet;
+	struct IfcSweptSurface;
+	struct IfcSurfaceOfLinearExtrusion;
+	struct IfcArbitraryProfileDefWithVoids;
+	struct IfcProcess;
+	struct IfcProcedure;
+	typedef NotImplemented IfcCurveStyleFontPattern; // (not currently used by Assimp)
+	struct IfcVector;
+	struct IfcFaceBound;
+	struct IfcFaceOuterBound;
+	struct IfcFeatureElementAddition;
+	struct IfcNamedUnit;
+	struct IfcConversionBasedUnit;
+	typedef NotImplemented IfcStructuralLoadSingleForce; // (not currently used by Assimp)
+	struct IfcHeatExchangerType;
+	struct IfcPresentationStyleAssignment;
+	struct IfcFlowTreatmentDeviceType;
+	struct IfcFilterType;
+	struct IfcResource;
+	struct IfcEvaporativeCoolerType;
+	typedef NotImplemented IfcTextureCoordinate; // (not currently used by Assimp)
+	typedef NotImplemented IfcTextureCoordinateGenerator; // (not currently used by Assimp)
+	struct IfcOffsetCurve2D;
+	struct IfcEdge;
+	struct IfcSubedge;
+	struct IfcProxy;
+	struct IfcLine;
+	struct IfcColumn;
+	typedef NotImplemented IfcClassificationNotationFacet; // (not currently used by Assimp)
+	struct IfcObjectPlacement;
+	struct IfcGridPlacement;
+	struct IfcDistributionControlElementType;
+	typedef NotImplemented IfcStructuralLoadSingleForceWarping; // (not currently used by Assimp)
+	typedef NotImplemented IfcExternallyDefinedTextFont; // (not currently used by Assimp)
+	struct IfcRelConnects;
+	typedef NotImplemented IfcRelConnectsElements; // (not currently used by Assimp)
+	typedef NotImplemented IfcRelConnectsWithRealizingElements; // (not currently used by Assimp)
+	typedef NotImplemented IfcConstraintClassificationRelationship; // (not currently used by Assimp)
+	struct IfcAnnotation;
+	struct IfcPlate;
+	struct IfcSolidModel;
+	struct IfcManifoldSolidBrep;
+	typedef NotImplemented IfcPreDefinedCurveFont; // (not currently used by Assimp)
+	typedef NotImplemented IfcBoundaryCondition; // (not currently used by Assimp)
+	typedef NotImplemented IfcBoundaryFaceCondition; // (not currently used by Assimp)
+	struct IfcFlowStorageDeviceType;
+	struct IfcStructuralItem;
+	struct IfcStructuralMember;
+	struct IfcStructuralCurveMember;
+	struct IfcStructuralConnection;
+	struct IfcStructuralSurfaceConnection;
+	struct IfcCoilType;
+	struct IfcDuctFittingType;
+	struct IfcStyledItem;
+	struct IfcAnnotationOccurrence;
+	struct IfcAnnotationCurveOccurrence;
+	struct IfcDimensionCurve;
+	struct IfcBoundedCurve;
+	struct IfcAxis1Placement;
+	typedef NotImplemented IfcLightIntensityDistribution; // (not currently used by Assimp)
+	typedef NotImplemented IfcPreDefinedSymbol; // (not currently used by Assimp)
+	struct IfcStructuralPointAction;
+	struct IfcSpatialStructureElement;
+	struct IfcSpace;
+	struct IfcContextDependentUnit;
+	typedef NotImplemented IfcVirtualGridIntersection; // (not currently used by Assimp)
+	typedef NotImplemented IfcRelAssociates; // (not currently used by Assimp)
+	typedef NotImplemented IfcRelAssociatesClassification; // (not currently used by Assimp)
+	struct IfcCoolingTowerType;
+	typedef NotImplemented IfcMaterialProperties; // (not currently used by Assimp)
+	typedef NotImplemented IfcGeneralMaterialProperties; // (not currently used by Assimp)
+	struct IfcFacetedBrepWithVoids;
+	typedef NotImplemented IfcProfileProperties; // (not currently used by Assimp)
+	typedef NotImplemented IfcGeneralProfileProperties; // (not currently used by Assimp)
+	typedef NotImplemented IfcStructuralProfileProperties; // (not currently used by Assimp)
+	struct IfcValveType;
+	struct IfcSystemFurnitureElementType;
+	struct IfcDiscreteAccessory;
+	typedef NotImplemented IfcPerson; // (not currently used by Assimp)
+	struct IfcBuildingElementType;
+	struct IfcRailingType;
+	struct IfcGasTerminalType;
+	typedef NotImplemented IfcTimeSeries; // (not currently used by Assimp)
+	typedef NotImplemented IfcIrregularTimeSeries; // (not currently used by Assimp)
+	struct IfcSpaceProgram;
+	struct IfcCovering;
+	typedef NotImplemented IfcShapeAspect; // (not currently used by Assimp)
+	struct IfcPresentationStyle;
+	typedef NotImplemented IfcClassificationItemRelationship; // (not currently used by Assimp)
+	struct IfcElectricHeaterType;
+	struct IfcBuildingStorey;
+	struct IfcVertex;
+	struct IfcVertexPoint;
+	struct IfcFlowInstrumentType;
+	struct IfcParameterizedProfileDef;
+	struct IfcUShapeProfileDef;
+	struct IfcRamp;
+	typedef NotImplemented IfcFillAreaStyle; // (not currently used by Assimp)
+	struct IfcCompositeCurve;
+	typedef NotImplemented IfcRelServicesBuildings; // (not currently used by Assimp)
+	struct IfcStructuralCurveMemberVarying;
+	typedef NotImplemented IfcRelReferencedInSpatialStructure; // (not currently used by Assimp)
+	struct IfcRampFlightType;
+	struct IfcDraughtingCallout;
+	struct IfcDimensionCurveDirectedCallout;
+	struct IfcRadiusDimension;
+	struct IfcEdgeFeature;
+	struct IfcSweptAreaSolid;
+	struct IfcExtrudedAreaSolid;
+	typedef NotImplemented IfcQuantityCount; // (not currently used by Assimp)
+	struct IfcAnnotationTextOccurrence;
+	typedef NotImplemented IfcReferencesValueDocument; // (not currently used by Assimp)
+	struct IfcStair;
+	typedef NotImplemented IfcSymbolStyle; // (not currently used by Assimp)
+	struct IfcFillAreaStyleTileSymbolWithStyle;
+	struct IfcAnnotationSymbolOccurrence;
+	struct IfcTerminatorSymbol;
+	struct IfcDimensionCurveTerminator;
+	struct IfcRectangleProfileDef;
+	struct IfcRectangleHollowProfileDef;
+	typedef NotImplemented IfcRelAssociatesLibrary; // (not currently used by Assimp)
+	struct IfcLocalPlacement;
+	typedef NotImplemented IfcOpticalMaterialProperties; // (not currently used by Assimp)
+	typedef NotImplemented IfcServiceLifeFactor; // (not currently used by Assimp)
+	typedef NotImplemented IfcRelAssignsTasks; // (not currently used by Assimp)
+	struct IfcTask;
+	struct IfcAnnotationFillAreaOccurrence;
+	struct IfcFace;
+	struct IfcFlowSegmentType;
+	struct IfcDuctSegmentType;
+	typedef NotImplemented IfcPropertyEnumeration; // (not currently used by Assimp)
+	struct IfcConstructionResource;
+	struct IfcConstructionEquipmentResource;
+	struct IfcSanitaryTerminalType;
+	typedef NotImplemented IfcPreDefinedDimensionSymbol; // (not currently used by Assimp)
+	typedef NotImplemented IfcOrganization; // (not currently used by Assimp)
+	struct IfcCircleProfileDef;
+	struct IfcStructuralReaction;
+	struct IfcStructuralPointReaction;
+	struct IfcRailing;
+	struct IfcTextLiteral;
+	struct IfcCartesianTransformationOperator;
+	typedef NotImplemented IfcCostValue; // (not currently used by Assimp)
+	typedef NotImplemented IfcTextStyle; // (not currently used by Assimp)
+	struct IfcLinearDimension;
+	struct IfcDamperType;
+	struct IfcSIUnit;
+	typedef NotImplemented IfcSurfaceStyleLighting; // (not currently used by Assimp)
+	struct IfcMeasureWithUnit;
+	typedef NotImplemented IfcMaterialLayerSet; // (not currently used by Assimp)
+	struct IfcDistributionElement;
+	struct IfcDistributionControlElement;
+	struct IfcTransformerType;
+	struct IfcLaborResource;
+	struct IfcDerivedProfileDef;
+	typedef NotImplemented IfcRelConnectsStructuralMember; // (not currently used by Assimp)
+	typedef NotImplemented IfcRelConnectsWithEccentricity; // (not currently used by Assimp)
+	struct IfcFurnitureStandard;
+	struct IfcStairFlightType;
+	struct IfcWorkControl;
+	struct IfcWorkPlan;
+	typedef NotImplemented IfcRelDefines; // (not currently used by Assimp)
+	typedef NotImplemented IfcRelDefinesByProperties; // (not currently used by Assimp)
+	struct IfcCondition;
+	typedef NotImplemented IfcGridAxis; // (not currently used by Assimp)
+	struct IfcRelVoidsElement;
+	struct IfcWindow;
+	typedef NotImplemented IfcRelFlowControlElements; // (not currently used by Assimp)
+	typedef NotImplemented IfcRelConnectsPortToElement; // (not currently used by Assimp)
+	struct IfcProtectiveDeviceType;
+	struct IfcJunctionBoxType;
+	struct IfcStructuralAnalysisModel;
+	struct IfcAxis2Placement2D;
+	struct IfcSpaceType;
+	struct IfcEllipseProfileDef;
+	struct IfcDistributionFlowElement;
+	struct IfcFlowMovingDevice;
+	struct IfcSurfaceStyleWithTextures;
+	struct IfcGeometricSet;
+	typedef NotImplemented IfcMechanicalMaterialProperties; // (not currently used by Assimp)
+	typedef NotImplemented IfcMechanicalConcreteMaterialProperties; // (not currently used by Assimp)
+	typedef NotImplemented IfcRibPlateProfileProperties; // (not currently used by Assimp)
+	typedef NotImplemented IfcDocumentInformationRelationship; // (not currently used by Assimp)
+	struct IfcProjectOrder;
+	struct IfcBSplineCurve;
+	struct IfcBezierCurve;
+	struct IfcStructuralPointConnection;
+	struct IfcFlowController;
+	struct IfcElectricDistributionPoint;
+	struct IfcSite;
+	struct IfcOffsetCurve3D;
+	typedef NotImplemented IfcPropertySet; // (not currently used by Assimp)
+	typedef NotImplemented IfcConnectionSurfaceGeometry; // (not currently used by Assimp)
+	struct IfcVirtualElement;
+	struct IfcConstructionProductResource;
+	typedef NotImplemented IfcWaterProperties; // (not currently used by Assimp)
+	struct IfcSurfaceCurveSweptAreaSolid;
+	typedef NotImplemented IfcPermeableCoveringProperties; // (not currently used by Assimp)
+	struct IfcCartesianTransformationOperator3D;
+	struct IfcCartesianTransformationOperator3DnonUniform;
+	struct IfcCrewResource;
+	struct IfcStructuralSurfaceMember;
+	struct Ifc2DCompositeCurve;
+	struct IfcRepresentationContext;
+	struct IfcGeometricRepresentationContext;
+	struct IfcFlowTreatmentDevice;
+	typedef NotImplemented IfcTextStyleForDefinedFont; // (not currently used by Assimp)
+	struct IfcRightCircularCylinder;
+	struct IfcWasteTerminalType;
+	typedef NotImplemented IfcSpaceThermalLoadProperties; // (not currently used by Assimp)
+	typedef NotImplemented IfcConstraintRelationship; // (not currently used by Assimp)
+	struct IfcBuildingElementComponent;
+	struct IfcBuildingElementPart;
+	struct IfcWall;
+	struct IfcWallStandardCase;
+	typedef NotImplemented IfcApprovalActorRelationship; // (not currently used by Assimp)
+	struct IfcPath;
+	struct IfcDefinedSymbol;
+	struct IfcStructuralSurfaceMemberVarying;
+	struct IfcPoint;
+	struct IfcSurfaceOfRevolution;
+	struct IfcFlowTerminal;
+	struct IfcFurnishingElement;
+	typedef NotImplemented IfcCurveStyleFont; // (not currently used by Assimp)
+	struct IfcSurfaceStyleShading;
+	struct IfcSurfaceStyleRendering;
+	typedef NotImplemented IfcCoordinatedUniversalTimeOffset; // (not currently used by Assimp)
+	typedef NotImplemented IfcStructuralLoadSingleDisplacement; // (not currently used by Assimp)
+	struct IfcCircleHollowProfileDef;
+	struct IfcFlowMovingDeviceType;
+	struct IfcFanType;
+	struct IfcStructuralPlanarActionVarying;
+	struct IfcProductRepresentation;
+	typedef NotImplemented IfcRelDefinesByType; // (not currently used by Assimp)
+	typedef NotImplemented IfcPreDefinedTextFont; // (not currently used by Assimp)
+	typedef NotImplemented IfcTextStyleFontModel; // (not currently used by Assimp)
+	struct IfcStackTerminalType;
+	typedef NotImplemented IfcApprovalPropertyRelationship; // (not currently used by Assimp)
+	typedef NotImplemented IfcExternallyDefinedSymbol; // (not currently used by Assimp)
+	struct IfcReinforcingElement;
+	struct IfcReinforcingMesh;
+	struct IfcOrderAction;
+	typedef NotImplemented IfcRelCoversBldgElements; // (not currently used by Assimp)
+	struct IfcLightSource;
+	struct IfcLightSourceDirectional;
+	struct IfcLoop;
+	struct IfcVertexLoop;
+	struct IfcChamferEdgeFeature;
+	typedef NotImplemented IfcWindowPanelProperties; // (not currently used by Assimp)
+	typedef NotImplemented IfcClassification; // (not currently used by Assimp)
+	struct IfcElementComponentType;
+	struct IfcFastenerType;
+	struct IfcMechanicalFastenerType;
+	struct IfcScheduleTimeControl;
+	struct IfcSurfaceStyle;
+	typedef NotImplemented IfcReinforcementBarProperties; // (not currently used by Assimp)
+	struct IfcOpenShell;
+	typedef NotImplemented IfcLibraryReference; // (not currently used by Assimp)
+	struct IfcSubContractResource;
+	typedef NotImplemented IfcTimeSeriesReferenceRelationship; // (not currently used by Assimp)
+	struct IfcSweptDiskSolid;
+	struct IfcCompositeProfileDef;
+	typedef NotImplemented IfcElectricalBaseProperties; // (not currently used by Assimp)
+	typedef NotImplemented IfcPreDefinedPointMarkerSymbol; // (not currently used by Assimp)
+	struct IfcTankType;
+	typedef NotImplemented IfcBoundaryNodeCondition; // (not currently used by Assimp)
+	typedef NotImplemented IfcBoundaryNodeConditionWarping; // (not currently used by Assimp)
+	typedef NotImplemented IfcRelAssignsToGroup; // (not currently used by Assimp)
+	typedef NotImplemented IfcPresentationLayerAssignment; // (not currently used by Assimp)
+	struct IfcSphere;
+	struct IfcPolyLoop;
+	struct IfcCableCarrierFittingType;
+	struct IfcHumidifierType;
+	typedef NotImplemented IfcPropertyListValue; // (not currently used by Assimp)
+	typedef NotImplemented IfcPropertyConstraintRelationship; // (not currently used by Assimp)
+	struct IfcPerformanceHistory;
+	struct IfcShapeModel;
+	struct IfcTopologyRepresentation;
+	struct IfcBuilding;
+	struct IfcRoundedRectangleProfileDef;
+	struct IfcStairFlight;
+	typedef NotImplemented IfcSurfaceStyleRefraction; // (not currently used by Assimp)
+	typedef NotImplemented IfcRelInteractionRequirements; // (not currently used by Assimp)
+	typedef NotImplemented IfcConstraint; // (not currently used by Assimp)
+	typedef NotImplemented IfcObjective; // (not currently used by Assimp)
+	typedef NotImplemented IfcConnectionPortGeometry; // (not currently used by Assimp)
+	struct IfcDistributionChamberElement;
+	typedef NotImplemented IfcPersonAndOrganization; // (not currently used by Assimp)
+	struct IfcShapeRepresentation;
+	struct IfcRampFlight;
+	struct IfcBeamType;
+	struct IfcRelDecomposes;
+	struct IfcRoof;
+	struct IfcFooting;
+	typedef NotImplemented IfcRelCoversSpaces; // (not currently used by Assimp)
+	struct IfcLightSourceAmbient;
+	typedef NotImplemented IfcTimeSeriesValue; // (not currently used by Assimp)
+	struct IfcWindowStyle;
+	typedef NotImplemented IfcPropertyReferenceValue; // (not currently used by Assimp)
+	typedef NotImplemented IfcApproval; // (not currently used by Assimp)
+	typedef NotImplemented IfcRelConnectsStructuralElement; // (not currently used by Assimp)
+	struct IfcBuildingElementProxyType;
+	typedef NotImplemented IfcRelAssociatesProfileProperties; // (not currently used by Assimp)
+	struct IfcAxis2Placement3D;
+	typedef NotImplemented IfcRelConnectsPorts; // (not currently used by Assimp)
+	struct IfcEdgeCurve;
+	struct IfcClosedShell;
+	struct IfcTendonAnchor;
+	struct IfcCondenserType;
+	typedef NotImplemented IfcQuantityTime; // (not currently used by Assimp)
+	typedef NotImplemented IfcSurfaceTexture; // (not currently used by Assimp)
+	typedef NotImplemented IfcPixelTexture; // (not currently used by Assimp)
+	typedef NotImplemented IfcStructuralConnectionCondition; // (not currently used by Assimp)
+	typedef NotImplemented IfcFailureConnectionCondition; // (not currently used by Assimp)
+	typedef NotImplemented IfcDocumentReference; // (not currently used by Assimp)
+	typedef NotImplemented IfcMechanicalSteelMaterialProperties; // (not currently used by Assimp)
+	struct IfcPipeSegmentType;
+	struct IfcPointOnSurface;
+	typedef NotImplemented IfcTable; // (not currently used by Assimp)
+	typedef NotImplemented IfcLightDistributionData; // (not currently used by Assimp)
+	typedef NotImplemented IfcPropertyTableValue; // (not currently used by Assimp)
+	typedef NotImplemented IfcPresentationLayerWithStyle; // (not currently used by Assimp)
+	struct IfcAsset;
+	struct IfcLightSourcePositional;
+	typedef NotImplemented IfcLibraryInformation; // (not currently used by Assimp)
+	typedef NotImplemented IfcTextStyleTextModel; // (not currently used by Assimp)
+	struct IfcProjectionCurve;
+	struct IfcFillAreaStyleTiles;
+	struct IfcRelFillsElement;
+	struct IfcElectricMotorType;
+	struct IfcTendon;
+	struct IfcDistributionChamberElementType;
+	struct IfcMemberType;
+	struct IfcStructuralLinearAction;
+	struct IfcStructuralLinearActionVarying;
+	struct IfcProductDefinitionShape;
+	struct IfcFastener;
+	struct IfcMechanicalFastener;
+	typedef NotImplemented IfcFuelProperties; // (not currently used by Assimp)
+	struct IfcEvaporatorType;
+	typedef NotImplemented IfcMaterialLayerSetUsage; // (not currently used by Assimp)
+	struct IfcDiscreteAccessoryType;
+	struct IfcStructuralCurveConnection;
+	struct IfcProjectionElement;
+	typedef NotImplemented IfcImageTexture; // (not currently used by Assimp)
+	struct IfcCoveringType;
+	typedef NotImplemented IfcRelAssociatesAppliedValue; // (not currently used by Assimp)
+	struct IfcPumpType;
+	struct IfcPile;
+	struct IfcUnitAssignment;
+	struct IfcBoundingBox;
+	struct IfcShellBasedSurfaceModel;
+	struct IfcFacetedBrep;
+	struct IfcTextLiteralWithExtent;
+	typedef NotImplemented IfcApplication; // (not currently used by Assimp)
+	typedef NotImplemented IfcExtendedMaterialProperties; // (not currently used by Assimp)
+	struct IfcElectricApplianceType;
+	typedef NotImplemented IfcRelOccupiesSpaces; // (not currently used by Assimp)
+	struct IfcTrapeziumProfileDef;
+	typedef NotImplemented IfcQuantityWeight; // (not currently used by Assimp)
+	struct IfcRelContainedInSpatialStructure;
+	struct IfcEdgeLoop;
+	struct IfcProject;
+	struct IfcCartesianPoint;
+	typedef NotImplemented IfcMaterial; // (not currently used by Assimp)
+	struct IfcCurveBoundedPlane;
+	struct IfcWallType;
+	struct IfcFillAreaStyleHatching;
+	struct IfcEquipmentStandard;
+	typedef NotImplemented IfcHygroscopicMaterialProperties; // (not currently used by Assimp)
+	typedef NotImplemented IfcDoorPanelProperties; // (not currently used by Assimp)
+	struct IfcDiameterDimension;
+	struct IfcStructuralLoadGroup;
+	typedef NotImplemented IfcTelecomAddress; // (not currently used by Assimp)
+	struct IfcConstructionMaterialResource;
+	typedef NotImplemented IfcBlobTexture; // (not currently used by Assimp)
+	typedef NotImplemented IfcIrregularTimeSeriesValue; // (not currently used by Assimp)
+	struct IfcRelAggregates;
+	struct IfcBoilerType;
+	typedef NotImplemented IfcRelProjectsElement; // (not currently used by Assimp)
+	struct IfcColourSpecification;
+	struct IfcColourRgb;
+	typedef NotImplemented IfcRelConnectsStructuralActivity; // (not currently used by Assimp)
+	struct IfcDoorStyle;
+	typedef NotImplemented IfcStructuralLoadSingleDisplacementDistortion; // (not currently used by Assimp)
+	typedef NotImplemented IfcRelAssignsToProcess; // (not currently used by Assimp)
+	struct IfcDuctSilencerType;
+	struct IfcLightSourceGoniometric;
+	struct IfcActuatorType;
+	struct IfcSensorType;
+	struct IfcAirTerminalBoxType;
+	struct IfcAnnotationSurfaceOccurrence;
+	struct IfcZShapeProfileDef;
+	typedef NotImplemented IfcClassificationNotation; // (not currently used by Assimp)
+	struct IfcRationalBezierCurve;
+	struct IfcCartesianTransformationOperator2D;
+	struct IfcCartesianTransformationOperator2DnonUniform;
+	struct IfcMove;
+	typedef NotImplemented IfcBoundaryEdgeCondition; // (not currently used by Assimp)
+	typedef NotImplemented IfcDoorLiningProperties; // (not currently used by Assimp)
+	struct IfcCableCarrierSegmentType;
+	typedef NotImplemented IfcPostalAddress; // (not currently used by Assimp)
+	typedef NotImplemented IfcRelConnectsPathElements; // (not currently used by Assimp)
+	struct IfcElectricalElement;
+	typedef NotImplemented IfcOwnerHistory; // (not currently used by Assimp)
+	typedef NotImplemented IfcStructuralLoadTemperature; // (not currently used by Assimp)
+	typedef NotImplemented IfcTextStyleWithBoxCharacteristics; // (not currently used by Assimp)
+	struct IfcChillerType;
+	typedef NotImplemented IfcRelSchedulesCostItems; // (not currently used by Assimp)
+	struct IfcReinforcingBar;
+	typedef NotImplemented IfcCurrencyRelationship; // (not currently used by Assimp)
+	typedef NotImplemented IfcSoundValue; // (not currently used by Assimp)
+	struct IfcCShapeProfileDef;
+	struct IfcPermit;
+	struct IfcSlabType;
+	typedef NotImplemented IfcSlippageConnectionCondition; // (not currently used by Assimp)
+	struct IfcLampType;
+	struct IfcPlanarExtent;
+	struct IfcAlarmType;
+	typedef NotImplemented IfcDocumentElectronicFormat; // (not currently used by Assimp)
+	struct IfcElectricFlowStorageDeviceType;
+	struct IfcEquipmentElement;
+	struct IfcLightFixtureType;
+	typedef NotImplemented IfcMetric; // (not currently used by Assimp)
+	typedef NotImplemented IfcRelNests; // (not currently used by Assimp)
+	struct IfcCurtainWall;
+	typedef NotImplemented IfcRelAssociatesDocument; // (not currently used by Assimp)
+	typedef NotImplemented IfcComplexProperty; // (not currently used by Assimp)
+	typedef NotImplemented IfcVertexBasedTextureMap; // (not currently used by Assimp)
+	struct IfcSlab;
+	struct IfcCurtainWallType;
+	struct IfcOutletType;
+	struct IfcCompressorType;
+	struct IfcCraneRailAShapeProfileDef;
+	struct IfcFlowSegment;
+	struct IfcSectionedSpine;
+	typedef NotImplemented IfcTableRow; // (not currently used by Assimp)
+	typedef NotImplemented IfcDraughtingPreDefinedTextFont; // (not currently used by Assimp)
+	struct IfcElectricTimeControlType;
+	struct IfcFaceSurface;
+	typedef NotImplemented IfcMaterialList; // (not currently used by Assimp)
+	struct IfcMotorConnectionType;
+	struct IfcFlowFitting;
+	struct IfcPointOnCurve;
+	struct IfcTransportElementType;
+	typedef NotImplemented IfcRegularTimeSeries; // (not currently used by Assimp)
+	typedef NotImplemented IfcRelAssociatesConstraint; // (not currently used by Assimp)
+	typedef NotImplemented IfcPropertyEnumeratedValue; // (not currently used by Assimp)
+	typedef NotImplemented IfcStructuralSteelProfileProperties; // (not currently used by Assimp)
+	struct IfcCableSegmentType;
+	typedef NotImplemented IfcExternallyDefinedHatchStyle; // (not currently used by Assimp)
+	struct IfcAnnotationSurface;
+	struct IfcCompositeCurveSegment;
+	struct IfcServiceLife;
+	struct IfcPlateType;
+	typedef NotImplemented IfcCurveStyle; // (not currently used by Assimp)
+	typedef NotImplemented IfcSectionProperties; // (not currently used by Assimp)
+	struct IfcVibrationIsolatorType;
+	typedef NotImplemented IfcTextureMap; // (not currently used by Assimp)
+	struct IfcTrimmedCurve;
+	struct IfcMappedItem;
+	typedef NotImplemented IfcMaterialLayer; // (not currently used by Assimp)
+	struct IfcDirection;
+	struct IfcBlock;
+	struct IfcProjectOrderRecord;
+	struct IfcFlowMeterType;
+	struct IfcControllerType;
+	struct IfcBeam;
+	struct IfcArbitraryOpenProfileDef;
+	struct IfcCenterLineProfileDef;
+	typedef NotImplemented IfcStructuralLoadPlanarForce; // (not currently used by Assimp)
+	struct IfcTimeSeriesSchedule;
+	struct IfcRoundedEdgeFeature;
+	typedef NotImplemented IfcWindowLiningProperties; // (not currently used by Assimp)
+	typedef NotImplemented IfcRelOverridesProperties; // (not currently used by Assimp)
+	typedef NotImplemented IfcApprovalRelationship; // (not currently used by Assimp)
+	struct IfcIShapeProfileDef;
+	struct IfcSpaceHeaterType;
+	typedef NotImplemented IfcExternallyDefinedSurfaceStyle; // (not currently used by Assimp)
+	typedef NotImplemented IfcDerivedUnit; // (not currently used by Assimp)
+	struct IfcFlowStorageDevice;
+	typedef NotImplemented IfcMaterialClassificationRelationship; // (not currently used by Assimp)
+	typedef NotImplemented IfcClassificationItem; // (not currently used by Assimp)
+	struct IfcRevolvedAreaSolid;
+	typedef NotImplemented IfcConnectionPointGeometry; // (not currently used by Assimp)
+	struct IfcDoor;
+	struct IfcEllipse;
+	struct IfcTubeBundleType;
+	struct IfcAngularDimension;
+	typedef NotImplemented IfcThermalMaterialProperties; // (not currently used by Assimp)
+	struct IfcFaceBasedSurfaceModel;
+	struct IfcCraneRailFShapeProfileDef;
+	struct IfcColumnType;
+	struct IfcTShapeProfileDef;
+	struct IfcEnergyConversionDevice;
+	typedef NotImplemented IfcConnectionPointEccentricity; // (not currently used by Assimp)
+	typedef NotImplemented IfcReinforcementDefinitionProperties; // (not currently used by Assimp)
+	typedef NotImplemented IfcCurveStyleFontAndScaling; // (not currently used by Assimp)
+	struct IfcWorkSchedule;
+	typedef NotImplemented IfcOrganizationRelationship; // (not currently used by Assimp)
+	struct IfcZone;
+	struct IfcTransportElement;
+	typedef NotImplemented IfcDraughtingPreDefinedCurveFont; // (not currently used by Assimp)
+	struct IfcGeometricRepresentationSubContext;
+	struct IfcLShapeProfileDef;
+	struct IfcGeometricCurveSet;
+	struct IfcActor;
+	struct IfcOccupant;
+	typedef NotImplemented IfcPhysicalComplexQuantity; // (not currently used by Assimp)
+	struct IfcBooleanClippingResult;
+	typedef NotImplemented IfcPreDefinedTerminatorSymbol; // (not currently used by Assimp)
+	struct IfcAnnotationFillArea;
+	typedef NotImplemented IfcConstraintAggregationRelationship; // (not currently used by Assimp)
+	typedef NotImplemented IfcRelAssociatesApproval; // (not currently used by Assimp)
+	typedef NotImplemented IfcRelAssociatesMaterial; // (not currently used by Assimp)
+	typedef NotImplemented IfcRelAssignsToProduct; // (not currently used by Assimp)
+	typedef NotImplemented IfcAppliedValueRelationship; // (not currently used by Assimp)
+	struct IfcLightSourceSpot;
+	struct IfcFireSuppressionTerminalType;
+	typedef NotImplemented IfcElementQuantity; // (not currently used by Assimp)
+	typedef NotImplemented IfcDimensionPair; // (not currently used by Assimp)
+	struct IfcElectricGeneratorType;
+	typedef NotImplemented IfcRelSequence; // (not currently used by Assimp)
+	struct IfcInventory;
+	struct IfcPolyline;
+	struct IfcBoxedHalfSpace;
+	struct IfcAirTerminalType;
+	typedef NotImplemented IfcSectionReinforcementProperties; // (not currently used by Assimp)
+	struct IfcDistributionPort;
+	struct IfcCostItem;
+	struct IfcStructuredDimensionCallout;
+	struct IfcStructuralResultGroup;
+	typedef NotImplemented IfcRelSpaceBoundary; // (not currently used by Assimp)
+	struct IfcOrientedEdge;
+	typedef NotImplemented IfcRelAssignsToResource; // (not currently used by Assimp)
+	struct IfcCsgSolid;
+	typedef NotImplemented IfcProductsOfCombustionProperties; // (not currently used by Assimp)
+	typedef NotImplemented IfcRelaxation; // (not currently used by Assimp)
+	struct IfcPlanarBox;
+	typedef NotImplemented IfcQuantityLength; // (not currently used by Assimp)
+	struct IfcMaterialDefinitionRepresentation;
+	struct IfcAsymmetricIShapeProfileDef;
+	struct IfcRepresentationMap;
+
+
+
+    // C++ wrapper for IfcRoot
+    struct IfcRoot :  ObjectHelper<IfcRoot,4> { IfcRoot() : Object("IfcRoot") {}
+		IfcGloballyUniqueId::Out GlobalId;
+		Lazy< NotImplemented > OwnerHistory;
+		Maybe< IfcLabel::Out > Name;
+		Maybe< IfcText::Out > Description;
+    };
+
+    // C++ wrapper for IfcObjectDefinition
+    struct IfcObjectDefinition : IfcRoot, ObjectHelper<IfcObjectDefinition,0> { IfcObjectDefinition() : Object("IfcObjectDefinition") {}
+
+    };
+
+    // C++ wrapper for IfcTypeObject
+    struct IfcTypeObject : IfcObjectDefinition, ObjectHelper<IfcTypeObject,2> { IfcTypeObject() : Object("IfcTypeObject") {}
+		Maybe< IfcLabel::Out > ApplicableOccurrence;
+		Maybe< ListOf< Lazy< NotImplemented >, 1, 0 > > HasPropertySets;
+    };
+
+    // C++ wrapper for IfcTypeProduct
+    struct IfcTypeProduct : IfcTypeObject, ObjectHelper<IfcTypeProduct,2> { IfcTypeProduct() : Object("IfcTypeProduct") {}
+		Maybe< ListOf< Lazy< IfcRepresentationMap >, 1, 0 > > RepresentationMaps;
+		Maybe< IfcLabel::Out > Tag;
+    };
+
+    // C++ wrapper for IfcElementType
+    struct IfcElementType : IfcTypeProduct, ObjectHelper<IfcElementType,1> { IfcElementType() : Object("IfcElementType") {}
+		Maybe< IfcLabel::Out > ElementType;
+    };
+
+    // C++ wrapper for IfcFurnishingElementType
+    struct IfcFurnishingElementType : IfcElementType, ObjectHelper<IfcFurnishingElementType,0> { IfcFurnishingElementType() : Object("IfcFurnishingElementType") {}
+
+    };
+
+    // C++ wrapper for IfcFurnitureType
+    struct IfcFurnitureType : IfcFurnishingElementType, ObjectHelper<IfcFurnitureType,1> { IfcFurnitureType() : Object("IfcFurnitureType") {}
+		IfcAssemblyPlaceEnum::Out AssemblyPlace;
+    };
+
+    // C++ wrapper for IfcObject
+    struct IfcObject : IfcObjectDefinition, ObjectHelper<IfcObject,1> { IfcObject() : Object("IfcObject") {}
+		Maybe< IfcLabel::Out > ObjectType;
+    };
+
+    // C++ wrapper for IfcProduct
+    struct IfcProduct : IfcObject, ObjectHelper<IfcProduct,2> { IfcProduct() : Object("IfcProduct") {}
+		Maybe< Lazy< IfcObjectPlacement > > ObjectPlacement;
+		Maybe< Lazy< IfcProductRepresentation > > Representation;
+    };
+
+    // C++ wrapper for IfcGrid
+    struct IfcGrid : IfcProduct, ObjectHelper<IfcGrid,3> { IfcGrid() : Object("IfcGrid") {}
+		ListOf< Lazy< NotImplemented >, 1, 0 > UAxes;
+		ListOf< Lazy< NotImplemented >, 1, 0 > VAxes;
+		Maybe< ListOf< Lazy< NotImplemented >, 1, 0 > > WAxes;
+    };
+
+    // C++ wrapper for IfcRepresentationItem
+    struct IfcRepresentationItem :  ObjectHelper<IfcRepresentationItem,0> { IfcRepresentationItem() : Object("IfcRepresentationItem") {}
+
+    };
+
+    // C++ wrapper for IfcGeometricRepresentationItem
+    struct IfcGeometricRepresentationItem : IfcRepresentationItem, ObjectHelper<IfcGeometricRepresentationItem,0> { IfcGeometricRepresentationItem() : Object("IfcGeometricRepresentationItem") {}
+
+    };
+
+    // C++ wrapper for IfcOneDirectionRepeatFactor
+    struct IfcOneDirectionRepeatFactor : IfcGeometricRepresentationItem, ObjectHelper<IfcOneDirectionRepeatFactor,1> { IfcOneDirectionRepeatFactor() : Object("IfcOneDirectionRepeatFactor") {}
+		Lazy< IfcVector > RepeatFactor;
+    };
+
+    // C++ wrapper for IfcTwoDirectionRepeatFactor
+    struct IfcTwoDirectionRepeatFactor : IfcOneDirectionRepeatFactor, ObjectHelper<IfcTwoDirectionRepeatFactor,1> { IfcTwoDirectionRepeatFactor() : Object("IfcTwoDirectionRepeatFactor") {}
+		Lazy< IfcVector > SecondRepeatFactor;
+    };
+
+    // C++ wrapper for IfcElement
+    struct IfcElement : IfcProduct, ObjectHelper<IfcElement,1> { IfcElement() : Object("IfcElement") {}
+		Maybe< IfcIdentifier::Out > Tag;
+    };
+
+    // C++ wrapper for IfcElementComponent
+    struct IfcElementComponent : IfcElement, ObjectHelper<IfcElementComponent,0> { IfcElementComponent() : Object("IfcElementComponent") {}
+
+    };
+
+    // C++ wrapper for IfcSpatialStructureElementType
+    struct IfcSpatialStructureElementType : IfcElementType, ObjectHelper<IfcSpatialStructureElementType,0> { IfcSpatialStructureElementType() : Object("IfcSpatialStructureElementType") {}
+
+    };
+
+    // C++ wrapper for IfcControl
+    struct IfcControl : IfcObject, ObjectHelper<IfcControl,0> { IfcControl() : Object("IfcControl") {}
+
+    };
+
+    // C++ wrapper for IfcActionRequest
+    struct IfcActionRequest : IfcControl, ObjectHelper<IfcActionRequest,1> { IfcActionRequest() : Object("IfcActionRequest") {}
+		IfcIdentifier::Out RequestID;
+    };
+
+    // C++ wrapper for IfcDistributionElementType
+    struct IfcDistributionElementType : IfcElementType, ObjectHelper<IfcDistributionElementType,0> { IfcDistributionElementType() : Object("IfcDistributionElementType") {}
+
+    };
+
+    // C++ wrapper for IfcDistributionFlowElementType
+    struct IfcDistributionFlowElementType : IfcDistributionElementType, ObjectHelper<IfcDistributionFlowElementType,0> { IfcDistributionFlowElementType() : Object("IfcDistributionFlowElementType") {}
+
+    };
+
+    // C++ wrapper for IfcEnergyConversionDeviceType
+    struct IfcEnergyConversionDeviceType : IfcDistributionFlowElementType, ObjectHelper<IfcEnergyConversionDeviceType,0> { IfcEnergyConversionDeviceType() : Object("IfcEnergyConversionDeviceType") {}
+
+    };
+
+    // C++ wrapper for IfcCooledBeamType
+    struct IfcCooledBeamType : IfcEnergyConversionDeviceType, ObjectHelper<IfcCooledBeamType,1> { IfcCooledBeamType() : Object("IfcCooledBeamType") {}
+		IfcCooledBeamTypeEnum::Out PredefinedType;
+    };
+
+    // C++ wrapper for IfcCsgPrimitive3D
+    struct IfcCsgPrimitive3D : IfcGeometricRepresentationItem, ObjectHelper<IfcCsgPrimitive3D,1> { IfcCsgPrimitive3D() : Object("IfcCsgPrimitive3D") {}
+		Lazy< IfcAxis2Placement3D > Position;
+    };
+
+    // C++ wrapper for IfcRectangularPyramid
+    struct IfcRectangularPyramid : IfcCsgPrimitive3D, ObjectHelper<IfcRectangularPyramid,3> { IfcRectangularPyramid() : Object("IfcRectangularPyramid") {}
+		IfcPositiveLengthMeasure::Out XLength;
+		IfcPositiveLengthMeasure::Out YLength;
+		IfcPositiveLengthMeasure::Out Height;
+    };
+
+    // C++ wrapper for IfcSurface
+    struct IfcSurface : IfcGeometricRepresentationItem, ObjectHelper<IfcSurface,0> { IfcSurface() : Object("IfcSurface") {}
+
+    };
+
+    // C++ wrapper for IfcBoundedSurface
+    struct IfcBoundedSurface : IfcSurface, ObjectHelper<IfcBoundedSurface,0> { IfcBoundedSurface() : Object("IfcBoundedSurface") {}
+
+    };
+
+    // C++ wrapper for IfcRectangularTrimmedSurface
+    struct IfcRectangularTrimmedSurface : IfcBoundedSurface, ObjectHelper<IfcRectangularTrimmedSurface,7> { IfcRectangularTrimmedSurface() : Object("IfcRectangularTrimmedSurface") {}
+		Lazy< IfcSurface > BasisSurface;
+		IfcParameterValue::Out U1;
+		IfcParameterValue::Out V1;
+		IfcParameterValue::Out U2;
+		IfcParameterValue::Out V2;
+		BOOLEAN::Out Usense;
+		BOOLEAN::Out Vsense;
+    };
+
+    // C++ wrapper for IfcGroup
+    struct IfcGroup : IfcObject, ObjectHelper<IfcGroup,0> { IfcGroup() : Object("IfcGroup") {}
+
+    };
+
+    // C++ wrapper for IfcRelationship
+    struct IfcRelationship : IfcRoot, ObjectHelper<IfcRelationship,0> { IfcRelationship() : Object("IfcRelationship") {}
+
+    };
+
+    // C++ wrapper for IfcHalfSpaceSolid
+    struct IfcHalfSpaceSolid : IfcGeometricRepresentationItem, ObjectHelper<IfcHalfSpaceSolid,2> { IfcHalfSpaceSolid() : Object("IfcHalfSpaceSolid") {}
+		Lazy< IfcSurface > BaseSurface;
+		BOOLEAN::Out AgreementFlag;
+    };
+
+    // C++ wrapper for IfcPolygonalBoundedHalfSpace
+    struct IfcPolygonalBoundedHalfSpace : IfcHalfSpaceSolid, ObjectHelper<IfcPolygonalBoundedHalfSpace,2> { IfcPolygonalBoundedHalfSpace() : Object("IfcPolygonalBoundedHalfSpace") {}
+		Lazy< IfcAxis2Placement3D > Position;
+		Lazy< IfcBoundedCurve > PolygonalBoundary;
+    };
+
+    // C++ wrapper for IfcAirToAirHeatRecoveryType
+    struct IfcAirToAirHeatRecoveryType : IfcEnergyConversionDeviceType, ObjectHelper<IfcAirToAirHeatRecoveryType,1> { IfcAirToAirHeatRecoveryType() : Object("IfcAirToAirHeatRecoveryType") {}
+		IfcAirToAirHeatRecoveryTypeEnum::Out PredefinedType;
+    };
+
+    // C++ wrapper for IfcFlowFittingType
+    struct IfcFlowFittingType : IfcDistributionFlowElementType, ObjectHelper<IfcFlowFittingType,0> { IfcFlowFittingType() : Object("IfcFlowFittingType") {}
+
+    };
+
+    // C++ wrapper for IfcPipeFittingType
+    struct IfcPipeFittingType : IfcFlowFittingType, ObjectHelper<IfcPipeFittingType,1> { IfcPipeFittingType() : Object("IfcPipeFittingType") {}
+		IfcPipeFittingTypeEnum::Out PredefinedType;
+    };
+
+    // C++ wrapper for IfcRepresentation
+    struct IfcRepresentation :  ObjectHelper<IfcRepresentation,4> { IfcRepresentation() : Object("IfcRepresentation") {}
+		Lazy< IfcRepresentationContext > ContextOfItems;
+		Maybe< IfcLabel::Out > RepresentationIdentifier;
+		Maybe< IfcLabel::Out > RepresentationType;
+		ListOf< Lazy< IfcRepresentationItem >, 1, 0 > Items;
+    };
+
+    // C++ wrapper for IfcStyleModel
+    struct IfcStyleModel : IfcRepresentation, ObjectHelper<IfcStyleModel,0> { IfcStyleModel() : Object("IfcStyleModel") {}
+
+    };
+
+    // C++ wrapper for IfcStyledRepresentation
+    struct IfcStyledRepresentation : IfcStyleModel, ObjectHelper<IfcStyledRepresentation,0> { IfcStyledRepresentation() : Object("IfcStyledRepresentation") {}
+
+    };
+
+    // C++ wrapper for IfcBooleanResult
+    struct IfcBooleanResult : IfcGeometricRepresentationItem, ObjectHelper<IfcBooleanResult,3> { IfcBooleanResult() : Object("IfcBooleanResult") {}
+		IfcBooleanOperator::Out Operator;
+		IfcBooleanOperand::Out FirstOperand;
+		IfcBooleanOperand::Out SecondOperand;
+    };
+
+    // C++ wrapper for IfcFeatureElement
+    struct IfcFeatureElement : IfcElement, ObjectHelper<IfcFeatureElement,0> { IfcFeatureElement() : Object("IfcFeatureElement") {}
+
+    };
+
+    // C++ wrapper for IfcFeatureElementSubtraction
+    struct IfcFeatureElementSubtraction : IfcFeatureElement, ObjectHelper<IfcFeatureElementSubtraction,0> { IfcFeatureElementSubtraction() : Object("IfcFeatureElementSubtraction") {}
+
+    };
+
+    // C++ wrapper for IfcOpeningElement
+    struct IfcOpeningElement : IfcFeatureElementSubtraction, ObjectHelper<IfcOpeningElement,0> { IfcOpeningElement() : Object("IfcOpeningElement") {}
+
+    };
+
+    // C++ wrapper for IfcConditionCriterion
+    struct IfcConditionCriterion : IfcControl, ObjectHelper<IfcConditionCriterion,2> { IfcConditionCriterion() : Object("IfcConditionCriterion") {}
+		IfcConditionCriterionSelect::Out Criterion;
+		IfcDateTimeSelect::Out CriterionDateTime;
+    };
+
+    // C++ wrapper for IfcFlowTerminalType
+    struct IfcFlowTerminalType : IfcDistributionFlowElementType, ObjectHelper<IfcFlowTerminalType,0> { IfcFlowTerminalType() : Object("IfcFlowTerminalType") {}
+
+    };
+
+    // C++ wrapper for IfcFlowControllerType
+    struct IfcFlowControllerType : IfcDistributionFlowElementType, ObjectHelper<IfcFlowControllerType,0> { IfcFlowControllerType() : Object("IfcFlowControllerType") {}
+
+    };
+
+    // C++ wrapper for IfcSwitchingDeviceType
+    struct IfcSwitchingDeviceType : IfcFlowControllerType, ObjectHelper<IfcSwitchingDeviceType,1> { IfcSwitchingDeviceType() : Object("IfcSwitchingDeviceType") {}
+		IfcSwitchingDeviceTypeEnum::Out PredefinedType;
+    };
+
+    // C++ wrapper for IfcSystem
+    struct IfcSystem : IfcGroup, ObjectHelper<IfcSystem,0> { IfcSystem() : Object("IfcSystem") {}
+
+    };
+
+    // C++ wrapper for IfcElectricalCircuit
+    struct IfcElectricalCircuit : IfcSystem, ObjectHelper<IfcElectricalCircuit,0> { IfcElectricalCircuit() : Object("IfcElectricalCircuit") {}
+
+    };
+
+    // C++ wrapper for IfcUnitaryEquipmentType
+    struct IfcUnitaryEquipmentType : IfcEnergyConversionDeviceType, ObjectHelper<IfcUnitaryEquipmentType,1> { IfcUnitaryEquipmentType() : Object("IfcUnitaryEquipmentType") {}
+		IfcUnitaryEquipmentTypeEnum::Out PredefinedType;
+    };
+
+    // C++ wrapper for IfcPort
+    struct IfcPort : IfcProduct, ObjectHelper<IfcPort,0> { IfcPort() : Object("IfcPort") {}
+
+    };
+
+    // C++ wrapper for IfcPlacement
+    struct IfcPlacement : IfcGeometricRepresentationItem, ObjectHelper<IfcPlacement,1> { IfcPlacement() : Object("IfcPlacement") {}
+		Lazy< IfcCartesianPoint > Location;
+    };
+
+    // C++ wrapper for IfcProfileDef
+    struct IfcProfileDef :  ObjectHelper<IfcProfileDef,2> { IfcProfileDef() : Object("IfcProfileDef") {}
+		IfcProfileTypeEnum::Out ProfileType;
+		Maybe< IfcLabel::Out > ProfileName;
+    };
+
+    // C++ wrapper for IfcArbitraryClosedProfileDef
+    struct IfcArbitraryClosedProfileDef : IfcProfileDef, ObjectHelper<IfcArbitraryClosedProfileDef,1> { IfcArbitraryClosedProfileDef() : Object("IfcArbitraryClosedProfileDef") {}
+		Lazy< IfcCurve > OuterCurve;
+    };
+
+    // C++ wrapper for IfcCurve
+    struct IfcCurve : IfcGeometricRepresentationItem, ObjectHelper<IfcCurve,0> { IfcCurve() : Object("IfcCurve") {}
+
+    };
+
+    // C++ wrapper for IfcConic
+    struct IfcConic : IfcCurve, ObjectHelper<IfcConic,1> { IfcConic() : Object("IfcConic") {}
+		IfcAxis2Placement::Out Position;
+    };
+
+    // C++ wrapper for IfcCircle
+    struct IfcCircle : IfcConic, ObjectHelper<IfcCircle,1> { IfcCircle() : Object("IfcCircle") {}
+		IfcPositiveLengthMeasure::Out Radius;
+    };
+
+    // C++ wrapper for IfcElementarySurface
+    struct IfcElementarySurface : IfcSurface, ObjectHelper<IfcElementarySurface,1> { IfcElementarySurface() : Object("IfcElementarySurface") {}
+		Lazy< IfcAxis2Placement3D > Position;
+    };
+
+    // C++ wrapper for IfcPlane
+    struct IfcPlane : IfcElementarySurface, ObjectHelper<IfcPlane,0> { IfcPlane() : Object("IfcPlane") {}
+
+    };
+
+    // C++ wrapper for IfcCostSchedule
+    struct IfcCostSchedule : IfcControl, ObjectHelper<IfcCostSchedule,8> { IfcCostSchedule() : Object("IfcCostSchedule") {}
+		Maybe< IfcActorSelect::Out > SubmittedBy;
+		Maybe< IfcActorSelect::Out > PreparedBy;
+		Maybe< IfcDateTimeSelect::Out > SubmittedOn;
+		Maybe< IfcLabel::Out > Status;
+		Maybe< ListOf< IfcActorSelect, 1, 0 >::Out > TargetUsers;
+		Maybe< IfcDateTimeSelect::Out > UpdateDate;
+		IfcIdentifier::Out ID;
+		IfcCostScheduleTypeEnum::Out PredefinedType;
+    };
+
+    // C++ wrapper for IfcRightCircularCone
+    struct IfcRightCircularCone : IfcCsgPrimitive3D, ObjectHelper<IfcRightCircularCone,2> { IfcRightCircularCone() : Object("IfcRightCircularCone") {}
+		IfcPositiveLengthMeasure::Out Height;
+		IfcPositiveLengthMeasure::Out BottomRadius;
+    };
+
+    // C++ wrapper for IfcElementAssembly
+    struct IfcElementAssembly : IfcElement, ObjectHelper<IfcElementAssembly,2> { IfcElementAssembly() : Object("IfcElementAssembly") {}
+		Maybe< IfcAssemblyPlaceEnum::Out > AssemblyPlace;
+		IfcElementAssemblyTypeEnum::Out PredefinedType;
+    };
+
+    // C++ wrapper for IfcBuildingElement
+    struct IfcBuildingElement : IfcElement, ObjectHelper<IfcBuildingElement,0> { IfcBuildingElement() : Object("IfcBuildingElement") {}
+
+    };
+
+    // C++ wrapper for IfcMember
+    struct IfcMember : IfcBuildingElement, ObjectHelper<IfcMember,0> { IfcMember() : Object("IfcMember") {}
+
+    };
+
+    // C++ wrapper for IfcBuildingElementProxy
+    struct IfcBuildingElementProxy : IfcBuildingElement, ObjectHelper<IfcBuildingElementProxy,1> { IfcBuildingElementProxy() : Object("IfcBuildingElementProxy") {}
+		Maybe< IfcElementCompositionEnum::Out > CompositionType;
+    };
+
+    // C++ wrapper for IfcStructuralActivity
+    struct IfcStructuralActivity : IfcProduct, ObjectHelper<IfcStructuralActivity,2> { IfcStructuralActivity() : Object("IfcStructuralActivity") {}
+		Lazy< NotImplemented > AppliedLoad;
+		IfcGlobalOrLocalEnum::Out GlobalOrLocal;
+    };
+
+    // C++ wrapper for IfcStructuralAction
+    struct IfcStructuralAction : IfcStructuralActivity, ObjectHelper<IfcStructuralAction,2> { IfcStructuralAction() : Object("IfcStructuralAction") {}
+		BOOLEAN::Out DestabilizingLoad;
+		Maybe< Lazy< IfcStructuralReaction > > CausedBy;
+    };
+
+    // C++ wrapper for IfcStructuralPlanarAction
+    struct IfcStructuralPlanarAction : IfcStructuralAction, ObjectHelper<IfcStructuralPlanarAction,1> { IfcStructuralPlanarAction() : Object("IfcStructuralPlanarAction") {}
+		IfcProjectedOrTrueLengthEnum::Out ProjectedOrTrue;
+    };
+
+    // C++ wrapper for IfcTopologicalRepresentationItem
+    struct IfcTopologicalRepresentationItem : IfcRepresentationItem, ObjectHelper<IfcTopologicalRepresentationItem,0> { IfcTopologicalRepresentationItem() : Object("IfcTopologicalRepresentationItem") {}
+
+    };
+
+    // C++ wrapper for IfcConnectedFaceSet
+    struct IfcConnectedFaceSet : IfcTopologicalRepresentationItem, ObjectHelper<IfcConnectedFaceSet,1> { IfcConnectedFaceSet() : Object("IfcConnectedFaceSet") {}
+		ListOf< Lazy< IfcFace >, 1, 0 > CfsFaces;
+    };
+
+    // C++ wrapper for IfcSweptSurface
+    struct IfcSweptSurface : IfcSurface, ObjectHelper<IfcSweptSurface,2> { IfcSweptSurface() : Object("IfcSweptSurface") {}
+		Lazy< IfcProfileDef > SweptCurve;
+		Lazy< IfcAxis2Placement3D > Position;
+    };
+
+    // C++ wrapper for IfcSurfaceOfLinearExtrusion
+    struct IfcSurfaceOfLinearExtrusion : IfcSweptSurface, ObjectHelper<IfcSurfaceOfLinearExtrusion,2> { IfcSurfaceOfLinearExtrusion() : Object("IfcSurfaceOfLinearExtrusion") {}
+		Lazy< IfcDirection > ExtrudedDirection;
+		IfcLengthMeasure::Out Depth;
+    };
+
+    // C++ wrapper for IfcArbitraryProfileDefWithVoids
+    struct IfcArbitraryProfileDefWithVoids : IfcArbitraryClosedProfileDef, ObjectHelper<IfcArbitraryProfileDefWithVoids,1> { IfcArbitraryProfileDefWithVoids() : Object("IfcArbitraryProfileDefWithVoids") {}
+		ListOf< Lazy< IfcCurve >, 1, 0 > InnerCurves;
+    };
+
+    // C++ wrapper for IfcProcess
+    struct IfcProcess : IfcObject, ObjectHelper<IfcProcess,0> { IfcProcess() : Object("IfcProcess") {}
+
+    };
+
+    // C++ wrapper for IfcProcedure
+    struct IfcProcedure : IfcProcess, ObjectHelper<IfcProcedure,3> { IfcProcedure() : Object("IfcProcedure") {}
+		IfcIdentifier::Out ProcedureID;
+		IfcProcedureTypeEnum::Out ProcedureType;
+		Maybe< IfcLabel::Out > UserDefinedProcedureType;
+    };
+
+    // C++ wrapper for IfcVector
+    struct IfcVector : IfcGeometricRepresentationItem, ObjectHelper<IfcVector,2> { IfcVector() : Object("IfcVector") {}
+		Lazy< IfcDirection > Orientation;
+		IfcLengthMeasure::Out Magnitude;
+    };
+
+    // C++ wrapper for IfcFaceBound
+    struct IfcFaceBound : IfcTopologicalRepresentationItem, ObjectHelper<IfcFaceBound,2> { IfcFaceBound() : Object("IfcFaceBound") {}
+		Lazy< IfcLoop > Bound;
+		BOOLEAN::Out Orientation;
+    };
+
+    // C++ wrapper for IfcFaceOuterBound
+    struct IfcFaceOuterBound : IfcFaceBound, ObjectHelper<IfcFaceOuterBound,0> { IfcFaceOuterBound() : Object("IfcFaceOuterBound") {}
+
+    };
+
+    // C++ wrapper for IfcFeatureElementAddition
+    struct IfcFeatureElementAddition : IfcFeatureElement, ObjectHelper<IfcFeatureElementAddition,0> { IfcFeatureElementAddition() : Object("IfcFeatureElementAddition") {}
+
+    };
+
+    // C++ wrapper for IfcNamedUnit
+    struct IfcNamedUnit :  ObjectHelper<IfcNamedUnit,2> { IfcNamedUnit() : Object("IfcNamedUnit") {}
+		Lazy< NotImplemented > Dimensions;
+		IfcUnitEnum::Out UnitType;
+    };
+
+    // C++ wrapper for IfcConversionBasedUnit
+    struct IfcConversionBasedUnit : IfcNamedUnit, ObjectHelper<IfcConversionBasedUnit,2> { IfcConversionBasedUnit() : Object("IfcConversionBasedUnit") {}
+		IfcLabel::Out Name;
+		Lazy< IfcMeasureWithUnit > ConversionFactor;
+    };
+
+    // C++ wrapper for IfcHeatExchangerType
+    struct IfcHeatExchangerType : IfcEnergyConversionDeviceType, ObjectHelper<IfcHeatExchangerType,1> { IfcHeatExchangerType() : Object("IfcHeatExchangerType") {}
+		IfcHeatExchangerTypeEnum::Out PredefinedType;
+    };
+
+    // C++ wrapper for IfcPresentationStyleAssignment
+    struct IfcPresentationStyleAssignment :  ObjectHelper<IfcPresentationStyleAssignment,1> { IfcPresentationStyleAssignment() : Object("IfcPresentationStyleAssignment") {}
+		ListOf< IfcPresentationStyleSelect, 1, 0 >::Out Styles;
+    };
+
+    // C++ wrapper for IfcFlowTreatmentDeviceType
+    struct IfcFlowTreatmentDeviceType : IfcDistributionFlowElementType, ObjectHelper<IfcFlowTreatmentDeviceType,0> { IfcFlowTreatmentDeviceType() : Object("IfcFlowTreatmentDeviceType") {}
+
+    };
+
+    // C++ wrapper for IfcFilterType
+    struct IfcFilterType : IfcFlowTreatmentDeviceType, ObjectHelper<IfcFilterType,1> { IfcFilterType() : Object("IfcFilterType") {}
+		IfcFilterTypeEnum::Out PredefinedType;
+    };
+
+    // C++ wrapper for IfcResource
+    struct IfcResource : IfcObject, ObjectHelper<IfcResource,0> { IfcResource() : Object("IfcResource") {}
+
+    };
+
+    // C++ wrapper for IfcEvaporativeCoolerType
+    struct IfcEvaporativeCoolerType : IfcEnergyConversionDeviceType, ObjectHelper<IfcEvaporativeCoolerType,1> { IfcEvaporativeCoolerType() : Object("IfcEvaporativeCoolerType") {}
+		IfcEvaporativeCoolerTypeEnum::Out PredefinedType;
+    };
+
+    // C++ wrapper for IfcOffsetCurve2D
+    struct IfcOffsetCurve2D : IfcCurve, ObjectHelper<IfcOffsetCurve2D,3> { IfcOffsetCurve2D() : Object("IfcOffsetCurve2D") {}
+		Lazy< IfcCurve > BasisCurve;
+		IfcLengthMeasure::Out Distance;
+		LOGICAL::Out SelfIntersect;
+    };
+
+    // C++ wrapper for IfcEdge
+    struct IfcEdge : IfcTopologicalRepresentationItem, ObjectHelper<IfcEdge,2> { IfcEdge() : Object("IfcEdge") {}
+		Lazy< IfcVertex > EdgeStart;
+		Lazy< IfcVertex > EdgeEnd;
+    };
+
+    // C++ wrapper for IfcSubedge
+    struct IfcSubedge : IfcEdge, ObjectHelper<IfcSubedge,1> { IfcSubedge() : Object("IfcSubedge") {}
+		Lazy< IfcEdge > ParentEdge;
+    };
+
+    // C++ wrapper for IfcProxy
+    struct IfcProxy : IfcProduct, ObjectHelper<IfcProxy,2> { IfcProxy() : Object("IfcProxy") {}
+		IfcObjectTypeEnum::Out ProxyType;
+		Maybe< IfcLabel::Out > Tag;
+    };
+
+    // C++ wrapper for IfcLine
+    struct IfcLine : IfcCurve, ObjectHelper<IfcLine,2> { IfcLine() : Object("IfcLine") {}
+		Lazy< IfcCartesianPoint > Pnt;
+		Lazy< IfcVector > Dir;
+    };
+
+    // C++ wrapper for IfcColumn
+    struct IfcColumn : IfcBuildingElement, ObjectHelper<IfcColumn,0> { IfcColumn() : Object("IfcColumn") {}
+
+    };
+
+    // C++ wrapper for IfcObjectPlacement
+    struct IfcObjectPlacement :  ObjectHelper<IfcObjectPlacement,0> { IfcObjectPlacement() : Object("IfcObjectPlacement") {}
+
+    };
+
+    // C++ wrapper for IfcGridPlacement
+    struct IfcGridPlacement : IfcObjectPlacement, ObjectHelper<IfcGridPlacement,2> { IfcGridPlacement() : Object("IfcGridPlacement") {}
+		Lazy< NotImplemented > PlacementLocation;
+		Maybe< Lazy< NotImplemented > > PlacementRefDirection;
+    };
+
+    // C++ wrapper for IfcDistributionControlElementType
+    struct IfcDistributionControlElementType : IfcDistributionElementType, ObjectHelper<IfcDistributionControlElementType,0> { IfcDistributionControlElementType() : Object("IfcDistributionControlElementType") {}
+
+    };
+
+    // C++ wrapper for IfcRelConnects
+    struct IfcRelConnects : IfcRelationship, ObjectHelper<IfcRelConnects,0> { IfcRelConnects() : Object("IfcRelConnects") {}
+
+    };
+
+    // C++ wrapper for IfcAnnotation
+    struct IfcAnnotation : IfcProduct, ObjectHelper<IfcAnnotation,0> { IfcAnnotation() : Object("IfcAnnotation") {}
+
+    };
+
+    // C++ wrapper for IfcPlate
+    struct IfcPlate : IfcBuildingElement, ObjectHelper<IfcPlate,0> { IfcPlate() : Object("IfcPlate") {}
+
+    };
+
+    // C++ wrapper for IfcSolidModel
+    struct IfcSolidModel : IfcGeometricRepresentationItem, ObjectHelper<IfcSolidModel,0> { IfcSolidModel() : Object("IfcSolidModel") {}
+
+    };
+
+    // C++ wrapper for IfcManifoldSolidBrep
+    struct IfcManifoldSolidBrep : IfcSolidModel, ObjectHelper<IfcManifoldSolidBrep,1> { IfcManifoldSolidBrep() : Object("IfcManifoldSolidBrep") {}
+		Lazy< IfcClosedShell > Outer;
+    };
+
+    // C++ wrapper for IfcFlowStorageDeviceType
+    struct IfcFlowStorageDeviceType : IfcDistributionFlowElementType, ObjectHelper<IfcFlowStorageDeviceType,0> { IfcFlowStorageDeviceType() : Object("IfcFlowStorageDeviceType") {}
+
+    };
+
+    // C++ wrapper for IfcStructuralItem
+    struct IfcStructuralItem : IfcProduct, ObjectHelper<IfcStructuralItem,0> { IfcStructuralItem() : Object("IfcStructuralItem") {}
+
+    };
+
+    // C++ wrapper for IfcStructuralMember
+    struct IfcStructuralMember : IfcStructuralItem, ObjectHelper<IfcStructuralMember,0> { IfcStructuralMember() : Object("IfcStructuralMember") {}
+
+    };
+
+    // C++ wrapper for IfcStructuralCurveMember
+    struct IfcStructuralCurveMember : IfcStructuralMember, ObjectHelper<IfcStructuralCurveMember,1> { IfcStructuralCurveMember() : Object("IfcStructuralCurveMember") {}
+		IfcStructuralCurveTypeEnum::Out PredefinedType;
+    };
+
+    // C++ wrapper for IfcStructuralConnection
+    struct IfcStructuralConnection : IfcStructuralItem, ObjectHelper<IfcStructuralConnection,1> { IfcStructuralConnection() : Object("IfcStructuralConnection") {}
+		Maybe< Lazy< NotImplemented > > AppliedCondition;
+    };
+
+    // C++ wrapper for IfcStructuralSurfaceConnection
+    struct IfcStructuralSurfaceConnection : IfcStructuralConnection, ObjectHelper<IfcStructuralSurfaceConnection,0> { IfcStructuralSurfaceConnection() : Object("IfcStructuralSurfaceConnection") {}
+
+    };
+
+    // C++ wrapper for IfcCoilType
+    struct IfcCoilType : IfcEnergyConversionDeviceType, ObjectHelper<IfcCoilType,1> { IfcCoilType() : Object("IfcCoilType") {}
+		IfcCoilTypeEnum::Out PredefinedType;
+    };
+
+    // C++ wrapper for IfcDuctFittingType
+    struct IfcDuctFittingType : IfcFlowFittingType, ObjectHelper<IfcDuctFittingType,1> { IfcDuctFittingType() : Object("IfcDuctFittingType") {}
+		IfcDuctFittingTypeEnum::Out PredefinedType;
+    };
+
+    // C++ wrapper for IfcStyledItem
+    struct IfcStyledItem : IfcRepresentationItem, ObjectHelper<IfcStyledItem,3> { IfcStyledItem() : Object("IfcStyledItem") {}
+		Maybe< Lazy< IfcRepresentationItem > > Item;
+		ListOf< Lazy< IfcPresentationStyleAssignment >, 1, 0 > Styles;
+		Maybe< IfcLabel::Out > Name;
+    };
+
+    // C++ wrapper for IfcAnnotationOccurrence
+    struct IfcAnnotationOccurrence : IfcStyledItem, ObjectHelper<IfcAnnotationOccurrence,0> { IfcAnnotationOccurrence() : Object("IfcAnnotationOccurrence") {}
+
+    };
+
+    // C++ wrapper for IfcAnnotationCurveOccurrence
+    struct IfcAnnotationCurveOccurrence : IfcAnnotationOccurrence, ObjectHelper<IfcAnnotationCurveOccurrence,0> { IfcAnnotationCurveOccurrence() : Object("IfcAnnotationCurveOccurrence") {}
+
+    };
+
+    // C++ wrapper for IfcDimensionCurve
+    struct IfcDimensionCurve : IfcAnnotationCurveOccurrence, ObjectHelper<IfcDimensionCurve,0> { IfcDimensionCurve() : Object("IfcDimensionCurve") {}
+
+    };
+
+    // C++ wrapper for IfcBoundedCurve
+    struct IfcBoundedCurve : IfcCurve, ObjectHelper<IfcBoundedCurve,0> { IfcBoundedCurve() : Object("IfcBoundedCurve") {}
+
+    };
+
+    // C++ wrapper for IfcAxis1Placement
+    struct IfcAxis1Placement : IfcPlacement, ObjectHelper<IfcAxis1Placement,1> { IfcAxis1Placement() : Object("IfcAxis1Placement") {}
+		Maybe< Lazy< IfcDirection > > Axis;
+    };
+
+    // C++ wrapper for IfcStructuralPointAction
+    struct IfcStructuralPointAction : IfcStructuralAction, ObjectHelper<IfcStructuralPointAction,0> { IfcStructuralPointAction() : Object("IfcStructuralPointAction") {}
+
+    };
+
+    // C++ wrapper for IfcSpatialStructureElement
+    struct IfcSpatialStructureElement : IfcProduct, ObjectHelper<IfcSpatialStructureElement,2> { IfcSpatialStructureElement() : Object("IfcSpatialStructureElement") {}
+		Maybe< IfcLabel::Out > LongName;
+		IfcElementCompositionEnum::Out CompositionType;
+    };
+
+    // C++ wrapper for IfcSpace
+    struct IfcSpace : IfcSpatialStructureElement, ObjectHelper<IfcSpace,2> { IfcSpace() : Object("IfcSpace") {}
+		IfcInternalOrExternalEnum::Out InteriorOrExteriorSpace;
+		Maybe< IfcLengthMeasure::Out > ElevationWithFlooring;
+    };
+
+    // C++ wrapper for IfcContextDependentUnit
+    struct IfcContextDependentUnit : IfcNamedUnit, ObjectHelper<IfcContextDependentUnit,1> { IfcContextDependentUnit() : Object("IfcContextDependentUnit") {}
+		IfcLabel::Out Name;
+    };
+
+    // C++ wrapper for IfcCoolingTowerType
+    struct IfcCoolingTowerType : IfcEnergyConversionDeviceType, ObjectHelper<IfcCoolingTowerType,1> { IfcCoolingTowerType() : Object("IfcCoolingTowerType") {}
+		IfcCoolingTowerTypeEnum::Out PredefinedType;
+    };
+
+    // C++ wrapper for IfcFacetedBrepWithVoids
+    struct IfcFacetedBrepWithVoids : IfcManifoldSolidBrep, ObjectHelper<IfcFacetedBrepWithVoids,1> { IfcFacetedBrepWithVoids() : Object("IfcFacetedBrepWithVoids") {}
+		ListOf< Lazy< IfcClosedShell >, 1, 0 > Voids;
+    };
+
+    // C++ wrapper for IfcValveType
+    struct IfcValveType : IfcFlowControllerType, ObjectHelper<IfcValveType,1> { IfcValveType() : Object("IfcValveType") {}
+		IfcValveTypeEnum::Out PredefinedType;
+    };
+
+    // C++ wrapper for IfcSystemFurnitureElementType
+    struct IfcSystemFurnitureElementType : IfcFurnishingElementType, ObjectHelper<IfcSystemFurnitureElementType,0> { IfcSystemFurnitureElementType() : Object("IfcSystemFurnitureElementType") {}
+
+    };
+
+    // C++ wrapper for IfcDiscreteAccessory
+    struct IfcDiscreteAccessory : IfcElementComponent, ObjectHelper<IfcDiscreteAccessory,0> { IfcDiscreteAccessory() : Object("IfcDiscreteAccessory") {}
+
+    };
+
+    // C++ wrapper for IfcBuildingElementType
+    struct IfcBuildingElementType : IfcElementType, ObjectHelper<IfcBuildingElementType,0> { IfcBuildingElementType() : Object("IfcBuildingElementType") {}
+
+    };
+
+    // C++ wrapper for IfcRailingType
+    struct IfcRailingType : IfcBuildingElementType, ObjectHelper<IfcRailingType,1> { IfcRailingType() : Object("IfcRailingType") {}
+		IfcRailingTypeEnum::Out PredefinedType;
+    };
+
+    // C++ wrapper for IfcGasTerminalType
+    struct IfcGasTerminalType : IfcFlowTerminalType, ObjectHelper<IfcGasTerminalType,1> { IfcGasTerminalType() : Object("IfcGasTerminalType") {}
+		IfcGasTerminalTypeEnum::Out PredefinedType;
+    };
+
+    // C++ wrapper for IfcSpaceProgram
+    struct IfcSpaceProgram : IfcControl, ObjectHelper<IfcSpaceProgram,5> { IfcSpaceProgram() : Object("IfcSpaceProgram") {}
+		IfcIdentifier::Out SpaceProgramIdentifier;
+		Maybe< IfcAreaMeasure::Out > MaxRequiredArea;
+		Maybe< IfcAreaMeasure::Out > MinRequiredArea;
+		Maybe< Lazy< IfcSpatialStructureElement > > RequestedLocation;
+		IfcAreaMeasure::Out StandardRequiredArea;
+    };
+
+    // C++ wrapper for IfcCovering
+    struct IfcCovering : IfcBuildingElement, ObjectHelper<IfcCovering,1> { IfcCovering() : Object("IfcCovering") {}
+		Maybe< IfcCoveringTypeEnum::Out > PredefinedType;
+    };
+
+    // C++ wrapper for IfcPresentationStyle
+    struct IfcPresentationStyle :  ObjectHelper<IfcPresentationStyle,1> { IfcPresentationStyle() : Object("IfcPresentationStyle") {}
+		Maybe< IfcLabel::Out > Name;
+    };
+
+    // C++ wrapper for IfcElectricHeaterType
+    struct IfcElectricHeaterType : IfcFlowTerminalType, ObjectHelper<IfcElectricHeaterType,1> { IfcElectricHeaterType() : Object("IfcElectricHeaterType") {}
+		IfcElectricHeaterTypeEnum::Out PredefinedType;
+    };
+
+    // C++ wrapper for IfcBuildingStorey
+    struct IfcBuildingStorey : IfcSpatialStructureElement, ObjectHelper<IfcBuildingStorey,1> { IfcBuildingStorey() : Object("IfcBuildingStorey") {}
+		Maybe< IfcLengthMeasure::Out > Elevation;
+    };
+
+    // C++ wrapper for IfcVertex
+    struct IfcVertex : IfcTopologicalRepresentationItem, ObjectHelper<IfcVertex,0> { IfcVertex() : Object("IfcVertex") {}
+
+    };
+
+    // C++ wrapper for IfcVertexPoint
+    struct IfcVertexPoint : IfcVertex, ObjectHelper<IfcVertexPoint,1> { IfcVertexPoint() : Object("IfcVertexPoint") {}
+		Lazy< IfcPoint > VertexGeometry;
+    };
+
+    // C++ wrapper for IfcFlowInstrumentType
+    struct IfcFlowInstrumentType : IfcDistributionControlElementType, ObjectHelper<IfcFlowInstrumentType,1> { IfcFlowInstrumentType() : Object("IfcFlowInstrumentType") {}
+		IfcFlowInstrumentTypeEnum::Out PredefinedType;
+    };
+
+    // C++ wrapper for IfcParameterizedProfileDef
+    struct IfcParameterizedProfileDef : IfcProfileDef, ObjectHelper<IfcParameterizedProfileDef,1> { IfcParameterizedProfileDef() : Object("IfcParameterizedProfileDef") {}
+		Lazy< IfcAxis2Placement2D > Position;
+    };
+
+    // C++ wrapper for IfcUShapeProfileDef
+    struct IfcUShapeProfileDef : IfcParameterizedProfileDef, ObjectHelper<IfcUShapeProfileDef,8> { IfcUShapeProfileDef() : Object("IfcUShapeProfileDef") {}
+		IfcPositiveLengthMeasure::Out Depth;
+		IfcPositiveLengthMeasure::Out FlangeWidth;
+		IfcPositiveLengthMeasure::Out WebThickness;
+		IfcPositiveLengthMeasure::Out FlangeThickness;
+		Maybe< IfcPositiveLengthMeasure::Out > FilletRadius;
+		Maybe< IfcPositiveLengthMeasure::Out > EdgeRadius;
+		Maybe< IfcPlaneAngleMeasure::Out > FlangeSlope;
+		Maybe< IfcPositiveLengthMeasure::Out > CentreOfGravityInX;
+    };
+
+    // C++ wrapper for IfcRamp
+    struct IfcRamp : IfcBuildingElement, ObjectHelper<IfcRamp,1> { IfcRamp() : Object("IfcRamp") {}
+		IfcRampTypeEnum::Out ShapeType;
+    };
+
+    // C++ wrapper for IfcCompositeCurve
+    struct IfcCompositeCurve : IfcBoundedCurve, ObjectHelper<IfcCompositeCurve,2> { IfcCompositeCurve() : Object("IfcCompositeCurve") {}
+		ListOf< Lazy< IfcCompositeCurveSegment >, 1, 0 > Segments;
+		LOGICAL::Out SelfIntersect;
+    };
+
+    // C++ wrapper for IfcStructuralCurveMemberVarying
+    struct IfcStructuralCurveMemberVarying : IfcStructuralCurveMember, ObjectHelper<IfcStructuralCurveMemberVarying,0> { IfcStructuralCurveMemberVarying() : Object("IfcStructuralCurveMemberVarying") {}
+
+    };
+
+    // C++ wrapper for IfcRampFlightType
+    struct IfcRampFlightType : IfcBuildingElementType, ObjectHelper<IfcRampFlightType,1> { IfcRampFlightType() : Object("IfcRampFlightType") {}
+		IfcRampFlightTypeEnum::Out PredefinedType;
+    };
+
+    // C++ wrapper for IfcDraughtingCallout
+    struct IfcDraughtingCallout : IfcGeometricRepresentationItem, ObjectHelper<IfcDraughtingCallout,1> { IfcDraughtingCallout() : Object("IfcDraughtingCallout") {}
+		ListOf< IfcDraughtingCalloutElement, 1, 0 >::Out Contents;
+    };
+
+    // C++ wrapper for IfcDimensionCurveDirectedCallout
+    struct IfcDimensionCurveDirectedCallout : IfcDraughtingCallout, ObjectHelper<IfcDimensionCurveDirectedCallout,0> { IfcDimensionCurveDirectedCallout() : Object("IfcDimensionCurveDirectedCallout") {}
+
+    };
+
+    // C++ wrapper for IfcRadiusDimension
+    struct IfcRadiusDimension : IfcDimensionCurveDirectedCallout, ObjectHelper<IfcRadiusDimension,0> { IfcRadiusDimension() : Object("IfcRadiusDimension") {}
+
+    };
+
+    // C++ wrapper for IfcEdgeFeature
+    struct IfcEdgeFeature : IfcFeatureElementSubtraction, ObjectHelper<IfcEdgeFeature,1> { IfcEdgeFeature() : Object("IfcEdgeFeature") {}
+		Maybe< IfcPositiveLengthMeasure::Out > FeatureLength;
+    };
+
+    // C++ wrapper for IfcSweptAreaSolid
+    struct IfcSweptAreaSolid : IfcSolidModel, ObjectHelper<IfcSweptAreaSolid,2> { IfcSweptAreaSolid() : Object("IfcSweptAreaSolid") {}
+		Lazy< IfcProfileDef > SweptArea;
+		Lazy< IfcAxis2Placement3D > Position;
+    };
+
+    // C++ wrapper for IfcExtrudedAreaSolid
+    struct IfcExtrudedAreaSolid : IfcSweptAreaSolid, ObjectHelper<IfcExtrudedAreaSolid,2> { IfcExtrudedAreaSolid() : Object("IfcExtrudedAreaSolid") {}
+		Lazy< IfcDirection > ExtrudedDirection;
+		IfcPositiveLengthMeasure::Out Depth;
+    };
+
+    // C++ wrapper for IfcAnnotationTextOccurrence
+    struct IfcAnnotationTextOccurrence : IfcAnnotationOccurrence, ObjectHelper<IfcAnnotationTextOccurrence,0> { IfcAnnotationTextOccurrence() : Object("IfcAnnotationTextOccurrence") {}
+
+    };
+
+    // C++ wrapper for IfcStair
+    struct IfcStair : IfcBuildingElement, ObjectHelper<IfcStair,1> { IfcStair() : Object("IfcStair") {}
+		IfcStairTypeEnum::Out ShapeType;
+    };
+
+    // C++ wrapper for IfcFillAreaStyleTileSymbolWithStyle
+    struct IfcFillAreaStyleTileSymbolWithStyle : IfcGeometricRepresentationItem, ObjectHelper<IfcFillAreaStyleTileSymbolWithStyle,1> { IfcFillAreaStyleTileSymbolWithStyle() : Object("IfcFillAreaStyleTileSymbolWithStyle") {}
+		Lazy< IfcAnnotationSymbolOccurrence > Symbol;
+    };
+
+    // C++ wrapper for IfcAnnotationSymbolOccurrence
+    struct IfcAnnotationSymbolOccurrence : IfcAnnotationOccurrence, ObjectHelper<IfcAnnotationSymbolOccurrence,0> { IfcAnnotationSymbolOccurrence() : Object("IfcAnnotationSymbolOccurrence") {}
+
+    };
+
+    // C++ wrapper for IfcTerminatorSymbol
+    struct IfcTerminatorSymbol : IfcAnnotationSymbolOccurrence, ObjectHelper<IfcTerminatorSymbol,1> { IfcTerminatorSymbol() : Object("IfcTerminatorSymbol") {}
+		Lazy< IfcAnnotationCurveOccurrence > AnnotatedCurve;
+    };
+
+    // C++ wrapper for IfcDimensionCurveTerminator
+    struct IfcDimensionCurveTerminator : IfcTerminatorSymbol, ObjectHelper<IfcDimensionCurveTerminator,1> { IfcDimensionCurveTerminator() : Object("IfcDimensionCurveTerminator") {}
+		IfcDimensionExtentUsage::Out Role;
+    };
+
+    // C++ wrapper for IfcRectangleProfileDef
+    struct IfcRectangleProfileDef : IfcParameterizedProfileDef, ObjectHelper<IfcRectangleProfileDef,2> { IfcRectangleProfileDef() : Object("IfcRectangleProfileDef") {}
+		IfcPositiveLengthMeasure::Out XDim;
+		IfcPositiveLengthMeasure::Out YDim;
+    };
+
+    // C++ wrapper for IfcRectangleHollowProfileDef
+    struct IfcRectangleHollowProfileDef : IfcRectangleProfileDef, ObjectHelper<IfcRectangleHollowProfileDef,3> { IfcRectangleHollowProfileDef() : Object("IfcRectangleHollowProfileDef") {}
+		IfcPositiveLengthMeasure::Out WallThickness;
+		Maybe< IfcPositiveLengthMeasure::Out > InnerFilletRadius;
+		Maybe< IfcPositiveLengthMeasure::Out > OuterFilletRadius;
+    };
+
+    // C++ wrapper for IfcLocalPlacement
+    struct IfcLocalPlacement : IfcObjectPlacement, ObjectHelper<IfcLocalPlacement,2> { IfcLocalPlacement() : Object("IfcLocalPlacement") {}
+		Maybe< Lazy< IfcObjectPlacement > > PlacementRelTo;
+		IfcAxis2Placement::Out RelativePlacement;
+    };
+
+    // C++ wrapper for IfcTask
+    struct IfcTask : IfcProcess, ObjectHelper<IfcTask,5> { IfcTask() : Object("IfcTask") {}
+		IfcIdentifier::Out TaskId;
+		Maybe< IfcLabel::Out > Status;
+		Maybe< IfcLabel::Out > WorkMethod;
+		BOOLEAN::Out IsMilestone;
+		Maybe< INTEGER::Out > Priority;
+    };
+
+    // C++ wrapper for IfcAnnotationFillAreaOccurrence
+    struct IfcAnnotationFillAreaOccurrence : IfcAnnotationOccurrence, ObjectHelper<IfcAnnotationFillAreaOccurrence,2> { IfcAnnotationFillAreaOccurrence() : Object("IfcAnnotationFillAreaOccurrence") {}
+		Maybe< Lazy< IfcPoint > > FillStyleTarget;
+		Maybe< IfcGlobalOrLocalEnum::Out > GlobalOrLocal;
+    };
+
+    // C++ wrapper for IfcFace
+    struct IfcFace : IfcTopologicalRepresentationItem, ObjectHelper<IfcFace,1> { IfcFace() : Object("IfcFace") {}
+		ListOf< Lazy< IfcFaceBound >, 1, 0 > Bounds;
+    };
+
+    // C++ wrapper for IfcFlowSegmentType
+    struct IfcFlowSegmentType : IfcDistributionFlowElementType, ObjectHelper<IfcFlowSegmentType,0> { IfcFlowSegmentType() : Object("IfcFlowSegmentType") {}
+
+    };
+
+    // C++ wrapper for IfcDuctSegmentType
+    struct IfcDuctSegmentType : IfcFlowSegmentType, ObjectHelper<IfcDuctSegmentType,1> { IfcDuctSegmentType() : Object("IfcDuctSegmentType") {}
+		IfcDuctSegmentTypeEnum::Out PredefinedType;
+    };
+
+    // C++ wrapper for IfcConstructionResource
+    struct IfcConstructionResource : IfcResource, ObjectHelper<IfcConstructionResource,4> { IfcConstructionResource() : Object("IfcConstructionResource") {}
+		Maybe< IfcIdentifier::Out > ResourceIdentifier;
+		Maybe< IfcLabel::Out > ResourceGroup;
+		Maybe< IfcResourceConsumptionEnum::Out > ResourceConsumption;
+		Maybe< Lazy< IfcMeasureWithUnit > > BaseQuantity;
+    };
+
+    // C++ wrapper for IfcConstructionEquipmentResource
+    struct IfcConstructionEquipmentResource : IfcConstructionResource, ObjectHelper<IfcConstructionEquipmentResource,0> { IfcConstructionEquipmentResource() : Object("IfcConstructionEquipmentResource") {}
+
+    };
+
+    // C++ wrapper for IfcSanitaryTerminalType
+    struct IfcSanitaryTerminalType : IfcFlowTerminalType, ObjectHelper<IfcSanitaryTerminalType,1> { IfcSanitaryTerminalType() : Object("IfcSanitaryTerminalType") {}
+		IfcSanitaryTerminalTypeEnum::Out PredefinedType;
+    };
+
+    // C++ wrapper for IfcCircleProfileDef
+    struct IfcCircleProfileDef : IfcParameterizedProfileDef, ObjectHelper<IfcCircleProfileDef,1> { IfcCircleProfileDef() : Object("IfcCircleProfileDef") {}
+		IfcPositiveLengthMeasure::Out Radius;
+    };
+
+    // C++ wrapper for IfcStructuralReaction
+    struct IfcStructuralReaction : IfcStructuralActivity, ObjectHelper<IfcStructuralReaction,0> { IfcStructuralReaction() : Object("IfcStructuralReaction") {}
+
+    };
+
+    // C++ wrapper for IfcStructuralPointReaction
+    struct IfcStructuralPointReaction : IfcStructuralReaction, ObjectHelper<IfcStructuralPointReaction,0> { IfcStructuralPointReaction() : Object("IfcStructuralPointReaction") {}
+
+    };
+
+    // C++ wrapper for IfcRailing
+    struct IfcRailing : IfcBuildingElement, ObjectHelper<IfcRailing,1> { IfcRailing() : Object("IfcRailing") {}
+		Maybe< IfcRailingTypeEnum::Out > PredefinedType;
+    };
+
+    // C++ wrapper for IfcTextLiteral
+    struct IfcTextLiteral : IfcGeometricRepresentationItem, ObjectHelper<IfcTextLiteral,3> { IfcTextLiteral() : Object("IfcTextLiteral") {}
+		IfcPresentableText::Out Literal;
+		IfcAxis2Placement::Out Placement;
+		IfcTextPath::Out Path;
+    };
+
+    // C++ wrapper for IfcCartesianTransformationOperator
+    struct IfcCartesianTransformationOperator : IfcGeometricRepresentationItem, ObjectHelper<IfcCartesianTransformationOperator,4> { IfcCartesianTransformationOperator() : Object("IfcCartesianTransformationOperator") {}
+		Maybe< Lazy< IfcDirection > > Axis1;
+		Maybe< Lazy< IfcDirection > > Axis2;
+		Lazy< IfcCartesianPoint > LocalOrigin;
+		Maybe< REAL::Out > Scale;
+    };
+
+    // C++ wrapper for IfcLinearDimension
+    struct IfcLinearDimension : IfcDimensionCurveDirectedCallout, ObjectHelper<IfcLinearDimension,0> { IfcLinearDimension() : Object("IfcLinearDimension") {}
+
+    };
+
+    // C++ wrapper for IfcDamperType
+    struct IfcDamperType : IfcFlowControllerType, ObjectHelper<IfcDamperType,1> { IfcDamperType() : Object("IfcDamperType") {}
+		IfcDamperTypeEnum::Out PredefinedType;
+    };
+
+    // C++ wrapper for IfcSIUnit
+    struct IfcSIUnit : IfcNamedUnit, ObjectHelper<IfcSIUnit,2> { IfcSIUnit() : Object("IfcSIUnit") {}
+		Maybe< IfcSIPrefix::Out > Prefix;
+		IfcSIUnitName::Out Name;
+    };
+
+    // C++ wrapper for IfcMeasureWithUnit
+    struct IfcMeasureWithUnit :  ObjectHelper<IfcMeasureWithUnit,2> { IfcMeasureWithUnit() : Object("IfcMeasureWithUnit") {}
+		IfcValue::Out ValueComponent;
+		IfcUnit::Out UnitComponent;
+    };
+
+    // C++ wrapper for IfcDistributionElement
+    struct IfcDistributionElement : IfcElement, ObjectHelper<IfcDistributionElement,0> { IfcDistributionElement() : Object("IfcDistributionElement") {}
+
+    };
+
+    // C++ wrapper for IfcDistributionControlElement
+    struct IfcDistributionControlElement : IfcDistributionElement, ObjectHelper<IfcDistributionControlElement,1> { IfcDistributionControlElement() : Object("IfcDistributionControlElement") {}
+		Maybe< IfcIdentifier::Out > ControlElementId;
+    };
+
+    // C++ wrapper for IfcTransformerType
+    struct IfcTransformerType : IfcEnergyConversionDeviceType, ObjectHelper<IfcTransformerType,1> { IfcTransformerType() : Object("IfcTransformerType") {}
+		IfcTransformerTypeEnum::Out PredefinedType;
+    };
+
+    // C++ wrapper for IfcLaborResource
+    struct IfcLaborResource : IfcConstructionResource, ObjectHelper<IfcLaborResource,1> { IfcLaborResource() : Object("IfcLaborResource") {}
+		Maybe< IfcText::Out > SkillSet;
+    };
+
+    // C++ wrapper for IfcDerivedProfileDef
+    struct IfcDerivedProfileDef : IfcProfileDef, ObjectHelper<IfcDerivedProfileDef,3> { IfcDerivedProfileDef() : Object("IfcDerivedProfileDef") {}
+		Lazy< IfcProfileDef > ParentProfile;
+		Lazy< IfcCartesianTransformationOperator2D > Operator;
+		Maybe< IfcLabel::Out > Label;
+    };
+
+    // C++ wrapper for IfcFurnitureStandard
+    struct IfcFurnitureStandard : IfcControl, ObjectHelper<IfcFurnitureStandard,0> { IfcFurnitureStandard() : Object("IfcFurnitureStandard") {}
+
+    };
+
+    // C++ wrapper for IfcStairFlightType
+    struct IfcStairFlightType : IfcBuildingElementType, ObjectHelper<IfcStairFlightType,1> { IfcStairFlightType() : Object("IfcStairFlightType") {}
+		IfcStairFlightTypeEnum::Out PredefinedType;
+    };
+
+    // C++ wrapper for IfcWorkControl
+    struct IfcWorkControl : IfcControl, ObjectHelper<IfcWorkControl,10> { IfcWorkControl() : Object("IfcWorkControl") {}
+		IfcIdentifier::Out Identifier;
+		IfcDateTimeSelect::Out CreationDate;
+		Maybe< ListOf< Lazy< NotImplemented >, 1, 0 > > Creators;
+		Maybe< IfcLabel::Out > Purpose;
+		Maybe< IfcTimeMeasure::Out > Duration;
+		Maybe< IfcTimeMeasure::Out > TotalFloat;
+		IfcDateTimeSelect::Out StartTime;
+		Maybe< IfcDateTimeSelect::Out > FinishTime;
+		Maybe< IfcWorkControlTypeEnum::Out > WorkControlType;
+		Maybe< IfcLabel::Out > UserDefinedControlType;
+    };
+
+    // C++ wrapper for IfcWorkPlan
+    struct IfcWorkPlan : IfcWorkControl, ObjectHelper<IfcWorkPlan,0> { IfcWorkPlan() : Object("IfcWorkPlan") {}
+
+    };
+
+    // C++ wrapper for IfcCondition
+    struct IfcCondition : IfcGroup, ObjectHelper<IfcCondition,0> { IfcCondition() : Object("IfcCondition") {}
+
+    };
+
+    // C++ wrapper for IfcRelVoidsElement
+    struct IfcRelVoidsElement : IfcRelConnects, ObjectHelper<IfcRelVoidsElement,2> { IfcRelVoidsElement() : Object("IfcRelVoidsElement") {}
+		Lazy< IfcElement > RelatingBuildingElement;
+		Lazy< IfcFeatureElementSubtraction > RelatedOpeningElement;
+    };
+
+    // C++ wrapper for IfcWindow
+    struct IfcWindow : IfcBuildingElement, ObjectHelper<IfcWindow,2> { IfcWindow() : Object("IfcWindow") {}
+		Maybe< IfcPositiveLengthMeasure::Out > OverallHeight;
+		Maybe< IfcPositiveLengthMeasure::Out > OverallWidth;
+    };
+
+    // C++ wrapper for IfcProtectiveDeviceType
+    struct IfcProtectiveDeviceType : IfcFlowControllerType, ObjectHelper<IfcProtectiveDeviceType,1> { IfcProtectiveDeviceType() : Object("IfcProtectiveDeviceType") {}
+		IfcProtectiveDeviceTypeEnum::Out PredefinedType;
+    };
+
+    // C++ wrapper for IfcJunctionBoxType
+    struct IfcJunctionBoxType : IfcFlowFittingType, ObjectHelper<IfcJunctionBoxType,1> { IfcJunctionBoxType() : Object("IfcJunctionBoxType") {}
+		IfcJunctionBoxTypeEnum::Out PredefinedType;
+    };
+
+    // C++ wrapper for IfcStructuralAnalysisModel
+    struct IfcStructuralAnalysisModel : IfcSystem, ObjectHelper<IfcStructuralAnalysisModel,4> { IfcStructuralAnalysisModel() : Object("IfcStructuralAnalysisModel") {}
+		IfcAnalysisModelTypeEnum::Out PredefinedType;
+		Maybe< Lazy< IfcAxis2Placement3D > > OrientationOf2DPlane;
+		Maybe< ListOf< Lazy< IfcStructuralLoadGroup >, 1, 0 > > LoadedBy;
+		Maybe< ListOf< Lazy< IfcStructuralResultGroup >, 1, 0 > > HasResults;
+    };
+
+    // C++ wrapper for IfcAxis2Placement2D
+    struct IfcAxis2Placement2D : IfcPlacement, ObjectHelper<IfcAxis2Placement2D,1> { IfcAxis2Placement2D() : Object("IfcAxis2Placement2D") {}
+		Maybe< Lazy< IfcDirection > > RefDirection;
+    };
+
+    // C++ wrapper for IfcSpaceType
+    struct IfcSpaceType : IfcSpatialStructureElementType, ObjectHelper<IfcSpaceType,1> { IfcSpaceType() : Object("IfcSpaceType") {}
+		IfcSpaceTypeEnum::Out PredefinedType;
+    };
+
+    // C++ wrapper for IfcEllipseProfileDef
+    struct IfcEllipseProfileDef : IfcParameterizedProfileDef, ObjectHelper<IfcEllipseProfileDef,2> { IfcEllipseProfileDef() : Object("IfcEllipseProfileDef") {}
+		IfcPositiveLengthMeasure::Out SemiAxis1;
+		IfcPositiveLengthMeasure::Out SemiAxis2;
+    };
+
+    // C++ wrapper for IfcDistributionFlowElement
+    struct IfcDistributionFlowElement : IfcDistributionElement, ObjectHelper<IfcDistributionFlowElement,0> { IfcDistributionFlowElement() : Object("IfcDistributionFlowElement") {}
+
+    };
+
+    // C++ wrapper for IfcFlowMovingDevice
+    struct IfcFlowMovingDevice : IfcDistributionFlowElement, ObjectHelper<IfcFlowMovingDevice,0> { IfcFlowMovingDevice() : Object("IfcFlowMovingDevice") {}
+
+    };
+
+    // C++ wrapper for IfcSurfaceStyleWithTextures
+    struct IfcSurfaceStyleWithTextures :  ObjectHelper<IfcSurfaceStyleWithTextures,1> { IfcSurfaceStyleWithTextures() : Object("IfcSurfaceStyleWithTextures") {}
+		ListOf< Lazy< NotImplemented >, 1, 0 > Textures;
+    };
+
+    // C++ wrapper for IfcGeometricSet
+    struct IfcGeometricSet : IfcGeometricRepresentationItem, ObjectHelper<IfcGeometricSet,1> { IfcGeometricSet() : Object("IfcGeometricSet") {}
+		ListOf< IfcGeometricSetSelect, 1, 0 >::Out Elements;
+    };
+
+    // C++ wrapper for IfcProjectOrder
+    struct IfcProjectOrder : IfcControl, ObjectHelper<IfcProjectOrder,3> { IfcProjectOrder() : Object("IfcProjectOrder") {}
+		IfcIdentifier::Out ID;
+		IfcProjectOrderTypeEnum::Out PredefinedType;
+		Maybe< IfcLabel::Out > Status;
+    };
+
+    // C++ wrapper for IfcBSplineCurve
+    struct IfcBSplineCurve : IfcBoundedCurve, ObjectHelper<IfcBSplineCurve,5> { IfcBSplineCurve() : Object("IfcBSplineCurve") {}
+		INTEGER::Out Degree;
+		ListOf< Lazy< IfcCartesianPoint >, 2, 0 > ControlPointsList;
+		IfcBSplineCurveForm::Out CurveForm;
+		LOGICAL::Out ClosedCurve;
+		LOGICAL::Out SelfIntersect;
+    };
+
+    // C++ wrapper for IfcBezierCurve
+    struct IfcBezierCurve : IfcBSplineCurve, ObjectHelper<IfcBezierCurve,0> { IfcBezierCurve() : Object("IfcBezierCurve") {}
+
+    };
+
+    // C++ wrapper for IfcStructuralPointConnection
+    struct IfcStructuralPointConnection : IfcStructuralConnection, ObjectHelper<IfcStructuralPointConnection,0> { IfcStructuralPointConnection() : Object("IfcStructuralPointConnection") {}
+
+    };
+
+    // C++ wrapper for IfcFlowController
+    struct IfcFlowController : IfcDistributionFlowElement, ObjectHelper<IfcFlowController,0> { IfcFlowController() : Object("IfcFlowController") {}
+
+    };
+
+    // C++ wrapper for IfcElectricDistributionPoint
+    struct IfcElectricDistributionPoint : IfcFlowController, ObjectHelper<IfcElectricDistributionPoint,2> { IfcElectricDistributionPoint() : Object("IfcElectricDistributionPoint") {}
+		IfcElectricDistributionPointFunctionEnum::Out DistributionPointFunction;
+		Maybe< IfcLabel::Out > UserDefinedFunction;
+    };
+
+    // C++ wrapper for IfcSite
+    struct IfcSite : IfcSpatialStructureElement, ObjectHelper<IfcSite,5> { IfcSite() : Object("IfcSite") {}
+		Maybe< IfcCompoundPlaneAngleMeasure::Out > RefLatitude;
+		Maybe< IfcCompoundPlaneAngleMeasure::Out > RefLongitude;
+		Maybe< IfcLengthMeasure::Out > RefElevation;
+		Maybe< IfcLabel::Out > LandTitleNumber;
+		Maybe< Lazy< NotImplemented > > SiteAddress;
+    };
+
+    // C++ wrapper for IfcOffsetCurve3D
+    struct IfcOffsetCurve3D : IfcCurve, ObjectHelper<IfcOffsetCurve3D,4> { IfcOffsetCurve3D() : Object("IfcOffsetCurve3D") {}
+		Lazy< IfcCurve > BasisCurve;
+		IfcLengthMeasure::Out Distance;
+		LOGICAL::Out SelfIntersect;
+		Lazy< IfcDirection > RefDirection;
+    };
+
+    // C++ wrapper for IfcVirtualElement
+    struct IfcVirtualElement : IfcElement, ObjectHelper<IfcVirtualElement,0> { IfcVirtualElement() : Object("IfcVirtualElement") {}
+
+    };
+
+    // C++ wrapper for IfcConstructionProductResource
+    struct IfcConstructionProductResource : IfcConstructionResource, ObjectHelper<IfcConstructionProductResource,0> { IfcConstructionProductResource() : Object("IfcConstructionProductResource") {}
+
+    };
+
+    // C++ wrapper for IfcSurfaceCurveSweptAreaSolid
+    struct IfcSurfaceCurveSweptAreaSolid : IfcSweptAreaSolid, ObjectHelper<IfcSurfaceCurveSweptAreaSolid,4> { IfcSurfaceCurveSweptAreaSolid() : Object("IfcSurfaceCurveSweptAreaSolid") {}
+		Lazy< IfcCurve > Directrix;
+		IfcParameterValue::Out StartParam;
+		IfcParameterValue::Out EndParam;
+		Lazy< IfcSurface > ReferenceSurface;
+    };
+
+    // C++ wrapper for IfcCartesianTransformationOperator3D
+    struct IfcCartesianTransformationOperator3D : IfcCartesianTransformationOperator, ObjectHelper<IfcCartesianTransformationOperator3D,1> { IfcCartesianTransformationOperator3D() : Object("IfcCartesianTransformationOperator3D") {}
+		Maybe< Lazy< IfcDirection > > Axis3;
+    };
+
+    // C++ wrapper for IfcCartesianTransformationOperator3DnonUniform
+    struct IfcCartesianTransformationOperator3DnonUniform : IfcCartesianTransformationOperator3D, ObjectHelper<IfcCartesianTransformationOperator3DnonUniform,2> { IfcCartesianTransformationOperator3DnonUniform() : Object("IfcCartesianTransformationOperator3DnonUniform") {}
+		Maybe< REAL::Out > Scale2;
+		Maybe< REAL::Out > Scale3;
+    };
+
+    // C++ wrapper for IfcCrewResource
+    struct IfcCrewResource : IfcConstructionResource, ObjectHelper<IfcCrewResource,0> { IfcCrewResource() : Object("IfcCrewResource") {}
+
+    };
+
+    // C++ wrapper for IfcStructuralSurfaceMember
+    struct IfcStructuralSurfaceMember : IfcStructuralMember, ObjectHelper<IfcStructuralSurfaceMember,2> { IfcStructuralSurfaceMember() : Object("IfcStructuralSurfaceMember") {}
+		IfcStructuralSurfaceTypeEnum::Out PredefinedType;
+		Maybe< IfcPositiveLengthMeasure::Out > Thickness;
+    };
+
+    // C++ wrapper for Ifc2DCompositeCurve
+    struct Ifc2DCompositeCurve : IfcCompositeCurve, ObjectHelper<Ifc2DCompositeCurve,0> { Ifc2DCompositeCurve() : Object("Ifc2DCompositeCurve") {}
+
+    };
+
+    // C++ wrapper for IfcRepresentationContext
+    struct IfcRepresentationContext :  ObjectHelper<IfcRepresentationContext,2> { IfcRepresentationContext() : Object("IfcRepresentationContext") {}
+		Maybe< IfcLabel::Out > ContextIdentifier;
+		Maybe< IfcLabel::Out > ContextType;
+    };
+
+    // C++ wrapper for IfcGeometricRepresentationContext
+    struct IfcGeometricRepresentationContext : IfcRepresentationContext, ObjectHelper<IfcGeometricRepresentationContext,4> { IfcGeometricRepresentationContext() : Object("IfcGeometricRepresentationContext") {}
+		IfcDimensionCount::Out CoordinateSpaceDimension;
+		Maybe< REAL::Out > Precision;
+		IfcAxis2Placement::Out WorldCoordinateSystem;
+		Maybe< Lazy< IfcDirection > > TrueNorth;
+    };
+
+    // C++ wrapper for IfcFlowTreatmentDevice
+    struct IfcFlowTreatmentDevice : IfcDistributionFlowElement, ObjectHelper<IfcFlowTreatmentDevice,0> { IfcFlowTreatmentDevice() : Object("IfcFlowTreatmentDevice") {}
+
+    };
+
+    // C++ wrapper for IfcRightCircularCylinder
+    struct IfcRightCircularCylinder : IfcCsgPrimitive3D, ObjectHelper<IfcRightCircularCylinder,2> { IfcRightCircularCylinder() : Object("IfcRightCircularCylinder") {}
+		IfcPositiveLengthMeasure::Out Height;
+		IfcPositiveLengthMeasure::Out Radius;
+    };
+
+    // C++ wrapper for IfcWasteTerminalType
+    struct IfcWasteTerminalType : IfcFlowTerminalType, ObjectHelper<IfcWasteTerminalType,1> { IfcWasteTerminalType() : Object("IfcWasteTerminalType") {}
+		IfcWasteTerminalTypeEnum::Out PredefinedType;
+    };
+
+    // C++ wrapper for IfcBuildingElementComponent
+    struct IfcBuildingElementComponent : IfcBuildingElement, ObjectHelper<IfcBuildingElementComponent,0> { IfcBuildingElementComponent() : Object("IfcBuildingElementComponent") {}
+
+    };
+
+    // C++ wrapper for IfcBuildingElementPart
+    struct IfcBuildingElementPart : IfcBuildingElementComponent, ObjectHelper<IfcBuildingElementPart,0> { IfcBuildingElementPart() : Object("IfcBuildingElementPart") {}
+
+    };
+
+    // C++ wrapper for IfcWall
+    struct IfcWall : IfcBuildingElement, ObjectHelper<IfcWall,0> { IfcWall() : Object("IfcWall") {}
+
+    };
+
+    // C++ wrapper for IfcWallStandardCase
+    struct IfcWallStandardCase : IfcWall, ObjectHelper<IfcWallStandardCase,0> { IfcWallStandardCase() : Object("IfcWallStandardCase") {}
+
+    };
+
+    // C++ wrapper for IfcPath
+    struct IfcPath : IfcTopologicalRepresentationItem, ObjectHelper<IfcPath,1> { IfcPath() : Object("IfcPath") {}
+		ListOf< Lazy< IfcOrientedEdge >, 1, 0 > EdgeList;
+    };
+
+    // C++ wrapper for IfcDefinedSymbol
+    struct IfcDefinedSymbol : IfcGeometricRepresentationItem, ObjectHelper<IfcDefinedSymbol,2> { IfcDefinedSymbol() : Object("IfcDefinedSymbol") {}
+		IfcDefinedSymbolSelect::Out Definition;
+		Lazy< IfcCartesianTransformationOperator2D > Target;
+    };
+
+    // C++ wrapper for IfcStructuralSurfaceMemberVarying
+    struct IfcStructuralSurfaceMemberVarying : IfcStructuralSurfaceMember, ObjectHelper<IfcStructuralSurfaceMemberVarying,2> { IfcStructuralSurfaceMemberVarying() : Object("IfcStructuralSurfaceMemberVarying") {}
+		ListOf< IfcPositiveLengthMeasure, 2, 0 >::Out SubsequentThickness;
+		Lazy< NotImplemented > VaryingThicknessLocation;
+    };
+
+    // C++ wrapper for IfcPoint
+    struct IfcPoint : IfcGeometricRepresentationItem, ObjectHelper<IfcPoint,0> { IfcPoint() : Object("IfcPoint") {}
+
+    };
+
+    // C++ wrapper for IfcSurfaceOfRevolution
+    struct IfcSurfaceOfRevolution : IfcSweptSurface, ObjectHelper<IfcSurfaceOfRevolution,1> { IfcSurfaceOfRevolution() : Object("IfcSurfaceOfRevolution") {}
+		Lazy< IfcAxis1Placement > AxisPosition;
+    };
+
+    // C++ wrapper for IfcFlowTerminal
+    struct IfcFlowTerminal : IfcDistributionFlowElement, ObjectHelper<IfcFlowTerminal,0> { IfcFlowTerminal() : Object("IfcFlowTerminal") {}
+
+    };
+
+    // C++ wrapper for IfcFurnishingElement
+    struct IfcFurnishingElement : IfcElement, ObjectHelper<IfcFurnishingElement,0> { IfcFurnishingElement() : Object("IfcFurnishingElement") {}
+
+    };
+
+    // C++ wrapper for IfcSurfaceStyleShading
+    struct IfcSurfaceStyleShading :  ObjectHelper<IfcSurfaceStyleShading,1> { IfcSurfaceStyleShading() : Object("IfcSurfaceStyleShading") {}
+		Lazy< IfcColourRgb > SurfaceColour;
+    };
+
+    // C++ wrapper for IfcSurfaceStyleRendering
+    struct IfcSurfaceStyleRendering : IfcSurfaceStyleShading, ObjectHelper<IfcSurfaceStyleRendering,8> { IfcSurfaceStyleRendering() : Object("IfcSurfaceStyleRendering") {}
+		Maybe< IfcNormalisedRatioMeasure::Out > Transparency;
+		Maybe< IfcColourOrFactor::Out > DiffuseColour;
+		Maybe< IfcColourOrFactor::Out > TransmissionColour;
+		Maybe< IfcColourOrFactor::Out > DiffuseTransmissionColour;
+		Maybe< IfcColourOrFactor::Out > ReflectionColour;
+		Maybe< IfcColourOrFactor::Out > SpecularColour;
+		Maybe< IfcSpecularHighlightSelect::Out > SpecularHighlight;
+		IfcReflectanceMethodEnum::Out ReflectanceMethod;
+    };
+
+    // C++ wrapper for IfcCircleHollowProfileDef
+    struct IfcCircleHollowProfileDef : IfcCircleProfileDef, ObjectHelper<IfcCircleHollowProfileDef,1> { IfcCircleHollowProfileDef() : Object("IfcCircleHollowProfileDef") {}
+		IfcPositiveLengthMeasure::Out WallThickness;
+    };
+
+    // C++ wrapper for IfcFlowMovingDeviceType
+    struct IfcFlowMovingDeviceType : IfcDistributionFlowElementType, ObjectHelper<IfcFlowMovingDeviceType,0> { IfcFlowMovingDeviceType() : Object("IfcFlowMovingDeviceType") {}
+
+    };
+
+    // C++ wrapper for IfcFanType
+    struct IfcFanType : IfcFlowMovingDeviceType, ObjectHelper<IfcFanType,1> { IfcFanType() : Object("IfcFanType") {}
+		IfcFanTypeEnum::Out PredefinedType;
+    };
+
+    // C++ wrapper for IfcStructuralPlanarActionVarying
+    struct IfcStructuralPlanarActionVarying : IfcStructuralPlanarAction, ObjectHelper<IfcStructuralPlanarActionVarying,2> { IfcStructuralPlanarActionVarying() : Object("IfcStructuralPlanarActionVarying") {}
+		Lazy< NotImplemented > VaryingAppliedLoadLocation;
+		ListOf< Lazy< NotImplemented >, 2, 0 > SubsequentAppliedLoads;
+    };
+
+    // C++ wrapper for IfcProductRepresentation
+    struct IfcProductRepresentation :  ObjectHelper<IfcProductRepresentation,3> { IfcProductRepresentation() : Object("IfcProductRepresentation") {}
+		Maybe< IfcLabel::Out > Name;
+		Maybe< IfcText::Out > Description;
+		ListOf< Lazy< IfcRepresentation >, 1, 0 > Representations;
+    };
+
+    // C++ wrapper for IfcStackTerminalType
+    struct IfcStackTerminalType : IfcFlowTerminalType, ObjectHelper<IfcStackTerminalType,1> { IfcStackTerminalType() : Object("IfcStackTerminalType") {}
+		IfcStackTerminalTypeEnum::Out PredefinedType;
+    };
+
+    // C++ wrapper for IfcReinforcingElement
+    struct IfcReinforcingElement : IfcBuildingElementComponent, ObjectHelper<IfcReinforcingElement,1> { IfcReinforcingElement() : Object("IfcReinforcingElement") {}
+		Maybe< IfcLabel::Out > SteelGrade;
+    };
+
+    // C++ wrapper for IfcReinforcingMesh
+    struct IfcReinforcingMesh : IfcReinforcingElement, ObjectHelper<IfcReinforcingMesh,8> { IfcReinforcingMesh() : Object("IfcReinforcingMesh") {}
+		Maybe< IfcPositiveLengthMeasure::Out > MeshLength;
+		Maybe< IfcPositiveLengthMeasure::Out > MeshWidth;
+		IfcPositiveLengthMeasure::Out LongitudinalBarNominalDiameter;
+		IfcPositiveLengthMeasure::Out TransverseBarNominalDiameter;
+		IfcAreaMeasure::Out LongitudinalBarCrossSectionArea;
+		IfcAreaMeasure::Out TransverseBarCrossSectionArea;
+		IfcPositiveLengthMeasure::Out LongitudinalBarSpacing;
+		IfcPositiveLengthMeasure::Out TransverseBarSpacing;
+    };
+
+    // C++ wrapper for IfcOrderAction
+    struct IfcOrderAction : IfcTask, ObjectHelper<IfcOrderAction,1> { IfcOrderAction() : Object("IfcOrderAction") {}
+		IfcIdentifier::Out ActionID;
+    };
+
+    // C++ wrapper for IfcLightSource
+    struct IfcLightSource : IfcGeometricRepresentationItem, ObjectHelper<IfcLightSource,4> { IfcLightSource() : Object("IfcLightSource") {}
+		Maybe< IfcLabel::Out > Name;
+		Lazy< IfcColourRgb > LightColour;
+		Maybe< IfcNormalisedRatioMeasure::Out > AmbientIntensity;
+		Maybe< IfcNormalisedRatioMeasure::Out > Intensity;
+    };
+
+    // C++ wrapper for IfcLightSourceDirectional
+    struct IfcLightSourceDirectional : IfcLightSource, ObjectHelper<IfcLightSourceDirectional,1> { IfcLightSourceDirectional() : Object("IfcLightSourceDirectional") {}
+		Lazy< IfcDirection > Orientation;
+    };
+
+    // C++ wrapper for IfcLoop
+    struct IfcLoop : IfcTopologicalRepresentationItem, ObjectHelper<IfcLoop,0> { IfcLoop() : Object("IfcLoop") {}
+
+    };
+
+    // C++ wrapper for IfcVertexLoop
+    struct IfcVertexLoop : IfcLoop, ObjectHelper<IfcVertexLoop,1> { IfcVertexLoop() : Object("IfcVertexLoop") {}
+		Lazy< IfcVertex > LoopVertex;
+    };
+
+    // C++ wrapper for IfcChamferEdgeFeature
+    struct IfcChamferEdgeFeature : IfcEdgeFeature, ObjectHelper<IfcChamferEdgeFeature,2> { IfcChamferEdgeFeature() : Object("IfcChamferEdgeFeature") {}
+		Maybe< IfcPositiveLengthMeasure::Out > Width;
+		Maybe< IfcPositiveLengthMeasure::Out > Height;
+    };
+
+    // C++ wrapper for IfcElementComponentType
+    struct IfcElementComponentType : IfcElementType, ObjectHelper<IfcElementComponentType,0> { IfcElementComponentType() : Object("IfcElementComponentType") {}
+
+    };
+
+    // C++ wrapper for IfcFastenerType
+    struct IfcFastenerType : IfcElementComponentType, ObjectHelper<IfcFastenerType,0> { IfcFastenerType() : Object("IfcFastenerType") {}
+
+    };
+
+    // C++ wrapper for IfcMechanicalFastenerType
+    struct IfcMechanicalFastenerType : IfcFastenerType, ObjectHelper<IfcMechanicalFastenerType,0> { IfcMechanicalFastenerType() : Object("IfcMechanicalFastenerType") {}
+
+    };
+
+    // C++ wrapper for IfcScheduleTimeControl
+    struct IfcScheduleTimeControl : IfcControl, ObjectHelper<IfcScheduleTimeControl,18> { IfcScheduleTimeControl() : Object("IfcScheduleTimeControl") {}
+		Maybe< IfcDateTimeSelect::Out > ActualStart;
+		Maybe< IfcDateTimeSelect::Out > EarlyStart;
+		Maybe< IfcDateTimeSelect::Out > LateStart;
+		Maybe< IfcDateTimeSelect::Out > ScheduleStart;
+		Maybe< IfcDateTimeSelect::Out > ActualFinish;
+		Maybe< IfcDateTimeSelect::Out > EarlyFinish;
+		Maybe< IfcDateTimeSelect::Out > LateFinish;
+		Maybe< IfcDateTimeSelect::Out > ScheduleFinish;
+		Maybe< IfcTimeMeasure::Out > ScheduleDuration;
+		Maybe< IfcTimeMeasure::Out > ActualDuration;
+		Maybe< IfcTimeMeasure::Out > RemainingTime;
+		Maybe< IfcTimeMeasure::Out > FreeFloat;
+		Maybe< IfcTimeMeasure::Out > TotalFloat;
+		Maybe< BOOLEAN::Out > IsCritical;
+		Maybe< IfcDateTimeSelect::Out > StatusTime;
+		Maybe< IfcTimeMeasure::Out > StartFloat;
+		Maybe< IfcTimeMeasure::Out > FinishFloat;
+		Maybe< IfcPositiveRatioMeasure::Out > Completion;
+    };
+
+    // C++ wrapper for IfcSurfaceStyle
+    struct IfcSurfaceStyle : IfcPresentationStyle, ObjectHelper<IfcSurfaceStyle,2> { IfcSurfaceStyle() : Object("IfcSurfaceStyle") {}
+		IfcSurfaceSide::Out Side;
+		ListOf< IfcSurfaceStyleElementSelect, 1, 5 >::Out Styles;
+    };
+
+    // C++ wrapper for IfcOpenShell
+    struct IfcOpenShell : IfcConnectedFaceSet, ObjectHelper<IfcOpenShell,0> { IfcOpenShell() : Object("IfcOpenShell") {}
+
+    };
+
+    // C++ wrapper for IfcSubContractResource
+    struct IfcSubContractResource : IfcConstructionResource, ObjectHelper<IfcSubContractResource,2> { IfcSubContractResource() : Object("IfcSubContractResource") {}
+		Maybe< IfcActorSelect::Out > SubContractor;
+		Maybe< IfcText::Out > JobDescription;
+    };
+
+    // C++ wrapper for IfcSweptDiskSolid
+    struct IfcSweptDiskSolid : IfcSolidModel, ObjectHelper<IfcSweptDiskSolid,5> { IfcSweptDiskSolid() : Object("IfcSweptDiskSolid") {}
+		Lazy< IfcCurve > Directrix;
+		IfcPositiveLengthMeasure::Out Radius;
+		Maybe< IfcPositiveLengthMeasure::Out > InnerRadius;
+		IfcParameterValue::Out StartParam;
+		IfcParameterValue::Out EndParam;
+    };
+
+    // C++ wrapper for IfcCompositeProfileDef
+    struct IfcCompositeProfileDef : IfcProfileDef, ObjectHelper<IfcCompositeProfileDef,2> { IfcCompositeProfileDef() : Object("IfcCompositeProfileDef") {}
+		ListOf< Lazy< IfcProfileDef >, 2, 0 > Profiles;
+		Maybe< IfcLabel::Out > Label;
+    };
+
+    // C++ wrapper for IfcTankType
+    struct IfcTankType : IfcFlowStorageDeviceType, ObjectHelper<IfcTankType,1> { IfcTankType() : Object("IfcTankType") {}
+		IfcTankTypeEnum::Out PredefinedType;
+    };
+
+    // C++ wrapper for IfcSphere
+    struct IfcSphere : IfcCsgPrimitive3D, ObjectHelper<IfcSphere,1> { IfcSphere() : Object("IfcSphere") {}
+		IfcPositiveLengthMeasure::Out Radius;
+    };
+
+    // C++ wrapper for IfcPolyLoop
+    struct IfcPolyLoop : IfcLoop, ObjectHelper<IfcPolyLoop,1> { IfcPolyLoop() : Object("IfcPolyLoop") {}
+		ListOf< Lazy< IfcCartesianPoint >, 3, 0 > Polygon;
+    };
+
+    // C++ wrapper for IfcCableCarrierFittingType
+    struct IfcCableCarrierFittingType : IfcFlowFittingType, ObjectHelper<IfcCableCarrierFittingType,1> { IfcCableCarrierFittingType() : Object("IfcCableCarrierFittingType") {}
+		IfcCableCarrierFittingTypeEnum::Out PredefinedType;
+    };
+
+    // C++ wrapper for IfcHumidifierType
+    struct IfcHumidifierType : IfcEnergyConversionDeviceType, ObjectHelper<IfcHumidifierType,1> { IfcHumidifierType() : Object("IfcHumidifierType") {}
+		IfcHumidifierTypeEnum::Out PredefinedType;
+    };
+
+    // C++ wrapper for IfcPerformanceHistory
+    struct IfcPerformanceHistory : IfcControl, ObjectHelper<IfcPerformanceHistory,1> { IfcPerformanceHistory() : Object("IfcPerformanceHistory") {}
+		IfcLabel::Out LifeCyclePhase;
+    };
+
+    // C++ wrapper for IfcShapeModel
+    struct IfcShapeModel : IfcRepresentation, ObjectHelper<IfcShapeModel,0> { IfcShapeModel() : Object("IfcShapeModel") {}
+
+    };
+
+    // C++ wrapper for IfcTopologyRepresentation
+    struct IfcTopologyRepresentation : IfcShapeModel, ObjectHelper<IfcTopologyRepresentation,0> { IfcTopologyRepresentation() : Object("IfcTopologyRepresentation") {}
+
+    };
+
+    // C++ wrapper for IfcBuilding
+    struct IfcBuilding : IfcSpatialStructureElement, ObjectHelper<IfcBuilding,3> { IfcBuilding() : Object("IfcBuilding") {}
+		Maybe< IfcLengthMeasure::Out > ElevationOfRefHeight;
+		Maybe< IfcLengthMeasure::Out > ElevationOfTerrain;
+		Maybe< Lazy< NotImplemented > > BuildingAddress;
+    };
+
+    // C++ wrapper for IfcRoundedRectangleProfileDef
+    struct IfcRoundedRectangleProfileDef : IfcRectangleProfileDef, ObjectHelper<IfcRoundedRectangleProfileDef,1> { IfcRoundedRectangleProfileDef() : Object("IfcRoundedRectangleProfileDef") {}
+		IfcPositiveLengthMeasure::Out RoundingRadius;
+    };
+
+    // C++ wrapper for IfcStairFlight
+    struct IfcStairFlight : IfcBuildingElement, ObjectHelper<IfcStairFlight,4> { IfcStairFlight() : Object("IfcStairFlight") {}
+		Maybe< INTEGER::Out > NumberOfRiser;
+		Maybe< INTEGER::Out > NumberOfTreads;
+		Maybe< IfcPositiveLengthMeasure::Out > RiserHeight;
+		Maybe< IfcPositiveLengthMeasure::Out > TreadLength;
+    };
+
+    // C++ wrapper for IfcDistributionChamberElement
+    struct IfcDistributionChamberElement : IfcDistributionFlowElement, ObjectHelper<IfcDistributionChamberElement,0> { IfcDistributionChamberElement() : Object("IfcDistributionChamberElement") {}
+
+    };
+
+    // C++ wrapper for IfcShapeRepresentation
+    struct IfcShapeRepresentation : IfcShapeModel, ObjectHelper<IfcShapeRepresentation,0> { IfcShapeRepresentation() : Object("IfcShapeRepresentation") {}
+
+    };
+
+    // C++ wrapper for IfcRampFlight
+    struct IfcRampFlight : IfcBuildingElement, ObjectHelper<IfcRampFlight,0> { IfcRampFlight() : Object("IfcRampFlight") {}
+
+    };
+
+    // C++ wrapper for IfcBeamType
+    struct IfcBeamType : IfcBuildingElementType, ObjectHelper<IfcBeamType,1> { IfcBeamType() : Object("IfcBeamType") {}
+		IfcBeamTypeEnum::Out PredefinedType;
+    };
+
+    // C++ wrapper for IfcRelDecomposes
+    struct IfcRelDecomposes : IfcRelationship, ObjectHelper<IfcRelDecomposes,2> { IfcRelDecomposes() : Object("IfcRelDecomposes") {}
+		Lazy< IfcObjectDefinition > RelatingObject;
+		ListOf< Lazy< IfcObjectDefinition >, 1, 0 > RelatedObjects;
+    };
+
+    // C++ wrapper for IfcRoof
+    struct IfcRoof : IfcBuildingElement, ObjectHelper<IfcRoof,1> { IfcRoof() : Object("IfcRoof") {}
+		IfcRoofTypeEnum::Out ShapeType;
+    };
+
+    // C++ wrapper for IfcFooting
+    struct IfcFooting : IfcBuildingElement, ObjectHelper<IfcFooting,1> { IfcFooting() : Object("IfcFooting") {}
+		IfcFootingTypeEnum::Out PredefinedType;
+    };
+
+    // C++ wrapper for IfcLightSourceAmbient
+    struct IfcLightSourceAmbient : IfcLightSource, ObjectHelper<IfcLightSourceAmbient,0> { IfcLightSourceAmbient() : Object("IfcLightSourceAmbient") {}
+
+    };
+
+    // C++ wrapper for IfcWindowStyle
+    struct IfcWindowStyle : IfcTypeProduct, ObjectHelper<IfcWindowStyle,4> { IfcWindowStyle() : Object("IfcWindowStyle") {}
+		IfcWindowStyleConstructionEnum::Out ConstructionType;
+		IfcWindowStyleOperationEnum::Out OperationType;
+		BOOLEAN::Out ParameterTakesPrecedence;
+		BOOLEAN::Out Sizeable;
+    };
+
+    // C++ wrapper for IfcBuildingElementProxyType
+    struct IfcBuildingElementProxyType : IfcBuildingElementType, ObjectHelper<IfcBuildingElementProxyType,1> { IfcBuildingElementProxyType() : Object("IfcBuildingElementProxyType") {}
+		IfcBuildingElementProxyTypeEnum::Out PredefinedType;
+    };
+
+    // C++ wrapper for IfcAxis2Placement3D
+    struct IfcAxis2Placement3D : IfcPlacement, ObjectHelper<IfcAxis2Placement3D,2> { IfcAxis2Placement3D() : Object("IfcAxis2Placement3D") {}
+		Maybe< Lazy< IfcDirection > > Axis;
+		Maybe< Lazy< IfcDirection > > RefDirection;
+    };
+
+    // C++ wrapper for IfcEdgeCurve
+    struct IfcEdgeCurve : IfcEdge, ObjectHelper<IfcEdgeCurve,2> { IfcEdgeCurve() : Object("IfcEdgeCurve") {}
+		Lazy< IfcCurve > EdgeGeometry;
+		BOOLEAN::Out SameSense;
+    };
+
+    // C++ wrapper for IfcClosedShell
+    struct IfcClosedShell : IfcConnectedFaceSet, ObjectHelper<IfcClosedShell,0> { IfcClosedShell() : Object("IfcClosedShell") {}
+
+    };
+
+    // C++ wrapper for IfcTendonAnchor
+    struct IfcTendonAnchor : IfcReinforcingElement, ObjectHelper<IfcTendonAnchor,0> { IfcTendonAnchor() : Object("IfcTendonAnchor") {}
+
+    };
+
+    // C++ wrapper for IfcCondenserType
+    struct IfcCondenserType : IfcEnergyConversionDeviceType, ObjectHelper<IfcCondenserType,1> { IfcCondenserType() : Object("IfcCondenserType") {}
+		IfcCondenserTypeEnum::Out PredefinedType;
+    };
+
+    // C++ wrapper for IfcPipeSegmentType
+    struct IfcPipeSegmentType : IfcFlowSegmentType, ObjectHelper<IfcPipeSegmentType,1> { IfcPipeSegmentType() : Object("IfcPipeSegmentType") {}
+		IfcPipeSegmentTypeEnum::Out PredefinedType;
+    };
+
+    // C++ wrapper for IfcPointOnSurface
+    struct IfcPointOnSurface : IfcPoint, ObjectHelper<IfcPointOnSurface,3> { IfcPointOnSurface() : Object("IfcPointOnSurface") {}
+		Lazy< IfcSurface > BasisSurface;
+		IfcParameterValue::Out PointParameterU;
+		IfcParameterValue::Out PointParameterV;
+    };
+
+    // C++ wrapper for IfcAsset
+    struct IfcAsset : IfcGroup, ObjectHelper<IfcAsset,9> { IfcAsset() : Object("IfcAsset") {}
+		IfcIdentifier::Out AssetID;
+		Lazy< NotImplemented > OriginalValue;
+		Lazy< NotImplemented > CurrentValue;
+		Lazy< NotImplemented > TotalReplacementCost;
+		IfcActorSelect::Out Owner;
+		IfcActorSelect::Out User;
+		Lazy< NotImplemented > ResponsiblePerson;
+		Lazy< NotImplemented > IncorporationDate;
+		Lazy< NotImplemented > DepreciatedValue;
+    };
+
+    // C++ wrapper for IfcLightSourcePositional
+    struct IfcLightSourcePositional : IfcLightSource, ObjectHelper<IfcLightSourcePositional,5> { IfcLightSourcePositional() : Object("IfcLightSourcePositional") {}
+		Lazy< IfcCartesianPoint > Position;
+		IfcPositiveLengthMeasure::Out Radius;
+		IfcReal::Out ConstantAttenuation;
+		IfcReal::Out DistanceAttenuation;
+		IfcReal::Out QuadricAttenuation;
+    };
+
+    // C++ wrapper for IfcProjectionCurve
+    struct IfcProjectionCurve : IfcAnnotationCurveOccurrence, ObjectHelper<IfcProjectionCurve,0> { IfcProjectionCurve() : Object("IfcProjectionCurve") {}
+
+    };
+
+    // C++ wrapper for IfcFillAreaStyleTiles
+    struct IfcFillAreaStyleTiles : IfcGeometricRepresentationItem, ObjectHelper<IfcFillAreaStyleTiles,3> { IfcFillAreaStyleTiles() : Object("IfcFillAreaStyleTiles") {}
+		Lazy< IfcOneDirectionRepeatFactor > TilingPattern;
+		ListOf< IfcFillAreaStyleTileShapeSelect, 1, 0 >::Out Tiles;
+		IfcPositiveRatioMeasure::Out TilingScale;
+    };
+
+    // C++ wrapper for IfcRelFillsElement
+    struct IfcRelFillsElement : IfcRelConnects, ObjectHelper<IfcRelFillsElement,2> { IfcRelFillsElement() : Object("IfcRelFillsElement") {}
+		Lazy< IfcOpeningElement > RelatingOpeningElement;
+		Lazy< IfcElement > RelatedBuildingElement;
+    };
+
+    // C++ wrapper for IfcElectricMotorType
+    struct IfcElectricMotorType : IfcEnergyConversionDeviceType, ObjectHelper<IfcElectricMotorType,1> { IfcElectricMotorType() : Object("IfcElectricMotorType") {}
+		IfcElectricMotorTypeEnum::Out PredefinedType;
+    };
+
+    // C++ wrapper for IfcTendon
+    struct IfcTendon : IfcReinforcingElement, ObjectHelper<IfcTendon,8> { IfcTendon() : Object("IfcTendon") {}
+		IfcTendonTypeEnum::Out PredefinedType;
+		IfcPositiveLengthMeasure::Out NominalDiameter;
+		IfcAreaMeasure::Out CrossSectionArea;
+		Maybe< IfcForceMeasure::Out > TensionForce;
+		Maybe< IfcPressureMeasure::Out > PreStress;
+		Maybe< IfcNormalisedRatioMeasure::Out > FrictionCoefficient;
+		Maybe< IfcPositiveLengthMeasure::Out > AnchorageSlip;
+		Maybe< IfcPositiveLengthMeasure::Out > MinCurvatureRadius;
+    };
+
+    // C++ wrapper for IfcDistributionChamberElementType
+    struct IfcDistributionChamberElementType : IfcDistributionFlowElementType, ObjectHelper<IfcDistributionChamberElementType,1> { IfcDistributionChamberElementType() : Object("IfcDistributionChamberElementType") {}
+		IfcDistributionChamberElementTypeEnum::Out PredefinedType;
+    };
+
+    // C++ wrapper for IfcMemberType
+    struct IfcMemberType : IfcBuildingElementType, ObjectHelper<IfcMemberType,1> { IfcMemberType() : Object("IfcMemberType") {}
+		IfcMemberTypeEnum::Out PredefinedType;
+    };
+
+    // C++ wrapper for IfcStructuralLinearAction
+    struct IfcStructuralLinearAction : IfcStructuralAction, ObjectHelper<IfcStructuralLinearAction,1> { IfcStructuralLinearAction() : Object("IfcStructuralLinearAction") {}
+		IfcProjectedOrTrueLengthEnum::Out ProjectedOrTrue;
+    };
+
+    // C++ wrapper for IfcStructuralLinearActionVarying
+    struct IfcStructuralLinearActionVarying : IfcStructuralLinearAction, ObjectHelper<IfcStructuralLinearActionVarying,2> { IfcStructuralLinearActionVarying() : Object("IfcStructuralLinearActionVarying") {}
+		Lazy< NotImplemented > VaryingAppliedLoadLocation;
+		ListOf< Lazy< NotImplemented >, 1, 0 > SubsequentAppliedLoads;
+    };
+
+    // C++ wrapper for IfcProductDefinitionShape
+    struct IfcProductDefinitionShape : IfcProductRepresentation, ObjectHelper<IfcProductDefinitionShape,0> { IfcProductDefinitionShape() : Object("IfcProductDefinitionShape") {}
+
+    };
+
+    // C++ wrapper for IfcFastener
+    struct IfcFastener : IfcElementComponent, ObjectHelper<IfcFastener,0> { IfcFastener() : Object("IfcFastener") {}
+
+    };
+
+    // C++ wrapper for IfcMechanicalFastener
+    struct IfcMechanicalFastener : IfcFastener, ObjectHelper<IfcMechanicalFastener,2> { IfcMechanicalFastener() : Object("IfcMechanicalFastener") {}
+		Maybe< IfcPositiveLengthMeasure::Out > NominalDiameter;
+		Maybe< IfcPositiveLengthMeasure::Out > NominalLength;
+    };
+
+    // C++ wrapper for IfcEvaporatorType
+    struct IfcEvaporatorType : IfcEnergyConversionDeviceType, ObjectHelper<IfcEvaporatorType,1> { IfcEvaporatorType() : Object("IfcEvaporatorType") {}
+		IfcEvaporatorTypeEnum::Out PredefinedType;
+    };
+
+    // C++ wrapper for IfcDiscreteAccessoryType
+    struct IfcDiscreteAccessoryType : IfcElementComponentType, ObjectHelper<IfcDiscreteAccessoryType,0> { IfcDiscreteAccessoryType() : Object("IfcDiscreteAccessoryType") {}
+
+    };
+
+    // C++ wrapper for IfcStructuralCurveConnection
+    struct IfcStructuralCurveConnection : IfcStructuralConnection, ObjectHelper<IfcStructuralCurveConnection,0> { IfcStructuralCurveConnection() : Object("IfcStructuralCurveConnection") {}
+
+    };
+
+    // C++ wrapper for IfcProjectionElement
+    struct IfcProjectionElement : IfcFeatureElementAddition, ObjectHelper<IfcProjectionElement,0> { IfcProjectionElement() : Object("IfcProjectionElement") {}
+
+    };
+
+    // C++ wrapper for IfcCoveringType
+    struct IfcCoveringType : IfcBuildingElementType, ObjectHelper<IfcCoveringType,1> { IfcCoveringType() : Object("IfcCoveringType") {}
+		IfcCoveringTypeEnum::Out PredefinedType;
+    };
+
+    // C++ wrapper for IfcPumpType
+    struct IfcPumpType : IfcFlowMovingDeviceType, ObjectHelper<IfcPumpType,1> { IfcPumpType() : Object("IfcPumpType") {}
+		IfcPumpTypeEnum::Out PredefinedType;
+    };
+
+    // C++ wrapper for IfcPile
+    struct IfcPile : IfcBuildingElement, ObjectHelper<IfcPile,2> { IfcPile() : Object("IfcPile") {}
+		IfcPileTypeEnum::Out PredefinedType;
+		Maybe< IfcPileConstructionEnum::Out > ConstructionType;
+    };
+
+    // C++ wrapper for IfcUnitAssignment
+    struct IfcUnitAssignment :  ObjectHelper<IfcUnitAssignment,1> { IfcUnitAssignment() : Object("IfcUnitAssignment") {}
+		ListOf< IfcUnit, 1, 0 >::Out Units;
+    };
+
+    // C++ wrapper for IfcBoundingBox
+    struct IfcBoundingBox : IfcGeometricRepresentationItem, ObjectHelper<IfcBoundingBox,4> { IfcBoundingBox() : Object("IfcBoundingBox") {}
+		Lazy< IfcCartesianPoint > Corner;
+		IfcPositiveLengthMeasure::Out XDim;
+		IfcPositiveLengthMeasure::Out YDim;
+		IfcPositiveLengthMeasure::Out ZDim;
+    };
+
+    // C++ wrapper for IfcShellBasedSurfaceModel
+    struct IfcShellBasedSurfaceModel : IfcGeometricRepresentationItem, ObjectHelper<IfcShellBasedSurfaceModel,1> { IfcShellBasedSurfaceModel() : Object("IfcShellBasedSurfaceModel") {}
+		ListOf< IfcShell, 1, 0 >::Out SbsmBoundary;
+    };
+
+    // C++ wrapper for IfcFacetedBrep
+    struct IfcFacetedBrep : IfcManifoldSolidBrep, ObjectHelper<IfcFacetedBrep,0> { IfcFacetedBrep() : Object("IfcFacetedBrep") {}
+
+    };
+
+    // C++ wrapper for IfcTextLiteralWithExtent
+    struct IfcTextLiteralWithExtent : IfcTextLiteral, ObjectHelper<IfcTextLiteralWithExtent,2> { IfcTextLiteralWithExtent() : Object("IfcTextLiteralWithExtent") {}
+		Lazy< IfcPlanarExtent > Extent;
+		IfcBoxAlignment::Out BoxAlignment;
+    };
+
+    // C++ wrapper for IfcElectricApplianceType
+    struct IfcElectricApplianceType : IfcFlowTerminalType, ObjectHelper<IfcElectricApplianceType,1> { IfcElectricApplianceType() : Object("IfcElectricApplianceType") {}
+		IfcElectricApplianceTypeEnum::Out PredefinedType;
+    };
+
+    // C++ wrapper for IfcTrapeziumProfileDef
+    struct IfcTrapeziumProfileDef : IfcParameterizedProfileDef, ObjectHelper<IfcTrapeziumProfileDef,4> { IfcTrapeziumProfileDef() : Object("IfcTrapeziumProfileDef") {}
+		IfcPositiveLengthMeasure::Out BottomXDim;
+		IfcPositiveLengthMeasure::Out TopXDim;
+		IfcPositiveLengthMeasure::Out YDim;
+		IfcLengthMeasure::Out TopXOffset;
+    };
+
+    // C++ wrapper for IfcRelContainedInSpatialStructure
+    struct IfcRelContainedInSpatialStructure : IfcRelConnects, ObjectHelper<IfcRelContainedInSpatialStructure,2> { IfcRelContainedInSpatialStructure() : Object("IfcRelContainedInSpatialStructure") {}
+		ListOf< Lazy< IfcProduct >, 1, 0 > RelatedElements;
+		Lazy< IfcSpatialStructureElement > RelatingStructure;
+    };
+
+    // C++ wrapper for IfcEdgeLoop
+    struct IfcEdgeLoop : IfcLoop, ObjectHelper<IfcEdgeLoop,1> { IfcEdgeLoop() : Object("IfcEdgeLoop") {}
+		ListOf< Lazy< IfcOrientedEdge >, 1, 0 > EdgeList;
+    };
+
+    // C++ wrapper for IfcProject
+    struct IfcProject : IfcObject, ObjectHelper<IfcProject,4> { IfcProject() : Object("IfcProject") {}
+		Maybe< IfcLabel::Out > LongName;
+		Maybe< IfcLabel::Out > Phase;
+		ListOf< Lazy< IfcRepresentationContext >, 1, 0 > RepresentationContexts;
+		Lazy< IfcUnitAssignment > UnitsInContext;
+    };
+
+    // C++ wrapper for IfcCartesianPoint
+    struct IfcCartesianPoint : IfcPoint, ObjectHelper<IfcCartesianPoint,1> { IfcCartesianPoint() : Object("IfcCartesianPoint") {}
+		ListOf< IfcLengthMeasure, 1, 3 >::Out Coordinates;
+    };
+
+    // C++ wrapper for IfcCurveBoundedPlane
+    struct IfcCurveBoundedPlane : IfcBoundedSurface, ObjectHelper<IfcCurveBoundedPlane,3> { IfcCurveBoundedPlane() : Object("IfcCurveBoundedPlane") {}
+		Lazy< IfcPlane > BasisSurface;
+		Lazy< IfcCurve > OuterBoundary;
+		ListOf< Lazy< IfcCurve >, 0, 0 > InnerBoundaries;
+    };
+
+    // C++ wrapper for IfcWallType
+    struct IfcWallType : IfcBuildingElementType, ObjectHelper<IfcWallType,1> { IfcWallType() : Object("IfcWallType") {}
+		IfcWallTypeEnum::Out PredefinedType;
+    };
+
+    // C++ wrapper for IfcFillAreaStyleHatching
+    struct IfcFillAreaStyleHatching : IfcGeometricRepresentationItem, ObjectHelper<IfcFillAreaStyleHatching,5> { IfcFillAreaStyleHatching() : Object("IfcFillAreaStyleHatching") {}
+		Lazy< NotImplemented > HatchLineAppearance;
+		IfcHatchLineDistanceSelect::Out StartOfNextHatchLine;
+		Maybe< Lazy< IfcCartesianPoint > > PointOfReferenceHatchLine;
+		Maybe< Lazy< IfcCartesianPoint > > PatternStart;
+		IfcPlaneAngleMeasure::Out HatchLineAngle;
+    };
+
+    // C++ wrapper for IfcEquipmentStandard
+    struct IfcEquipmentStandard : IfcControl, ObjectHelper<IfcEquipmentStandard,0> { IfcEquipmentStandard() : Object("IfcEquipmentStandard") {}
+
+    };
+
+    // C++ wrapper for IfcDiameterDimension
+    struct IfcDiameterDimension : IfcDimensionCurveDirectedCallout, ObjectHelper<IfcDiameterDimension,0> { IfcDiameterDimension() : Object("IfcDiameterDimension") {}
+
+    };
+
+    // C++ wrapper for IfcStructuralLoadGroup
+    struct IfcStructuralLoadGroup : IfcGroup, ObjectHelper<IfcStructuralLoadGroup,5> { IfcStructuralLoadGroup() : Object("IfcStructuralLoadGroup") {}
+		IfcLoadGroupTypeEnum::Out PredefinedType;
+		IfcActionTypeEnum::Out ActionType;
+		IfcActionSourceTypeEnum::Out ActionSource;
+		Maybe< IfcPositiveRatioMeasure::Out > Coefficient;
+		Maybe< IfcLabel::Out > Purpose;
+    };
+
+    // C++ wrapper for IfcConstructionMaterialResource
+    struct IfcConstructionMaterialResource : IfcConstructionResource, ObjectHelper<IfcConstructionMaterialResource,2> { IfcConstructionMaterialResource() : Object("IfcConstructionMaterialResource") {}
+		Maybe< ListOf< IfcActorSelect, 1, 0 >::Out > Suppliers;
+		Maybe< IfcRatioMeasure::Out > UsageRatio;
+    };
+
+    // C++ wrapper for IfcRelAggregates
+    struct IfcRelAggregates : IfcRelDecomposes, ObjectHelper<IfcRelAggregates,0> { IfcRelAggregates() : Object("IfcRelAggregates") {}
+
+    };
+
+    // C++ wrapper for IfcBoilerType
+    struct IfcBoilerType : IfcEnergyConversionDeviceType, ObjectHelper<IfcBoilerType,1> { IfcBoilerType() : Object("IfcBoilerType") {}
+		IfcBoilerTypeEnum::Out PredefinedType;
+    };
+
+    // C++ wrapper for IfcColourSpecification
+    struct IfcColourSpecification :  ObjectHelper<IfcColourSpecification,1> { IfcColourSpecification() : Object("IfcColourSpecification") {}
+		Maybe< IfcLabel::Out > Name;
+    };
+
+    // C++ wrapper for IfcColourRgb
+    struct IfcColourRgb : IfcColourSpecification, ObjectHelper<IfcColourRgb,3> { IfcColourRgb() : Object("IfcColourRgb") {}
+		IfcNormalisedRatioMeasure::Out Red;
+		IfcNormalisedRatioMeasure::Out Green;
+		IfcNormalisedRatioMeasure::Out Blue;
+    };
+
+    // C++ wrapper for IfcDoorStyle
+    struct IfcDoorStyle : IfcTypeProduct, ObjectHelper<IfcDoorStyle,4> { IfcDoorStyle() : Object("IfcDoorStyle") {}
+		IfcDoorStyleOperationEnum::Out OperationType;
+		IfcDoorStyleConstructionEnum::Out ConstructionType;
+		BOOLEAN::Out ParameterTakesPrecedence;
+		BOOLEAN::Out Sizeable;
+    };
+
+    // C++ wrapper for IfcDuctSilencerType
+    struct IfcDuctSilencerType : IfcFlowTreatmentDeviceType, ObjectHelper<IfcDuctSilencerType,1> { IfcDuctSilencerType() : Object("IfcDuctSilencerType") {}
+		IfcDuctSilencerTypeEnum::Out PredefinedType;
+    };
+
+    // C++ wrapper for IfcLightSourceGoniometric
+    struct IfcLightSourceGoniometric : IfcLightSource, ObjectHelper<IfcLightSourceGoniometric,6> { IfcLightSourceGoniometric() : Object("IfcLightSourceGoniometric") {}
+		Lazy< IfcAxis2Placement3D > Position;
+		Maybe< Lazy< IfcColourRgb > > ColourAppearance;
+		IfcThermodynamicTemperatureMeasure::Out ColourTemperature;
+		IfcLuminousFluxMeasure::Out LuminousFlux;
+		IfcLightEmissionSourceEnum::Out LightEmissionSource;
+		IfcLightDistributionDataSourceSelect::Out LightDistributionDataSource;
+    };
+
+    // C++ wrapper for IfcActuatorType
+    struct IfcActuatorType : IfcDistributionControlElementType, ObjectHelper<IfcActuatorType,1> { IfcActuatorType() : Object("IfcActuatorType") {}
+		IfcActuatorTypeEnum::Out PredefinedType;
+    };
+
+    // C++ wrapper for IfcSensorType
+    struct IfcSensorType : IfcDistributionControlElementType, ObjectHelper<IfcSensorType,1> { IfcSensorType() : Object("IfcSensorType") {}
+		IfcSensorTypeEnum::Out PredefinedType;
+    };
+
+    // C++ wrapper for IfcAirTerminalBoxType
+    struct IfcAirTerminalBoxType : IfcFlowControllerType, ObjectHelper<IfcAirTerminalBoxType,1> { IfcAirTerminalBoxType() : Object("IfcAirTerminalBoxType") {}
+		IfcAirTerminalBoxTypeEnum::Out PredefinedType;
+    };
+
+    // C++ wrapper for IfcAnnotationSurfaceOccurrence
+    struct IfcAnnotationSurfaceOccurrence : IfcAnnotationOccurrence, ObjectHelper<IfcAnnotationSurfaceOccurrence,0> { IfcAnnotationSurfaceOccurrence() : Object("IfcAnnotationSurfaceOccurrence") {}
+
+    };
+
+    // C++ wrapper for IfcZShapeProfileDef
+    struct IfcZShapeProfileDef : IfcParameterizedProfileDef, ObjectHelper<IfcZShapeProfileDef,6> { IfcZShapeProfileDef() : Object("IfcZShapeProfileDef") {}
+		IfcPositiveLengthMeasure::Out Depth;
+		IfcPositiveLengthMeasure::Out FlangeWidth;
+		IfcPositiveLengthMeasure::Out WebThickness;
+		IfcPositiveLengthMeasure::Out FlangeThickness;
+		Maybe< IfcPositiveLengthMeasure::Out > FilletRadius;
+		Maybe< IfcPositiveLengthMeasure::Out > EdgeRadius;
+    };
+
+    // C++ wrapper for IfcRationalBezierCurve
+    struct IfcRationalBezierCurve : IfcBezierCurve, ObjectHelper<IfcRationalBezierCurve,1> { IfcRationalBezierCurve() : Object("IfcRationalBezierCurve") {}
+		ListOf< REAL, 2, 0 >::Out WeightsData;
+    };
+
+    // C++ wrapper for IfcCartesianTransformationOperator2D
+    struct IfcCartesianTransformationOperator2D : IfcCartesianTransformationOperator, ObjectHelper<IfcCartesianTransformationOperator2D,0> { IfcCartesianTransformationOperator2D() : Object("IfcCartesianTransformationOperator2D") {}
+
+    };
+
+    // C++ wrapper for IfcCartesianTransformationOperator2DnonUniform
+    struct IfcCartesianTransformationOperator2DnonUniform : IfcCartesianTransformationOperator2D, ObjectHelper<IfcCartesianTransformationOperator2DnonUniform,1> { IfcCartesianTransformationOperator2DnonUniform() : Object("IfcCartesianTransformationOperator2DnonUniform") {}
+		Maybe< REAL::Out > Scale2;
+    };
+
+    // C++ wrapper for IfcMove
+    struct IfcMove : IfcTask, ObjectHelper<IfcMove,3> { IfcMove() : Object("IfcMove") {}
+		Lazy< IfcSpatialStructureElement > MoveFrom;
+		Lazy< IfcSpatialStructureElement > MoveTo;
+		Maybe< ListOf< IfcText, 1, 0 >::Out > PunchList;
+    };
+
+    // C++ wrapper for IfcCableCarrierSegmentType
+    struct IfcCableCarrierSegmentType : IfcFlowSegmentType, ObjectHelper<IfcCableCarrierSegmentType,1> { IfcCableCarrierSegmentType() : Object("IfcCableCarrierSegmentType") {}
+		IfcCableCarrierSegmentTypeEnum::Out PredefinedType;
+    };
+
+    // C++ wrapper for IfcElectricalElement
+    struct IfcElectricalElement : IfcElement, ObjectHelper<IfcElectricalElement,0> { IfcElectricalElement() : Object("IfcElectricalElement") {}
+
+    };
+
+    // C++ wrapper for IfcChillerType
+    struct IfcChillerType : IfcEnergyConversionDeviceType, ObjectHelper<IfcChillerType,1> { IfcChillerType() : Object("IfcChillerType") {}
+		IfcChillerTypeEnum::Out PredefinedType;
+    };
+
+    // C++ wrapper for IfcReinforcingBar
+    struct IfcReinforcingBar : IfcReinforcingElement, ObjectHelper<IfcReinforcingBar,5> { IfcReinforcingBar() : Object("IfcReinforcingBar") {}
+		IfcPositiveLengthMeasure::Out NominalDiameter;
+		IfcAreaMeasure::Out CrossSectionArea;
+		Maybe< IfcPositiveLengthMeasure::Out > BarLength;
+		IfcReinforcingBarRoleEnum::Out BarRole;
+		Maybe< IfcReinforcingBarSurfaceEnum::Out > BarSurface;
+    };
+
+    // C++ wrapper for IfcCShapeProfileDef
+    struct IfcCShapeProfileDef : IfcParameterizedProfileDef, ObjectHelper<IfcCShapeProfileDef,6> { IfcCShapeProfileDef() : Object("IfcCShapeProfileDef") {}
+		IfcPositiveLengthMeasure::Out Depth;
+		IfcPositiveLengthMeasure::Out Width;
+		IfcPositiveLengthMeasure::Out WallThickness;
+		IfcPositiveLengthMeasure::Out Girth;
+		Maybe< IfcPositiveLengthMeasure::Out > InternalFilletRadius;
+		Maybe< IfcPositiveLengthMeasure::Out > CentreOfGravityInX;
+    };
+
+    // C++ wrapper for IfcPermit
+    struct IfcPermit : IfcControl, ObjectHelper<IfcPermit,1> { IfcPermit() : Object("IfcPermit") {}
+		IfcIdentifier::Out PermitID;
+    };
+
+    // C++ wrapper for IfcSlabType
+    struct IfcSlabType : IfcBuildingElementType, ObjectHelper<IfcSlabType,1> { IfcSlabType() : Object("IfcSlabType") {}
+		IfcSlabTypeEnum::Out PredefinedType;
+    };
+
+    // C++ wrapper for IfcLampType
+    struct IfcLampType : IfcFlowTerminalType, ObjectHelper<IfcLampType,1> { IfcLampType() : Object("IfcLampType") {}
+		IfcLampTypeEnum::Out PredefinedType;
+    };
+
+    // C++ wrapper for IfcPlanarExtent
+    struct IfcPlanarExtent : IfcGeometricRepresentationItem, ObjectHelper<IfcPlanarExtent,2> { IfcPlanarExtent() : Object("IfcPlanarExtent") {}
+		IfcLengthMeasure::Out SizeInX;
+		IfcLengthMeasure::Out SizeInY;
+    };
+
+    // C++ wrapper for IfcAlarmType
+    struct IfcAlarmType : IfcDistributionControlElementType, ObjectHelper<IfcAlarmType,1> { IfcAlarmType() : Object("IfcAlarmType") {}
+		IfcAlarmTypeEnum::Out PredefinedType;
+    };
+
+    // C++ wrapper for IfcElectricFlowStorageDeviceType
+    struct IfcElectricFlowStorageDeviceType : IfcFlowStorageDeviceType, ObjectHelper<IfcElectricFlowStorageDeviceType,1> { IfcElectricFlowStorageDeviceType() : Object("IfcElectricFlowStorageDeviceType") {}
+		IfcElectricFlowStorageDeviceTypeEnum::Out PredefinedType;
+    };
+
+    // C++ wrapper for IfcEquipmentElement
+    struct IfcEquipmentElement : IfcElement, ObjectHelper<IfcEquipmentElement,0> { IfcEquipmentElement() : Object("IfcEquipmentElement") {}
+
+    };
+
+    // C++ wrapper for IfcLightFixtureType
+    struct IfcLightFixtureType : IfcFlowTerminalType, ObjectHelper<IfcLightFixtureType,1> { IfcLightFixtureType() : Object("IfcLightFixtureType") {}
+		IfcLightFixtureTypeEnum::Out PredefinedType;
+    };
+
+    // C++ wrapper for IfcCurtainWall
+    struct IfcCurtainWall : IfcBuildingElement, ObjectHelper<IfcCurtainWall,0> { IfcCurtainWall() : Object("IfcCurtainWall") {}
+
+    };
+
+    // C++ wrapper for IfcSlab
+    struct IfcSlab : IfcBuildingElement, ObjectHelper<IfcSlab,1> { IfcSlab() : Object("IfcSlab") {}
+		Maybe< IfcSlabTypeEnum::Out > PredefinedType;
+    };
+
+    // C++ wrapper for IfcCurtainWallType
+    struct IfcCurtainWallType : IfcBuildingElementType, ObjectHelper<IfcCurtainWallType,1> { IfcCurtainWallType() : Object("IfcCurtainWallType") {}
+		IfcCurtainWallTypeEnum::Out PredefinedType;
+    };
+
+    // C++ wrapper for IfcOutletType
+    struct IfcOutletType : IfcFlowTerminalType, ObjectHelper<IfcOutletType,1> { IfcOutletType() : Object("IfcOutletType") {}
+		IfcOutletTypeEnum::Out PredefinedType;
+    };
+
+    // C++ wrapper for IfcCompressorType
+    struct IfcCompressorType : IfcFlowMovingDeviceType, ObjectHelper<IfcCompressorType,1> { IfcCompressorType() : Object("IfcCompressorType") {}
+		IfcCompressorTypeEnum::Out PredefinedType;
+    };
+
+    // C++ wrapper for IfcCraneRailAShapeProfileDef
+    struct IfcCraneRailAShapeProfileDef : IfcParameterizedProfileDef, ObjectHelper<IfcCraneRailAShapeProfileDef,12> { IfcCraneRailAShapeProfileDef() : Object("IfcCraneRailAShapeProfileDef") {}
+		IfcPositiveLengthMeasure::Out OverallHeight;
+		IfcPositiveLengthMeasure::Out BaseWidth2;
+		Maybe< IfcPositiveLengthMeasure::Out > Radius;
+		IfcPositiveLengthMeasure::Out HeadWidth;
+		IfcPositiveLengthMeasure::Out HeadDepth2;
+		IfcPositiveLengthMeasure::Out HeadDepth3;
+		IfcPositiveLengthMeasure::Out WebThickness;
+		IfcPositiveLengthMeasure::Out BaseWidth4;
+		IfcPositiveLengthMeasure::Out BaseDepth1;
+		IfcPositiveLengthMeasure::Out BaseDepth2;
+		IfcPositiveLengthMeasure::Out BaseDepth3;
+		Maybe< IfcPositiveLengthMeasure::Out > CentreOfGravityInY;
+    };
+
+    // C++ wrapper for IfcFlowSegment
+    struct IfcFlowSegment : IfcDistributionFlowElement, ObjectHelper<IfcFlowSegment,0> { IfcFlowSegment() : Object("IfcFlowSegment") {}
+
+    };
+
+    // C++ wrapper for IfcSectionedSpine
+    struct IfcSectionedSpine : IfcGeometricRepresentationItem, ObjectHelper<IfcSectionedSpine,3> { IfcSectionedSpine() : Object("IfcSectionedSpine") {}
+		Lazy< IfcCompositeCurve > SpineCurve;
+		ListOf< Lazy< IfcProfileDef >, 2, 0 > CrossSections;
+		ListOf< Lazy< IfcAxis2Placement3D >, 2, 0 > CrossSectionPositions;
+    };
+
+    // C++ wrapper for IfcElectricTimeControlType
+    struct IfcElectricTimeControlType : IfcFlowControllerType, ObjectHelper<IfcElectricTimeControlType,1> { IfcElectricTimeControlType() : Object("IfcElectricTimeControlType") {}
+		IfcElectricTimeControlTypeEnum::Out PredefinedType;
+    };
+
+    // C++ wrapper for IfcFaceSurface
+    struct IfcFaceSurface : IfcFace, ObjectHelper<IfcFaceSurface,2> { IfcFaceSurface() : Object("IfcFaceSurface") {}
+		Lazy< IfcSurface > FaceSurface;
+		BOOLEAN::Out SameSense;
+    };
+
+    // C++ wrapper for IfcMotorConnectionType
+    struct IfcMotorConnectionType : IfcEnergyConversionDeviceType, ObjectHelper<IfcMotorConnectionType,1> { IfcMotorConnectionType() : Object("IfcMotorConnectionType") {}
+		IfcMotorConnectionTypeEnum::Out PredefinedType;
+    };
+
+    // C++ wrapper for IfcFlowFitting
+    struct IfcFlowFitting : IfcDistributionFlowElement, ObjectHelper<IfcFlowFitting,0> { IfcFlowFitting() : Object("IfcFlowFitting") {}
+
+    };
+
+    // C++ wrapper for IfcPointOnCurve
+    struct IfcPointOnCurve : IfcPoint, ObjectHelper<IfcPointOnCurve,2> { IfcPointOnCurve() : Object("IfcPointOnCurve") {}
+		Lazy< IfcCurve > BasisCurve;
+		IfcParameterValue::Out PointParameter;
+    };
+
+    // C++ wrapper for IfcTransportElementType
+    struct IfcTransportElementType : IfcElementType, ObjectHelper<IfcTransportElementType,1> { IfcTransportElementType() : Object("IfcTransportElementType") {}
+		IfcTransportElementTypeEnum::Out PredefinedType;
+    };
+
+    // C++ wrapper for IfcCableSegmentType
+    struct IfcCableSegmentType : IfcFlowSegmentType, ObjectHelper<IfcCableSegmentType,1> { IfcCableSegmentType() : Object("IfcCableSegmentType") {}
+		IfcCableSegmentTypeEnum::Out PredefinedType;
+    };
+
+    // C++ wrapper for IfcAnnotationSurface
+    struct IfcAnnotationSurface : IfcGeometricRepresentationItem, ObjectHelper<IfcAnnotationSurface,2> { IfcAnnotationSurface() : Object("IfcAnnotationSurface") {}
+		Lazy< IfcGeometricRepresentationItem > Item;
+		Maybe< Lazy< NotImplemented > > TextureCoordinates;
+    };
+
+    // C++ wrapper for IfcCompositeCurveSegment
+    struct IfcCompositeCurveSegment : IfcGeometricRepresentationItem, ObjectHelper<IfcCompositeCurveSegment,3> { IfcCompositeCurveSegment() : Object("IfcCompositeCurveSegment") {}
+		IfcTransitionCode::Out Transition;
+		BOOLEAN::Out SameSense;
+		Lazy< IfcCurve > ParentCurve;
+    };
+
+    // C++ wrapper for IfcServiceLife
+    struct IfcServiceLife : IfcControl, ObjectHelper<IfcServiceLife,2> { IfcServiceLife() : Object("IfcServiceLife") {}
+		IfcServiceLifeTypeEnum::Out ServiceLifeType;
+		IfcTimeMeasure::Out ServiceLifeDuration;
+    };
+
+    // C++ wrapper for IfcPlateType
+    struct IfcPlateType : IfcBuildingElementType, ObjectHelper<IfcPlateType,1> { IfcPlateType() : Object("IfcPlateType") {}
+		IfcPlateTypeEnum::Out PredefinedType;
+    };
+
+    // C++ wrapper for IfcVibrationIsolatorType
+    struct IfcVibrationIsolatorType : IfcDiscreteAccessoryType, ObjectHelper<IfcVibrationIsolatorType,1> { IfcVibrationIsolatorType() : Object("IfcVibrationIsolatorType") {}
+		IfcVibrationIsolatorTypeEnum::Out PredefinedType;
+    };
+
+    // C++ wrapper for IfcTrimmedCurve
+    struct IfcTrimmedCurve : IfcBoundedCurve, ObjectHelper<IfcTrimmedCurve,5> { IfcTrimmedCurve() : Object("IfcTrimmedCurve") {}
+		Lazy< IfcCurve > BasisCurve;
+		ListOf< IfcTrimmingSelect, 1, 2 >::Out Trim1;
+		ListOf< IfcTrimmingSelect, 1, 2 >::Out Trim2;
+		BOOLEAN::Out SenseAgreement;
+		IfcTrimmingPreference::Out MasterRepresentation;
+    };
+
+    // C++ wrapper for IfcMappedItem
+    struct IfcMappedItem : IfcRepresentationItem, ObjectHelper<IfcMappedItem,2> { IfcMappedItem() : Object("IfcMappedItem") {}
+		Lazy< IfcRepresentationMap > MappingSource;
+		Lazy< IfcCartesianTransformationOperator > MappingTarget;
+    };
+
+    // C++ wrapper for IfcDirection
+    struct IfcDirection : IfcGeometricRepresentationItem, ObjectHelper<IfcDirection,1> { IfcDirection() : Object("IfcDirection") {}
+		ListOf< REAL, 2, 3 >::Out DirectionRatios;
+    };
+
+    // C++ wrapper for IfcBlock
+    struct IfcBlock : IfcCsgPrimitive3D, ObjectHelper<IfcBlock,3> { IfcBlock() : Object("IfcBlock") {}
+		IfcPositiveLengthMeasure::Out XLength;
+		IfcPositiveLengthMeasure::Out YLength;
+		IfcPositiveLengthMeasure::Out ZLength;
+    };
+
+    // C++ wrapper for IfcProjectOrderRecord
+    struct IfcProjectOrderRecord : IfcControl, ObjectHelper<IfcProjectOrderRecord,2> { IfcProjectOrderRecord() : Object("IfcProjectOrderRecord") {}
+		ListOf< Lazy< NotImplemented >, 1, 0 > Records;
+		IfcProjectOrderRecordTypeEnum::Out PredefinedType;
+    };
+
+    // C++ wrapper for IfcFlowMeterType
+    struct IfcFlowMeterType : IfcFlowControllerType, ObjectHelper<IfcFlowMeterType,1> { IfcFlowMeterType() : Object("IfcFlowMeterType") {}
+		IfcFlowMeterTypeEnum::Out PredefinedType;
+    };
+
+    // C++ wrapper for IfcControllerType
+    struct IfcControllerType : IfcDistributionControlElementType, ObjectHelper<IfcControllerType,1> { IfcControllerType() : Object("IfcControllerType") {}
+		IfcControllerTypeEnum::Out PredefinedType;
+    };
+
+    // C++ wrapper for IfcBeam
+    struct IfcBeam : IfcBuildingElement, ObjectHelper<IfcBeam,0> { IfcBeam() : Object("IfcBeam") {}
+
+    };
+
+    // C++ wrapper for IfcArbitraryOpenProfileDef
+    struct IfcArbitraryOpenProfileDef : IfcProfileDef, ObjectHelper<IfcArbitraryOpenProfileDef,1> { IfcArbitraryOpenProfileDef() : Object("IfcArbitraryOpenProfileDef") {}
+		Lazy< IfcBoundedCurve > Curve;
+    };
+
+    // C++ wrapper for IfcCenterLineProfileDef
+    struct IfcCenterLineProfileDef : IfcArbitraryOpenProfileDef, ObjectHelper<IfcCenterLineProfileDef,1> { IfcCenterLineProfileDef() : Object("IfcCenterLineProfileDef") {}
+		IfcPositiveLengthMeasure::Out Thickness;
+    };
+
+    // C++ wrapper for IfcTimeSeriesSchedule
+    struct IfcTimeSeriesSchedule : IfcControl, ObjectHelper<IfcTimeSeriesSchedule,3> { IfcTimeSeriesSchedule() : Object("IfcTimeSeriesSchedule") {}
+		Maybe< ListOf< IfcDateTimeSelect, 1, 0 >::Out > ApplicableDates;
+		IfcTimeSeriesScheduleTypeEnum::Out TimeSeriesScheduleType;
+		Lazy< NotImplemented > TimeSeries;
+    };
+
+    // C++ wrapper for IfcRoundedEdgeFeature
+    struct IfcRoundedEdgeFeature : IfcEdgeFeature, ObjectHelper<IfcRoundedEdgeFeature,1> { IfcRoundedEdgeFeature() : Object("IfcRoundedEdgeFeature") {}
+		Maybe< IfcPositiveLengthMeasure::Out > Radius;
+    };
+
+    // C++ wrapper for IfcIShapeProfileDef
+    struct IfcIShapeProfileDef : IfcParameterizedProfileDef, ObjectHelper<IfcIShapeProfileDef,5> { IfcIShapeProfileDef() : Object("IfcIShapeProfileDef") {}
+		IfcPositiveLengthMeasure::Out OverallWidth;
+		IfcPositiveLengthMeasure::Out OverallDepth;
+		IfcPositiveLengthMeasure::Out WebThickness;
+		IfcPositiveLengthMeasure::Out FlangeThickness;
+		Maybe< IfcPositiveLengthMeasure::Out > FilletRadius;
+    };
+
+    // C++ wrapper for IfcSpaceHeaterType
+    struct IfcSpaceHeaterType : IfcEnergyConversionDeviceType, ObjectHelper<IfcSpaceHeaterType,1> { IfcSpaceHeaterType() : Object("IfcSpaceHeaterType") {}
+		IfcSpaceHeaterTypeEnum::Out PredefinedType;
+    };
+
+    // C++ wrapper for IfcFlowStorageDevice
+    struct IfcFlowStorageDevice : IfcDistributionFlowElement, ObjectHelper<IfcFlowStorageDevice,0> { IfcFlowStorageDevice() : Object("IfcFlowStorageDevice") {}
+
+    };
+
+    // C++ wrapper for IfcRevolvedAreaSolid
+    struct IfcRevolvedAreaSolid : IfcSweptAreaSolid, ObjectHelper<IfcRevolvedAreaSolid,2> { IfcRevolvedAreaSolid() : Object("IfcRevolvedAreaSolid") {}
+		Lazy< IfcAxis1Placement > Axis;
+		IfcPlaneAngleMeasure::Out Angle;
+    };
+
+    // C++ wrapper for IfcDoor
+    struct IfcDoor : IfcBuildingElement, ObjectHelper<IfcDoor,2> { IfcDoor() : Object("IfcDoor") {}
+		Maybe< IfcPositiveLengthMeasure::Out > OverallHeight;
+		Maybe< IfcPositiveLengthMeasure::Out > OverallWidth;
+    };
+
+    // C++ wrapper for IfcEllipse
+    struct IfcEllipse : IfcConic, ObjectHelper<IfcEllipse,2> { IfcEllipse() : Object("IfcEllipse") {}
+		IfcPositiveLengthMeasure::Out SemiAxis1;
+		IfcPositiveLengthMeasure::Out SemiAxis2;
+    };
+
+    // C++ wrapper for IfcTubeBundleType
+    struct IfcTubeBundleType : IfcEnergyConversionDeviceType, ObjectHelper<IfcTubeBundleType,1> { IfcTubeBundleType() : Object("IfcTubeBundleType") {}
+		IfcTubeBundleTypeEnum::Out PredefinedType;
+    };
+
+    // C++ wrapper for IfcAngularDimension
+    struct IfcAngularDimension : IfcDimensionCurveDirectedCallout, ObjectHelper<IfcAngularDimension,0> { IfcAngularDimension() : Object("IfcAngularDimension") {}
+
+    };
+
+    // C++ wrapper for IfcFaceBasedSurfaceModel
+    struct IfcFaceBasedSurfaceModel : IfcGeometricRepresentationItem, ObjectHelper<IfcFaceBasedSurfaceModel,1> { IfcFaceBasedSurfaceModel() : Object("IfcFaceBasedSurfaceModel") {}
+		ListOf< Lazy< IfcConnectedFaceSet >, 1, 0 > FbsmFaces;
+    };
+
+    // C++ wrapper for IfcCraneRailFShapeProfileDef
+    struct IfcCraneRailFShapeProfileDef : IfcParameterizedProfileDef, ObjectHelper<IfcCraneRailFShapeProfileDef,9> { IfcCraneRailFShapeProfileDef() : Object("IfcCraneRailFShapeProfileDef") {}
+		IfcPositiveLengthMeasure::Out OverallHeight;
+		IfcPositiveLengthMeasure::Out HeadWidth;
+		Maybe< IfcPositiveLengthMeasure::Out > Radius;
+		IfcPositiveLengthMeasure::Out HeadDepth2;
+		IfcPositiveLengthMeasure::Out HeadDepth3;
+		IfcPositiveLengthMeasure::Out WebThickness;
+		IfcPositiveLengthMeasure::Out BaseDepth1;
+		IfcPositiveLengthMeasure::Out BaseDepth2;
+		Maybe< IfcPositiveLengthMeasure::Out > CentreOfGravityInY;
+    };
+
+    // C++ wrapper for IfcColumnType
+    struct IfcColumnType : IfcBuildingElementType, ObjectHelper<IfcColumnType,1> { IfcColumnType() : Object("IfcColumnType") {}
+		IfcColumnTypeEnum::Out PredefinedType;
+    };
+
+    // C++ wrapper for IfcTShapeProfileDef
+    struct IfcTShapeProfileDef : IfcParameterizedProfileDef, ObjectHelper<IfcTShapeProfileDef,10> { IfcTShapeProfileDef() : Object("IfcTShapeProfileDef") {}
+		IfcPositiveLengthMeasure::Out Depth;
+		IfcPositiveLengthMeasure::Out FlangeWidth;
+		IfcPositiveLengthMeasure::Out WebThickness;
+		IfcPositiveLengthMeasure::Out FlangeThickness;
+		Maybe< IfcPositiveLengthMeasure::Out > FilletRadius;
+		Maybe< IfcPositiveLengthMeasure::Out > FlangeEdgeRadius;
+		Maybe< IfcPositiveLengthMeasure::Out > WebEdgeRadius;
+		Maybe< IfcPlaneAngleMeasure::Out > WebSlope;
+		Maybe< IfcPlaneAngleMeasure::Out > FlangeSlope;
+		Maybe< IfcPositiveLengthMeasure::Out > CentreOfGravityInY;
+    };
+
+    // C++ wrapper for IfcEnergyConversionDevice
+    struct IfcEnergyConversionDevice : IfcDistributionFlowElement, ObjectHelper<IfcEnergyConversionDevice,0> { IfcEnergyConversionDevice() : Object("IfcEnergyConversionDevice") {}
+
+    };
+
+    // C++ wrapper for IfcWorkSchedule
+    struct IfcWorkSchedule : IfcWorkControl, ObjectHelper<IfcWorkSchedule,0> { IfcWorkSchedule() : Object("IfcWorkSchedule") {}
+
+    };
+
+    // C++ wrapper for IfcZone
+    struct IfcZone : IfcGroup, ObjectHelper<IfcZone,0> { IfcZone() : Object("IfcZone") {}
+
+    };
+
+    // C++ wrapper for IfcTransportElement
+    struct IfcTransportElement : IfcElement, ObjectHelper<IfcTransportElement,3> { IfcTransportElement() : Object("IfcTransportElement") {}
+		Maybe< IfcTransportElementTypeEnum::Out > OperationType;
+		Maybe< IfcMassMeasure::Out > CapacityByWeight;
+		Maybe< IfcCountMeasure::Out > CapacityByNumber;
+    };
+
+    // C++ wrapper for IfcGeometricRepresentationSubContext
+    struct IfcGeometricRepresentationSubContext : IfcGeometricRepresentationContext, ObjectHelper<IfcGeometricRepresentationSubContext,4> { IfcGeometricRepresentationSubContext() : Object("IfcGeometricRepresentationSubContext") {}
+		Lazy< IfcGeometricRepresentationContext > ParentContext;
+		Maybe< IfcPositiveRatioMeasure::Out > TargetScale;
+		IfcGeometricProjectionEnum::Out TargetView;
+		Maybe< IfcLabel::Out > UserDefinedTargetView;
+    };
+
+    // C++ wrapper for IfcLShapeProfileDef
+    struct IfcLShapeProfileDef : IfcParameterizedProfileDef, ObjectHelper<IfcLShapeProfileDef,8> { IfcLShapeProfileDef() : Object("IfcLShapeProfileDef") {}
+		IfcPositiveLengthMeasure::Out Depth;
+		Maybe< IfcPositiveLengthMeasure::Out > Width;
+		IfcPositiveLengthMeasure::Out Thickness;
+		Maybe< IfcPositiveLengthMeasure::Out > FilletRadius;
+		Maybe< IfcPositiveLengthMeasure::Out > EdgeRadius;
+		Maybe< IfcPlaneAngleMeasure::Out > LegSlope;
+		Maybe< IfcPositiveLengthMeasure::Out > CentreOfGravityInX;
+		Maybe< IfcPositiveLengthMeasure::Out > CentreOfGravityInY;
+    };
+
+    // C++ wrapper for IfcGeometricCurveSet
+    struct IfcGeometricCurveSet : IfcGeometricSet, ObjectHelper<IfcGeometricCurveSet,0> { IfcGeometricCurveSet() : Object("IfcGeometricCurveSet") {}
+
+    };
+
+    // C++ wrapper for IfcActor
+    struct IfcActor : IfcObject, ObjectHelper<IfcActor,1> { IfcActor() : Object("IfcActor") {}
+		IfcActorSelect::Out TheActor;
+    };
+
+    // C++ wrapper for IfcOccupant
+    struct IfcOccupant : IfcActor, ObjectHelper<IfcOccupant,1> { IfcOccupant() : Object("IfcOccupant") {}
+		IfcOccupantTypeEnum::Out PredefinedType;
+    };
+
+    // C++ wrapper for IfcBooleanClippingResult
+    struct IfcBooleanClippingResult : IfcBooleanResult, ObjectHelper<IfcBooleanClippingResult,0> { IfcBooleanClippingResult() : Object("IfcBooleanClippingResult") {}
+
+    };
+
+    // C++ wrapper for IfcAnnotationFillArea
+    struct IfcAnnotationFillArea : IfcGeometricRepresentationItem, ObjectHelper<IfcAnnotationFillArea,2> { IfcAnnotationFillArea() : Object("IfcAnnotationFillArea") {}
+		Lazy< IfcCurve > OuterBoundary;
+		Maybe< ListOf< Lazy< IfcCurve >, 1, 0 > > InnerBoundaries;
+    };
+
+    // C++ wrapper for IfcLightSourceSpot
+    struct IfcLightSourceSpot : IfcLightSourcePositional, ObjectHelper<IfcLightSourceSpot,4> { IfcLightSourceSpot() : Object("IfcLightSourceSpot") {}
+		Lazy< IfcDirection > Orientation;
+		Maybe< IfcReal::Out > ConcentrationExponent;
+		IfcPositivePlaneAngleMeasure::Out SpreadAngle;
+		IfcPositivePlaneAngleMeasure::Out BeamWidthAngle;
+    };
+
+    // C++ wrapper for IfcFireSuppressionTerminalType
+    struct IfcFireSuppressionTerminalType : IfcFlowTerminalType, ObjectHelper<IfcFireSuppressionTerminalType,1> { IfcFireSuppressionTerminalType() : Object("IfcFireSuppressionTerminalType") {}
+		IfcFireSuppressionTerminalTypeEnum::Out PredefinedType;
+    };
+
+    // C++ wrapper for IfcElectricGeneratorType
+    struct IfcElectricGeneratorType : IfcEnergyConversionDeviceType, ObjectHelper<IfcElectricGeneratorType,1> { IfcElectricGeneratorType() : Object("IfcElectricGeneratorType") {}
+		IfcElectricGeneratorTypeEnum::Out PredefinedType;
+    };
+
+    // C++ wrapper for IfcInventory
+    struct IfcInventory : IfcGroup, ObjectHelper<IfcInventory,6> { IfcInventory() : Object("IfcInventory") {}
+		IfcInventoryTypeEnum::Out InventoryType;
+		IfcActorSelect::Out Jurisdiction;
+		ListOf< Lazy< NotImplemented >, 1, 0 > ResponsiblePersons;
+		Lazy< NotImplemented > LastUpdateDate;
+		Maybe< Lazy< NotImplemented > > CurrentValue;
+		Maybe< Lazy< NotImplemented > > OriginalValue;
+    };
+
+    // C++ wrapper for IfcPolyline
+    struct IfcPolyline : IfcBoundedCurve, ObjectHelper<IfcPolyline,1> { IfcPolyline() : Object("IfcPolyline") {}
+		ListOf< Lazy< IfcCartesianPoint >, 2, 0 > Points;
+    };
+
+    // C++ wrapper for IfcBoxedHalfSpace
+    struct IfcBoxedHalfSpace : IfcHalfSpaceSolid, ObjectHelper<IfcBoxedHalfSpace,1> { IfcBoxedHalfSpace() : Object("IfcBoxedHalfSpace") {}
+		Lazy< IfcBoundingBox > Enclosure;
+    };
+
+    // C++ wrapper for IfcAirTerminalType
+    struct IfcAirTerminalType : IfcFlowTerminalType, ObjectHelper<IfcAirTerminalType,1> { IfcAirTerminalType() : Object("IfcAirTerminalType") {}
+		IfcAirTerminalTypeEnum::Out PredefinedType;
+    };
+
+    // C++ wrapper for IfcDistributionPort
+    struct IfcDistributionPort : IfcPort, ObjectHelper<IfcDistributionPort,1> { IfcDistributionPort() : Object("IfcDistributionPort") {}
+		Maybe< IfcFlowDirectionEnum::Out > FlowDirection;
+    };
+
+    // C++ wrapper for IfcCostItem
+    struct IfcCostItem : IfcControl, ObjectHelper<IfcCostItem,0> { IfcCostItem() : Object("IfcCostItem") {}
+
+    };
+
+    // C++ wrapper for IfcStructuredDimensionCallout
+    struct IfcStructuredDimensionCallout : IfcDraughtingCallout, ObjectHelper<IfcStructuredDimensionCallout,0> { IfcStructuredDimensionCallout() : Object("IfcStructuredDimensionCallout") {}
+
+    };
+
+    // C++ wrapper for IfcStructuralResultGroup
+    struct IfcStructuralResultGroup : IfcGroup, ObjectHelper<IfcStructuralResultGroup,3> { IfcStructuralResultGroup() : Object("IfcStructuralResultGroup") {}
+		IfcAnalysisTheoryTypeEnum::Out TheoryType;
+		Maybe< Lazy< IfcStructuralLoadGroup > > ResultForLoadGroup;
+		BOOLEAN::Out IsLinear;
+    };
+
+    // C++ wrapper for IfcOrientedEdge
+    struct IfcOrientedEdge : IfcEdge, ObjectHelper<IfcOrientedEdge,2> { IfcOrientedEdge() : Object("IfcOrientedEdge") {}
+		Lazy< IfcEdge > EdgeElement;
+		BOOLEAN::Out Orientation;
+    };
+
+    // C++ wrapper for IfcCsgSolid
+    struct IfcCsgSolid : IfcSolidModel, ObjectHelper<IfcCsgSolid,1> { IfcCsgSolid() : Object("IfcCsgSolid") {}
+		IfcCsgSelect::Out TreeRootExpression;
+    };
+
+    // C++ wrapper for IfcPlanarBox
+    struct IfcPlanarBox : IfcPlanarExtent, ObjectHelper<IfcPlanarBox,1> { IfcPlanarBox() : Object("IfcPlanarBox") {}
+		IfcAxis2Placement::Out Placement;
+    };
+
+    // C++ wrapper for IfcMaterialDefinitionRepresentation
+    struct IfcMaterialDefinitionRepresentation : IfcProductRepresentation, ObjectHelper<IfcMaterialDefinitionRepresentation,1> { IfcMaterialDefinitionRepresentation() : Object("IfcMaterialDefinitionRepresentation") {}
+		Lazy< NotImplemented > RepresentedMaterial;
+    };
+
+    // C++ wrapper for IfcAsymmetricIShapeProfileDef
+    struct IfcAsymmetricIShapeProfileDef : IfcIShapeProfileDef, ObjectHelper<IfcAsymmetricIShapeProfileDef,4> { IfcAsymmetricIShapeProfileDef() : Object("IfcAsymmetricIShapeProfileDef") {}
+		IfcPositiveLengthMeasure::Out TopFlangeWidth;
+		Maybe< IfcPositiveLengthMeasure::Out > TopFlangeThickness;
+		Maybe< IfcPositiveLengthMeasure::Out > TopFlangeFilletRadius;
+		Maybe< IfcPositiveLengthMeasure::Out > CentreOfGravityInY;
+    };
+
+    // C++ wrapper for IfcRepresentationMap
+    struct IfcRepresentationMap :  ObjectHelper<IfcRepresentationMap,2> { IfcRepresentationMap() : Object("IfcRepresentationMap") {}
+		IfcAxis2Placement::Out MappingOrigin;
+		Lazy< IfcRepresentation > MappedRepresentation;
+    };
+
+	void GetSchema(EXPRESS::ConversionSchema& out);
+
+} //! IFC
+namespace STEP {
+
+	// ******************************************************************************
+	// Converter stubs
+	// ******************************************************************************
+	
+#define DECL_CONV_STUB(type) template <> size_t GenericFill<IFC::type>(const STEP::DB& db, const EXPRESS::LIST& params, IFC::type* in)
+	
+	DECL_CONV_STUB(IfcRoot);
+	DECL_CONV_STUB(IfcObjectDefinition);
+	DECL_CONV_STUB(IfcTypeObject);
+	DECL_CONV_STUB(IfcTypeProduct);
+	DECL_CONV_STUB(IfcElementType);
+	DECL_CONV_STUB(IfcFurnishingElementType);
+	DECL_CONV_STUB(IfcFurnitureType);
+	DECL_CONV_STUB(IfcObject);
+	DECL_CONV_STUB(IfcProduct);
+	DECL_CONV_STUB(IfcGrid);
+	DECL_CONV_STUB(IfcRepresentationItem);
+	DECL_CONV_STUB(IfcGeometricRepresentationItem);
+	DECL_CONV_STUB(IfcOneDirectionRepeatFactor);
+	DECL_CONV_STUB(IfcTwoDirectionRepeatFactor);
+	DECL_CONV_STUB(IfcElement);
+	DECL_CONV_STUB(IfcElementComponent);
+	DECL_CONV_STUB(IfcSpatialStructureElementType);
+	DECL_CONV_STUB(IfcControl);
+	DECL_CONV_STUB(IfcActionRequest);
+	DECL_CONV_STUB(IfcDistributionElementType);
+	DECL_CONV_STUB(IfcDistributionFlowElementType);
+	DECL_CONV_STUB(IfcEnergyConversionDeviceType);
+	DECL_CONV_STUB(IfcCooledBeamType);
+	DECL_CONV_STUB(IfcCsgPrimitive3D);
+	DECL_CONV_STUB(IfcRectangularPyramid);
+	DECL_CONV_STUB(IfcSurface);
+	DECL_CONV_STUB(IfcBoundedSurface);
+	DECL_CONV_STUB(IfcRectangularTrimmedSurface);
+	DECL_CONV_STUB(IfcGroup);
+	DECL_CONV_STUB(IfcRelationship);
+	DECL_CONV_STUB(IfcHalfSpaceSolid);
+	DECL_CONV_STUB(IfcPolygonalBoundedHalfSpace);
+	DECL_CONV_STUB(IfcAirToAirHeatRecoveryType);
+	DECL_CONV_STUB(IfcFlowFittingType);
+	DECL_CONV_STUB(IfcPipeFittingType);
+	DECL_CONV_STUB(IfcRepresentation);
+	DECL_CONV_STUB(IfcStyleModel);
+	DECL_CONV_STUB(IfcStyledRepresentation);
+	DECL_CONV_STUB(IfcBooleanResult);
+	DECL_CONV_STUB(IfcFeatureElement);
+	DECL_CONV_STUB(IfcFeatureElementSubtraction);
+	DECL_CONV_STUB(IfcOpeningElement);
+	DECL_CONV_STUB(IfcConditionCriterion);
+	DECL_CONV_STUB(IfcFlowTerminalType);
+	DECL_CONV_STUB(IfcFlowControllerType);
+	DECL_CONV_STUB(IfcSwitchingDeviceType);
+	DECL_CONV_STUB(IfcSystem);
+	DECL_CONV_STUB(IfcElectricalCircuit);
+	DECL_CONV_STUB(IfcUnitaryEquipmentType);
+	DECL_CONV_STUB(IfcPort);
+	DECL_CONV_STUB(IfcPlacement);
+	DECL_CONV_STUB(IfcProfileDef);
+	DECL_CONV_STUB(IfcArbitraryClosedProfileDef);
+	DECL_CONV_STUB(IfcCurve);
+	DECL_CONV_STUB(IfcConic);
+	DECL_CONV_STUB(IfcCircle);
+	DECL_CONV_STUB(IfcElementarySurface);
+	DECL_CONV_STUB(IfcPlane);
+	DECL_CONV_STUB(IfcCostSchedule);
+	DECL_CONV_STUB(IfcRightCircularCone);
+	DECL_CONV_STUB(IfcElementAssembly);
+	DECL_CONV_STUB(IfcBuildingElement);
+	DECL_CONV_STUB(IfcMember);
+	DECL_CONV_STUB(IfcBuildingElementProxy);
+	DECL_CONV_STUB(IfcStructuralActivity);
+	DECL_CONV_STUB(IfcStructuralAction);
+	DECL_CONV_STUB(IfcStructuralPlanarAction);
+	DECL_CONV_STUB(IfcTopologicalRepresentationItem);
+	DECL_CONV_STUB(IfcConnectedFaceSet);
+	DECL_CONV_STUB(IfcSweptSurface);
+	DECL_CONV_STUB(IfcSurfaceOfLinearExtrusion);
+	DECL_CONV_STUB(IfcArbitraryProfileDefWithVoids);
+	DECL_CONV_STUB(IfcProcess);
+	DECL_CONV_STUB(IfcProcedure);
+	DECL_CONV_STUB(IfcVector);
+	DECL_CONV_STUB(IfcFaceBound);
+	DECL_CONV_STUB(IfcFaceOuterBound);
+	DECL_CONV_STUB(IfcFeatureElementAddition);
+	DECL_CONV_STUB(IfcNamedUnit);
+	DECL_CONV_STUB(IfcConversionBasedUnit);
+	DECL_CONV_STUB(IfcHeatExchangerType);
+	DECL_CONV_STUB(IfcPresentationStyleAssignment);
+	DECL_CONV_STUB(IfcFlowTreatmentDeviceType);
+	DECL_CONV_STUB(IfcFilterType);
+	DECL_CONV_STUB(IfcResource);
+	DECL_CONV_STUB(IfcEvaporativeCoolerType);
+	DECL_CONV_STUB(IfcOffsetCurve2D);
+	DECL_CONV_STUB(IfcEdge);
+	DECL_CONV_STUB(IfcSubedge);
+	DECL_CONV_STUB(IfcProxy);
+	DECL_CONV_STUB(IfcLine);
+	DECL_CONV_STUB(IfcColumn);
+	DECL_CONV_STUB(IfcObjectPlacement);
+	DECL_CONV_STUB(IfcGridPlacement);
+	DECL_CONV_STUB(IfcDistributionControlElementType);
+	DECL_CONV_STUB(IfcRelConnects);
+	DECL_CONV_STUB(IfcAnnotation);
+	DECL_CONV_STUB(IfcPlate);
+	DECL_CONV_STUB(IfcSolidModel);
+	DECL_CONV_STUB(IfcManifoldSolidBrep);
+	DECL_CONV_STUB(IfcFlowStorageDeviceType);
+	DECL_CONV_STUB(IfcStructuralItem);
+	DECL_CONV_STUB(IfcStructuralMember);
+	DECL_CONV_STUB(IfcStructuralCurveMember);
+	DECL_CONV_STUB(IfcStructuralConnection);
+	DECL_CONV_STUB(IfcStructuralSurfaceConnection);
+	DECL_CONV_STUB(IfcCoilType);
+	DECL_CONV_STUB(IfcDuctFittingType);
+	DECL_CONV_STUB(IfcStyledItem);
+	DECL_CONV_STUB(IfcAnnotationOccurrence);
+	DECL_CONV_STUB(IfcAnnotationCurveOccurrence);
+	DECL_CONV_STUB(IfcDimensionCurve);
+	DECL_CONV_STUB(IfcBoundedCurve);
+	DECL_CONV_STUB(IfcAxis1Placement);
+	DECL_CONV_STUB(IfcStructuralPointAction);
+	DECL_CONV_STUB(IfcSpatialStructureElement);
+	DECL_CONV_STUB(IfcSpace);
+	DECL_CONV_STUB(IfcContextDependentUnit);
+	DECL_CONV_STUB(IfcCoolingTowerType);
+	DECL_CONV_STUB(IfcFacetedBrepWithVoids);
+	DECL_CONV_STUB(IfcValveType);
+	DECL_CONV_STUB(IfcSystemFurnitureElementType);
+	DECL_CONV_STUB(IfcDiscreteAccessory);
+	DECL_CONV_STUB(IfcBuildingElementType);
+	DECL_CONV_STUB(IfcRailingType);
+	DECL_CONV_STUB(IfcGasTerminalType);
+	DECL_CONV_STUB(IfcSpaceProgram);
+	DECL_CONV_STUB(IfcCovering);
+	DECL_CONV_STUB(IfcPresentationStyle);
+	DECL_CONV_STUB(IfcElectricHeaterType);
+	DECL_CONV_STUB(IfcBuildingStorey);
+	DECL_CONV_STUB(IfcVertex);
+	DECL_CONV_STUB(IfcVertexPoint);
+	DECL_CONV_STUB(IfcFlowInstrumentType);
+	DECL_CONV_STUB(IfcParameterizedProfileDef);
+	DECL_CONV_STUB(IfcUShapeProfileDef);
+	DECL_CONV_STUB(IfcRamp);
+	DECL_CONV_STUB(IfcCompositeCurve);
+	DECL_CONV_STUB(IfcStructuralCurveMemberVarying);
+	DECL_CONV_STUB(IfcRampFlightType);
+	DECL_CONV_STUB(IfcDraughtingCallout);
+	DECL_CONV_STUB(IfcDimensionCurveDirectedCallout);
+	DECL_CONV_STUB(IfcRadiusDimension);
+	DECL_CONV_STUB(IfcEdgeFeature);
+	DECL_CONV_STUB(IfcSweptAreaSolid);
+	DECL_CONV_STUB(IfcExtrudedAreaSolid);
+	DECL_CONV_STUB(IfcAnnotationTextOccurrence);
+	DECL_CONV_STUB(IfcStair);
+	DECL_CONV_STUB(IfcFillAreaStyleTileSymbolWithStyle);
+	DECL_CONV_STUB(IfcAnnotationSymbolOccurrence);
+	DECL_CONV_STUB(IfcTerminatorSymbol);
+	DECL_CONV_STUB(IfcDimensionCurveTerminator);
+	DECL_CONV_STUB(IfcRectangleProfileDef);
+	DECL_CONV_STUB(IfcRectangleHollowProfileDef);
+	DECL_CONV_STUB(IfcLocalPlacement);
+	DECL_CONV_STUB(IfcTask);
+	DECL_CONV_STUB(IfcAnnotationFillAreaOccurrence);
+	DECL_CONV_STUB(IfcFace);
+	DECL_CONV_STUB(IfcFlowSegmentType);
+	DECL_CONV_STUB(IfcDuctSegmentType);
+	DECL_CONV_STUB(IfcConstructionResource);
+	DECL_CONV_STUB(IfcConstructionEquipmentResource);
+	DECL_CONV_STUB(IfcSanitaryTerminalType);
+	DECL_CONV_STUB(IfcCircleProfileDef);
+	DECL_CONV_STUB(IfcStructuralReaction);
+	DECL_CONV_STUB(IfcStructuralPointReaction);
+	DECL_CONV_STUB(IfcRailing);
+	DECL_CONV_STUB(IfcTextLiteral);
+	DECL_CONV_STUB(IfcCartesianTransformationOperator);
+	DECL_CONV_STUB(IfcLinearDimension);
+	DECL_CONV_STUB(IfcDamperType);
+	DECL_CONV_STUB(IfcSIUnit);
+	DECL_CONV_STUB(IfcMeasureWithUnit);
+	DECL_CONV_STUB(IfcDistributionElement);
+	DECL_CONV_STUB(IfcDistributionControlElement);
+	DECL_CONV_STUB(IfcTransformerType);
+	DECL_CONV_STUB(IfcLaborResource);
+	DECL_CONV_STUB(IfcDerivedProfileDef);
+	DECL_CONV_STUB(IfcFurnitureStandard);
+	DECL_CONV_STUB(IfcStairFlightType);
+	DECL_CONV_STUB(IfcWorkControl);
+	DECL_CONV_STUB(IfcWorkPlan);
+	DECL_CONV_STUB(IfcCondition);
+	DECL_CONV_STUB(IfcRelVoidsElement);
+	DECL_CONV_STUB(IfcWindow);
+	DECL_CONV_STUB(IfcProtectiveDeviceType);
+	DECL_CONV_STUB(IfcJunctionBoxType);
+	DECL_CONV_STUB(IfcStructuralAnalysisModel);
+	DECL_CONV_STUB(IfcAxis2Placement2D);
+	DECL_CONV_STUB(IfcSpaceType);
+	DECL_CONV_STUB(IfcEllipseProfileDef);
+	DECL_CONV_STUB(IfcDistributionFlowElement);
+	DECL_CONV_STUB(IfcFlowMovingDevice);
+	DECL_CONV_STUB(IfcSurfaceStyleWithTextures);
+	DECL_CONV_STUB(IfcGeometricSet);
+	DECL_CONV_STUB(IfcProjectOrder);
+	DECL_CONV_STUB(IfcBSplineCurve);
+	DECL_CONV_STUB(IfcBezierCurve);
+	DECL_CONV_STUB(IfcStructuralPointConnection);
+	DECL_CONV_STUB(IfcFlowController);
+	DECL_CONV_STUB(IfcElectricDistributionPoint);
+	DECL_CONV_STUB(IfcSite);
+	DECL_CONV_STUB(IfcOffsetCurve3D);
+	DECL_CONV_STUB(IfcVirtualElement);
+	DECL_CONV_STUB(IfcConstructionProductResource);
+	DECL_CONV_STUB(IfcSurfaceCurveSweptAreaSolid);
+	DECL_CONV_STUB(IfcCartesianTransformationOperator3D);
+	DECL_CONV_STUB(IfcCartesianTransformationOperator3DnonUniform);
+	DECL_CONV_STUB(IfcCrewResource);
+	DECL_CONV_STUB(IfcStructuralSurfaceMember);
+	DECL_CONV_STUB(Ifc2DCompositeCurve);
+	DECL_CONV_STUB(IfcRepresentationContext);
+	DECL_CONV_STUB(IfcGeometricRepresentationContext);
+	DECL_CONV_STUB(IfcFlowTreatmentDevice);
+	DECL_CONV_STUB(IfcRightCircularCylinder);
+	DECL_CONV_STUB(IfcWasteTerminalType);
+	DECL_CONV_STUB(IfcBuildingElementComponent);
+	DECL_CONV_STUB(IfcBuildingElementPart);
+	DECL_CONV_STUB(IfcWall);
+	DECL_CONV_STUB(IfcWallStandardCase);
+	DECL_CONV_STUB(IfcPath);
+	DECL_CONV_STUB(IfcDefinedSymbol);
+	DECL_CONV_STUB(IfcStructuralSurfaceMemberVarying);
+	DECL_CONV_STUB(IfcPoint);
+	DECL_CONV_STUB(IfcSurfaceOfRevolution);
+	DECL_CONV_STUB(IfcFlowTerminal);
+	DECL_CONV_STUB(IfcFurnishingElement);
+	DECL_CONV_STUB(IfcSurfaceStyleShading);
+	DECL_CONV_STUB(IfcSurfaceStyleRendering);
+	DECL_CONV_STUB(IfcCircleHollowProfileDef);
+	DECL_CONV_STUB(IfcFlowMovingDeviceType);
+	DECL_CONV_STUB(IfcFanType);
+	DECL_CONV_STUB(IfcStructuralPlanarActionVarying);
+	DECL_CONV_STUB(IfcProductRepresentation);
+	DECL_CONV_STUB(IfcStackTerminalType);
+	DECL_CONV_STUB(IfcReinforcingElement);
+	DECL_CONV_STUB(IfcReinforcingMesh);
+	DECL_CONV_STUB(IfcOrderAction);
+	DECL_CONV_STUB(IfcLightSource);
+	DECL_CONV_STUB(IfcLightSourceDirectional);
+	DECL_CONV_STUB(IfcLoop);
+	DECL_CONV_STUB(IfcVertexLoop);
+	DECL_CONV_STUB(IfcChamferEdgeFeature);
+	DECL_CONV_STUB(IfcElementComponentType);
+	DECL_CONV_STUB(IfcFastenerType);
+	DECL_CONV_STUB(IfcMechanicalFastenerType);
+	DECL_CONV_STUB(IfcScheduleTimeControl);
+	DECL_CONV_STUB(IfcSurfaceStyle);
+	DECL_CONV_STUB(IfcOpenShell);
+	DECL_CONV_STUB(IfcSubContractResource);
+	DECL_CONV_STUB(IfcSweptDiskSolid);
+	DECL_CONV_STUB(IfcCompositeProfileDef);
+	DECL_CONV_STUB(IfcTankType);
+	DECL_CONV_STUB(IfcSphere);
+	DECL_CONV_STUB(IfcPolyLoop);
+	DECL_CONV_STUB(IfcCableCarrierFittingType);
+	DECL_CONV_STUB(IfcHumidifierType);
+	DECL_CONV_STUB(IfcPerformanceHistory);
+	DECL_CONV_STUB(IfcShapeModel);
+	DECL_CONV_STUB(IfcTopologyRepresentation);
+	DECL_CONV_STUB(IfcBuilding);
+	DECL_CONV_STUB(IfcRoundedRectangleProfileDef);
+	DECL_CONV_STUB(IfcStairFlight);
+	DECL_CONV_STUB(IfcDistributionChamberElement);
+	DECL_CONV_STUB(IfcShapeRepresentation);
+	DECL_CONV_STUB(IfcRampFlight);
+	DECL_CONV_STUB(IfcBeamType);
+	DECL_CONV_STUB(IfcRelDecomposes);
+	DECL_CONV_STUB(IfcRoof);
+	DECL_CONV_STUB(IfcFooting);
+	DECL_CONV_STUB(IfcLightSourceAmbient);
+	DECL_CONV_STUB(IfcWindowStyle);
+	DECL_CONV_STUB(IfcBuildingElementProxyType);
+	DECL_CONV_STUB(IfcAxis2Placement3D);
+	DECL_CONV_STUB(IfcEdgeCurve);
+	DECL_CONV_STUB(IfcClosedShell);
+	DECL_CONV_STUB(IfcTendonAnchor);
+	DECL_CONV_STUB(IfcCondenserType);
+	DECL_CONV_STUB(IfcPipeSegmentType);
+	DECL_CONV_STUB(IfcPointOnSurface);
+	DECL_CONV_STUB(IfcAsset);
+	DECL_CONV_STUB(IfcLightSourcePositional);
+	DECL_CONV_STUB(IfcProjectionCurve);
+	DECL_CONV_STUB(IfcFillAreaStyleTiles);
+	DECL_CONV_STUB(IfcRelFillsElement);
+	DECL_CONV_STUB(IfcElectricMotorType);
+	DECL_CONV_STUB(IfcTendon);
+	DECL_CONV_STUB(IfcDistributionChamberElementType);
+	DECL_CONV_STUB(IfcMemberType);
+	DECL_CONV_STUB(IfcStructuralLinearAction);
+	DECL_CONV_STUB(IfcStructuralLinearActionVarying);
+	DECL_CONV_STUB(IfcProductDefinitionShape);
+	DECL_CONV_STUB(IfcFastener);
+	DECL_CONV_STUB(IfcMechanicalFastener);
+	DECL_CONV_STUB(IfcEvaporatorType);
+	DECL_CONV_STUB(IfcDiscreteAccessoryType);
+	DECL_CONV_STUB(IfcStructuralCurveConnection);
+	DECL_CONV_STUB(IfcProjectionElement);
+	DECL_CONV_STUB(IfcCoveringType);
+	DECL_CONV_STUB(IfcPumpType);
+	DECL_CONV_STUB(IfcPile);
+	DECL_CONV_STUB(IfcUnitAssignment);
+	DECL_CONV_STUB(IfcBoundingBox);
+	DECL_CONV_STUB(IfcShellBasedSurfaceModel);
+	DECL_CONV_STUB(IfcFacetedBrep);
+	DECL_CONV_STUB(IfcTextLiteralWithExtent);
+	DECL_CONV_STUB(IfcElectricApplianceType);
+	DECL_CONV_STUB(IfcTrapeziumProfileDef);
+	DECL_CONV_STUB(IfcRelContainedInSpatialStructure);
+	DECL_CONV_STUB(IfcEdgeLoop);
+	DECL_CONV_STUB(IfcProject);
+	DECL_CONV_STUB(IfcCartesianPoint);
+	DECL_CONV_STUB(IfcCurveBoundedPlane);
+	DECL_CONV_STUB(IfcWallType);
+	DECL_CONV_STUB(IfcFillAreaStyleHatching);
+	DECL_CONV_STUB(IfcEquipmentStandard);
+	DECL_CONV_STUB(IfcDiameterDimension);
+	DECL_CONV_STUB(IfcStructuralLoadGroup);
+	DECL_CONV_STUB(IfcConstructionMaterialResource);
+	DECL_CONV_STUB(IfcRelAggregates);
+	DECL_CONV_STUB(IfcBoilerType);
+	DECL_CONV_STUB(IfcColourSpecification);
+	DECL_CONV_STUB(IfcColourRgb);
+	DECL_CONV_STUB(IfcDoorStyle);
+	DECL_CONV_STUB(IfcDuctSilencerType);
+	DECL_CONV_STUB(IfcLightSourceGoniometric);
+	DECL_CONV_STUB(IfcActuatorType);
+	DECL_CONV_STUB(IfcSensorType);
+	DECL_CONV_STUB(IfcAirTerminalBoxType);
+	DECL_CONV_STUB(IfcAnnotationSurfaceOccurrence);
+	DECL_CONV_STUB(IfcZShapeProfileDef);
+	DECL_CONV_STUB(IfcRationalBezierCurve);
+	DECL_CONV_STUB(IfcCartesianTransformationOperator2D);
+	DECL_CONV_STUB(IfcCartesianTransformationOperator2DnonUniform);
+	DECL_CONV_STUB(IfcMove);
+	DECL_CONV_STUB(IfcCableCarrierSegmentType);
+	DECL_CONV_STUB(IfcElectricalElement);
+	DECL_CONV_STUB(IfcChillerType);
+	DECL_CONV_STUB(IfcReinforcingBar);
+	DECL_CONV_STUB(IfcCShapeProfileDef);
+	DECL_CONV_STUB(IfcPermit);
+	DECL_CONV_STUB(IfcSlabType);
+	DECL_CONV_STUB(IfcLampType);
+	DECL_CONV_STUB(IfcPlanarExtent);
+	DECL_CONV_STUB(IfcAlarmType);
+	DECL_CONV_STUB(IfcElectricFlowStorageDeviceType);
+	DECL_CONV_STUB(IfcEquipmentElement);
+	DECL_CONV_STUB(IfcLightFixtureType);
+	DECL_CONV_STUB(IfcCurtainWall);
+	DECL_CONV_STUB(IfcSlab);
+	DECL_CONV_STUB(IfcCurtainWallType);
+	DECL_CONV_STUB(IfcOutletType);
+	DECL_CONV_STUB(IfcCompressorType);
+	DECL_CONV_STUB(IfcCraneRailAShapeProfileDef);
+	DECL_CONV_STUB(IfcFlowSegment);
+	DECL_CONV_STUB(IfcSectionedSpine);
+	DECL_CONV_STUB(IfcElectricTimeControlType);
+	DECL_CONV_STUB(IfcFaceSurface);
+	DECL_CONV_STUB(IfcMotorConnectionType);
+	DECL_CONV_STUB(IfcFlowFitting);
+	DECL_CONV_STUB(IfcPointOnCurve);
+	DECL_CONV_STUB(IfcTransportElementType);
+	DECL_CONV_STUB(IfcCableSegmentType);
+	DECL_CONV_STUB(IfcAnnotationSurface);
+	DECL_CONV_STUB(IfcCompositeCurveSegment);
+	DECL_CONV_STUB(IfcServiceLife);
+	DECL_CONV_STUB(IfcPlateType);
+	DECL_CONV_STUB(IfcVibrationIsolatorType);
+	DECL_CONV_STUB(IfcTrimmedCurve);
+	DECL_CONV_STUB(IfcMappedItem);
+	DECL_CONV_STUB(IfcDirection);
+	DECL_CONV_STUB(IfcBlock);
+	DECL_CONV_STUB(IfcProjectOrderRecord);
+	DECL_CONV_STUB(IfcFlowMeterType);
+	DECL_CONV_STUB(IfcControllerType);
+	DECL_CONV_STUB(IfcBeam);
+	DECL_CONV_STUB(IfcArbitraryOpenProfileDef);
+	DECL_CONV_STUB(IfcCenterLineProfileDef);
+	DECL_CONV_STUB(IfcTimeSeriesSchedule);
+	DECL_CONV_STUB(IfcRoundedEdgeFeature);
+	DECL_CONV_STUB(IfcIShapeProfileDef);
+	DECL_CONV_STUB(IfcSpaceHeaterType);
+	DECL_CONV_STUB(IfcFlowStorageDevice);
+	DECL_CONV_STUB(IfcRevolvedAreaSolid);
+	DECL_CONV_STUB(IfcDoor);
+	DECL_CONV_STUB(IfcEllipse);
+	DECL_CONV_STUB(IfcTubeBundleType);
+	DECL_CONV_STUB(IfcAngularDimension);
+	DECL_CONV_STUB(IfcFaceBasedSurfaceModel);
+	DECL_CONV_STUB(IfcCraneRailFShapeProfileDef);
+	DECL_CONV_STUB(IfcColumnType);
+	DECL_CONV_STUB(IfcTShapeProfileDef);
+	DECL_CONV_STUB(IfcEnergyConversionDevice);
+	DECL_CONV_STUB(IfcWorkSchedule);
+	DECL_CONV_STUB(IfcZone);
+	DECL_CONV_STUB(IfcTransportElement);
+	DECL_CONV_STUB(IfcGeometricRepresentationSubContext);
+	DECL_CONV_STUB(IfcLShapeProfileDef);
+	DECL_CONV_STUB(IfcGeometricCurveSet);
+	DECL_CONV_STUB(IfcActor);
+	DECL_CONV_STUB(IfcOccupant);
+	DECL_CONV_STUB(IfcBooleanClippingResult);
+	DECL_CONV_STUB(IfcAnnotationFillArea);
+	DECL_CONV_STUB(IfcLightSourceSpot);
+	DECL_CONV_STUB(IfcFireSuppressionTerminalType);
+	DECL_CONV_STUB(IfcElectricGeneratorType);
+	DECL_CONV_STUB(IfcInventory);
+	DECL_CONV_STUB(IfcPolyline);
+	DECL_CONV_STUB(IfcBoxedHalfSpace);
+	DECL_CONV_STUB(IfcAirTerminalType);
+	DECL_CONV_STUB(IfcDistributionPort);
+	DECL_CONV_STUB(IfcCostItem);
+	DECL_CONV_STUB(IfcStructuredDimensionCallout);
+	DECL_CONV_STUB(IfcStructuralResultGroup);
+	DECL_CONV_STUB(IfcOrientedEdge);
+	DECL_CONV_STUB(IfcCsgSolid);
+	DECL_CONV_STUB(IfcPlanarBox);
+	DECL_CONV_STUB(IfcMaterialDefinitionRepresentation);
+	DECL_CONV_STUB(IfcAsymmetricIShapeProfileDef);
+	DECL_CONV_STUB(IfcRepresentationMap);
+
+
+#undef DECL_CONV_STUB
+
+} //! STEP
+} //! Assimp
+
+#endif // INCLUDED_IFC_READER_GEN_H

+ 448 - 0
ThirdParty/Assimp/code/IFCUtil.cpp

@@ -0,0 +1,448 @@
+/*
+Open Asset Import Library (ASSIMP)
+----------------------------------------------------------------------
+
+Copyright (c) 2006-2010, ASSIMP Development Team
+All rights reserved.
+
+Redistribution and use of this software in source and binary forms, 
+with or without modification, are permitted provided that the 
+following conditions are met:
+
+* Redistributions of source code must retain the above
+  copyright notice, this list of conditions and the
+  following disclaimer.
+
+* Redistributions in binary form must reproduce the above
+  copyright notice, this list of conditions and the
+  following disclaimer in the documentation and/or other
+  materials provided with the distribution.
+
+* Neither the name of the ASSIMP team, nor the names of its
+  contributors may be used to endorse or promote products
+  derived from this software without specific prior
+  written permission of the ASSIMP Development Team.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+----------------------------------------------------------------------
+*/
+
+/** @file  IFCUtil.cpp
+ *  @brief Implementation of conversion routines for some common Ifc helper entities.
+ */
+
+#include "AssimpPCH.h"
+
+#ifndef ASSIMP_BUILD_NO_IFC_IMPORTER
+#include "IFCUtil.h"
+#include "ProcessHelper.h"
+
+namespace Assimp {
+	namespace IFC {
+
+// ------------------------------------------------------------------------------------------------
+void TempOpening::Transform(const aiMatrix4x4& mat) 
+{
+	if(profileMesh) {
+		profileMesh->Transform(mat);
+	}
+	extrusionDir *= aiMatrix3x3(mat);
+}
+
+// ------------------------------------------------------------------------------------------------
+aiMesh* TempMesh::ToMesh() 
+{
+	ai_assert(verts.size() == std::accumulate(vertcnt.begin(),vertcnt.end(),0));
+
+	if (verts.empty()) {
+		return NULL;
+	}
+
+	std::auto_ptr<aiMesh> mesh(new aiMesh());
+
+	// copy vertices
+	mesh->mNumVertices = static_cast<unsigned int>(verts.size());
+	mesh->mVertices = new aiVector3D[mesh->mNumVertices];
+	std::copy(verts.begin(),verts.end(),mesh->mVertices);
+
+	// and build up faces
+	mesh->mNumFaces = static_cast<unsigned int>(vertcnt.size());
+	mesh->mFaces = new aiFace[mesh->mNumFaces];
+
+	for(unsigned int i = 0,n=0, acc = 0; i < mesh->mNumFaces; ++n) {
+		aiFace& f = mesh->mFaces[i];
+		if (!vertcnt[n]) {
+			--mesh->mNumFaces;
+			continue;
+		}
+
+		f.mNumIndices = vertcnt[n];
+		f.mIndices = new unsigned int[f.mNumIndices];
+		for(unsigned int a = 0; a < f.mNumIndices; ++a) {
+			f.mIndices[a] = acc++;
+		}
+
+		++i;
+	}
+
+	return mesh.release();
+}
+
+// ------------------------------------------------------------------------------------------------
+void TempMesh::Clear()
+{
+	verts.clear();
+	vertcnt.clear();
+}
+
+// ------------------------------------------------------------------------------------------------
+void TempMesh::Transform(const aiMatrix4x4& mat) 
+{
+	BOOST_FOREACH(aiVector3D& v, verts) {
+		v *= mat;
+	}
+}
+
+// ------------------------------------------------------------------------------
+aiVector3D TempMesh::Center() const
+{
+	return std::accumulate(verts.begin(),verts.end(),aiVector3D(0.f,0.f,0.f)) / static_cast<float>(verts.size());
+}
+
+// ------------------------------------------------------------------------------------------------
+void TempMesh::Append(const TempMesh& other)
+{
+	verts.insert(verts.end(),other.verts.begin(),other.verts.end());
+	vertcnt.insert(vertcnt.end(),other.vertcnt.begin(),other.vertcnt.end());
+}
+
+// ------------------------------------------------------------------------------------------------
+void TempMesh::RemoveAdjacentDuplicates() 
+{
+
+	bool drop = false;
+	std::vector<aiVector3D>::iterator base = verts.begin();
+	BOOST_FOREACH(unsigned int& cnt, vertcnt) {
+		if (cnt < 2){
+			base += cnt;
+			continue;
+		}
+
+		aiVector3D vmin,vmax;
+		ArrayBounds(&*base, cnt ,vmin,vmax);
+
+
+		const float epsilon = (vmax-vmin).SquareLength() / 1e9f;
+		//const float dotepsilon = 1e-9;
+
+		//// look for vertices that lie directly on the line between their predecessor and their 
+		//// successor and replace them with either of them.
+
+		//for(size_t i = 0; i < cnt; ++i) {
+		//	aiVector3D& v1 = *(base+i), &v0 = *(base+(i?i-1:cnt-1)), &v2 = *(base+(i+1)%cnt);
+		//	const aiVector3D& d0 = (v1-v0), &d1 = (v2-v1);
+		//	const float l0 = d0.SquareLength(), l1 = d1.SquareLength();
+		//	if (!l0 || !l1) {
+		//		continue;
+		//	}
+
+		//	const float d = (d0/sqrt(l0))*(d1/sqrt(l1));
+
+		//	if ( d >= 1.f-dotepsilon ) {
+		//		v1 = v0;
+		//	}
+		//	else if ( d < -1.f+dotepsilon ) {
+		//		v2 = v1;
+		//		continue;
+		//	}
+		//}
+
+		// drop any identical, adjacent vertices. this pass will collect the dropouts
+		// of the previous pass as a side-effect.
+		FuzzyVectorCompare fz(epsilon);
+		std::vector<aiVector3D>::iterator end = base+cnt, e = std::unique( base, end, fz );
+		if (e != end) {
+			cnt -= static_cast<unsigned int>(std::distance(e, end));
+			verts.erase(e,end);
+			drop  = true;
+		}
+
+		// check front and back vertices for this polygon
+		if (cnt > 1 && fz(*base,*(base+cnt-1))) {
+			verts.erase(base+ --cnt);
+			drop  = true;
+		}
+
+		// removing adjacent duplicates shouldn't erase everything :-)
+		ai_assert(cnt>0);
+		base += cnt;
+	}
+	if(drop) {
+		IFCImporter::LogDebug("removed duplicate vertices");
+	}
+}
+
+// ------------------------------------------------------------------------------------------------
+bool IsTrue(const EXPRESS::BOOLEAN& in)
+{
+	return (std::string)in == "TRUE" || (std::string)in == "T";
+}
+
+// ------------------------------------------------------------------------------------------------
+float ConvertSIPrefix(const std::string& prefix)
+{
+	if (prefix == "EXA") {
+		return 1e18f;
+	}
+	else if (prefix == "PETA") {
+		return 1e15f;
+	}
+	else if (prefix == "TERA") {
+		return 1e12f;
+	}
+	else if (prefix == "GIGA") {
+		return 1e9f;
+	}
+	else if (prefix == "MEGA") {
+		return 1e6f;
+	}
+	else if (prefix == "KILO") {
+		return 1e3f;
+	}
+	else if (prefix == "HECTO") {
+		return 1e2f;
+	}
+	else if (prefix == "DECA") {
+		return 1e-0f;
+	}
+	else if (prefix == "DECI") {
+		return 1e-1f;
+	}
+	else if (prefix == "CENTI") {
+		return 1e-2f;
+	}
+	else if (prefix == "MILLI") {
+		return 1e-3f;
+	}
+	else if (prefix == "MICRO") {
+		return 1e-6f;
+	}
+	else if (prefix == "NANO") {
+		return 1e-9f;
+	}
+	else if (prefix == "PICO") {
+		return 1e-12f;
+	}
+	else if (prefix == "FEMTO") {
+		return 1e-15f;
+	}
+	else if (prefix == "ATTO") {
+		return 1e-18f;
+	}
+	else {
+		IFCImporter::LogError("Unrecognized SI prefix: " + prefix);
+		return 1;
+	}
+}
+
+// ------------------------------------------------------------------------------------------------
+void ConvertColor(aiColor4D& out, const IfcColourRgb& in)
+{
+	out.r = in.Red;
+	out.g = in.Green;
+	out.b = in.Blue;
+	out.a = 1.f;
+}
+
+// ------------------------------------------------------------------------------------------------
+void ConvertColor(aiColor4D& out, const IfcColourOrFactor& in,ConversionData& conv,const aiColor4D* base)
+{
+	if (const EXPRESS::REAL* const r = in.ToPtr<EXPRESS::REAL>()) {
+		out.r = out.g = out.b = *r;
+		if(base) {
+			out.r *= base->r;
+			out.g *= base->g;
+			out.b *= base->b;
+			out.a = base->a;
+		}
+		else out.a = 1.0;
+	}
+	else if (const IfcColourRgb* const rgb = in.ResolveSelectPtr<IfcColourRgb>(conv.db)) {
+		ConvertColor(out,*rgb);
+	}
+	else {
+		IFCImporter::LogWarn("skipping unknown IfcColourOrFactor entity");
+	}
+}
+
+// ------------------------------------------------------------------------------------------------
+void ConvertCartesianPoint(aiVector3D& out, const IfcCartesianPoint& in)
+{
+	out = aiVector3D();
+	for(size_t i = 0; i < in.Coordinates.size(); ++i) {
+		out[i] = in.Coordinates[i];
+	}
+}
+
+// ------------------------------------------------------------------------------------------------
+void ConvertVector(aiVector3D& out, const IfcVector& in)
+{
+	ConvertDirection(out,in.Orientation);
+	out *= in.Magnitude;
+}
+
+// ------------------------------------------------------------------------------------------------
+void ConvertDirection(aiVector3D& out, const IfcDirection& in)
+{
+	out = aiVector3D();
+	for(size_t i = 0; i < in.DirectionRatios.size(); ++i) {
+		out[i] = in.DirectionRatios[i];
+	}
+	const float len = out.Length();
+	if (len<1e-6) {
+		IFCImporter::LogWarn("direction vector magnitude too small, normalization would result in a division by zero");
+		return;
+	}
+	out /= len;
+}
+
+// ------------------------------------------------------------------------------------------------
+void AssignMatrixAxes(aiMatrix4x4& out, const aiVector3D& x, const aiVector3D& y, const aiVector3D& z)
+{
+	out.a1 = x.x;
+	out.b1 = x.y;
+	out.c1 = x.z;
+
+	out.a2 = y.x;
+	out.b2 = y.y;
+	out.c2 = y.z;
+
+	out.a3 = z.x;
+	out.b3 = z.y;
+	out.c3 = z.z;
+}
+
+// ------------------------------------------------------------------------------------------------
+void ConvertAxisPlacement(aiMatrix4x4& out, const IfcAxis2Placement3D& in)
+{
+	aiVector3D loc;
+	ConvertCartesianPoint(loc,in.Location);
+
+	aiVector3D z(0.f,0.f,1.f),r(1.f,0.f,0.f),x;
+
+	if (in.Axis) { 
+		ConvertDirection(z,*in.Axis.Get());
+	}
+	if (in.RefDirection) {
+		ConvertDirection(r,*in.RefDirection.Get());
+	}
+
+	aiVector3D v = r.Normalize();
+	aiVector3D tmpx = z * (v*z);
+
+	x = (v-tmpx).Normalize();
+	aiVector3D y = (z^x);
+
+	aiMatrix4x4::Translation(loc,out);
+	AssignMatrixAxes(out,x,y,z);
+}
+
+// ------------------------------------------------------------------------------------------------
+void ConvertAxisPlacement(aiMatrix4x4& out, const IfcAxis2Placement2D& in)
+{
+	aiVector3D loc;
+	ConvertCartesianPoint(loc,in.Location);
+
+	aiVector3D x(1.f,0.f,0.f);
+	if (in.RefDirection) {
+		ConvertDirection(x,*in.RefDirection.Get());
+	}
+
+	const aiVector3D y = aiVector3D(x.y,-x.x,0.f);
+
+	aiMatrix4x4::Translation(loc,out);
+	AssignMatrixAxes(out,x,y,aiVector3D(0.f,0.f,1.f));
+}
+
+// ------------------------------------------------------------------------------------------------
+void ConvertAxisPlacement(aiVector3D& axis, aiVector3D& pos, const IfcAxis1Placement& in)
+{
+	ConvertCartesianPoint(pos,in.Location);
+	if (in.Axis) {
+		ConvertDirection(axis,in.Axis.Get());
+	}
+	else {
+		axis = aiVector3D(0.f,0.f,1.f);
+	}
+}
+
+// ------------------------------------------------------------------------------------------------
+void ConvertAxisPlacement(aiMatrix4x4& out, const IfcAxis2Placement& in, ConversionData& conv)
+{
+	if(const IfcAxis2Placement3D* pl3 = in.ResolveSelectPtr<IfcAxis2Placement3D>(conv.db)) {
+		ConvertAxisPlacement(out,*pl3);
+	}
+	else if(const IfcAxis2Placement2D* pl2 = in.ResolveSelectPtr<IfcAxis2Placement2D>(conv.db)) {
+		ConvertAxisPlacement(out,*pl2);
+	}
+	else {
+		IFCImporter::LogWarn("skipping unknown IfcAxis2Placement entity");
+	}
+}
+
+// ------------------------------------------------------------------------------------------------
+void ConvertTransformOperator(aiMatrix4x4& out, const IfcCartesianTransformationOperator& op)
+{
+	aiVector3D loc;
+	ConvertCartesianPoint(loc,op.LocalOrigin);
+
+	aiVector3D x(1.f,0.f,0.f),y(0.f,1.f,0.f),z(0.f,0.f,1.f);
+	if (op.Axis1) {
+		ConvertDirection(x,*op.Axis1.Get());
+	}
+	if (op.Axis2) {
+		ConvertDirection(y,*op.Axis2.Get());
+	}
+	if (const IfcCartesianTransformationOperator3D* op2 = op.ToPtr<IfcCartesianTransformationOperator3D>()) {
+		if(op2->Axis3) {
+			ConvertDirection(z,*op2->Axis3.Get());
+		}
+	}
+
+	aiMatrix4x4 locm;
+	aiMatrix4x4::Translation(loc,locm);	
+	AssignMatrixAxes(out,x,y,z);
+
+
+	aiVector3D vscale;
+	if (const IfcCartesianTransformationOperator3DnonUniform* nuni = op.ToPtr<IfcCartesianTransformationOperator3DnonUniform>()) {
+		vscale.x = nuni->Scale?op.Scale.Get():1.f;
+		vscale.y = nuni->Scale2?nuni->Scale2.Get():1.f;
+		vscale.z = nuni->Scale3?nuni->Scale3.Get():1.f;
+	}
+	else {
+		const float sc = op.Scale?op.Scale.Get():1.f;
+		vscale = aiVector3D(sc,sc,sc);
+	}
+
+	aiMatrix4x4 s;
+	aiMatrix4x4::Scaling(vscale,s);
+
+	out = locm * out * s;
+}
+
+} // ! IFC
+} // ! Assimp
+
+#endif

+ 298 - 0
ThirdParty/Assimp/code/IFCUtil.h

@@ -0,0 +1,298 @@
+/*
+Open Asset Import Library (ASSIMP)
+----------------------------------------------------------------------
+
+Copyright (c) 2006-2010, ASSIMP Development Team
+All rights reserved.
+
+Redistribution and use of this software in source and binary forms, 
+with or without modification, are permitted provided that the 
+following conditions are met:
+
+* Redistributions of source code must retain the above
+  copyright notice, this list of conditions and the
+  following disclaimer.
+
+* Redistributions in binary form must reproduce the above
+  copyright notice, this list of conditions and the
+  following disclaimer in the documentation and/or other
+  materials provided with the distribution.
+
+* Neither the name of the ASSIMP team, nor the names of its
+  contributors may be used to endorse or promote products
+  derived from this software without specific prior
+  written permission of the ASSIMP Development Team.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+----------------------------------------------------------------------
+*/
+
+/** @file  IFC.cpp
+ *  @brief Implementation of the Industry Foundation Classes loader.
+ */
+
+#ifndef INCLUDED_IFCUTIL_H
+#define INCLUDED_IFCUTIL_H
+
+#include "IFCReaderGen.h"
+#include "IFCLoader.h"
+
+namespace Assimp {
+namespace IFC {
+
+// helper for std::for_each to delete all heap-allocated items in a container
+template<typename T>
+struct delete_fun
+{
+	void operator()(T* del) {
+		delete del;
+	}
+};
+
+// ------------------------------------------------------------------------------------------------
+// Temporary representation of an opening in a wall or a floor
+// ------------------------------------------------------------------------------------------------
+struct TempMesh;
+struct TempOpening 
+{
+	const IFC::IfcExtrudedAreaSolid* solid;
+	aiVector3D extrusionDir;
+	boost::shared_ptr<TempMesh> profileMesh;
+
+	// ------------------------------------------------------------------------------
+	TempOpening(const IFC::IfcExtrudedAreaSolid* solid,aiVector3D extrusionDir,boost::shared_ptr<TempMesh> profileMesh)
+		: solid(solid)
+		, extrusionDir(extrusionDir)
+		, profileMesh(profileMesh)
+	{
+	}
+
+	// ------------------------------------------------------------------------------
+	void Transform(const aiMatrix4x4& mat); // defined later since TempMesh is not complete yet
+};
+
+
+// ------------------------------------------------------------------------------------------------
+// Intermediate data storage during conversion. Keeps everything and a bit more.
+// ------------------------------------------------------------------------------------------------
+struct ConversionData 
+{
+	ConversionData(const STEP::DB& db, const IFC::IfcProject& proj, aiScene* out,const IFCImporter::Settings& settings)
+		: len_scale(1.0)
+		, angle_scale(1.0)
+		, db(db)
+		, proj(proj)
+		, out(out)
+		, settings(settings)
+		, apply_openings()
+		, collect_openings()
+	{}
+
+	~ConversionData() {
+		std::for_each(meshes.begin(),meshes.end(),delete_fun<aiMesh>());
+		std::for_each(materials.begin(),materials.end(),delete_fun<aiMaterial>());
+	}
+
+	float len_scale, angle_scale;
+	bool plane_angle_in_radians;
+
+	const STEP::DB& db;
+	const IFC::IfcProject& proj;
+	aiScene* out;
+
+	aiMatrix4x4 wcs;
+	std::vector<aiMesh*> meshes;
+	std::vector<aiMaterial*> materials;
+
+	typedef std::map<const IFC::IfcRepresentationItem*, std::vector<unsigned int> > MeshCache;
+	MeshCache cached_meshes;
+
+	const IFCImporter::Settings& settings;
+
+	// Intermediate arrays used to resolve openings in walls: only one of them
+	// can be given at a time. apply_openings if present if the current element
+	// is a wall and needs its openings to be poured into its geometry while
+	// collect_openings is present only if the current element is an 
+	// IfcOpeningElement, for which all the geometry needs to be preserved
+	// for later processing by a parent, which is a wall. 
+	std::vector<TempOpening>* apply_openings;
+	std::vector<TempOpening>* collect_openings;
+};
+
+// ------------------------------------------------------------------------------------------------
+// Binary predicate to compare vectors with a given, quadratic epsilon.
+// ------------------------------------------------------------------------------------------------
+struct FuzzyVectorCompare {
+
+	FuzzyVectorCompare(float epsilon) : epsilon(epsilon) {}
+	bool operator()(const aiVector3D& a, const aiVector3D& b) {
+		return fabs((a-b).SquareLength()) < epsilon;
+	}
+
+	const float epsilon;
+};
+
+
+// ------------------------------------------------------------------------------------------------
+// Helper used during mesh construction. Aids at creating aiMesh'es out of relatively few polygons.
+// ------------------------------------------------------------------------------------------------
+struct TempMesh
+{
+	std::vector<aiVector3D> verts;
+	std::vector<unsigned int> vertcnt;
+
+	// utilities
+	aiMesh* ToMesh();
+	void Clear();
+	void Transform(const aiMatrix4x4& mat);
+	aiVector3D Center() const;
+	void Append(const TempMesh& other);
+	void RemoveAdjacentDuplicates();
+};
+
+
+
+
+
+// conversion routines for common IFC entities, implemented in IFCUtil.cpp
+void ConvertColor(aiColor4D& out, const IfcColourRgb& in);
+void ConvertColor(aiColor4D& out, const IfcColourOrFactor& in,ConversionData& conv,const aiColor4D* base);
+void ConvertCartesianPoint(aiVector3D& out, const IfcCartesianPoint& in);
+void ConvertDirection(aiVector3D& out, const IfcDirection& in);
+void ConvertVector(aiVector3D& out, const IfcVector& in);
+void AssignMatrixAxes(aiMatrix4x4& out, const aiVector3D& x, const aiVector3D& y, const aiVector3D& z);
+void ConvertAxisPlacement(aiMatrix4x4& out, const IfcAxis2Placement3D& in);
+void ConvertAxisPlacement(aiMatrix4x4& out, const IfcAxis2Placement2D& in);
+void ConvertAxisPlacement(aiVector3D& axis, aiVector3D& pos, const IFC::IfcAxis1Placement& in);
+void ConvertAxisPlacement(aiMatrix4x4& out, const IfcAxis2Placement& in, ConversionData& conv);
+void ConvertTransformOperator(aiMatrix4x4& out, const IfcCartesianTransformationOperator& op);
+bool IsTrue(const EXPRESS::BOOLEAN& in);
+float ConvertSIPrefix(const std::string& prefix);
+
+
+// IFCProfile.cpp
+bool ProcessProfile(const IfcProfileDef& prof, TempMesh& meshout, ConversionData& conv);
+
+// IFCMaterial.cpp
+unsigned int ProcessMaterials(const IFC::IfcRepresentationItem& item, ConversionData& conv);
+
+// IFCGeometry.cpp
+bool ProcessRepresentationItem(const IfcRepresentationItem& item, std::vector<unsigned int>& mesh_indices, ConversionData& conv);
+void AssignAddedMeshes(std::vector<unsigned int>& mesh_indices,aiNode* nd,ConversionData& /*conv*/);
+
+
+// IFCCurve.cpp
+
+// ------------------------------------------------------------------------------------------------
+// Custom exception for use by members of the Curve class
+// ------------------------------------------------------------------------------------------------
+class CurveError 
+{
+public:
+	CurveError(const std::string& s)
+		: s(s)
+	{
+	}
+
+	std::string s;
+};
+
+
+// ------------------------------------------------------------------------------------------------
+// Temporary representation for an arbitrary sub-class of IfcCurve. Used to sample the curves
+// to obtain a list of line segments.
+// ------------------------------------------------------------------------------------------------
+class Curve
+{
+protected:
+
+	Curve(const IfcCurve& base_entity, ConversionData& conv)
+		: base_entity(base_entity)
+		, conv(conv)
+	{}
+
+public:
+
+	typedef std::pair<float,float> ParamRange;
+
+public:
+
+	// check if a curve is closed 
+	virtual bool IsClosed() const = 0;
+
+	// evaluate the curve at the given parametric position
+	virtual aiVector3D Eval(float p) const = 0;
+
+	// try to match a point on the curve to a given parameter
+	// for self-intersecting curves, the result is not ambiguous and
+	// it is undefined which parameter is returned. 
+	virtual bool ReverseEval(const aiVector3D& val, float& paramOut) const;
+
+	// get the range of the curve (both inclusive).
+	// +inf and -inf are valid return values, the curve is not bounded in such a case.
+	virtual std::pair<float,float> GetParametricRange() const = 0;
+	float GetParametricRangeDelta() const;
+
+	// estimate the number of sample points that this curve will require
+	virtual size_t EstimateSampleCount(float start,float end) const;
+
+	// intelligently sample the curve based on the current settings
+	// and append the result to the mesh
+	virtual void SampleDiscrete(TempMesh& out,float start,float end) const;
+
+#ifdef _DEBUG
+	// check if a particular parameter value lies within the well-defined range
+	bool InRange(float) const;
+#endif 
+
+public:
+
+	static Curve* Convert(const IFC::IfcCurve&,ConversionData& conv);
+
+protected:
+
+	const IfcCurve& base_entity;
+	ConversionData& conv;
+};
+
+
+// --------------------------------------------------------------------------------
+// A BoundedCurve always holds the invariant that GetParametricRange()
+// never returns infinite values.
+// --------------------------------------------------------------------------------
+class BoundedCurve : public Curve 
+{
+public:
+
+	BoundedCurve(const IfcBoundedCurve& entity, ConversionData& conv)
+		: Curve(entity,conv)
+	{}
+
+public:
+
+	bool IsClosed() const;
+
+public:
+
+	// sample the entire curve
+	void SampleDiscrete(TempMesh& out) const;
+	using Curve::SampleDiscrete;
+};
+
+
+
+}
+}
+
+#endif 

+ 4 - 4
ThirdParty/Assimp/code/IRRLoader.cpp

@@ -52,7 +52,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
 #include "SceneCombiner.h"
 #include "SceneCombiner.h"
 #include "StandardShapes.h"
 #include "StandardShapes.h"
-
+#include "Importer.h"
 
 
 // We need boost::common_factor to compute the lcm/gcd of a number
 // We need boost::common_factor to compute the lcm/gcd of a number
 #include <boost/math/common_factor_rt.hpp>
 #include <boost/math/common_factor_rt.hpp>
@@ -243,7 +243,7 @@ void IRRImporter::CopyMaterial(std::vector<aiMaterial*>& materials,
 {
 {
 	if (inmaterials.empty())	{
 	if (inmaterials.empty())	{
 		// Do we have a default material? If not we need to create one
 		// Do we have a default material? If not we need to create one
-		if (0xffffffff == defMatIdx)
+		if (UINT_MAX == defMatIdx)
 		{
 		{
 			defMatIdx = (unsigned int)materials.size();
 			defMatIdx = (unsigned int)materials.size();
 			MaterialHelper* mat = new MaterialHelper();
 			MaterialHelper* mat = new MaterialHelper();
@@ -1073,7 +1073,7 @@ void IRRImporter::InternReadFile( const std::string& pFile,
 
 
 										// and parse its properties
 										// and parse its properties
 										key.mValue = prop.value;
 										key.mValue = prop.value;
-										key.mTime  = strtol10(&prop.name[5]);
+										key.mTime  = strtoul10(&prop.name[5]);
 									}
 									}
 								}
 								}
 								else if (curAnim->type == Animator::FLY_CIRCLE)	{
 								else if (curAnim->type == Animator::FLY_CIRCLE)	{
@@ -1397,7 +1397,7 @@ void IRRImporter::InternReadFile( const std::string& pFile,
 	/* Now process our scenegraph recursively: generate final
 	/* Now process our scenegraph recursively: generate final
 	 * meshes and generate animation channels for all nodes.
 	 * meshes and generate animation channels for all nodes.
 	 */
 	 */
-	unsigned int defMatIdx = 0xffffffff;
+	unsigned int defMatIdx = UINT_MAX;
 	GenerateGraph(root,tempScene->mRootNode, tempScene,
 	GenerateGraph(root,tempScene->mRootNode, tempScene,
 		batch, meshes, anims, attach, materials, defMatIdx);
 		batch, meshes, anims, attach, materials, defMatIdx);
 
 

+ 3 - 7
ThirdParty/Assimp/code/IRRLoader.h

@@ -61,15 +61,11 @@ namespace Assimp	{
  */
  */
 class IRRImporter : public BaseImporter, public IrrlichtBase
 class IRRImporter : public BaseImporter, public IrrlichtBase
 {
 {
-	friend class Importer;
-
-protected:
-	/** Constructor to be privately used by Importer */
+public:
 	IRRImporter();
 	IRRImporter();
-
-	/** Destructor, private as well */
 	~IRRImporter();
 	~IRRImporter();
 
 
+
 public:
 public:
 
 
 	// -------------------------------------------------------------------
 	// -------------------------------------------------------------------
@@ -279,7 +275,7 @@ private:
 	 *
 	 *
 	 *  @param materials Receives an output material
 	 *  @param materials Receives an output material
 	 *  @param inmaterials List of input materials
 	 *  @param inmaterials List of input materials
-	 *  @param defMatIdx Default material index - 0xffffffff if not there
+	 *  @param defMatIdx Default material index - UINT_MAX if not present
 	 *  @param mesh Mesh to work on
 	 *  @param mesh Mesh to work on
 	 */
 	 */
 	void CopyMaterial(std::vector<aiMaterial*>&	 materials,
 	void CopyMaterial(std::vector<aiMaterial*>&	 materials,

+ 2 - 2
ThirdParty/Assimp/code/IRRMeshLoader.cpp

@@ -320,7 +320,7 @@ void IRRMeshImporter::InternReadFile( const std::string& pFile,
 					curNormals.push_back(temp);
 					curNormals.push_back(temp);
 
 
 					// read the vertex colors
 					// read the vertex colors
-					uint32_t clr = strtol16(sz,&sz);	
+					uint32_t clr = strtoul16(sz,&sz);	
 					ColorFromARGBPacked(clr,c);
 					ColorFromARGBPacked(clr,c);
 
 
 					if (!curColors.empty() && c != *(curColors.end()-1))
 					if (!curColors.empty() && c != *(curColors.end()-1))
@@ -411,7 +411,7 @@ void IRRMeshImporter::InternReadFile( const std::string& pFile,
 						curFace->mIndices = new unsigned int[3];
 						curFace->mIndices = new unsigned int[3];
 					}
 					}
 
 
-					unsigned int idx = strtol10(sz,&sz);
+					unsigned int idx = strtoul10(sz,&sz);
 					if (idx >= curVertices.size())	{
 					if (idx >= curVertices.size())	{
 						DefaultLogger::get()->error("IRRMESH: Index out of range");
 						DefaultLogger::get()->error("IRRMESH: Index out of range");
 						idx = 0;
 						idx = 0;

이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.